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


Read a short integer parameter from a configuration file


#include <photon/PxProto.h>

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


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

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