From 2708e4180f952780c6b089d07d9ab5ae8babf1e9 Mon Sep 17 00:00:00 2001 From: christos Date: Thu, 15 Jan 1998 19:39:11 +0000 Subject: [PATCH] PR/4805: Ty Sarna: read builtin does not remove trailing blanks. --- bin/sh/miscbltin.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bin/sh/miscbltin.c b/bin/sh/miscbltin.c index 9050584842d8..9814236f488f 100644 --- a/bin/sh/miscbltin.c +++ b/bin/sh/miscbltin.c @@ -1,4 +1,4 @@ -/* $NetBSD: miscbltin.c,v 1.20 1997/11/05 14:05:28 kleink Exp $ */ +/* $NetBSD: miscbltin.c,v 1.21 1998/01/15 19:39:11 christos Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -41,7 +41,7 @@ #if 0 static char sccsid[] = "@(#)miscbltin.c 8.4 (Berkeley) 5/4/95"; #else -__RCSID("$NetBSD: miscbltin.c,v 1.20 1997/11/05 14:05:28 kleink Exp $"); +__RCSID("$NetBSD: miscbltin.c,v 1.21 1998/01/15 19:39:11 christos Exp $"); #endif #endif /* not lint */ @@ -154,6 +154,9 @@ readcmd(argc, argv) } } STACKSTRNUL(p); + /* Remove trailing blanks */ + while (strchr(ifs, *--p) != NULL) + *p = '\0'; setvar(*ap, stackblock(), 0); while (*++ap != NULL) setvar(*ap, nullstr, 0);