#define LOBYTE 0377
#define STRIP 0177
#define QUOTE 0200
I can deal with preprocessor abuse but octal crosses the line...Also, in case anybody would have the bad idea to take inspiration from that code, don't do that:
#define MAX(a,b) ((a)>(b)?(a):(b))
It evaluates the macro parameters twice.Although, on second thought, don't do anything like that code anyway.
I thought permissions were given in octal just because they're groups of 3 bits (owner/group/other) so it aligns with octal correctly.
#define TRUE (-1)
#define FALSE 0
instead of #define TRUE (1==1)
#define FALSE !TRUE
edit: re-formattingThen again, for short academic programs it probably won't cause that much confusion, having running code is more a side-effect of that, so it's a bit like executable pseudocode.
It does make me wonder what's the biggest program out there that's been written with heavy preprocessor abuse. Then again, not sure whether I'd really wanna know…