using a function instead of a macro saves 896 bytes of .text
This commit is contained in:
parent
617950554f
commit
35776a9d4d
8
misc.c
8
misc.c
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
#include "sh.h"
|
#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);
|
MKSH_SH_H_ID);
|
||||||
|
|
||||||
short chtypes[UCHAR_MAX+1]; /* type bits for unsigned char */
|
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);
|
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 */
|
/* called from XcheckN() to grow buffer */
|
||||||
char *
|
char *
|
||||||
Xcheck_grow_(XString *xsp, char *xp, unsigned more)
|
Xcheck_grow_(XString *xsp, char *xp, unsigned more)
|
||||||
|
4
sh.h
4
sh.h
@ -8,7 +8,7 @@
|
|||||||
/* $OpenBSD: c_test.h,v 1.4 2004/12/20 11:34:26 otto Exp $ */
|
/* $OpenBSD: c_test.h,v 1.4 2004/12/20 11:34:26 otto Exp $ */
|
||||||
/* $OpenBSD: tty.h,v 1.5 2004/12/20 11:34:26 otto Exp $ */
|
/* $OpenBSD: tty.h,v 1.5 2004/12/20 11:34:26 otto Exp $ */
|
||||||
|
|
||||||
#define MKSH_SH_H_ID "$MirOS: src/bin/mksh/sh.h,v 1.59 2006/11/09 15:03:56 tg Exp $"
|
#define MKSH_SH_H_ID "$MirOS: src/bin/mksh/sh.h,v 1.60 2006/11/09 20:53:42 tg Exp $"
|
||||||
#define MKSH_VERSION "R29 2006/11/09"
|
#define MKSH_VERSION "R29 2006/11/09"
|
||||||
|
|
||||||
#if HAVE_SYS_PARAM_H
|
#if HAVE_SYS_PARAM_H
|
||||||
@ -1217,7 +1217,7 @@ struct tbl **ktsort(struct table *);
|
|||||||
void setctypes(const char *, int);
|
void setctypes(const char *, int);
|
||||||
void initctypes(void);
|
void initctypes(void);
|
||||||
char *ulton(unsigned long, int);
|
char *ulton(unsigned long, int);
|
||||||
#define str_save(s, a) str_nsave((s), (s) ? strlen(s) : 0, a)
|
char *str_save(const char *, Area *);
|
||||||
char *str_nsave(const char *, int, Area *);
|
char *str_nsave(const char *, int, Area *);
|
||||||
int option(const char *);
|
int option(const char *);
|
||||||
char *getoptions(void);
|
char *getoptions(void);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user