Get the next entry in the current section
#include <photon/PxProto.h>
const char *PxConfigNextString( char *value,
short maxlen );
This function returns the next entry in the current section as a string. A pointer to the entry name is returned, and its configuration value (up to a maximum of maxlen-1 characters) is copied as a string into the buffer at address value. This may be used to process a configuration section consisting of unknown entries, but where each entry is to be processed in a similar fashion.
A string containing the next entry name within the current section if one exists, NULL otherwise.
![]() |
|
char *env, val[128];
if (PxConfigSection("Environment") != NULL)
while ((env = PxConfigNextString(val, sizeof(val))) != NULL)
setenv(env, val, ~0);
Photon
| Safety: | |
|---|---|
| Interrupt handler | No |
| Signal handler | No |
| Thread | No |
PxConfigNextSection(), PxConfigOpen(), PxConfigSection()