Macros and functions to help memory allocation.
The type used to represent a letter.
Definition words.h:33
short num
The subscript (must be either -1 or positive).
Definition words.h:35
uchar lab
The ASCII character.
Definition words.h:34
The type used to represent a word.
Definition words.h:143
letter * array
Array of letters.
Definition words.h:144
uint right
Index following the righmost letter (when nonempty).
Definition words.h:147
uint size_array
Size of the array of letters.
Definition words.h:145
uint left
Index of the leftmost letter (when nonempty).
Definition words.h:146
bool empty
Boolean indicating whether the word is empty.
Definition words.h:148
letter rigpull_word(word *)
Removes the rightmost letter of a word.
Definition words.c:320
letter lefread_word(const word *, uint)
Reads a letter inside a word without removing it: left-right version.
Definition words.c:246
void delete_word(word *)
Release of a word.
Definition words.c:221
int sprint_letter_utf8(letter, char *)
Prints a letter in a given char array: UTF8 version for the subscripts.
Definition words.c:29
uint fprint_letter_utf8(letter, FILE *)
Displays a letter on a given stream: UTF8 version for the subscripts.
Definition words.c:11
word * create_empty_word(void)
Creation of an empty word.
Definition words.c:209
bool isempty_word(const word *)
Tests whether a word is empty.
Definition words.c:230
void lefcon_word(letter, word *)
Concatenates a letter to the left of a word.
Definition words.c:271
letter * get_alphabet_word(const word *, uint *)
Computes the set of letters occuring inside a word.
Definition words.c:374
void concatenate_word(word *, const word *)
Concatenates two words into the left one.
Definition words.c:338
void rigcon_word(letter, word *)
Concatenates a letter to the right of a word.
Definition words.c:286
uint letter_index(letter l, const letter *alphabet, uint size_alphabet)
Retrieves the index of a letter in an alphabet (sorted array of letters.
Definition words.c:136
letter lefpull_word(word *)
Removes the leftmost letter of a word.
Definition words.c:302
letter * duplicate_alphabet(const letter *, uint)
Creates a copy of an array of letters.
Definition words.c:127
letter rigread_word(const word *, uint)
Reads a letter inside a word without removing it: right-left version.
Definition words.c:254
void fprint_letter_latex(letter, FILE *, bool)
Displays a letter on a given stream: latex version for the subscripts.
Definition words.c:85
void display_word(const word *, FILE *)
Dislpays a word on a given stream (UTF8 is used for the subscripts of letters).
Definition words.c:345
uint size_word(const word *)
Computes the length of a word.
Definition words.c:233
void fprint_letter_gviz(letter, FILE *, bool)
Displays a letter on a given stream: graphviz version for the subscript.
Definition words.c:58
int compare_letters(const void *, const void *)
Comparison of two letters for sorting algorithms.
Definition words.c:106
uint length_letter_utf8(letter)
Computes the length of a letter when displayed in UTF8, including the subscript.
Definition words.c:4