if !MKSH_SMALL, str_save() can be a macro
This commit is contained in:
parent
273ca89019
commit
ebf58f6b42
4
misc.c
4
misc.c
@ -3,7 +3,7 @@
|
||||
|
||||
#include "sh.h"
|
||||
|
||||
__RCSID("$MirOS: src/bin/mksh/misc.c,v 1.23 2006/11/10 01:13:52 tg Exp $\t"
|
||||
__RCSID("$MirOS: src/bin/mksh/misc.c,v 1.24 2006/11/10 01:19:17 tg Exp $\t"
|
||||
MKSH_SH_H_ID);
|
||||
|
||||
unsigned char chtypes[UCHAR_MAX + 1]; /* type bits for unsigned char */
|
||||
@ -65,11 +65,13 @@ str_nsave(const char *s, int n, Area *ap)
|
||||
return (ns);
|
||||
}
|
||||
|
||||
#ifdef MKSH_SMALL
|
||||
char *
|
||||
str_save(const char *s, Area *ap)
|
||||
{
|
||||
return (str_nsave(s, s ? strlen(s) : 0, ap));
|
||||
}
|
||||
#endif
|
||||
|
||||
/* called from XcheckN() to grow buffer */
|
||||
char *
|
||||
|
6
sh.h
6
sh.h
@ -8,7 +8,7 @@
|
||||
/* $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 $ */
|
||||
|
||||
#define MKSH_SH_H_ID "$MirOS: src/bin/mksh/sh.h,v 1.68 2006/11/10 01:13:52 tg Exp $"
|
||||
#define MKSH_SH_H_ID "$MirOS: src/bin/mksh/sh.h,v 1.69 2006/11/10 01:19:17 tg Exp $"
|
||||
#define MKSH_VERSION "R29 2006/11/10"
|
||||
|
||||
#if HAVE_SYS_PARAM_H
|
||||
@ -1219,7 +1219,11 @@ struct tbl **ktsort(struct table *);
|
||||
/* misc.c */
|
||||
void setctypes(const char *, int);
|
||||
void initctypes(void);
|
||||
#ifdef MKSH_SMALL
|
||||
char *str_save(const char *, Area *);
|
||||
#else
|
||||
#define str_save(s,ap) (str_nsave((s), (s) ? strlen(s) : 0, (ap)))
|
||||
#endif
|
||||
char *str_nsave(const char *, int, Area *);
|
||||
int option(const char *);
|
||||
char *getoptions(void);
|
||||
|
Loading…
x
Reference in New Issue
Block a user