From d7b6b9a5cec11ff37984b1281a5fc98371059fd9 Mon Sep 17 00:00:00 2001 From: ceriel Date: Wed, 10 Nov 1993 12:32:42 +0000 Subject: [PATCH] Added prototyping stuff --- modules/src/system/close.c | 2 -- modules/src/system/proto.make | 6 ++-- modules/src/system/stop.c | 2 -- modules/src/system/system.3 | 4 +-- modules/src/system/system.h | 57 ++++++++++++----------------------- 5 files changed, 24 insertions(+), 47 deletions(-) diff --git a/modules/src/system/close.c b/modules/src/system/close.c index 0625e25f5..9ffea8889 100644 --- a/modules/src/system/close.c +++ b/modules/src/system/close.c @@ -6,9 +6,7 @@ #include -#if __STDC__ > 0 void -#endif sys_close(fp) register File *fp; { diff --git a/modules/src/system/proto.make b/modules/src/system/proto.make index 3fbc4644f..5ff296200 100644 --- a/modules/src/system/proto.make +++ b/modules/src/system/proto.make @@ -18,7 +18,7 @@ CSRC = $(SRC_DIR)/access.c $(SRC_DIR)/break.c $(SRC_DIR)/chmode.c \ $(SRC_DIR)/write.c $(SRC_DIR)/seek.c $(SRC_DIR)/rename.c SRC = $(SRC_DIR)/proto.make $(SRC_DIR)/system.h $(CSRC) -INCLUDES = -I$(SRC_DIR) +INCLUDES = -I$(SRC_DIR) -I$(MOD_DIR)/h CFLAGS = $(COPTIONS) $(INCLUDES) all: $(LIBSYS) @@ -29,9 +29,10 @@ $(LIBSYS): $(OBJ) $(RANLIB) $(LIBSYS) install: all + -mkdir $(MOD_DIR)/lib + -mkdir $(MOD_DIR)/h cp $(LIBSYS) $(MOD_DIR)/lib/$(LIBSYS) $(RANLIB) $(MOD_DIR)/lib/$(LIBSYS) - cp $(SRC_DIR)/system.3 $(MOD_DIR)/man/system.3 cp $(SRC_DIR)/system.h $(MOD_DIR)/h/system.h if [ $(DO_MACHINE_INDEP) = y ] ; \ then mk_manpage $(SRC_DIR)/system.3 $(TARGET_HOME) ; \ @@ -39,7 +40,6 @@ install: all cmp: all -cmp $(LIBSYS) $(MOD_DIR)/lib/$(LIBSYS) - -cmp $(SRC_DIR)/system.3 $(MOD_DIR)/man/system.3 -cmp $(SRC_DIR)/system.h $(MOD_DIR)/h/system.h clean: diff --git a/modules/src/system/stop.c b/modules/src/system/stop.c index b94999679..839036878 100644 --- a/modules/src/system/stop.c +++ b/modules/src/system/stop.c @@ -6,9 +6,7 @@ #include -#if __STDC__ > 0 void -#endif sys_stop(how) int how; { diff --git a/modules/src/system/system.3 b/modules/src/system/system.3 index 269867d36..58557489c 100644 --- a/modules/src/system/system.3 +++ b/modules/src/system/system.3 @@ -16,7 +16,7 @@ sys_break, sys_stop, sys_time \- system call interface .B int flag; .B File **filep; .PP -.B sys_close(filep) +.B void sys_close(filep) .B File *filep; .PP .B int sys_read(filep, bufptr, bufsiz, pnbytes) @@ -64,7 +64,7 @@ sys_break, sys_stop, sys_time \- system call interface .B char *sys_break(incr) .B int incr; .PP -.B sys_stop(how) +.B void sys_stop(how) .B int how; .PP .B long sys_time(); diff --git a/modules/src/system/system.h b/modules/src/system/system.h index ee21fa53e..d08dc7976 100644 --- a/modules/src/system/system.h +++ b/modules/src/system/system.h @@ -6,6 +6,8 @@ #ifndef __SYSTEM_INCLUDED__ #define __SYSTEM_INCLUDED__ +#include + struct _sys_fildes { int o_fd; /* UNIX filedescriptor */ int o_flags; /* flags for open; 0 if not used */ @@ -31,44 +33,23 @@ extern File _sys_ftab[]; #define S_EXIT 1 #define S_ABORT 2 -#if __STDC__ -int sys_open(char *, int, File **); -void sys_close(File *); -int sys_read(File *, char *, int, int *); -int sys_write(File *, char *, int); -int sys_seek(File *, long, int, long *); -int sys_reset(File *); -int sys_access(char *, int); -int sys_remove(char *); -int sys_rename(char *, char *); -long sys_filesize(char *); -int sys_chmode(char *, int); -int sys_lock(char *); -int sys_unlock(char *); -char *sys_break(int); -void sys_stop(int); -long sys_time(void); -long sys_modtime(char *); -#else -/* No prototypes, avoid 'void'. */ -int sys_open(); -extern sys_close(); -int sys_read(); -int sys_write(); -int sys_seek(); -int sys_reset(); -int sys_access(); -int sys_remove(); -int sys_rename(); -long sys_filesize(); -int sys_chmode(); -int sys_lock(); -int sys_unlock(); -char *sys_break(); -extern sys_stop(); -long sys_time(); -long sys_modtime(); -#endif +_PROTOTYPE(int sys_open, (char *, int, File **)); +_PROTOTYPE(void sys_close, (File *)); +_PROTOTYPE(int sys_read, (File *, char *, int, int *)); +_PROTOTYPE(int sys_write, (File *, char *, int)); +_PROTOTYPE(int sys_seek, (File *, long, int, long *)); +_PROTOTYPE(int sys_reset, (File *)); +_PROTOTYPE(int sys_access, (char *, int)); +_PROTOTYPE(int sys_remove, (char *)); +_PROTOTYPE(int sys_rename, (char *, char *)); +_PROTOTYPE(long sys_filesize, (char *)); +_PROTOTYPE(int sys_chmode, (char *, int)); +_PROTOTYPE(int sys_lock, (char *)); +_PROTOTYPE(int sys_unlock, (char *)); +_PROTOTYPE(char *sys_break, (int)); +_PROTOTYPE(void sys_stop, (int)); +_PROTOTYPE(long sys_time, (void)); +_PROTOTYPE(long sys_modtime, (char *)); /* standard file decsriptors */ #define STDIN &_sys_ftab[0]