Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/db The "-N" command line option means "include the t...
details: https://anonhg.NetBSD.org/src/rev/744fead623d8
branches: trunk
changeset: 777400:744fead623d8
user: apb <apb%NetBSD.org@localhost>
date: Fri Feb 17 11:37:33 2012 +0000
description:
The "-N" command line option means "include the terminating NUL byte",
so rename the corresponding flag from F_NO_NUL to F_INCLUDE_NUL to match
the behaviour.
This is the second half of the fix for PR 46035.
diffstat:
usr.bin/db/db.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diffs (54 lines):
diff -r af6a028d69b2 -r 744fead623d8 usr.bin/db/db.c
--- a/usr.bin/db/db.c Fri Feb 17 11:18:55 2012 +0000
+++ b/usr.bin/db/db.c Fri Feb 17 11:37:33 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: db.c,v 1.25 2011/09/01 13:25:02 joerg Exp $ */
+/* $NetBSD: db.c,v 1.26 2012/02/17 11:37:33 apb Exp $ */
/*-
* Copyright (c) 2002-2009 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
#include <sys/cdefs.h>
#ifndef lint
#ifdef __RCSID
-__RCSID("$NetBSD: db.c,v 1.25 2011/09/01 13:25:02 joerg Exp $");
+__RCSID("$NetBSD: db.c,v 1.26 2012/02/17 11:37:33 apb Exp $");
#endif /* __RCSID */
#endif /* not lint */
@@ -61,7 +61,7 @@
F_IGNORECASE = 1<<11,
F_ENDIAN_BIG = 1<<12,
F_ENDIAN_LITTLE = 1<<13,
- F_NO_NUL = 1<<14,
+ F_INCLUDE_NUL = 1<<14,
F_CREATENEW = 1<<20,
F_DUPLICATES = 1<<21,
F_REPLACE = 1<<22,
@@ -184,7 +184,7 @@
break;
case 'N':
- flags |= F_NO_NUL;
+ flags |= F_INCLUDE_NUL;
break;
case 'O':
@@ -383,7 +383,7 @@
int len;
char *data;
-#define MINUSNUL(x) ((x) > 0 ? (x) - (flags & F_NO_NUL ? 0 : 1) : 0)
+#define MINUSNUL(x) ((x) > 0 ? (x) - (flags & F_INCLUDE_NUL ? 0 : 1) : 0)
if (flags & F_SHOW_KEY) {
if (flags & F_ENCODE_KEY) {
@@ -438,7 +438,7 @@
ks = keystr;
}
key->data = ks;
- key->size = klen + (flags & F_NO_NUL ? 0 : 1);
+ key->size = klen + (flags & F_INCLUDE_NUL ? 0 : 1);
if (downcase && (flags & F_IGNORECASE)) {
for (p = ks; *p; p++)
if (isupper((int)*p))
Home |
Main Index |
Thread Index |
Old Index