Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/pkg_install/lib Don't use special-case code for the...
details: https://anonhg.NetBSD.org/src/rev/b9ac366636b3
branches: trunk
changeset: 539794:b9ac366636b3
user: agc <agc%NetBSD.org@localhost>
date: Tue Nov 26 14:46:45 2002 +0000
description:
Don't use special-case code for the '_' modifier, just add it to the
modifier table. Fixes a problem pointed out by Rene Hexel.
diffstat:
usr.sbin/pkg_install/lib/str.c | 12 +++---------
1 files changed, 3 insertions(+), 9 deletions(-)
diffs (39 lines):
diff -r 01d2784d47b3 -r b9ac366636b3 usr.sbin/pkg_install/lib/str.c
--- a/usr.sbin/pkg_install/lib/str.c Tue Nov 26 14:43:39 2002 +0000
+++ b/usr.sbin/pkg_install/lib/str.c Tue Nov 26 14:46:45 2002 +0000
@@ -1,11 +1,11 @@
-/* $NetBSD: str.c,v 1.40 2002/11/14 09:40:23 agc Exp $ */
+/* $NetBSD: str.c,v 1.41 2002/11/26 14:46:45 agc Exp $ */
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char *rcsid = "Id: str.c,v 1.5 1997/10/08 07:48:21 charnier Exp";
#else
-__RCSID("$NetBSD: str.c,v 1.40 2002/11/14 09:40:23 agc Exp $");
+__RCSID("$NetBSD: str.c,v 1.41 2002/11/26 14:46:45 agc Exp $");
#endif
#endif
@@ -153,6 +153,7 @@
{ "beta", 4, Beta },
{ "rc", 2, RC },
{ "pl", 2, Dot },
+ { "_", 1, Dot },
{ ".", 1, Dot },
{ NULL, 0, 0 }
};
@@ -197,13 +198,6 @@
return 0;
}
ALLOC(int64_t, ap->v, ap->size, ap->c, 62, "mkver", exit(EXIT_FAILURE));
- if (*num == '_') {
- num += 1;
- if (isdigit(*(num + 1))) {
- ap->v[ap->c++] = Dot;
- return 1;
- }
- }
if (isdigit(*num)) {
for (cp = num, n = 0 ; isdigit(*num) ; num++) {
n = (n * 10) + (*num - '0');
Home |
Main Index |
Thread Index |
Old Index