rename the “tilde” function; apparently, some system headers define it

This commit is contained in:
tg 2014-11-19 21:49:12 +00:00
parent 9b31399aec
commit 517bd63fe5
3 changed files with 7 additions and 7 deletions

4
edit.c
View File

@ -28,7 +28,7 @@
#ifndef MKSH_NO_CMDLINE_EDITING
__RCSID("$MirOS: src/bin/mksh/edit.c,v 1.277 2014/11/14 20:00:40 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/edit.c,v 1.278 2014/11/19 21:49:10 tg Exp $");
/*
* in later versions we might use libtermcap for this, but since external
@ -327,7 +327,7 @@ x_glob_hlp_tilde_and_rem_qchar(char *s, bool magic_flag)
/* ok, so split into "~foo"/"bar" or "~"/"baz" */
*cp++ = 0;
/* try to expand the tilde */
if (!(dp = tilde(s + 1))) {
if (!(dp = do_tilde(s + 1))) {
/* nope, revert damage */
*--cp = '/';
} else {

6
eval.c
View File

@ -23,7 +23,7 @@
#include "sh.h"
__RCSID("$MirOS: src/bin/mksh/eval.c,v 1.158 2014/10/19 21:53:07 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/eval.c,v 1.159 2014/11/19 21:49:12 tg Exp $");
/*
* string expansion
@ -1681,7 +1681,7 @@ maybe_expand_tilde(const char *p, XString *dsp, char **dpp, int isassign)
}
*tp = '\0';
r = (p[0] == EOS || p[0] == CHAR || p[0] == CSUBST) ?
tilde(Xstring(ts, tp)) : NULL;
do_tilde(Xstring(ts, tp)) : NULL;
Xfree(ts, tp);
if (r) {
while (*r) {
@ -1703,7 +1703,7 @@ maybe_expand_tilde(const char *p, XString *dsp, char **dpp, int isassign)
*/
char *
tilde(char *cp)
do_tilde(char *cp)
{
char *dp = null;

4
sh.h
View File

@ -169,7 +169,7 @@
#endif
#ifdef EXTERN
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.703 2014/11/19 18:44:11 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.704 2014/11/19 21:49:12 tg Exp $");
#endif
#define MKSH_VERSION "R50 2014/11/19"
@ -1645,7 +1645,7 @@ char *evalonestr(const char *cp, int);
char *debunk(char *, const char *, size_t);
void expand(const char *, XPtrV *, int);
int glob_str(char *, XPtrV *, bool);
char *tilde(char *);
char *do_tilde(char *);
/* exec.c */
int execute(struct op * volatile, volatile int, volatile int * volatile);
int shcomexec(const char **);