From: Peter Howkins Date: Thu, 28 Jun 2018 03:10:42 +0000 (+0100) Subject: dtcm: Change to ANSI function definitions X-Git-Tag: 2.3.0a~360 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=35dc4283e41599c029be653e182821a50da4859f;p=oweals%2Fcde.git dtcm: Change to ANSI function definitions --- diff --git a/cde/programs/dtcm/dtcm/RFCMIME.c b/cde/programs/dtcm/dtcm/RFCMIME.c index d2932bbf..bde71f7a 100644 --- a/cde/programs/dtcm/dtcm/RFCMIME.c +++ b/cde/programs/dtcm/dtcm/RFCMIME.c @@ -225,7 +225,7 @@ DtXlateStdToOpLocale ( } } char * -targetTagName() +targetTagName(void) { char *ret_locale = NULL; char *ret_lang = NULL; diff --git a/cde/programs/dtcm/dtcm/calendarA.c b/cde/programs/dtcm/dtcm/calendarA.c index ecb32f8a..e7368991 100644 --- a/cde/programs/dtcm/dtcm/calendarA.c +++ b/cde/programs/dtcm/dtcm/calendarA.c @@ -1904,8 +1904,7 @@ move_to_new_day(XtPointer data, XtIntervalId *dummy) } static void -setup_new_day_handler(c) - Calendar *c; +setup_new_day_handler(Calendar *c) { Tick midnight; unsigned long next_day; @@ -1985,9 +1984,7 @@ sig_int_handler( exit(0); } -static int myabort(dpy, event) - Display *dpy; - XErrorEvent *event; +static int myabort(Display *dpy, XErrorEvent *event) { /* char buffer[MAXNAMELEN]; @@ -2328,7 +2325,7 @@ view_event(Widget w, XtPointer client_data, XtPointer cbs) } static void -cm_usage() +cm_usage(void) { (void)fprintf(stderr, "Usage: dtcm [ -c calendar ] [-v view ]"); (void)fprintf(stderr, " [ -p printer ] [ generic-tool-arguments ]\n" ); @@ -2452,7 +2449,7 @@ static XtResource resources[] = { * to the local host. */ char * -get_user_calendar() +get_user_calendar(void) { char *name, *uname, *loc; Boolean needfree = False; @@ -2474,8 +2471,7 @@ get_user_calendar() } static void -init_calendar(argc, argv) - int argc; char **argv; +init_calendar(int argc, char **argv) { int start, stop; register int i; @@ -2956,7 +2952,7 @@ today_inrange(Calendar *c, time_t day_in_range) { return inrange; } void -init_strings() +init_strings(void) { char *display_lang="C"; diff --git a/cde/programs/dtcm/dtcm/deskset.c b/cde/programs/dtcm/dtcm/deskset.c index 527ed4ae..e89dca2a 100644 --- a/cde/programs/dtcm/dtcm/deskset.c +++ b/cde/programs/dtcm/dtcm/deskset.c @@ -85,7 +85,7 @@ static char sccsid[] = "@(#)deskset.c 1.11 94/12/22 Copyr 1993 Sun Microsystems ** ******************************************************************************/ extern char * -ds_relname() +ds_relname(void) { static char buf[MAXNAMELEN]; diff --git a/cde/programs/dtcm/dtcm/dtcm_editor.c b/cde/programs/dtcm/dtcm/dtcm_editor.c index ecf81fcf..4f472092 100644 --- a/cde/programs/dtcm/dtcm/dtcm_editor.c +++ b/cde/programs/dtcm/dtcm/dtcm_editor.c @@ -680,7 +680,8 @@ de_reset_proc(Widget w, XtPointer client_data, XtPointer data) { } static void -display_command_usage() { +display_command_usage(void) +{ fprintf(stderr, "\ndtcm_editor Usage: dtcm [filename]\n\n"); exit(0); } diff --git a/cde/programs/dtcm/dtcm/find.c b/cde/programs/dtcm/dtcm/find.c index 6b767c16..074a6ce5 100644 --- a/cde/programs/dtcm/dtcm/find.c +++ b/cde/programs/dtcm/dtcm/find.c @@ -68,8 +68,7 @@ static void layout_labels(Widget, Widget, Widget, Widget); extern caddr_t -make_find(c) -Calendar *c; +make_find(Calendar *c) { Find *f; Widget separator1, separator2, button_form; @@ -554,10 +553,7 @@ fmt_time_what( } void -find_appts(widget, client_data, cbs) -Widget widget; -XtPointer client_data; -XmPushButtonCallbackStruct *cbs; +find_appts(Widget widget, XtPointer client_data, XmPushButtonCallbackStruct *cbs) { Calendar *c = calendar; Props *p = (Props*)c->properties; @@ -766,10 +762,7 @@ XmPushButtonCallbackStruct *cbs; } void -show_appt(widget, client_data, cbs) -Widget widget; -XtPointer client_data; -XmPushButtonCallbackStruct *cbs; +show_appt(Widget widget, XtPointer client_data, XmPushButtonCallbackStruct *cbs) { Calendar *c = calendar; diff --git a/cde/programs/dtcm/dtcm/md5.c b/cde/programs/dtcm/dtcm/md5.c index 34adc25b..a2ae1b8f 100644 --- a/cde/programs/dtcm/dtcm/md5.c +++ b/cde/programs/dtcm/dtcm/md5.c @@ -168,8 +168,7 @@ static unsigned char PADDING[64] = { /* MD5 initialization. Begins an MD5 operation, writing a new context. */ -void MD5Init (context) -MD5_CTX *context; /* context */ +void MD5Init (MD5_CTX *context) { context->count[0] = context->count[1] = 0; /* Load magic initialization constants. @@ -183,11 +182,12 @@ MD5_CTX *context; /* context */ /* MD5 block update operation. Continues an MD5 message-digest operation, processing another message block, and updating the context. + + context, context + input, input block + inputLen, length of input block */ -void MD5Update (context, input, inputLen) -MD5_CTX *context; /* context */ -unsigned char *input; /* input block */ -unsigned int inputLen; /* length of input block */ +void MD5Update (MD5_CTX *context, unsigned char *input, unsigned int inputLen) { unsigned int i, index, partLen; @@ -225,10 +225,11 @@ unsigned int inputLen; /* length of input block */ /* MD5 finalization. Ends an MD5 message-digest operation, writing the the message digest and zeroizing the context. + + digest, message digest + context, context */ -void MD5Final (digest, context) -unsigned char digest[16]; /* message digest */ -MD5_CTX *context; /* context */ +void MD5Final (unsigned char digest[16], MD5_CTX *context) { unsigned char bits[8]; unsigned int index, padLen; @@ -255,9 +256,7 @@ MD5_CTX *context; /* context */ /* MD5 basic transformation. Transforms state based on block. */ -static void MD5Transform (state, block) -UINT4 state[4]; -unsigned char block[64]; +static void MD5Transform (UINT4 state[4], unsigned char block[64]) { UINT4 a = state[0], b = state[1], c = state[2], d = state[3], x[16]; @@ -348,10 +347,7 @@ unsigned char block[64]; /* Encodes input (UINT4) into output (unsigned char). Assumes len is a multiple of 4. */ -static void Encode (output, input, len) -unsigned char *output; -UINT4 *input; -unsigned int len; +static void Encode (unsigned char *output, UINT4 *input, unsigned int len) { unsigned int i, j; @@ -366,10 +362,7 @@ unsigned int len; /* Decodes input (unsigned char) into output (UINT4). Assumes len is a multiple of 4. */ -static void Decode (output, input, len) -UINT4 *output; -unsigned char *input; -unsigned int len; +static void Decode (UINT4 *output, unsigned char *input, unsigned int len) { unsigned int i, j; @@ -381,20 +374,14 @@ unsigned int len; /* Note: Replace "for loop" with standard memcpy if possible. */ -static void MD5_memcpy (output, input, len) -POINTER output; -POINTER input; -unsigned int len; +static void MD5_memcpy (POINTER output, POINTER input, unsigned int len) { memcpy(output, input, len); } /* Note: Replace "for loop" with standard memset if possible. */ -static void MD5_memset (output, value, len) -POINTER output; -int value; -unsigned int len; +static void MD5_memset (POINTER output, int value, unsigned int len) { memset(output, value, len); } diff --git a/cde/programs/dtcm/dtcm/misc.c b/cde/programs/dtcm/dtcm/misc.c index f76aeb74..55d563a2 100644 --- a/cde/programs/dtcm/dtcm/misc.c +++ b/cde/programs/dtcm/dtcm/misc.c @@ -1161,9 +1161,7 @@ setup_quit_handler(Widget w, XtCallbackProc cb, caddr_t user_data) { } int -ds_is_double_click(last_event, event ) -XEvent *last_event; -XEvent *event; +ds_is_double_click(XEvent *last_event, XEvent *event) { static int time_threshold; static int dist_threshold; diff --git a/cde/programs/dtcm/dtcm/timezone.c b/cde/programs/dtcm/dtcm/timezone.c index 236bcc95..e7dfa4a1 100644 --- a/cde/programs/dtcm/dtcm/timezone.c +++ b/cde/programs/dtcm/dtcm/timezone.c @@ -61,8 +61,7 @@ #include "help.h" extern caddr_t -make_timezone(c) -Calendar *c; +make_timezone(Calendar *c) { Timezone *t; Widget text, separator, button_form; @@ -326,8 +325,7 @@ Calendar *c; } extern void -refresh_timezone(t) -Timezone *t; +refresh_timezone(Timezone *t) { XmToggleButtonSetState(t->mytime, t->timezone_type == mytime, FALSE); XmToggleButtonSetState(t->customtime, t->timezone_type == customtime,FALSE); diff --git a/cde/programs/dtcm/libDtCmP/getdate.y b/cde/programs/dtcm/libDtCmP/getdate.y index e42b8ee8..43391d7a 100644 --- a/cde/programs/dtcm/libDtCmP/getdate.y +++ b/cde/programs/dtcm/libDtCmP/getdate.y @@ -464,7 +464,7 @@ lookup(char *id) static char *lptr; -int yylex() +int yylex(void) { extern int yylval; int sign; diff --git a/cde/programs/dtcm/libDtCmP/props.c b/cde/programs/dtcm/libDtCmP/props.c index e889e251..930a40c2 100644 --- a/cde/programs/dtcm/libDtCmP/props.c +++ b/cde/programs/dtcm/libDtCmP/props.c @@ -327,7 +327,7 @@ props_clean_up(Props *p) { } static void -init_props() +init_props(void) { #define LIBDTCM_CAT "libdtcm" static int is_inited = 0; diff --git a/cde/programs/dtcm/libDtCmP/timeops.c b/cde/programs/dtcm/libDtCmP/timeops.c index 06393be5..67c2e078 100644 --- a/cde/programs/dtcm/libDtCmP/timeops.c +++ b/cde/programs/dtcm/libDtCmP/timeops.c @@ -147,14 +147,14 @@ ntimes_this_week(u_int weekmask, int firstday) /* Return beginning of time */ extern Tick -get_bot() +get_bot(void) { return bot; } /* Return end of time */ extern Tick -get_eot() +get_eot(void) { return eot; } @@ -255,8 +255,7 @@ year(Tick t) } extern int -month(t) - Tick t; +month(Tick t) { struct tm *tm; _Xltimeparams localtime_buf; @@ -945,7 +944,7 @@ xytoclock(int x, int y, Tick t) } extern Tick -now() +now(void) { return(time(0)); } @@ -972,7 +971,7 @@ set_timezone(char *tzname) } extern long -gmt_off() +gmt_off(void) { struct tm tm; Tick t; @@ -1001,7 +1000,7 @@ gmt_off() * of the routines in this file and the caller of these routines. */ extern void -init_time() +init_time(void) { struct tm tm, gm; Tick t; diff --git a/cde/programs/dtcm/libDtCmP/util.c b/cde/programs/dtcm/libDtCmP/util.c index 2ad7aaf3..537d1b69 100644 --- a/cde/programs/dtcm/libDtCmP/util.c +++ b/cde/programs/dtcm/libDtCmP/util.c @@ -102,7 +102,7 @@ extern int pclose(FILE *); * */ extern char* -cm_def_printer() +cm_def_printer(void) { FILE *fp; char message[257]; @@ -291,8 +291,7 @@ cr_to_str(char *s) /* VARARGS1 */ extern void -syserr(msg, a1, a2, a3) - char *msg; +syserr(char *msg, int a1, int a2, int a3) { /* Taken from Unix World, July 1989, p. 66 */ int saveerr; @@ -525,7 +524,7 @@ get_tail(char *str, char sep) } extern char * -cm_get_credentials() +cm_get_credentials(void) { char *name, *host; static char *login = NULL; @@ -541,7 +540,7 @@ cm_get_credentials() } extern char * -cm_get_local_host() +cm_get_local_host(void) { static char *local_host; @@ -558,7 +557,7 @@ cm_get_local_host() } extern char * -cm_get_uname() +cm_get_uname(void) { static char *name; struct passwd *pw; @@ -574,7 +573,7 @@ cm_get_uname() } extern char * -cm_get_local_domain() +cm_get_local_domain(void) { static char *local_domain; diff --git a/cde/programs/dtcm/server/cmscalendar.c b/cde/programs/dtcm/server/cmscalendar.c index e04b621a..54552795 100644 --- a/cde/programs/dtcm/server/cmscalendar.c +++ b/cde/programs/dtcm/server/cmscalendar.c @@ -612,7 +612,7 @@ _DtCmsRbToCsaStat(Rb_Status rb_stat) } extern void -garbage_collect() +garbage_collect(void) { unsigned remain; _DtCmsCalendar *clist = calendar_list; @@ -644,7 +644,7 @@ garbage_collect() } extern void -debug_switch() +debug_switch(void) { _DtCmsCalendar *clist = calendar_list; Access_Entry_4 *l; diff --git a/cde/programs/dtcm/server/cmsconvert.c b/cde/programs/dtcm/server/cmsconvert.c index 7aa8450e..bf4ce237 100644 --- a/cde/programs/dtcm/server/cmsconvert.c +++ b/cde/programs/dtcm/server/cmsconvert.c @@ -839,7 +839,7 @@ _AttrsToAbbrAppt(uint size, cms_attribute *attrs, Abb_Appt_4 *appt) } static Abb_Appt_4 * -_MakeAbbrAppt() +_MakeAbbrAppt(void) { Abb_Appt_4 *a; diff --git a/cde/programs/dtcm/server/lexit.c b/cde/programs/dtcm/server/lexit.c index a59393b3..075f264b 100644 --- a/cde/programs/dtcm/server/lexit.c +++ b/cde/programs/dtcm/server/lexit.c @@ -193,7 +193,7 @@ static u_int sendit_value[255]; */ static void -init() +init(void) { int i; @@ -264,7 +264,7 @@ init() } extern int -yyylex() +yyylex(void) { static int first_time=1; diff --git a/cde/programs/dtcm/server/programtable.c b/cde/programs/dtcm/server/programtable.c index fa2ca073..0051ca53 100644 --- a/cde/programs/dtcm/server/programtable.c +++ b/cde/programs/dtcm/server/programtable.c @@ -56,7 +56,7 @@ program_object po = { program_handle program = &po; -program_handle newph() +program_handle newph(void) { extern void initrtable2(); extern void initrtable3(); @@ -71,7 +71,7 @@ program_handle newph() return(program); } -program_handle getph() +program_handle getph(void) { return(program); } diff --git a/cde/programs/dtcm/server/repeat.c b/cde/programs/dtcm/server/repeat.c index e0b56725..c6b1951e 100644 --- a/cde/programs/dtcm/server/repeat.c +++ b/cde/programs/dtcm/server/repeat.c @@ -123,7 +123,7 @@ static time_t prevdaysofweek(time_t t, int weekmask); * of the routines in this file and the caller of these routines. */ extern void -init_time() +init_time(void) { struct tm tm, gm; time_t t; diff --git a/cde/programs/dtcm/server/rtable2.c b/cde/programs/dtcm/server/rtable2.c index 05a16aea..90945751 100644 --- a/cde/programs/dtcm/server/rtable2.c +++ b/cde/programs/dtcm/server/rtable2.c @@ -50,18 +50,14 @@ /*************** V2 PROTOCOL IMPLEMENTATION PROCS *****************/ extern void * -_DtCm_rtable_ping_2_svc(args, svcrq) -void *args; -struct svc_req *svcrq; +_DtCm_rtable_ping_2_svc(void *args, struct svc_req *svcrq) { return(NULL); /* for RPC reply */ } /* PROC #1 */ extern Table_Res_2 * -_DtCm_rtable_lookup_2_svc (args, svcrq) -Table_Args_2 *args; -struct svc_req *svcrq; +_DtCm_rtable_lookup_2_svc (Table_Args_2 *args, struct svc_req *svcrq) { static Table_Res_2 *res = NULL; Table_Args_4 *newargs; @@ -81,9 +77,7 @@ struct svc_req *svcrq; /* PROC #2 */ extern Table_Res_2 * -_DtCm_rtable_lookup_next_larger_2_svc(args, svcrq) -Table_Args_2 *args; -struct svc_req *svcrq; +_DtCm_rtable_lookup_next_larger_2_svc(Table_Args_2 *args, struct svc_req *svcrq) { static Table_Res_2 *res = NULL; Table_Args_4 *newargs; @@ -104,9 +98,7 @@ struct svc_req *svcrq; /* PROC #3 */ extern Table_Res_2 * -_DtCm_rtable_lookup_next_smaller_2_svc(args, svcrq) -Table_Args_2 *args; -struct svc_req *svcrq; +_DtCm_rtable_lookup_next_smaller_2_svc(Table_Args_2 *args, struct svc_req *svcrq) { static Table_Res_2 *res = NULL; Table_Args_4 *newargs; @@ -127,9 +119,7 @@ struct svc_req *svcrq; /* PROC #4 */ extern Table_Res_2 * -_DtCm_rtable_lookup_range_2_svc(args, svcrq) -Table_Args_2 *args; -struct svc_req *svcrq; +_DtCm_rtable_lookup_range_2_svc(Table_Args_2 *args, struct svc_req *svcrq) { static Table_Res_2 *res = NULL; Table_Args_4 *newargs; @@ -149,9 +139,7 @@ struct svc_req *svcrq; /* PROC #5 */ extern Table_Res_2 * -_DtCm_rtable_abbreviated_lookup_range_2_svc(args, svcrq) -Table_Args_2 *args; -struct svc_req *svcrq; +_DtCm_rtable_abbreviated_lookup_range_2_svc(Table_Args_2 *args, struct svc_req *svcrq) { static Table_Res_2 *res = NULL; Table_Args_4 *newargs; @@ -171,9 +159,7 @@ struct svc_req *svcrq; /* PROC #6 */ extern Table_Res_2 * -_DtCm_rtable_insert_2_svc(args, svcrq) -Table_Args_2 *args; -struct svc_req *svcrq; +_DtCm_rtable_insert_2_svc(Table_Args_2 *args, struct svc_req *svcrq) { static Table_Res_2 *res = NULL; Table_Args_4 *newargs; @@ -193,9 +179,7 @@ struct svc_req *svcrq; /* PROC #7 */ extern Table_Res_2 * -_DtCm_rtable_delete_2_svc(args, svcrq) -Table_Args_2 *args; -struct svc_req *svcrq; +_DtCm_rtable_delete_2_svc(Table_Args_2 *args, struct svc_req *svcrq) { static Table_Res_2 *res = NULL; Table_Args_4 *newargs; @@ -214,9 +198,7 @@ struct svc_req *svcrq; /* PROC #8 */ extern Table_Res_2 * -_DtCm_rtable_delete_instance_2_svc(args, svcrq) -Table_Args_2 *args; -struct svc_req *svcrq; +_DtCm_rtable_delete_instance_2_svc(Table_Args_2 *args, struct svc_req *svcrq) { static Table_Res_2 *res = NULL; Table_Args_4 *newargs; @@ -235,9 +217,7 @@ struct svc_req *svcrq; /* PROC #9 */ extern Table_Res_2 * -_DtCm_rtable_change_2_svc(args, svcrq) -Table_Args_2 *args; -struct svc_req *svcrq; +_DtCm_rtable_change_2_svc(Table_Args_2 *args, struct svc_req *svcrq) { static Table_Res_2 *res = NULL; Table_Args_4 *newargs; @@ -257,9 +237,7 @@ struct svc_req *svcrq; /* PROC #10 */ extern Table_Res_2 * -_DtCm_rtable_change_instance_2_svc(args, svcrq) -Table_Args_2 *args; -struct svc_req *svcrq; +_DtCm_rtable_change_instance_2_svc(Table_Args_2 *args, struct svc_req *svcrq) { static Table_Res_2 *res = NULL; Table_Args_4 *newargs; @@ -279,9 +257,7 @@ struct svc_req *svcrq; /* PROC #11 */ extern Table_Res_2 * -_DtCm_rtable_lookup_next_reminder_2_svc(args, svcrq) -Table_Args_2 *args; -struct svc_req *svcrq; +_DtCm_rtable_lookup_next_reminder_2_svc(Table_Args_2 *args, struct svc_req *svcrq) { static Table_Res_2 *res = NULL; Table_Args_4 *newargs; @@ -301,9 +277,7 @@ struct svc_req *svcrq; /* PROC #12 */ extern Table_Status_2 * -_DtCm_rtable_check_2_svc(args, svcrq) -Table_Args_2 *args; -struct svc_req *svcrq; +_DtCm_rtable_check_2_svc(Table_Args_2 *args, struct svc_req *svcrq) { static Table_Status_2 res; Table_Args_4 *newargs; @@ -321,9 +295,7 @@ struct svc_req *svcrq; /* PROC #13 */ extern Table_Status_2 * -_DtCm_rtable_flush_table_2_svc(args, svcrq) -Table_Args_2 *args; -struct svc_req *svcrq; +_DtCm_rtable_flush_table_2_svc(Table_Args_2 *args, struct svc_req *svcrq) { static Table_Status_2 res; Table_Args_4 *newargs; @@ -341,9 +313,7 @@ struct svc_req *svcrq; /* PROC #14 */ extern int * -_DtCm_rtable_size_2_svc(args, svcrq) -Table_Args_2 *args; -struct svc_req *svcrq; +_DtCm_rtable_size_2_svc(Table_Args_2 *args, struct svc_req *svcrq) { static int size; Table_Args_4 *newargs; @@ -358,9 +328,7 @@ struct svc_req *svcrq; /* PROC #15 */ Registration_Status_2 * -_DtCm_register_callback_2_svc(r, svcrq) -Registration_2 *r; -struct svc_req *svcrq; +_DtCm_register_callback_2_svc(Registration_2 *r, struct svc_req *svcrq) { static Registration_Status_2 stat; Registration_4 *newreg; @@ -377,9 +345,7 @@ struct svc_req *svcrq; /* PROC #16 */ Registration_Status_2 * -_DtCm_deregister_callback_2_svc(r, svcrq) -Registration_2 *r; -struct svc_req *svcrq; +_DtCm_deregister_callback_2_svc(Registration_2 *r, struct svc_req *svcrq) { static Registration_Status_2 stat; Registration_4 *newreg; @@ -396,9 +362,7 @@ struct svc_req *svcrq; /* PROC #17 */ extern Access_Status_2 * -_DtCm_rtable_set_access_2_svc(args, svcrq) -Access_Args_2 *args; -struct svc_req *svcrq; +_DtCm_rtable_set_access_2_svc(Access_Args_2 *args, struct svc_req *svcrq) { static Access_Status_2 stat; Access_Args_4 *newargs; @@ -415,9 +379,7 @@ struct svc_req *svcrq; /* PROC #18 */ extern Access_Args_2 * -_DtCm_rtable_get_access_2_svc(args, svcrq) -Access_Args_2 *args; -struct svc_req *svcrq; +_DtCm_rtable_get_access_2_svc(Access_Args_2 *args, struct svc_req *svcrq) { static Access_Args_2 *res = NULL; Access_Args_4 *newargs; @@ -435,8 +397,7 @@ struct svc_req *svcrq; return(res); } -void initrtable2(ph) - program_handle ph; +void initrtable2(program_handle ph) { int ver = TABLEVERS_2; ph->program_num = TABLEPROG; diff --git a/cde/programs/dtcm/server/rtable3.c b/cde/programs/dtcm/server/rtable3.c index ba856d3b..61e57614 100644 --- a/cde/programs/dtcm/server/rtable3.c +++ b/cde/programs/dtcm/server/rtable3.c @@ -50,18 +50,14 @@ /*************** V3 PROTOCOL IMPLEMENTATION PROCS *****************/ extern void * -_DtCm_rtable_ping_3_svc(args, svcrq) -void *args; -struct svc_req *svcrq; +_DtCm_rtable_ping_3_svc(void *args, struct svc_req *svcrq) { return(NULL); /* for RPC reply */ } /* PROC #1 */ extern Table_Res_3 * -_DtCm_rtable_lookup_3_svc (args, svcrq) -Table_Args_3 *args; -struct svc_req *svcrq; +_DtCm_rtable_lookup_3_svc (Table_Args_3 *args, struct svc_req *svcrq) { static Table_Res_3 *res = NULL; Table_Args_4 *newargs; @@ -80,9 +76,7 @@ struct svc_req *svcrq; /* PROC #2 */ extern Table_Res_3 * -_DtCm_rtable_lookup_next_larger_3_svc(args, svcrq) -Table_Args_3 *args; -struct svc_req *svcrq; +_DtCm_rtable_lookup_next_larger_3_svc(Table_Args_3 *args, struct svc_req *svcrq) { static Table_Res_3 *res = NULL; Table_Args_4 *newargs; @@ -101,9 +95,7 @@ struct svc_req *svcrq; /* PROC #3 */ extern Table_Res_3 * -_DtCm_rtable_lookup_next_smaller_3_svc(args, svcrq) -Table_Args_3 *args; -struct svc_req *svcrq; +_DtCm_rtable_lookup_next_smaller_3_svc(Table_Args_3 *args, struct svc_req *svcrq) { static Table_Res_3 *res = NULL; Table_Args_4 *newargs; @@ -122,9 +114,7 @@ struct svc_req *svcrq; /* PROC #4 */ extern Table_Res_3 * -_DtCm_rtable_lookup_range_3_svc(args, svcrq) -Table_Args_3 *args; -struct svc_req *svcrq; +_DtCm_rtable_lookup_range_3_svc(Table_Args_3 *args, struct svc_req *svcrq) { static Table_Res_3 *res = NULL; Table_Args_4 *newargs; @@ -143,9 +133,7 @@ struct svc_req *svcrq; /* PROC #5 */ extern Table_Res_3 * -_DtCm_rtable_abbreviated_lookup_range_3_svc(args, svcrq) -Table_Args_3 *args; -struct svc_req *svcrq; +_DtCm_rtable_abbreviated_lookup_range_3_svc(Table_Args_3 *args, struct svc_req *svcrq) { static Table_Res_3 *res = NULL; Table_Args_4 *newargs; @@ -164,9 +152,7 @@ struct svc_req *svcrq; /* PROC #6 */ extern Table_Res_3 * -_DtCm_rtable_insert_3_svc(args, svcrq) -Table_Args_3 *args; -struct svc_req *svcrq; +_DtCm_rtable_insert_3_svc(Table_Args_3 *args, struct svc_req *svcrq) { static Table_Res_3 *res = NULL; Table_Args_4 *newargs; @@ -185,9 +171,7 @@ struct svc_req *svcrq; /* PROC #7 */ extern Table_Res_3 * -_DtCm_rtable_delete_3_svc(args, svcrq) -Table_Args_3 *args; -struct svc_req *svcrq; +_DtCm_rtable_delete_3_svc(Table_Args_3 *args, struct svc_req *svcrq) { static Table_Res_3 *res = NULL; Table_Args_4 *newargs; @@ -206,9 +190,7 @@ struct svc_req *svcrq; /* PROC #8 */ extern Table_Res_3 * -_DtCm_rtable_delete_instance_3_svc(args, svcrq) -Table_Args_3 *args; -struct svc_req *svcrq; +_DtCm_rtable_delete_instance_3_svc(Table_Args_3 *args, struct svc_req *svcrq) { static Table_Res_3 *res = NULL; Table_Args_4 *newargs; @@ -227,9 +209,7 @@ struct svc_req *svcrq; /* PROC #9 */ extern Table_Res_3 * -_DtCm_rtable_change_3_svc(args, svcrq) -Table_Args_3 *args; -struct svc_req *svcrq; +_DtCm_rtable_change_3_svc(Table_Args_3 *args, struct svc_req *svcrq) { static Table_Res_3 *res = NULL; Table_Args_4 *newargs; @@ -249,9 +229,7 @@ struct svc_req *svcrq; /* PROC #10 */ extern Table_Res_3 * -_DtCm_rtable_change_instance_3_svc(args, svcrq) -Table_Args_3 *args; -struct svc_req *svcrq; +_DtCm_rtable_change_instance_3_svc(Table_Args_3 *args, struct svc_req *svcrq) { static Table_Res_3 *res = NULL; Table_Args_4 *newargs; @@ -271,9 +249,7 @@ struct svc_req *svcrq; /* PROC #11 */ extern Table_Res_3 * -_DtCm_rtable_lookup_next_reminder_3_svc(args, svcrq) -Table_Args_3 *args; -struct svc_req *svcrq; +_DtCm_rtable_lookup_next_reminder_3_svc(Table_Args_3 *args, struct svc_req *svcrq) { static Table_Res_3 *res = NULL; Table_Args_4 *newargs; @@ -292,9 +268,7 @@ struct svc_req *svcrq; /* PROC #12 */ extern Table_Status_3 * -_DtCm_rtable_check_3_svc(args, svcrq) -Table_Args_3 *args; -struct svc_req *svcrq; +_DtCm_rtable_check_3_svc(Table_Args_3 *args, struct svc_req *svcrq) { static Table_Status_3 res; Table_Args_4 *newargs; @@ -311,9 +285,7 @@ struct svc_req *svcrq; /* PROC #13 */ extern Table_Status_3 * -_DtCm_rtable_flush_table_3_svc(args, svcrq) -Table_Args_3 *args; -struct svc_req *svcrq; +_DtCm_rtable_flush_table_3_svc(Table_Args_3 *args, struct svc_req *svcrq) { static Table_Status_3 res; Table_Args_4 *newargs; @@ -330,9 +302,7 @@ struct svc_req *svcrq; /* PROC #14 */ extern int * -_DtCm_rtable_size_3_svc(args, svcrq) -Table_Args_3 *args; -struct svc_req *svcrq; +_DtCm_rtable_size_3_svc(Table_Args_3 *args, struct svc_req *svcrq) { static int size; Table_Args_4 *newargs; @@ -347,9 +317,7 @@ struct svc_req *svcrq; /* PROC #15 */ Registration_Status_3 * -_DtCm_register_callback_3_svc(r, svcrq) -Registration_3 *r; -struct svc_req *svcrq; +_DtCm_register_callback_3_svc(Registration_3 *r, struct svc_req *svcrq) { static Registration_Status_3 stat; Registration_4 *newreg; @@ -365,9 +333,7 @@ struct svc_req *svcrq; /* PROC #16 */ Registration_Status_3 * -_DtCm_deregister_callback_3_svc(r, svcrq) -Registration_3 *r; -struct svc_req *svcrq; +_DtCm_deregister_callback_3_svc(Registration_3 *r, struct svc_req *svcrq) { static Registration_Status_3 stat; Registration_4 *newreg; @@ -383,9 +349,7 @@ struct svc_req *svcrq; /* PROC #17 */ extern Access_Status_3 * -_DtCm_rtable_set_access_3_svc(args, svcrq) -Access_Args_3 *args; -struct svc_req *svcrq; +_DtCm_rtable_set_access_3_svc(Access_Args_3 *args, struct svc_req *svcrq) { static Access_Status_3 stat; Access_Args_4 *newargs; @@ -401,9 +365,7 @@ struct svc_req *svcrq; /* PROC #18 */ extern Access_Args_3 * -_DtCm_rtable_get_access_3_svc(args, svcrq) -Access_Args_3 *args; -struct svc_req *svcrq; +_DtCm_rtable_get_access_3_svc(Access_Args_3 *args, struct svc_req *svcrq) { static Access_Args_3 *res = NULL; Access_Args_4 *newargs; @@ -421,9 +383,7 @@ struct svc_req *svcrq; /* PROC #19 */ extern Table_Res_3 * -_DtCm_rtable_abbreviated_lookup_key_range_3_svc(args, svcrq) -Table_Args_3 *args; -struct svc_req *svcrq; +_DtCm_rtable_abbreviated_lookup_key_range_3_svc(Table_Args_3 *args, struct svc_req *svcrq) { static Table_Res_3 *res = NULL; Table_Args_4 *newargs; @@ -441,9 +401,7 @@ struct svc_req *svcrq; /* PROC #20 */ extern long * -_DtCm_rtable_gmtoff_3_svc(args, svcrq) -void *args; -struct svc_req *svcrq; +_DtCm_rtable_gmtoff_3_svc(void *args, struct svc_req *svcrq) { static long gmtoff; @@ -452,8 +410,7 @@ struct svc_req *svcrq; return(&gmtoff); } -void initrtable3(ph) - program_handle ph; +void initrtable3(program_handle ph) { ph->program_num = TABLEPROG; ph->prog[TABLEVERS_3].vers = &tableprog_3_table[0]; diff --git a/cde/programs/dtcm/server/svcmain.c b/cde/programs/dtcm/server/svcmain.c index e4b32985..b828ca3c 100644 --- a/cde/programs/dtcm/server/svcmain.c +++ b/cde/programs/dtcm/server/svcmain.c @@ -201,7 +201,7 @@ error: } static void -init_dir() +init_dir(void) { char *dir = _DtCMS_DEFAULT_DIR; char msgbuf[BUFSIZ]; @@ -282,7 +282,7 @@ init_dir() * send a SIGHUP signal to the rpc.cmsd that is already running */ static void -send_hup() +send_hup(void) { FILE *fp = NULL; char buf[BUFSIZ]; @@ -313,7 +313,7 @@ send_hup() * We only allow one rpc.cmsd to run on each machine. */ static int -lock_it() +lock_it(void) { char *dir = _DtCMS_DEFAULT_DIR; char buff [MAXPATHLEN]; @@ -467,7 +467,7 @@ sighup_handler(int sig_num) * time and now so that the calling routine can set the alarm. */ static int -_GetFirstGarbageCollectionTime() +_GetFirstGarbageCollectionTime(void) { int n=0, midnight=0, gtime=0; @@ -487,7 +487,7 @@ _GetFirstGarbageCollectionTime() } static void -init_alarm() +init_alarm(void) { int next; extern void garbage_collect(); @@ -508,6 +508,7 @@ init_alarm() alarm((unsigned) next); } +int main(int argc, char **argv) { u_long version;