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.
This set of routines allows the user to "dump" all the aliases that exist in the database. It returns both the user defined aliases and those defined by the system (e.g.: "?include library"). It returns only the aliases names---to find out what their expansions are use Show_Alias() . For example
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.
If an alias search is in progress and an alias becomes undefined (via UnDefine_Alias() ), it will not be returned by subsequent calls to Find_Alias() . If an alias is added, it will not be returned until the next alias search is begun.
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. |
No additional details. See Begin_Alias_Search()
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. |
No additional details. See Begin_Alias_Search()
void End_Alias_Search | ( | void | ) |
Terminates the alias search sequence and frees any involved memory.
No additional details. See Begin_Alias_Search()