Esempio n. 1
0
int main(int argc, char *argv[]) {

	struct cconf *config;
	char configfile[4096];

	snprintf(configfile, sizeof(configfile), "%s/%s",
		env_get_dir(), "config");

	config = cconf_read(configfile);
	if (!config) {
		perror(configfile);
		return 1;
	}

	/* open process cache and download history. */
	if (proc_cache_open() < 0 || dlhist_open() < 0)
		return 1;

	process(config);

	proc_cache_close();
	dlhist_close();
	cconf_free(config);

	return 0;
}
Esempio n. 2
0
int cmd_dlhist(int argc, char **argv) {

	if (dlhist_open() < 0)
		return 1;

	dlhist_print();

	dlhist_close();

	return 0;
}