Functions | |
void | Begin_Glyph_Search (void) |
These routines recall all the defined glyph names. More... | |
void | End_Glyph_Search (void) |
Terminates the glyph search sequence and frees any involved memory. More... | |
HC_BOOLEAN | Find_Glyph (char *name) |
Retrieves the glyph names, one at a time. The function returns false when all glyphs have been returned. More... | |
void | Show_Glyph_Count (int *count) |
Finds out how many glyphs will be returned. This is useful for determining the size of a data structure needed to store incoming items. More... | |
void Begin_Glyph_Search | ( | void | ) |
These routines recall all the defined glyph names.
These routines are used to find all of the glyph definitions that exist in the database. For example,
Begin_Glyph_Search () while (Find_Glyph (the_name)) Show_Glyph(the_name, definition) End_Glyph_Search ()
retrieves all the known names, in the style in which they were originally defined. If you need to know how many glyph definitions will be returned (possibly for allocating a data structure to hold them) call Show_Glyph_Count() after initiating the search.
Find_Glyph() returns the names (one at a time). The function returns false when all glyph names have been returned.
End_Glyph_Search() terminates the process and frees any involved memory. This last step can be done any time after the initial call to Begin_Glyph_Search().
If you want to examine the glyph name definitions, call Show_Glyph() on the results of Find_Glyph() .
After calling Begin_Glyph_Search() , if a glyph becomes undefined (via UnDefine_Glyph() ), subsequent calls to Find_Glyph() will not return it. If a glyph is redefined, the new definition will be returned. If a new glyph is defined, it will not be returned in this search sequence.
Show_Glyph_Count() is only valid between Begin_Glyph_Search() and End_Glyph_Search() . It will always return the total number of glyphs defined as opposed to the remaining number of glyph definitions.
Glyph name searches can be nested. A user program can call Begin_Glyph_Search() and look at the defined glyph names without interfering with a glyph name search that might already have been activated by another portion of the program. When End_Glyph_Search() is called, the previously active glyph name search (if any) becomes current.
void End_Glyph_Search | ( | void | ) |
Terminates the glyph search sequence and frees any involved memory.
No additional details. See Begin_Glyph_Search()
HC_BOOLEAN Find_Glyph | ( | char * | name | ) |
Retrieves the glyph names, one at a time. The function returns false when all glyphs have been returned.
name | - Simple name from the list of definitions. Returned to user. Passed by reference always. |
No additional details. See Begin_Glyph_Search()
void Show_Glyph_Count | ( | int * | count | ) |
Finds out how many glyphs will be returned. This is useful for determining the size of a data structure needed to store incoming items.
count | - The total number of glyph names returned by Find_Glyph() . Returned to user. Passed by reference always. |
No additional details. See Begin_Glyph_Search()