Lhogho
0.0.027
|
Lhogho supports two types of word atoms - real words and subwords.
Word atoms contain a string of characters (if UNICODE in globals.h is defined the characters are stored as wchar_t
, otherwise as char
). The characters in the string are kept outside the atom in a memory allocated by malloc. The length of the word (in characters) is 24 bits, so the maximal length of a word is 16777215 (approx. 16.8 million) characters.
Use IS_WORD() macro to check whether the atom is word, LENGTH() to get its length and STRING() to aceess word's characters. Use IDLENGTH() to set the length and the ID
at the same time.
Subword atoms contain a description of a substring of the string in another word atom. The substring must be considered not null-terminated.
Use IS_SUBWORD() macro to check whether the atom is subword. LENGTH(), STRING() and IDLENGTH() as the same as with words. Use WORD() to get the hosting word of the subword.