In addition to having Vermont Views automatically handle the loading of keyworded sections, you can read and clear sections yourself by specifying manual loading for the desired keyworded sections and then using the functions mf_kwdload() and mf_kwdunload().
To do manual loading with any section, append to the keyword a comma followed by an 'M' (for manual loading). When mf_rd() encounters ",M" at the end of a keyword, the keyword text is loaded into the memory file just as an automatic keyworded section. The keyword line is read in and an index is associated with that keyword.
To load a manual section of the text file into memory, use mf_kwdload():
|
||
|
|
|
|
|
|
You can read in multiple keywords with the same beginning characters. Placing a comma at the end of the keyword string means to read in only the section that is specified. If no comma is specified, then all sections starting with the specified strings are read in. Consider the text file below:
|
Calling mf_kwdload("*FM", mfp) loads all of these sections since they all start with FM. Calling mf_kwdload("*FM_", mfp) loads only the two starting with FM_. Calling mf_kwdload("*FM,", mfp) loads only the first section.
To remove sections from the memory, call mf_kwdunload():
|
||
|
|
|
|
|
|
Multiple sections can be removed using the same conventions as used for mf_kwdload().