A name in the SGML standard may contain `.' and `-'. A name in LLgen and C consists only of letters and underscores. So a SGML-name must be converted; every `.' is replaced by `a' and every `-' is replaced by `z'. This gives no conflicts with existing SGML-names because those are in uppercase. The function cstring() converts a string, so that all occurrences of `"' and `\\' are escaped by `\\'. All newlines are converted to `\\n'.
The value of hash_string() is calculated by adding the characters together. streq() returns TRUE if s1 equals s2 and FALSE otherwise. strsave() creates a new string and copies the content of s into the new string.
to_upper() converts a string to uppercase, only the letters are changed, underscores, digits etc, remain the same. to_lower() converts a string to lowercase, only the letters are affected. check_int() checks if key is in the list key1 ... key15. If so TRUE is returned, otherwise FALSE. Not all arguments are needed. The first key[1..15] that equals 0 is assumed to be the end of the list.
MALLOC() and CALLOC() return a pointer to a piece of memory. If the memory can not be found an error is returned. FREE() and CFREE() free the allocated memory.