Added prototyping stuff

This commit is contained in:
ceriel 1993-11-10 12:32:42 +00:00
parent 103cbb4319
commit d7b6b9a5ce
5 changed files with 24 additions and 47 deletions

View file

@ -6,9 +6,7 @@
#include <system.h>
#if __STDC__ > 0
void
#endif
sys_close(fp)
register File *fp;
{

View file

@ -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:

View file

@ -6,9 +6,7 @@
#include <system.h>
#if __STDC__ > 0
void
#endif
sys_stop(how)
int how;
{

View file

@ -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();

View file

@ -6,6 +6,8 @@
#ifndef __SYSTEM_INCLUDED__
#define __SYSTEM_INCLUDED__
#include <ansi.h>
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]