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


Read a long integer parameter from a configuration file


#include <photon/PxProto.h>

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


PxConfigReadLong() reads a long 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 long, 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(), PxConfigReadInt(), PxConfigReadShort(), PxConfigReadString(), PxConfigWriteBool(), PxConfigWriteChar(), PxConfigWriteInt(), PxConfigWriteLong(), PxConfigWriteShort(), PxConfigWriteString()

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