* University of Maryland at College Park
*/
/*
- * $Id: amindex.c,v 1.15.2.1 2006/11/24 18:05:05 martinea Exp $
+ * $Id: amindex.c,v 1.15 2006/05/25 01:47:19 johnfranks Exp $
*
* index control
*/
datebuf[SIZEOF(datebuf)-1] = '\0';
dc = datebuf;
- snprintf(level_str, SIZEOF(level_str), "%d", level);
+ g_snprintf(level_str, SIZEOF(level_str), "%d", level);
}
host = sanitise_filename(host);
disk = sanitise_filename(disk);
}
- conf_indexdir = getconf_str(CNF_INDEXDIR);
- if (*conf_indexdir == '/') {
- conf_indexdir = stralloc(conf_indexdir);
- } else {
- conf_indexdir = stralloc2(config_dir, conf_indexdir);
- }
+ conf_indexdir = config_dir_relative(getconf_str(CNF_INDEXDIR));
/*
* Note: vstralloc() will stop at the first NULL, which might be
* "disk" or "dc" (datebuf) rather than the full file name.
datebuf[SIZEOF(datebuf)-1] = '\0';
dc = datebuf;
- snprintf(level_str, SIZEOF(level_str), "%d", level);
+ g_snprintf(level_str, SIZEOF(level_str), "%d", level);
}
host = old_sanitise_filename(host);
disk = old_sanitise_filename(disk);
}
- conf_indexdir = getconf_str(CNF_INDEXDIR);
- if (*conf_indexdir == '/') {
- conf_indexdir = stralloc(conf_indexdir);
- } else {
- conf_indexdir = stralloc2(config_dir, conf_indexdir);
- }
+ conf_indexdir = config_dir_relative(getconf_str(CNF_INDEXDIR));
/*
* Note: vstralloc() will stop at the first NULL, which might be
* "disk" or "dc" (datebuf) rather than the full file name.