From: tb Date: Fri, 5 Aug 2016 13:21:31 +0000 (+0000) Subject: Initialize reps, begin, end, steps to their defaults. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=14a74a08143dd0ca3e6bb53cbfe0fafc69f99a1e;p=openbsd Initialize reps, begin, end, steps to their defaults. Makes jot - - - - behave the same way as jot -, jot - - and jot - - - instead of spurting out zeroes indefinitely. Fixes the dddd regression test and matches FreeBSD and NetBSD. From attila () stalphonsos ! com, thanks! 'good direction' deraadt --- diff --git a/usr.bin/jot/jot.c b/usr.bin/jot/jot.c index 08da69f270b..62771001714 100644 --- a/usr.bin/jot/jot.c +++ b/usr.bin/jot/jot.c @@ -1,4 +1,4 @@ -/* $OpenBSD: jot.c,v 1.28 2016/07/17 04:04:46 tb Exp $ */ +/* $OpenBSD: jot.c,v 1.29 2016/08/05 13:21:31 tb Exp $ */ /* $NetBSD: jot.c,v 1.3 1994/12/02 20:29:43 pk Exp $ */ /*- @@ -54,10 +54,10 @@ #define is_default(s) (strcmp((s), "-") == 0) -static double begin; -static double ender; -static double s; -static long reps; +static double begin = BEGIN_DEF; +static double ender = ENDER_DEF; +static double s = STEP_DEF; +static long reps = REPS_DEF; static bool randomize; static bool infinity; static bool boring;