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.
Showing
Please register or sign in to comment