summaryrefslogtreecommitdiff
path: root/src/searchutils.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2016-12-23 08:04:13 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2016-12-23 17:22:54 -0800
commit3cec0670866aaffbd4506ad934029f21983c99b9 (patch)
tree01ccd0601ba0ee93a6edd2f549d8fcc895badebc /src/searchutils.c
parent290ca116c9172d97b2b026951fac722d3bd3ced9 (diff)
downloadgrep-3cec0670866aaffbd4506ad934029f21983c99b9.tar.gz
maint: rewrite to avoid some macros
These days, the dangerous powers of C macros are not needed if constants or functions will do just as well. * src/grep.c (SEP_CHAR_SELECTED, SEP_CHAR_REJECTED, SEP_STR_GROUP) (INITIAL_BUFSIZE): * src/kwset.c (DEPTH_SIZE): Now constants, not macros. * src/kwset.c (link): Remove macro. Instead, rename local vars from 'link' to 'cur'. (malloc) [GREP]: Remove macro. All uses of malloc changed to xmalloc. Omit double-inclusion of xalloc.h. Do not depend on 'GREP'. (U): Now a function, not a macro. * src/kwset.c, src/searchutils.c (NCHAR): Move this macro to ... * src/system.h: ... here, and make it a constant.
Diffstat (limited to 'src/searchutils.c')
-rw-r--r--src/searchutils.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/searchutils.c b/src/searchutils.c
index 73d6c1c7..deaab609 100644
--- a/src/searchutils.c
+++ b/src/searchutils.c
@@ -22,8 +22,6 @@
#define SYSTEM_INLINE _GL_EXTERN_INLINE
#include "search.h"
-#define NCHAR (UCHAR_MAX + 1)
-
kwset_t
kwsinit (bool mb_trans)
{