symchar

This function adds the string c to the symbol table if it is not already defined. This uses a copy of c rather than c itself. c must be a NULL terminated string. allocation/deallocation of c is the users responsibility. The symchar pointer returned should never be freed by the user.

Assumptions that must be satisfied before calling: Symbol table initialized and c is a null terminated string.

Assumptions valid after calling: The value of c has been added to the symbol table and the symbol table is not changed in any other way. The symchar * returned will be the same for the life of the ASCEND process.

Any size string can be stored in this table, though it's a bad idea to store very large ones. Strings below MAXIMUM_STRING_LENGTH we store efficiently.

*permanentstring = AddSymbol(c);


Generated on Thu Jul 17 04:00:09 2008 for libascend by  doxygen 1.5.1