Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/sort When parsing numbers, allow a leading '+'.
details: https://anonhg.NetBSD.org/src/rev/2aaf95d8434e
branches: trunk
changeset: 784156:2aaf95d8434e
user: apb <apb%NetBSD.org@localhost>
date: Sun Jan 20 10:12:58 2013 +0000
description:
When parsing numbers, allow a leading '+'.
diffstat:
usr.bin/sort/fields.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diffs (29 lines):
diff -r 611cb5c3094a -r 2aaf95d8434e usr.bin/sort/fields.c
--- a/usr.bin/sort/fields.c Sun Jan 20 07:32:45 2013 +0000
+++ b/usr.bin/sort/fields.c Sun Jan 20 10:12:58 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fields.c,v 1.32 2010/12/18 23:09:48 christos Exp $ */
+/* $NetBSD: fields.c,v 1.33 2013/01/20 10:12:58 apb Exp $ */
/*-
* Copyright (c) 2000-2003 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
#include "sort.h"
-__RCSID("$NetBSD: fields.c,v 1.32 2010/12/18 23:09:48 christos Exp $");
+__RCSID("$NetBSD: fields.c,v 1.33 2013/01/20 10:12:58 apb Exp $");
#define SKIP_BLANKS(ptr) { \
if (BLANK & d_mask[*(ptr)]) \
@@ -275,7 +275,10 @@
if (*line == '-') { /* set the sign */
negate ^= 0xff;
line++;
+ } else if (*line == '+') {
+ line++;
}
+
/* eat initial zeroes */
for (; *line == '0' && line < lineend; line++)
continue;
Home |
Main Index |
Thread Index |
Old Index