Example #1
0
/* Verify that none of the databases has changed since the last call.
 * Don't check until after first initialize.
 * Returns TRUE if any changes, else FALSE.
 */
int             database_has_changed (void)
{
    char            fnamebuf[256];
    DBLK           *db;

    if (OE_sitecnfg_mtime == 0L)
	return FALSE;
    if (file_has_changed (OE_sitecnfg_fname, OE_sitecnfg_mtime))
	return TRUE;
    for (db = usrblk.dblist; db != NULL; db = db->link) {
	sprintf (fnamebuf, "%s%s" EXT_DTBS, db->path, db->name);
	if (file_has_changed (fnamebuf, db->iimtime))
	    return TRUE;
    }
    return FALSE;
}  /* database_has_changed() */
Example #2
0
Bool
ini_dyn_changed (
    SYMTAB *symtab)
{
    char
        *filename;

    ASSERT (symtab);

    /*  Date, time, and name of original ini file are in the table           */
    filename = sym_get_value (symtab, "filename", NULL);
    if (filename
    &&  file_has_changed (filename,
                          sym_get_number (symtab, "filedate", 0),
                          sym_get_number (symtab, "filetime", 0)))
        return (TRUE);
    else
        return (FALSE);
}