fix, even removing code, good…
This commit is contained in:
9
edit.c
9
edit.c
@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
#include "sh.h"
|
#include "sh.h"
|
||||||
|
|
||||||
__RCSID("$MirOS: src/bin/mksh/edit.c,v 1.216 2011/06/30 13:48:12 tg Exp $");
|
__RCSID("$MirOS: src/bin/mksh/edit.c,v 1.217 2011/06/30 14:09:04 tg Exp $");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* in later versions we might use libtermcap for this, but since external
|
* in later versions we might use libtermcap for this, but since external
|
||||||
@ -533,7 +533,7 @@ x_cf_glob(int *flagsp, const char *buf, int buflen, int pos, int *startp,
|
|||||||
|
|
||||||
if (len >= 0) {
|
if (len >= 0) {
|
||||||
char *toglob, *s;
|
char *toglob, *s;
|
||||||
bool saw_slash = false, saw_dollar = false, saw_glob = false;
|
bool saw_dollar = false, saw_glob = false;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Given a string, copy it and possibly add a '*' to the end.
|
* Given a string, copy it and possibly add a '*' to the end.
|
||||||
@ -564,8 +564,7 @@ x_cf_glob(int *flagsp, const char *buf, int buflen, int pos, int *startp,
|
|||||||
(*s == '+' || *s == '@' || *s == '!'))) {
|
(*s == '+' || *s == '@' || *s == '!'))) {
|
||||||
/* just expand based on the extglob */
|
/* just expand based on the extglob */
|
||||||
saw_glob = true;
|
saw_glob = true;
|
||||||
} else if (*s == '/')
|
}
|
||||||
saw_slash = true;
|
|
||||||
}
|
}
|
||||||
if (saw_glob) {
|
if (saw_glob) {
|
||||||
/*
|
/*
|
||||||
@ -577,7 +576,7 @@ x_cf_glob(int *flagsp, const char *buf, int buflen, int pos, int *startp,
|
|||||||
} else if (saw_dollar || *toglob == '~') {
|
} else if (saw_dollar || *toglob == '~') {
|
||||||
/* do not append a glob, nor later a space */
|
/* do not append a glob, nor later a space */
|
||||||
*flagsp |= XCF_IS_SUBGLOB;
|
*flagsp |= XCF_IS_SUBGLOB;
|
||||||
} else if (saw_slash) {
|
} else {
|
||||||
/* append a glob, this is not just a tilde */
|
/* append a glob, this is not just a tilde */
|
||||||
toglob[len] = '*';
|
toglob[len] = '*';
|
||||||
toglob[len + 1] = '\0';
|
toglob[len + 1] = '\0';
|
||||||
|
Reference in New Issue
Block a user