[Previous] [Contents] [Index] [Next]

PxConfigNextSection()

Seek the beginning of the next section of a configuration file

Synopsis:

#include <photon/PxProto.h>

const char *PxConfigNextSection( void );

Description:

Seek the start of the next section, and return the name of this section; this section is made the internal current section. This may be used to process a configuration file consisting of unknown sections, but where each section has known entries.

Returns:

A string containing the next section name if one exists, NULL otherwise


Note: This string is a shared static character array that will be overwritten by subsequent calls to PxConfigSection() or PxConfigNextSection().

Examples:

    char *section;
    while ((section = PxConfigNextSection()) != NULL) {
        PxConfigReadShort(NULL, "Size", 0, &recsize);
        PxConfigReadShort(NULL, "Max", 0, &maxrecs);
    }

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

PxConfigNextString(), PxConfigOpen(), PxConfigSection()


[Previous] [Contents] [Index] [Next]