Read a string parameter from a configuration file
#include <photon/PxProto.h>
int PxConfigReadString( const char *section,
const char *entry,
char *dflt,
char *value,
short maxlen );
PxConfigReadString() reads a string parameter from the specified section and entry of the configuration file. If section is NULL, the function reads the value from entry in the current section.
PxConfigReadString() copies a maximum of (maxlen-1) characters (with a '\0' terminator appended) in the string into the buffer at address value. If the required section or entry doesn't exist, the first (maxlen-1) characters of the default string dflt are copied into the buffer at address value (with a '\0' terminator appended).
Pt_TRUE if the required section/entry exists, otherwise Pt_FALSE.
Photon
| Safety: | |
|---|---|
| Interrupt handler | No |
| Signal handler | No |
| Thread | No |
PxConfigOpen(), PxConfigReadBool(), PxConfigReadChar(), PxConfigReadInt(), PxConfigReadLong(), PxConfigReadShort(), PxConfigWriteBool(), PxConfigWriteChar(), PxConfigWriteInt(), PxConfigWriteLong(), PxConfigWriteShort(), PxConfigWriteString()