lex_error
- Emit an error message.
dupstr
- The C89 standard does not define a dupstr() in the C library,
so define our own dupstr.
Function names beginning with "str" are reserved (I think),
so make it dupstr,
as that is what it does: duplicate a string.
init_global_state
- create and initialize a global_state structure,
containing all 'global' variables that are needed during the scanning.
destroy_global_state
- free all memory of the global state structure.
main
- Entry point of the heredoc pre-processor.