| iMatix home page
| << | < | > | >>
SFL Logo SFL
Version 2.11

 

ini_dyn_value

#include "sflini.h"
char *
ini_dyn_value (
    SYMTAB *symtab,
    const char *section,
    const char *keyword,
    const char *default_value)

Synopsis

Finds a section:keyword in the symbol table and returns a pointer to its value. Returns the default value if the symbol is not defined in the table. The default value may be NULL. The specified section and keyword can be in any case; they are converted internally to lowercase to match the symbol table. If the keyword is empty or NULL, no ':keyword' is appended to the section name.

Source Code - (sflini.c)

{
    ASSERT (section);
    if (keyword && *keyword)
        snprintf (ini_keyword, sizeof (ini_keyword), "%s:%s", section, keyword);
    else
        strncpy  (ini_keyword, section, sizeof (ini_keyword));

    strlwc (ini_keyword);
    return (sym get value (symtab, ini_keyword, default_value));
}

| << | < | > | >> iMatix Copyright © 1996-2000 iMatix Corporation