From: thib Date: Tue, 15 May 2001 00:42:05 +0000 (+0000) Subject: before loading a header file, check if it has already been loaded X-Git-Tag: ver1564~280 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=db99ba4b85210451fa0bd18d2b802c72e14bc08c;p=fcron before loading a header file, check if it has already been loaded --- diff --git a/allow.h b/allow.h index f652d50..a3986f1 100644 --- a/allow.h +++ b/allow.h @@ -21,8 +21,12 @@ * `LICENSE' that comes with the fcron source distribution. */ - /* $Id: allow.h,v 1.1 2001-04-29 22:24:55 thib Exp $ */ + /* $Id: allow.h,v 1.2 2001-05-15 00:51:55 thib Exp $ */ +#ifndef __ALLOW_H__ +#define __ALLOW_H__ /* functions prototypes */ extern int is_allowed(char *user); + +#endif /* __ALLOW_H__ */ diff --git a/database.h b/database.h index cd3e87c..265fa46 100644 --- a/database.h +++ b/database.h @@ -21,8 +21,10 @@ * `LICENSE' that comes with the fcron source distribution. */ - /* $Id: database.h,v 1.1 2001-04-29 22:22:50 thib Exp $ */ + /* $Id: database.h,v 1.2 2001-05-15 00:48:58 thib Exp $ */ +#ifndef __DATABASE_H__ +#define __DATABASE_H__ /* functions prototypes */ extern void test_jobs(void); @@ -31,9 +33,15 @@ extern void wait_all(int *counter); extern time_t time_to_sleep(time_t lim); extern time_t check_lavg(time_t lim); extern void set_next_exe(CL *line, char option); +#define NO_GOTO 1 /* set_next_exe() : no goto_non_matching() */ +#define NO_GOTO_LOG 2 /* set_next_exe() : NO_GOTO but also log nextexe time */ extern void set_next_exe_notrun(CL *line, char context); +#define LAVG 1 /* set_next_exe_notrun() : context */ +#define SYSDOWN 2 /* set_next_exe_notrun() : context */ extern void mail_notrun(CL *line, char context, struct tm *since); extern void insert_nextexe(CL *line); extern void add_serial_job(CL *line); extern void add_lavg_job(CL *line); extern void run_serial_job(void); + +#endif /* __DATABASE_H__ */ diff --git a/fileconf.h b/fileconf.h index e69de29..2277a84 100644 --- a/fileconf.h +++ b/fileconf.h @@ -0,0 +1,34 @@ +/* + * FCRON - periodic command scheduler + * + * Copyright 2000-2001 Thibault Godouet + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * The GNU General Public License can also be found in the file + * `LICENSE' that comes with the fcron source distribution. + */ + + /* $Id: fileconf.h,v 1.2 2001-05-15 00:45:45 thib Exp $ */ + +#ifndef __FILECONF_H__ +#define __FILECONF_H__ + +/* functions prototypes */ +extern int read_file(char *filename, char *user); +extern void delete_file(const char *user_name); +extern int save_file(char *path); + +#endif /* __FILECONF_H__ */ diff --git a/job.h b/job.h index 10617da..61e73c3 100644 --- a/job.h +++ b/job.h @@ -21,8 +21,10 @@ * `LICENSE' that comes with the fcron source distribution. */ - /* $Id: job.h,v 1.1 2001-04-29 22:13:57 thib Exp $ */ + /* $Id: job.h,v 1.2 2001-05-15 00:42:05 thib Exp $ */ +#ifndef __JOB_H__ +#define __JOB_H__ /* functions prototypes */ extern int change_user(char *user_name); @@ -30,3 +32,5 @@ extern void run_job(struct exe *exeent); extern int create_mail(CL *line, char *subject); extern void launch_mailer(CL *line, int mailfd); extern void xwrite(int fd, char *string); + +#endif /* __JOB_H__ */ diff --git a/log.h b/log.h index dfdd5d9..e0fdbff 100644 --- a/log.h +++ b/log.h @@ -21,8 +21,10 @@ * `LICENSE' that comes with the fcron source distribution. */ - /* $Id: log.h,v 1.1 2001-04-29 22:14:13 thib Exp $ */ + /* $Id: log.h,v 1.2 2001-05-15 00:43:29 thib Exp $ */ +#ifndef __LOG_H__ +#define __LOG_H__ /* functions prototypes */ extern void xcloselog(void); @@ -36,3 +38,5 @@ extern void error_e(char *fmt, ...); extern void die(char *fmt, ...); extern void die_e(char *fmt, ...); extern void Debug(char *fmt, ...); + +#endif /* __LOG_H__ */ diff --git a/subs.h b/subs.h index 897b18e..bfde3e5 100644 --- a/subs.h +++ b/subs.h @@ -21,13 +21,18 @@ * `LICENSE' that comes with the fcron source distribution. */ - /* $Id: subs.h,v 1.1 2001-04-29 22:24:48 thib Exp $ */ + /* $Id: subs.h,v 1.2 2001-05-15 00:51:17 thib Exp $ */ +#ifndef __SUBS_H__ +#define __SUBS_H__ /* functions prototypes */ extern int remove_blanks(char *str); extern char *strdup2(const char *); +extern int temp_file(char **name); extern int save_type(FILE *f, short int type); extern int save_str(FILE *f, short int type, char *str); extern int save_strn(FILE *f, short int type, char *str, short int size); extern int save_lint(FILE *f, short int type, long int value); + +#endif /* __SUBS_H__ */