diff --git a/bin/sh/memalloc.c b/bin/sh/memalloc.c index 3ee104c4cc4e..bc567d08450e 100644 --- a/bin/sh/memalloc.c +++ b/bin/sh/memalloc.c @@ -277,16 +277,6 @@ growstackblock(int min) -void -grabstackblock(int len) -{ - len = ALIGN(len); - stacknxt += len; - stacknleft -= len; -} - - - /* * The following routines are somewhat easier to use that the above. * The user declares a variable of type STACKSTR, which may be declared diff --git a/bin/sh/memalloc.h b/bin/sh/memalloc.h index f3e8829eed4f..425004ed3f72 100644 --- a/bin/sh/memalloc.h +++ b/bin/sh/memalloc.h @@ -55,7 +55,6 @@ pointer stalloc(int); void stunalloc(pointer); void setstackmark(struct stackmark *); void popstackmark(struct stackmark *); -void grabstackblock(int); char *growstackstr(void); char *makestrspace(int, char *); char *stputbin(const char *data, int len, char *p); @@ -65,6 +64,7 @@ char *stputs(const char *data, char *p); #define stackblock() stacknxt #define stackblocksize() stacknleft +#define grabstackblock(n) stalloc(n) #define STARTSTACKSTR(p) p = stackblock() #define STPUTC(c, p) do { if (p == sstrend) p = growstackstr(); *p++ = (c); } while(0) #define CHECKSTRSPACE(n, p) { if (sstrend - p < n) p = makestrspace(n, p); }