using a function instead of a macro saves 896 bytes of .text

This commit is contained in:
tg
2006-11-09 20:53:42 +00:00
parent 617950554f
commit 35776a9d4d
2 changed files with 9 additions and 3 deletions

8
misc.c
View File

@ -3,7 +3,7 @@
#include "sh.h"
__RCSID("$MirOS: src/bin/mksh/misc.c,v 1.19 2006/11/09 14:19:31 tg Exp $\t"
__RCSID("$MirOS: src/bin/mksh/misc.c,v 1.20 2006/11/09 20:53:41 tg Exp $\t"
MKSH_SH_H_ID);
short chtypes[UCHAR_MAX+1]; /* type bits for unsigned char */
@ -81,6 +81,12 @@ str_nsave(const char *s, int n, Area *ap)
return (ns);
}
char *
str_save(const char *s, Area *ap)
{
return (str_nsave(s, s ? strlen(s) : 0, ap));
}
/* called from XcheckN() to grow buffer */
char *
Xcheck_grow_(XString *xsp, char *xp, unsigned more)