Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/seq The sign is optional in an exponent
details: https://anonhg.NetBSD.org/src/rev/1191e365543d
branches: trunk
changeset: 357156:1191e365543d
user: ginsbach <ginsbach%NetBSD.org@localhost>
date: Sun Oct 29 01:28:46 2017 +0000
description:
The sign is optional in an exponent
Treat numbers after [Ee] as a positive number rather than an invalid
numeric sequence. (Taken from FreeBSD but done differently.)
diffstat:
usr.bin/seq/seq.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (26 lines):
diff -r 0b4ec4214292 -r 1191e365543d usr.bin/seq/seq.c
--- a/usr.bin/seq/seq.c Sun Oct 29 00:20:42 2017 +0000
+++ b/usr.bin/seq/seq.c Sun Oct 29 01:28:46 2017 +0000
@@ -31,7 +31,7 @@
#ifndef lint
__COPYRIGHT("@(#) Copyright (c) 2005\
The NetBSD Foundation, Inc. All rights reserved.");
-__RCSID("$NetBSD: seq.c,v 1.9 2017/10/29 00:02:23 ginsbach Exp $");
+__RCSID("$NetBSD: seq.c,v 1.10 2017/10/29 01:28:46 ginsbach Exp $");
#endif /* not lint */
#include <ctype.h>
@@ -211,10 +211,10 @@
}
if (ISEXP((unsigned char)*s)) {
s++;
- if (ISSIGN((unsigned char)*s)) {
+ /* optional sign */
+ if (ISSIGN((unsigned char)*s))
s++;
- continue;
- }
+ continue;
}
break;
}
Home |
Main Index |
Thread Index |
Old Index