diff options
author | peter <peter@FreeBSD.org> | 1996-09-03 14:16:06 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1996-09-03 14:16:06 +0000 |
commit | 0475c084c22d974adb50e049f8526e7ba3325c20 (patch) | |
tree | 813be7fe988c4549d7c49e07f8aa26f6bed0c68a /bin/sh/miscbltin.c | |
parent | 46c0540195d8219fc18878aaf2e8f89c0c6778dc (diff) | |
download | FreeBSD-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/miscbltin.c')
-rw-r--r-- | bin/sh/miscbltin.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/bin/sh/miscbltin.c b/bin/sh/miscbltin.c index 97b2885..4122ac5 100644 --- a/bin/sh/miscbltin.c +++ b/bin/sh/miscbltin.c @@ -33,7 +33,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: miscbltin.c,v 1.5 1996/09/01 10:20:46 peter Exp $ + * $Id: miscbltin.c,v 1.6 1996/09/03 13:35:10 peter Exp $ */ #ifndef lint @@ -51,6 +51,7 @@ static char sccsid[] = "@(#)miscbltin.c 8.4 (Berkeley) 5/4/95"; #include <unistd.h> #include <ctype.h> #include <errno.h> +#include <stdio.h> #include "shell.h" #include "options.h" @@ -292,7 +293,7 @@ ulimitcmd(argc, argv) char **argv; { register int c; - quad_t val; + quad_t val = 0; enum { SOFT = 0x1, HARD = 0x2 } how = SOFT | HARD; const struct limits *l; @@ -365,7 +366,7 @@ ulimitcmd(argc, argv) else { val /= l->factor; - out1fmt("%ld\n", (long) val); + out1fmt("%qd\n", (quad_t) val); } } return 0; @@ -393,7 +394,7 @@ ulimitcmd(argc, argv) else { val /= l->factor; - out1fmt("%ld\n", (long) val); + out1fmt("%qd\n", (quad_t) val); } } return 0; |