collective R54 release preparation multi-merger:
install both lksh and mksh manpages from Build.sh (Martijn Dekker) spelling fixes (Larry Hynes) manpage improvements (Martijn Dekker) initial port to Harvey-OS’ APEX (Ronald G. Minnich, Elbing Miss, Álvaro Jurado) more from komh’s OS/2 port (KO Myung-Hun)
This commit is contained in:
14
eval.c
14
eval.c
@ -23,7 +23,7 @@
|
||||
|
||||
#include "sh.h"
|
||||
|
||||
__RCSID("$MirOS: src/bin/mksh/eval.c,v 1.193 2016/09/01 12:59:09 tg Exp $");
|
||||
__RCSID("$MirOS: src/bin/mksh/eval.c,v 1.194 2016/11/11 23:31:34 tg Exp $");
|
||||
|
||||
/*
|
||||
* string expansion
|
||||
@ -1576,7 +1576,7 @@ globit(XString *xs, /* dest string */
|
||||
* SunOS 4.1.3 does this...
|
||||
*/
|
||||
if ((check & GF_EXCHECK) && xp > Xstring(*xs, xp) &&
|
||||
xp[-1] == '/' && !S_ISDIR(lstatb.st_mode) &&
|
||||
mksh_cdirsep(xp[-1]) && !S_ISDIR(lstatb.st_mode) &&
|
||||
(!S_ISLNK(lstatb.st_mode) ||
|
||||
stat_check() < 0 || !S_ISDIR(statb.st_mode)))
|
||||
return;
|
||||
@ -1586,7 +1586,7 @@ globit(XString *xs, /* dest string */
|
||||
* directory
|
||||
*/
|
||||
if (((check & GF_MARKDIR) && (check & GF_GLOBBED)) &&
|
||||
xp > Xstring(*xs, xp) && xp[-1] != '/' &&
|
||||
xp > Xstring(*xs, xp) && !mksh_cdirsep(xp[-1]) &&
|
||||
(S_ISDIR(lstatb.st_mode) ||
|
||||
(S_ISLNK(lstatb.st_mode) && stat_check() > 0 &&
|
||||
S_ISDIR(statb.st_mode)))) {
|
||||
@ -1601,11 +1601,11 @@ globit(XString *xs, /* dest string */
|
||||
|
||||
if (xp > Xstring(*xs, xp))
|
||||
*xp++ = '/';
|
||||
while (*sp == '/') {
|
||||
while (mksh_cdirsep(*sp)) {
|
||||
Xcheck(*xs, xp);
|
||||
*xp++ = *sp++;
|
||||
}
|
||||
np = strchr(sp, '/');
|
||||
np = mksh_sdirsep(sp);
|
||||
if (np != NULL) {
|
||||
se = np;
|
||||
/* don't assume '/', can be multiple kinds */
|
||||
@ -1713,8 +1713,8 @@ maybe_expand_tilde(const char *p, XString *dsp, char **dpp, bool isassign)
|
||||
|
||||
Xinit(ts, tp, 16, ATEMP);
|
||||
/* : only for DOASNTILDE form */
|
||||
while (p[0] == CHAR && p[1] != '/' && (!isassign || p[1] != ':'))
|
||||
{
|
||||
while (p[0] == CHAR && !mksh_cdirsep(p[1]) &&
|
||||
(!isassign || p[1] != ':')) {
|
||||
Xcheck(ts, tp);
|
||||
*tp++ = p[1];
|
||||
p += 2;
|
||||
|
Reference in New Issue
Block a user