blok: ansify
authorAlan Cox <alan@linux.intel.com>
Sun, 10 May 2015 21:48:09 +0000 (22:48 +0100)
committerAlan Cox <alan@linux.intel.com>
Sun, 10 May 2015 21:48:09 +0000 (22:48 +0100)
Applications/V7/cmd/sh/blok.c
Applications/V7/cmd/sh/defs.h

index e2c820e..cc45690 100644 (file)
@@ -27,8 +27,7 @@ BLKPTR bloktop = BLK(end);    /*top of arena (last blok) */
 
 
 
-ADDRESS alloc(nbytes)
-POS nbytes;
+ADDRESS alloc(POS nbytes)
 {
        register POS rbytes = round(nbytes + BYTESPERWORD, BYTESPERWORD);
 
@@ -61,8 +60,7 @@ POS nbytes;
        }
 }
 
-void addblok(reqd)
-POS reqd;
+void addblok(POS reqd)
 {
        if (stakbas != staktop) {
                register STKPTR rndstak;
@@ -100,8 +98,7 @@ void free(void *ap)
 }
 
 #ifdef DEBUG
-chkbptr(ptr)
-BLKPTR ptr;
+chkbptr(BLKPTR ptr)
 {
        int exf = 0;
        register BLKPTR p = end;
index 0d40e45..5c338a8 100644 (file)
@@ -292,8 +292,14 @@ extern address end[];
 
 #include       "ctype.h"
 
+/* args.c */
 extern int options(int argc, STRING *argv);
 extern void setargs(STRING argi[]);
 extern DOLPTR freeargs(DOLPTR blk);
 extern void clearup(void);
 extern DOLPTR useargs(void);
+/* blok.c */
+ADDRESS alloc(POS nbytes);
+extern void addblok(POS reqd);
+extern void free(void *ap);    /* FIXME: rename sh_free */
+extern chkbptr(BLKPTR ptr);