Testing some code, including term.h , I saw some strange bugs using regular identifiers like tab or columns . This is because this header defines many macros. Here are some examples:
#define columns CUR Numbers[0] #define lines CUR Numbers[2] #define bell CUR Strings[1] #define insert_line CUR Strings[53] #define tab CUR Strings[134]
However, I did not find any documentation about these macro constants. These seem to be shortcuts to access some members of the TERMINAL data structure. Of course, the solution is to #undef each identifier used in the source code. But it is very restrictive.
So my question is: why not the term.h identifier term.h ?
They are often used as local variables in real source code, so this leads to incomprehensible errors.
source share