summaryrefslogtreecommitdiffstats
path: root/bin/sh/memalloc.c
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2002-02-02 06:50:57 +0000
committerimp <imp@FreeBSD.org>2002-02-02 06:50:57 +0000
commit5ef5088ac4e038d0a147a08377ef087fd6edf527 (patch)
tree01a827446e9ba4f34cf1e754fcac691f6c9eb1cf /bin/sh/memalloc.c
parent50014e35418ca00d25ea852fc4f94acf80be4df3 (diff)
downloadFreeBSD-src-5ef5088ac4e038d0a147a08377ef087fd6edf527.zip
FreeBSD-src-5ef5088ac4e038d0a147a08377ef087fd6edf527.tar.gz
o __P has been reoved
o Old-style K&R declarations have been converted to new C89 style o register has been removed o prototype for main() has been removed (gcc3 makes it an error) o int main(int argc, char *argv[]) is the preferred main definition. o Attempt to not break style(9) conformance for declarations more than they already are. o Change int foo() { ... to int foo(void) { ...
Diffstat (limited to 'bin/sh/memalloc.c')
-rw-r--r--bin/sh/memalloc.c35
1 files changed, 12 insertions, 23 deletions
diff --git a/bin/sh/memalloc.c b/bin/sh/memalloc.c
index 26b4b2d..651501c 100644
--- a/bin/sh/memalloc.c
+++ b/bin/sh/memalloc.c
@@ -57,8 +57,7 @@ static const char rcsid[] =
*/
pointer
-ckmalloc(nbytes)
- int nbytes;
+ckmalloc(int nbytes)
{
pointer p;
@@ -73,9 +72,7 @@ ckmalloc(nbytes)
*/
pointer
-ckrealloc(p, nbytes)
- pointer p;
- int nbytes;
+ckrealloc(pointer p, int nbytes)
{
if ((p = realloc(p, nbytes)) == NULL)
error("Out of space");
@@ -88,8 +85,7 @@ ckrealloc(p, nbytes)
*/
char *
-savestr(s)
- char *s;
+savestr(char *s)
{
char *p;
@@ -127,8 +123,7 @@ int herefd = -1;
pointer
-stalloc(nbytes)
- int nbytes;
+stalloc(int nbytes)
{
char *p;
@@ -157,8 +152,7 @@ stalloc(nbytes)
void
-stunalloc(p)
- pointer p;
+stunalloc(pointer p)
{
if (p == NULL) { /*DEBUG */
write(STDERR_FILENO, "stunalloc\n", 10);
@@ -171,8 +165,7 @@ stunalloc(p)
void
-setstackmark(mark)
- struct stackmark *mark;
+setstackmark(struct stackmark *mark)
{
mark->stackp = stackp;
mark->stacknxt = stacknxt;
@@ -183,8 +176,7 @@ setstackmark(mark)
void
-popstackmark(mark)
- struct stackmark *mark;
+popstackmark(struct stackmark *mark)
{
struct stack_block *sp;
@@ -212,7 +204,7 @@ popstackmark(mark)
*/
void
-growstackblock()
+growstackblock(void)
{
char *p;
int newlen;
@@ -261,8 +253,7 @@ growstackblock()
void
-grabstackblock(len)
- int len;
+grabstackblock(int len)
{
len = ALIGN(len);
stacknxt += len;
@@ -291,7 +282,7 @@ grabstackblock(len)
char *
-growstackstr()
+growstackstr(void)
{
int len;
@@ -312,7 +303,7 @@ growstackstr()
*/
char *
-makestrspace()
+makestrspace(void)
{
int len;
@@ -325,9 +316,7 @@ makestrspace()
void
-ungrabstackstr(s, p)
- char *s;
- char *p;
+ungrabstackstr(char *s, char *p)
{
stacknleft += stacknxt - s;
stacknxt = s;
OpenPOWER on IntegriCloud