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

 

ini_dyn_refresh

#include "sflini.h"
Bool
ini_dyn_refresh (
    SYMTAB *symtab)

Synopsis

Refreshes a symbol table created by ini dyn load(). If the original file (as specified by the 'filename' symbol) has been modified, reloads the whole ini file. You would typically call this function at regular intervals to permit automatic reloading of an ini file in an application. Returns TRUE if the ini file was actually reloaded, or FALSE if the file had not changed or could not be accessed, or if the symbol table was incorrectly created. If the symbol table is reloaded from the ini file, all previous symbols are deleted.

Source Code - (sflini.c)

{
    char
        *filename;

    ASSERT (symtab);
    if (ini dyn changed (symtab))
      {
        filename = mem_strdup (sym get value (symtab, "filename", NULL));
        sym empty table (symtab);       /*  Delete previous table contents   */
        ini dyn load (symtab, filename);
        mem_free (filename);
        return (TRUE);
      }
    return (FALSE);
}

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