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

PxConfigReadInt()

Read an integer parameter from a configuration file

Synopsis:

#include <photon/PxProto.h>

int PxConfigReadInt( const char *section, 
                     const char *entry, 
                     int dflt, 
                     int *value );

Description:

PxConfigReadInt() reads an integer parameter from the specified section and entry of the configuration file and stores it in *value.

If section is NULL, the function reads the value from entry in the current section. If the required section or entry doesn't exist, the default value is stored in *value.

The value can be signed. The characters after the sign determine the base:

Character(s): Base:
0x or 0X Hexadecimal
0 Octal
Other digits Decimal

If the entry doesn't contain a valid int, the default value dflt is stored in *value.

Returns:

Pt_TRUE if the required section/entry exists and the given value is valid, otherwise Pt_FALSE.

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

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


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