diff options
author | Sadaf Ebrahimi <sadafebrahimi@google.com> | 2023-04-03 14:34:28 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2023-04-03 14:34:28 +0000 |
commit | 6d742e911565cf13b5b691c397305552b8c4402c (patch) | |
tree | 05d42c3978a283da1f69ca71abf6518b29990e55 /src/histrap.c | |
parent | e249d87246ec84c3a4a7d889915fa2caf919b1a7 (diff) | |
parent | b02792c9ac5b8ff483bec88fdb16c886edf576f7 (diff) | |
download | mksh-6d742e911565cf13b5b691c397305552b8c4402c.tar.gz |
Merge "Upgrade mksh to mksh-R59c"android-u-beta-1-gpl
Diffstat (limited to 'src/histrap.c')
-rw-r--r-- | src/histrap.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/histrap.c b/src/histrap.c index 84211c6..7f46201 100644 --- a/src/histrap.c +++ b/src/histrap.c @@ -27,7 +27,7 @@ #include <sys/file.h> #endif -__RCSID("$MirOS: src/bin/mksh/histrap.c,v 1.169 2019/09/16 21:10:33 tg Exp $"); +__RCSID("$MirOS: src/bin/mksh/histrap.c,v 1.170 2020/10/01 22:53:20 tg Exp $"); Trap sigtraps[ksh_NSIG + 1]; static struct sigaction Sigact_ign; @@ -415,7 +415,8 @@ hist_get(const char *str, bool approx, bool allow_cur) bool anchored = *str == '?' ? (++str, false) : true; /* the -1 is to avoid the current fc command */ - if ((n = findhist(histptr - history - 1, 0, str, anchored)) < 0) + if ((n = findhist(histptr - history - 1, str, false, + anchored)) < 0) bi_errorf(Tf_sD_s, str, Tnot_in_history); else hp = &history[n]; @@ -479,7 +480,7 @@ histnum(int n) * direction. */ int -findhist(int start, int fwd, const char *str, bool anchored) +findhist(int start, const char *str, bool fwd, bool anchored) { char **hp; int maxhist = histptr - history; |