From bfaec7ddd6a225c08ad75f0c765ca1f2ed1a60d6 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Sun, 10 May 2015 22:48:09 +0100 Subject: [PATCH] blok: ansify --- Applications/V7/cmd/sh/blok.c | 9 +++------ Applications/V7/cmd/sh/defs.h | 6 ++++++ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/Applications/V7/cmd/sh/blok.c b/Applications/V7/cmd/sh/blok.c index e2c820eb..cc456909 100644 --- a/Applications/V7/cmd/sh/blok.c +++ b/Applications/V7/cmd/sh/blok.c @@ -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; diff --git a/Applications/V7/cmd/sh/defs.h b/Applications/V7/cmd/sh/defs.h index 0d40e451..5c338a8e 100644 --- a/Applications/V7/cmd/sh/defs.h +++ b/Applications/V7/cmd/sh/defs.h @@ -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); -- 2.34.1