From: Jonathan Tan Date: Tue, 30 May 2023 17:29:33 GMT Subject: Re: [PATCH v2 3/7] sane-ctype.h: move sane-ctype macros from git-compat-util.h Message-ID: <20230530172933.2781693-1-jonathantanmy@google.com> In-Reply-To: <4d29e5d4-6ce3-c099-15a7-e89ad787780d@gmail.com> Phillip Wood writes: > > Any specific reason for the "sane-" prefix? I think it would make more > > sense if it was just named ctype.h: see below. > > I don't have a strong opinion either way but "sane-ctype.h" makes it > clearer why we're doing something different to the standard library. Ah...that's true. > >> -extern const signed char hexval_table[256]; > > > > And this one has nothing to do with ctypes or sanity, but rather, what's > > considered to be a hex character. I think we need another patch to move > > this to hex.h. > > Isn't "what's considered to be a hex character" related to ctypes and > sanity though as it is used by the "sane" definition of isxdigit(). > > >> -#define isxdigit(x) (hexval_table[(unsigned char)(x)] != -1) > > > > Same for this one. > > I'd much rather keep all of our "sane" ctype replacements in one place > as Calvin is proposing. isxdigit() is defined in so it should > be in our "sane" version of that header. Good point.