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


Read an integer parameter from a configuration file


#include <photon/PxProto.h>

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


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.


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



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]