3 ms·
From what I remember when trying to understand what was going on, it was a really convoluted, pre-computed array where the parameter to each ctype function was
by bhaak 11y ago
From what I remember when trying to understand what was going on, it was a really convoluted, pre-computed array where the parameter to each ctype function was used as an index.
My guess to why they did it this way was that it was an optimization and/or possible support for different locales.
Even though it's undefined behavior, considering that other libc implementations don't have this issue, making a simple function like isblank so complicated that it may crash, makes you wonder what other abominations lurk in that code.