rename more identifiers with trailing underscores

This commit is contained in:
tg 2011-10-25 22:36:39 +00:00
parent cd7dab250b
commit fed31331f4
5 changed files with 39 additions and 39 deletions

34
lex.c
View File

@ -22,7 +22,7 @@
#include "sh.h"
__RCSID("$MirOS: src/bin/mksh/lex.c,v 1.156 2011/09/07 15:24:16 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/lex.c,v 1.157 2011/10/25 22:36:36 tg Exp $");
/*
* states while lexing word
@ -90,7 +90,7 @@ typedef struct {
static void readhere(struct ioword *);
static void ungetsc(int);
static void ungetsc_(int);
static void ungetsc_i(int);
static int getsc_uu(void);
static void getsc_line(Source *);
static int getsc_bn(void);
@ -99,8 +99,8 @@ static void s_put(int);
static char *get_brace_var(XString *, char *);
static bool arraysub(char **);
static void gethere(bool);
static Lex_state *push_state_(State_info *, Lex_state *);
static Lex_state *pop_state_(State_info *, Lex_state *);
static Lex_state *push_state_i(State_info *, Lex_state *);
static Lex_state *pop_state_i(State_info *, Lex_state *);
static int dopprompt(const char *, int, bool);
void yyskiputf8bom(void);
@ -154,13 +154,13 @@ getsc_r(int c)
#define PUSH_STATE(s) do { \
if (++statep == state_info.end) \
statep = push_state_(&state_info, statep); \
statep = push_state_i(&state_info, statep); \
state = statep->type = (s); \
} while (/* CONSTCOND */ 0)
#define POP_STATE() do { \
if (--statep == state_info.base) \
statep = pop_state_(&state_info, statep); \
statep = pop_state_i(&state_info, statep); \
state = statep->type; \
} while (/* CONSTCOND */ 0)
@ -1727,10 +1727,10 @@ ungetsc(int c)
rp->xp--;
rp = rp->next;
}
ungetsc_(c);
ungetsc_i(c);
}
static void
ungetsc_(int c)
ungetsc_i(int c)
{
if (source->str > source->start)
source->str--;
@ -1768,7 +1768,7 @@ getsc_bn(void)
if ((c2 = o_getsc_u()) == '\n')
/* ignore the \newline; get the next char... */
continue;
ungetsc_(c2);
ungetsc_i(c2);
backslash_skip = 1;
}
return (c);
@ -1781,25 +1781,25 @@ yyskiputf8bom(void)
int c;
if ((unsigned char)(c = o_getsc_u()) != 0xEF) {
ungetsc_(c);
ungetsc_i(c);
return;
}
if ((unsigned char)(c = o_getsc_u()) != 0xBB) {
ungetsc_(c);
ungetsc_(0xEF);
ungetsc_i(c);
ungetsc_i(0xEF);
return;
}
if ((unsigned char)(c = o_getsc_u()) != 0xBF) {
ungetsc_(c);
ungetsc_(0xBB);
ungetsc_(0xEF);
ungetsc_i(c);
ungetsc_i(0xBB);
ungetsc_i(0xEF);
return;
}
UTFMODE |= 8;
}
static Lex_state *
push_state_(State_info *si, Lex_state *old_end)
push_state_i(State_info *si, Lex_state *old_end)
{
Lex_state *news = alloc2(STATE_BSIZE, sizeof(Lex_state), ATEMP);
@ -1810,7 +1810,7 @@ push_state_(State_info *si, Lex_state *old_end)
}
static Lex_state *
pop_state_(State_info *si, Lex_state *old_end)
pop_state_i(State_info *si, Lex_state *old_end)
{
Lex_state *old_base = si->base;

8
misc.c
View File

@ -29,7 +29,7 @@
#include <grp.h>
#endif
__RCSID("$MirOS: src/bin/mksh/misc.c,v 1.175 2011/10/25 22:25:06 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/misc.c,v 1.176 2011/10/25 22:36:37 tg Exp $");
/* type bits for unsigned char */
unsigned char chtypes[UCHAR_MAX + 1];
@ -2029,7 +2029,7 @@ stristr(const char *b, const char *l)
#ifdef MKSH_SMALL
char *
strndup_(const char *src, size_t len, Area *ap)
strndup_i(const char *src, size_t len, Area *ap)
{
char *dst = NULL;
@ -2042,9 +2042,9 @@ strndup_(const char *src, size_t len, Area *ap)
}
char *
strdup_(const char *src, Area *ap)
strdup_i(const char *src, Area *ap)
{
return (src == NULL ? NULL : strndup_(src, strlen(src), ap));
return (src == NULL ? NULL : strndup_i(src, strlen(src), ap));
}
#endif

22
sh.h
View File

@ -151,7 +151,7 @@
#endif
#ifdef EXTERN
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.497 2011/10/25 22:25:07 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.498 2011/10/25 22:36:37 tg Exp $");
#endif
#define MKSH_VERSION "R40 2011/10/24"
@ -442,11 +442,11 @@ char *ucstrstr(char *, const char *);
} while (/* CONSTCOND */ 0)
#ifdef MKSH_SMALL
#define strdupx(d, s, ap) do { \
(d) = strdup_((s), (ap)); \
#define strdupx(d, s, ap) do { \
(d) = strdup_i((s), (ap)); \
} while (/* CONSTCOND */ 0)
#define strndupx(d, s, n, ap) do { \
(d) = strndup_((s), (n), (ap)); \
#define strndupx(d, s, n, ap) do { \
(d) = strndup_i((s), (n), (ap)); \
} while (/* CONSTCOND */ 0)
#else
/* be careful to evaluate arguments only once! */
@ -896,10 +896,10 @@ EXTERN mksh_ari_t x_lins E_INIT(-1); /* tty lines */
#define shf_fileno(shf) ((shf)->fd)
#define shf_setfileno(shf,nfd) ((shf)->fd = (nfd))
#define shf_getc_(shf) ((shf)->rnleft > 0 ? \
#define shf_getc_i(shf) ((shf)->rnleft > 0 ? \
(shf)->rnleft--, *(shf)->rp++ : \
shf_getchar(shf))
#define shf_putc_(c, shf) ((shf)->wnleft == 0 ? \
#define shf_putc_i(c, shf) ((shf)->wnleft == 0 ? \
shf_putchar((c), (shf)) : \
((shf)->wnleft--, *(shf)->wp++ = (c)))
#define shf_eof(shf) ((shf)->flags & SHF_EOF)
@ -1772,8 +1772,8 @@ void simplify_path(char *);
void set_current_wd(const char *);
int c_cd(const char **);
#ifdef MKSH_SMALL
char *strdup_(const char *, Area *);
char *strndup_(const char *, size_t, Area *);
char *strdup_i(const char *, Area *);
char *strndup_i(const char *, size_t, Area *);
#endif
int unbksl(bool, int (*)(void), void (*)(int));
/* shf.c */
@ -1793,8 +1793,8 @@ int shf_ungetc(int, struct shf *);
int shf_getc(struct shf *);
int shf_putc(int, struct shf *);
#else
#define shf_getc shf_getc_
#define shf_putc shf_putc_
#define shf_getc shf_getc_i
#define shf_putc shf_putc_i
#endif
int shf_putchar(int, struct shf *);
ssize_t shf_puts(const char *, struct shf *);

6
shf.c
View File

@ -24,7 +24,7 @@
#include "sh.h"
__RCSID("$MirOS: src/bin/mksh/shf.c,v 1.44 2011/09/07 15:24:20 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/shf.c,v 1.45 2011/10/25 22:36:38 tg Exp $");
/* flags to shf_emptybuf() */
#define EB_READSW 0x01 /* about to switch to reading */
@ -1046,12 +1046,12 @@ shf_vfprintf(struct shf *shf, const char *fmt, va_list args)
int
shf_getc(struct shf *shf)
{
return (shf_getc_(shf));
return (shf_getc_i(shf));
}
int
shf_putc(int c, struct shf *shf)
{
return (shf_putc_(c, shf));
return (shf_putc_i(c, shf));
}
#endif

8
tree.c
View File

@ -22,7 +22,7 @@
#include "sh.h"
__RCSID("$MirOS: src/bin/mksh/tree.c,v 1.51 2011/09/07 15:24:21 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/tree.c,v 1.52 2011/10/25 22:36:39 tg Exp $");
#define INDENT 8
@ -747,7 +747,7 @@ dumpchar(struct shf *shf, int c)
/* see: wdvarput */
static const char *
dumpwdvar_(struct shf *shf, const char *wp, int quotelevel)
dumpwdvar_i(struct shf *shf, const char *wp, int quotelevel)
{
int c;
@ -799,7 +799,7 @@ dumpwdvar_(struct shf *shf, const char *wp, int quotelevel)
while ((c = *wp++) != 0)
dumpchar(shf, c);
shf_putc('|', shf);
wp = dumpwdvar_(shf, wp, 0);
wp = dumpwdvar_i(shf, wp, 0);
break;
case CSUBST:
shf_puts("]CSUBST(", shf);
@ -826,7 +826,7 @@ dumpwdvar_(struct shf *shf, const char *wp, int quotelevel)
void
dumpwdvar(struct shf *shf, const char *wp)
{
dumpwdvar_(shf, wp, 0);
dumpwdvar_i(shf, wp, 0);
}
void