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

PxConfigReadString()

Read a string parameter from a configuration file

Synopsis:

#include <photon/PxProto.h>

int PxConfigReadString( const char *section, 
                        const char *entry, 
                        char *dflt, 
                        char *value, 
                        short maxlen );

Description:

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).

Returns:

Pt_TRUE if the required section/entry exists, otherwise Pt_FALSE.

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

PxConfigOpen(), PxConfigReadBool(), PxConfigReadChar(), PxConfigReadInt(), PxConfigReadLong(), PxConfigReadShort(), PxConfigWriteBool(), PxConfigWriteChar(), PxConfigWriteInt(), PxConfigWriteLong(), PxConfigWriteShort(), PxConfigWriteString()


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