}
}
char *
-targetTagName()
+targetTagName(void)
{
char *ret_locale = NULL;
char *ret_lang = NULL;
}
static void
-setup_new_day_handler(c)
- Calendar *c;
+setup_new_day_handler(Calendar *c)
{
Tick midnight;
unsigned long next_day;
exit(0);
}
-static int myabort(dpy, event)
- Display *dpy;
- XErrorEvent *event;
+static int myabort(Display *dpy, XErrorEvent *event)
{
/*
char buffer[MAXNAMELEN];
}
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" );
* to the local host.
*/
char *
-get_user_calendar()
+get_user_calendar(void)
{
char *name, *uname, *loc;
Boolean needfree = False;
}
static void
-init_calendar(argc, argv)
- int argc; char **argv;
+init_calendar(int argc, char **argv)
{
int start, stop;
register int i;
return inrange;
}
void
-init_strings()
+init_strings(void)
{
char *display_lang="C";
**
******************************************************************************/
extern char *
-ds_relname()
+ds_relname(void)
{
static char buf[MAXNAMELEN];
}
static void
-display_command_usage() {
+display_command_usage(void)
+{
fprintf(stderr, "\ndtcm_editor Usage: dtcm [filename]\n\n");
exit(0);
}
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;
}
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;
}
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;
/* 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.
/* 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;
/* 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;
/* 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];
/* 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;
/* 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;
/* 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);
}
}
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;
#include "help.h"
extern caddr_t
-make_timezone(c)
-Calendar *c;
+make_timezone(Calendar *c)
{
Timezone *t;
Widget text, separator, button_form;
}
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);
static char *lptr;
-int yylex()
+int yylex(void)
{
extern int yylval;
int sign;
}
static void
-init_props()
+init_props(void)
{
#define LIBDTCM_CAT "libdtcm"
static int is_inited = 0;
/* 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;
}
}
extern int
-month(t)
- Tick t;
+month(Tick t)
{
struct tm *tm;
_Xltimeparams localtime_buf;
}
extern Tick
-now()
+now(void)
{
return(time(0));
}
}
extern long
-gmt_off()
+gmt_off(void)
{
struct tm tm;
Tick t;
* 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;
*
*/
extern char*
-cm_def_printer()
+cm_def_printer(void)
{
FILE *fp;
char message[257];
/* 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;
}
extern char *
-cm_get_credentials()
+cm_get_credentials(void)
{
char *name, *host;
static char *login = NULL;
}
extern char *
-cm_get_local_host()
+cm_get_local_host(void)
{
static char *local_host;
}
extern char *
-cm_get_uname()
+cm_get_uname(void)
{
static char *name;
struct passwd *pw;
}
extern char *
-cm_get_local_domain()
+cm_get_local_domain(void)
{
static char *local_domain;
}
extern void
-garbage_collect()
+garbage_collect(void)
{
unsigned remain;
_DtCmsCalendar *clist = calendar_list;
}
extern void
-debug_switch()
+debug_switch(void)
{
_DtCmsCalendar *clist = calendar_list;
Access_Entry_4 *l;
}
static Abb_Appt_4 *
-_MakeAbbrAppt()
+_MakeAbbrAppt(void)
{
Abb_Appt_4 *a;
*/
static void
-init()
+init(void)
{
int i;
}
extern int
-yyylex()
+yyylex(void)
{
static int first_time=1;
program_handle program = &po;
-program_handle newph()
+program_handle newph(void)
{
extern void initrtable2();
extern void initrtable3();
return(program);
}
-program_handle getph()
+program_handle getph(void)
{
return(program);
}
* 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;
/*************** 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;
/* 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;
/* 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;
/* 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;
/* 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;
/* 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;
/* 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;
/* 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;
/* 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;
/* 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;
/* 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;
/* 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;
/* 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;
/* 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;
/* 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;
/* 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;
/* 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;
/* 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;
return(res);
}
-void initrtable2(ph)
- program_handle ph;
+void initrtable2(program_handle ph)
{
int ver = TABLEVERS_2;
ph->program_num = TABLEPROG;
/*************** 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;
/* 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;
/* 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;
/* 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;
/* 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;
/* 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;
/* 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;
/* 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;
/* 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;
/* 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;
/* 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;
/* 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;
/* 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;
/* 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;
/* 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;
/* 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;
/* 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;
/* 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;
/* 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;
/* 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;
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];
}
static void
-init_dir()
+init_dir(void)
{
char *dir = _DtCMS_DEFAULT_DIR;
char msgbuf[BUFSIZ];
* 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];
* 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];
* time and now so that the calling routine can set the alarm.
*/
static int
-_GetFirstGarbageCollectionTime()
+_GetFirstGarbageCollectionTime(void)
{
int n=0, midnight=0, gtime=0;
}
static void
-init_alarm()
+init_alarm(void)
{
int next;
extern void garbage_collect();
alarm((unsigned) next);
}
+int
main(int argc, char **argv)
{
u_long version;