From 6374309c6d4d17ab1e4109133ab8aad55f77d51c Mon Sep 17 00:00:00 2001 From: Paul Smith Date: Mon, 14 Oct 2002 21:54:04 +0000 Subject: Convert the source code to use ANSI C style function definitions and enable the automake ansi2knr capability. Right now this doesn't quite build using a K&R compiler because of a problem with the loadavg test program, but the rest of the code works. I'm asking the automake list about this problem. --- vmsfunctions.c | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) (limited to 'vmsfunctions.c') diff --git a/vmsfunctions.c b/vmsfunctions.c index f6708cc..48cb9a5 100644 --- a/vmsfunctions.c +++ b/vmsfunctions.c @@ -16,8 +16,7 @@ #ifdef HAVE_VMSDIR_H DIR * -opendir (dspec) - char *dspec; +opendir (char *dspec) { struct DIR *dir = (struct DIR *)xmalloc (sizeof (struct DIR)); struct NAM *dnam = (struct NAM *)xmalloc (sizeof (struct NAM)); @@ -60,8 +59,7 @@ opendir (dspec) while (0) struct direct * -readdir (dir) - DIR * dir; +readdir (DIR *dir) { struct FAB *dfab = &dir->fab; struct NAM *dnam = (struct NAM *)(dfab->fab$l_nam); @@ -97,8 +95,7 @@ readdir (dir) } int -closedir (dir) - DIR *dir; +closedir (DIR *dir) { if (dir != NULL) { @@ -115,8 +112,7 @@ closedir (dir) #endif /* compiled for OpenVMS prior to V7.x */ char * -getwd (cwd) - char *cwd; +getwd (char *cwd) { static char buf[512]; @@ -127,9 +123,7 @@ getwd (cwd) } int -vms_stat (name, buf) - char *name; - struct stat *buf; +vms_stat (char *name, struct stat *buf) { int status; int i; @@ -226,8 +220,7 @@ vms_stat (name, buf) } char * -cvt_time (tval) - unsigned long tval; +cvt_time (unsigned long tval) { static long int date[2]; static char str[27]; @@ -247,9 +240,7 @@ cvt_time (tval) } int -strcmpi (s1, s2) - const char *s1; - const char *s2; +strcmpi (const char *s1, const char *s2) { while (*s1 != '\0' && toupper(*s1) == toupper(*s2)) { -- cgit v1.2.3