]> code.delx.au - gnu-emacs/commit
Cleanup etags.c to use locale-independent code
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 23 May 2015 22:18:12 +0000 (15:18 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 23 May 2015 22:19:02 +0000 (15:19 -0700)
commitfb11a5e11769a7ca909bf5a7798f9e7193fabb13
tree3ea9e8c9077a3bf82bedfbcbc8de601930b0c8d8
parentfa658b2e9075f6990e52c2f08a70586c87e98d22
Cleanup etags.c to use locale-independent code

Although this doesn't alter behavior (as etags doesn't use
setlocale), the new version is more clearly locale-independent and
the executable is a bit smaller on my platform.
* lib-src/etags.c: Include <limits.h>, for UCHAR_MAX.
Include <c-ctype.h> instead of <ctype.h>.
(CHARS, CHAR, init, _wht, _nin, _itk, _btk, _etk, white, nonam, endtk)
(begtk, midtk):
Remove; no longer needed.
(iswhite, ISALNUM, ISALPHA, ISDIGIT, ISLOWER, lowcase): Remove.
All callers changed to use c_isspace, c_isalnum, c_isalpha, c_isdigit,
c_islower, c_tolower, respectively.
(notinname, begtoken, intoken, endtoken): Rewrite as functions
instead of macros, and initialize the tables at compile-time
rather than at run-time.
lib-src/etags.c