summaryrefslogtreecommitdiffstats
path: root/bin/sh/input.c
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1996-09-03 14:16:06 +0000
committerpeter <peter@FreeBSD.org>1996-09-03 14:16:06 +0000
commit0475c084c22d974adb50e049f8526e7ba3325c20 (patch)
tree813be7fe988c4549d7c49e07f8aa26f6bed0c68a /bin/sh/input.c
parent46c0540195d8219fc18878aaf2e8f89c0c6778dc (diff)
downloadFreeBSD-src-0475c084c22d974adb50e049f8526e7ba3325c20.zip
FreeBSD-src-0475c084c22d974adb50e049f8526e7ba3325c20.tar.gz
Fix for PR#1287. This makes sh behave sensibly in case statements in the
face of aliases. Note, bash doesn't do aliases while running scripts, but "real" ksh does.. Also: Reduce redundant .Nm macros in (unused) bltin/echo.1 nuke error2, it's hardly used. More -Wall cleanups dont do certain history operations if NO_HISTORY defined handle quad_t's from resource limits Submitted by: Steve Price <sprice@hiwaay.net> (minor tweaks by me)
Diffstat (limited to 'bin/sh/input.c')
-rw-r--r--bin/sh/input.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/bin/sh/input.c b/bin/sh/input.c
index 1d41bb2..e1c530c 100644
--- a/bin/sh/input.c
+++ b/bin/sh/input.c
@@ -33,7 +33,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: input.c,v 1.4 1995/11/03 18:50:14 peter Exp $
+ * $Id: input.c,v 1.5 1996/09/01 10:20:18 peter Exp $
*/
#ifndef lint
@@ -178,14 +178,13 @@ pread()
retry:
if (parsefile->fd == 0 && el) {
const char *rl_cp;
- int len;
rl_cp = el_gets(el, &nr);
if (rl_cp == NULL)
nr = 0;
else {
/* XXX - BUFSIZE should redesign so not necessary */
- strcpy(parsenextc, rl_cp);
+ (void)strcpy(parsenextc, rl_cp);
}
} else {
@@ -286,13 +285,13 @@ check:
savec = *q;
*q = '\0';
-
+#ifndef NO_HISTORY
if (parsefile->fd == 0 && hist && something) {
INTOFF;
history(hist, whichprompt == 1 ? H_ENTER : H_ADD, parsenextc);
INTON;
}
-
+#endif
if (vflag) {
out2str(parsenextc);
OpenPOWER on IntegriCloud