Functions | |
void | Begin_Alias_Search (void) |
void | Show_Alias_Count (int *count) |
HC_BOOLEAN | Find_Alias (char *alias) |
void | End_Alias_Search (void) |
void Begin_Alias_Search | ( | void | ) |
These routines recall the name of each alias.
Begin_Alias_Search () while (Find_Alias (alias)) { Show_Alias (alias, def) print (alias, def) } End_Alias_Search ()
prints all the known aliases names and their definitions. Begin_Alias_Search() initiates the search for each alias name.
Show_Alias_Count() finds out how many aliases will be returned. This is useful for determining the size of a data structure needed to store incoming items.
Find_Alias() retrieves the alias names, one at a time. The function returns false when all aliases have been returned.
End_Alias_Search() terminates the sequence and frees any involved memory.
Show_Alias_Count() is only valid between Begin_Alias_Search() and End_Alias_Search() . It will always return the total number of aliases defined not the remaining number of aliases.
Alias searches can be nested. Auser program can call Begin_Alias_Search() and look at the defined aliases without interfering with an alias search, which might have been activated by another portion of the program. When End_Alias_Search() is called, the previously active alias search (if any) becomes current.
void Show_Alias_Count | ( | int * | count | ) |
Finds out how many aliases will be returned. This is useful for determining the size of a data structure needed to store incoming items.
count | - The total number of aliases names returned by Find_Alias() . Returned to user. Passed by reference always. |
HC_BOOLEAN Find_Alias | ( | char * | alias | ) |
Retrieves the alias names, one at a time. The function returns false when all aliases have been returned.
alias | - One alias name. Returned to user. Passed by reference always. |
void End_Alias_Search | ( | void | ) |
Terminates the alias search sequence and frees any involved memory.