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

PxConfigReadShort()

Read a short integer parameter from a configuration file

Synopsis:

#include <photon/PxProto.h>

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

Description:

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.

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


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