Seek the start of a given section in a configuration file
#include <photon/PxProto.h> int PxConfigSection( const char *section ); int PxConfigSectionCx(PxCfgContext_t *cx, char const *section);
Section names must be an exact match—they must not be abbreviated and the match is case-sensitive. If there is more than one section with the same name, these functions seek to the first matched section in the file. Use PxConfigNextSection*() to find subsequent sections with the same name. |
phexlib
These functions seek to the start of the requested section, and return an indication of whether the section exists within the configuration file. These functions may be used to conditionally process an optional section block. Photon also uses it internally to locate a configuration entry; the section is made the internal current section.
If the requested section can't be found, the file pointer and current section remain untouched, and the function returns Pt_FALSE.
Pt_TRUE if the requested section exists, Pt_FALSE otherwise
Photon
Safety: | |
---|---|
Interrupt handler | No |
Signal handler | No |
Thread | No |
PxConfigDeleteSection*(), PxConfigFirstSection*(), PxConfigForceEmptySection*(), PxConfigNextEntry*(), PxConfigNextSection*(), PxConfigNextString*(), PxConfigOpen*()