www.beck-ipc.com

@CHIP-RTOS C Library - BIOS API


BIOS_Get_Ini_String

Get an entry from CHIP.INI.

int BIOS_Get_Ini_String ( const char far *section,
                          const char far *item_name,
                          char far *item_text,
                          unsigned int max_len );

Parameters

section

Pointer to section string (max. 40 chars)

item_name

Pointer to item name (max. 40 chars)

item_text

Output parameter:  Pointer to where up to max_len characters of item text will be written, plus a terminating nil character.

max_len

Maximum characters to output to item_text , not including terminating nil character.

Caution:    Buffer at item_text must be max_len + 1 size.

Return Value

0:  Entry not found
>0 :  Length of the string found
-1 :  CHIP.INI file not found

Comments

This API is thread safe and reentrant.   This function will fail (returns -1) if insufficient system heap memory is available to momentarily hold the contents of the CHIP.INI file.

Example usage:

            
// Declare an output buffer to receive the item's text
unsigned char item_text[100] ;

unsigned int text_length =
BIOS_Get_Ini_String("MY_SECTION", "MY_ITEM",item_text, sizeof(item_text)-1);

See Also

RTOS API

This library function invokes a RTOS software interrupt.   Refer to this RTOS API function's documentation for more details.

Supported since or modified in @CHIP-RTOS version

    SC12SC13SC11SC1x3SC2x
    V1.00V1.00V1.00V0.90V1.00

This API List
List of C Libraries
@CHIP-RTOS Main Index


End of document