From b18a1db69b3dd6dacbc169afd4dc29600d8d660c Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Mon, 16 Feb 1998 07:54:30 +0000 Subject: use abs() on the width for compat with other versions of fmt that accept -width; ross --- usr.bin/fmt/fmt.c | 8 ++++---- 1 file 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) -- cgit v1.2.3