From be9e1212aeeb9cfabaf21779fc79fad6fc3752ce Mon Sep 17 00:00:00 2001 From: thib Date: Sun, 6 Oct 2002 16:51:37 +0000 Subject: [PATCH] changed type name : CL->cl_t CF->cf_t exe->exe_t lavg->lavg_t job->job_t --- fcron.c | 26 +++++++++++++------------- fcron.h | 12 ++++++------ fcrontab.h | 5 +++-- job.h | 10 +++++----- 4 files changed, 27 insertions(+), 26 deletions(-) diff --git a/fcron.c b/fcron.c index 2b27217..4fa6828 100644 --- a/fcron.c +++ b/fcron.c @@ -21,7 +21,7 @@ * `LICENSE' that comes with the fcron source distribution. */ - /* $Id: fcron.c,v 1.66 2002-08-29 17:33:19 thib Exp $ */ + /* $Id: fcron.c,v 1.67 2002-10-06 16:56:04 thib Exp $ */ #include "fcron.h" @@ -33,7 +33,7 @@ #include "socket.h" #endif -char rcs_info[] = "$Id: fcron.c,v 1.66 2002-08-29 17:33:19 thib Exp $"; +char rcs_info[] = "$Id: fcron.c,v 1.67 2002-10-06 16:56:04 thib Exp $"; void main_loop(void); void check_signal(void); @@ -84,11 +84,11 @@ char sig_chld = 0; /* is 1 when we got a SIGCHLD */ char sig_debug = 0; /* is 1 when we got a SIGUSR2 */ /* jobs database */ -struct CF *file_base; /* point to the first file of the list */ -struct job *queue_base; /* ordered list of normal jobs to be run */ +struct cf_t *file_base; /* point to the first file of the list */ +struct job_t *queue_base; /* ordered list of normal jobs to be run */ unsigned long int next_id; /* id for next line to enter database */ -struct CL **serial_array; /* ordered list of job to be run one by one */ +struct cl_t **serial_array; /* ordered list of job to be run one by one */ short int serial_array_size; /* size of serial_array */ short int serial_array_index; /* the index of the first job */ short int serial_num; /* number of job being queued */ @@ -97,12 +97,12 @@ short int serial_running; /* number of running serial jobs */ /* do not run more than this number of serial job simultaneously */ short int serial_max_running = SERIAL_MAX_RUNNING; -struct lavg *lavg_array; /* jobs waiting for a given system load value */ +struct lavg_t *lavg_array; /* jobs waiting for a given system load value */ short int lavg_array_size; /* size of lavg_array */ short int lavg_num; /* number of job being queued */ short int lavg_serial_running;/* number of serialized lavg job being running */ -struct exe *exe_array; /* jobs which are executed */ +struct exe_t *exe_array; /* jobs which are executed */ short int exe_array_size; /* size of exe_array */ short int exe_num; /* number of job being executed */ @@ -164,8 +164,8 @@ void print_schedule(void) /* print the current schedule on syslog */ { - CF *cf; - CL *cl; + cf_t *cf; + cl_t *cl; struct tm *ftime; explain("Printing schedule ..."); @@ -188,7 +188,7 @@ void xexit(int exit_value) /* exit after having freed memory and removed lock file */ { - CF *f = NULL; + cf_t *f = NULL; now = time(NULL); @@ -584,7 +584,7 @@ main(int argc, char **argv) /* initialize exe_array */ exe_num = 0; exe_array_size = EXE_INITIAL_SIZE; - if ( (exe_array = calloc(exe_array_size, sizeof(struct exe))) == NULL ) + if ( (exe_array = calloc(exe_array_size, sizeof(struct exe_t))) == NULL ) die_e("could not calloc exe_array"); /* initialize serial_array */ @@ -592,14 +592,14 @@ main(int argc, char **argv) serial_array_index = 0; serial_num = 0; serial_array_size = SERIAL_INITIAL_SIZE; - if ( (serial_array = calloc(serial_array_size, sizeof(CL *))) == NULL ) + if ( (serial_array = calloc(serial_array_size, sizeof(cl_t *))) == NULL ) die_e("could not calloc serial_array"); /* initialize lavg_array */ lavg_num = 0; lavg_serial_running = 0; lavg_array_size = LAVG_INITIAL_SIZE; - if ( (lavg_array = calloc(lavg_array_size, sizeof(lavg))) == NULL ) + if ( (lavg_array = calloc(lavg_array_size, sizeof(lavg_t))) == NULL ) die_e("could not calloc lavg_array"); #ifdef FCRONDYN diff --git a/fcron.h b/fcron.h index dba8a5c..66f7e7e 100644 --- a/fcron.h +++ b/fcron.h @@ -21,7 +21,7 @@ * `LICENSE' that comes with the fcron source distribution. */ - /* $Id: fcron.h,v 1.27 2002-03-02 17:27:34 thib Exp $ */ + /* $Id: fcron.h,v 1.28 2002-10-06 16:56:15 thib Exp $ */ #ifndef __FCRON_H__ #define __FCRON_H__ @@ -73,19 +73,19 @@ extern pid_t daemon_pid; extern mode_t saved_umask; extern char *prog_name; extern char sig_hup; -extern struct CF *file_base; -extern struct job *queue_base; +extern struct cf_t *file_base; +extern struct job_t *queue_base; extern unsigned long int next_id; -extern struct CL **serial_array; +extern struct cl_t **serial_array; extern short int serial_array_size; extern short int serial_array_index; extern short int serial_num; extern short int serial_running; extern short int serial_max_running; -extern struct exe *exe_array; +extern struct exe_t *exe_array; extern short int exe_array_size; extern short int exe_num; -extern struct lavg *lavg_array; +extern struct lavg_t *lavg_array; extern short int lavg_array_size; extern short int lavg_num; extern short int lavg_serial_running; diff --git a/fcrontab.h b/fcrontab.h index aef145b..2aaa071 100644 --- a/fcrontab.h +++ b/fcrontab.h @@ -21,7 +21,7 @@ * `LICENSE' that comes with the fcron source distribution. */ - /* $Id: fcrontab.h,v 1.16 2002-08-30 20:05:27 thib Exp $ */ + /* $Id: fcrontab.h,v 1.17 2002-10-06 16:55:46 thib Exp $ */ #ifndef __FCRONTAB_H__ #define __FCRONTAB_H__ @@ -32,11 +32,12 @@ extern char debug_opt; extern pid_t daemon_pid; extern char dosyslog; -extern struct CF *file_base; +extern struct cf_t *file_base; extern char *user; extern char *runas; extern uid_t uid; extern uid_t asuid; extern uid_t fcrontab_uid; +extern gid_t fcrontab_gid; #endif /* __FCRONTAB_H__ */ diff --git a/job.h b/job.h index cd93f95..85c7a4c 100644 --- a/job.h +++ b/job.h @@ -21,15 +21,15 @@ * `LICENSE' that comes with the fcron source distribution. */ - /* $Id: job.h,v 1.5 2002-07-19 19:32:28 thib Exp $ */ + /* $Id: job.h,v 1.6 2002-10-06 16:51:37 thib Exp $ */ #ifndef __JOB_H__ #define __JOB_H__ /* functions prototypes */ -extern int change_user(struct CL *cl); -extern void run_job(struct exe *exeent); -extern FILE *create_mail(struct CL *line, char *subject); -extern void launch_mailer(struct CL *line, FILE *mailf); +extern int change_user(struct cl_t *cl); +extern void run_job(struct exe_t *exeent); +extern FILE *create_mail(struct cl_t *line, char *subject); +extern void launch_mailer(struct cl_t *line, FILE *mailf); #endif /* __JOB_H__ */ -- 2.40.0