Signal EOF in mac osx terminal

By default, macOS (formerly OS X and Mac OS X) software recognizes EOF when Control-D is pressed at the beginning of a line. (I believe this behavior is similar for other versions of Unix as well.) In detail, the actual operation is that, when Control-D is pressed, all bytes in the terminal’s input buffer are … Read more

What are the applications of the ## preprocessor operator and gotchas to consider?

One thing to be aware of when you’re using the token-paste (‘##‘) or stringizing (‘#‘) preprocessing operators is that you have to use an extra level of indirection for them to work properly in all cases. If you don’t do this and the items passed to the token-pasting operator are macros themselves, you’ll get results … Read more