diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-02-16 07:54:30 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-02-16 07:54:30 +0000 |
commit | b18a1db69b3dd6dacbc169afd4dc29600d8d660c (patch) | |
tree | 99d43cf5e50edec8cd05723e49473f2cff2ac4de /usr.bin/fmt | |
parent | 68d6999afdf0e9d9d8314f8275eff12cd58edda8 (diff) |
use abs() on the width for compat with other versions of fmt that accept -width; ross
Diffstat (limited to 'usr.bin/fmt')
-rw-r--r-- | usr.bin/fmt/fmt.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/fmt/fmt.c b/usr.bin/fmt/fmt.c index 1a6ad9f55b5..73de68cb516 100644 --- a/usr.bin/fmt/fmt.c +++ b/usr.bin/fmt/fmt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fmt.c,v 1.8 1997/10/01 15:31:03 millert Exp $ */ +/* $OpenBSD: fmt.c,v 1.9 1998/02/16 07:54:29 deraadt Exp $ */ /* $NetBSD: fmt.c,v 1.4 1995/09/01 01:29:41 jtc Exp $ */ /* @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)fmt.c 8.1 (Berkeley) 7/20/93"; #else -static char rcsid[] = "$OpenBSD: fmt.c,v 1.8 1997/10/01 15:31:03 millert Exp $"; +static char rcsid[] = "$OpenBSD: fmt.c,v 1.9 1998/02/16 07:54:29 deraadt Exp $"; #endif #endif /* not lint */ @@ -133,11 +133,11 @@ main(argc, argv) if (argc > 1 && (1 == (sscanf(argv[1], "%d", &number)))) { argv++; argc--; - goal_length = number; + goal_length = abs(number); if (argc > 1 && (1 == (sscanf(argv[1], "%d", &number)))) { argv++; argc--; - max_length = number; + max_length = abs(number); } } if (max_length <= goal_length) |