From 7b429366b5fbd9a1566077d8afc442aacd3d85ea Mon Sep 17 00:00:00 2001 From: branch-fixup Date: Fri, 30 Jun 2006 18:25:43 +0000 Subject: [PATCH] Add files from parent branch HEAD: net/ipw/distinfo net/ipw/patches/patch-ab --- net/ipw/distinfo | 7 +++ net/ipw/patches/patch-ab | 102 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 109 insertions(+) create mode 100644 net/ipw/distinfo create mode 100644 net/ipw/patches/patch-ab diff --git a/net/ipw/distinfo b/net/ipw/distinfo new file mode 100644 index 00000000000..58c329f6cd8 --- /dev/null +++ b/net/ipw/distinfo @@ -0,0 +1,7 @@ +$NetBSD: distinfo,v 1.5 2005/02/24 12:13:50 agc Exp $ + +SHA1 (ipw-3.3a.tar.gz) = ca7943d263b9ace3951badeb4189e5aa9c2c8ddd +RMD160 (ipw-3.3a.tar.gz) = 7b159404a1fbd897b2ec1bb9516ab3b1a897345d +Size (ipw-3.3a.tar.gz) = 17238 bytes +SHA1 (patch-aa) = 60cf070bacd1f500ebc666d2947b1153626369b5 +SHA1 (patch-ab) = 91f504acc0c21fea3953518eb64a13b1c876f3dc diff --git a/net/ipw/patches/patch-ab b/net/ipw/patches/patch-ab new file mode 100644 index 00000000000..a8ae4f6bb0a --- /dev/null +++ b/net/ipw/patches/patch-ab @@ -0,0 +1,102 @@ +$NetBSD$ + +--- ipw.c.orig 1999-03-30 08:04:12.000000000 +0100 ++++ ipw.c 2006-06-30 19:22:53.000000000 +0100 +@@ -257,7 +257,7 @@ + static int my_opterr = 1; /* if error message should be printed */ + static int my_optind = 1; /* index into parent argv vector */ + static int my_optopt; /* character checked for validity */ +-static int optreset; /* reset getopt */ ++static int my_optreset; /* reset getopt */ + static char *my_optarg; /* argument associated with option */ + + #define BADCH (int)'?' +@@ -275,9 +275,9 @@ + static char *place = EMSG; /* option letter processing */ + register char *oli = NULL; /* option letter list index */ + +- if (optreset || ! *place) ++ if (my_optreset || ! *place) + { /* update scanning pointer */ +- optreset = 0; ++ my_optreset = 0; + if (my_optind >= nargc || *(place = nargv[my_optind]) != '-') + { + place = EMSG; +@@ -782,7 +782,7 @@ + if (!p) + return NULL; + +- for (q = p + rwhois_prefix_len; *q && !isspace (*q); q++) ++ for (q = p + rwhois_prefix_len; *q && !isspace (*q) && *q != ':'; q++) + continue; + srvr_len = q - p; + server = (char *) xmalloc (srvr_len + 1); +@@ -1745,14 +1745,14 @@ + { + static char const ripe1[] = "European Regional Internet Registry/RIPE"; + static char const ripe2[] = "RIPE NCC (NET-RIPE-NCC-"; +- static char const apnic[] = "Asia Pacific Network Information Center"; ++ static char const apnic[] = "Asia Pacific Network Information Centre"; + static char const nomatch[] = "No match"; + static char const updated[] = "Record last updated on "; + static char const hostname[] = "Hostname:"; + auto char arin_query[200]; + + try_next_addr: +- strcpy (arin_query, "net "); ++ strcpy (arin_query, "n "); + strcat (arin_query, dotted_blockname); + whois_data = whois (arin_server, arin_query); + if (whois_data == NULL) /* Server must be down! */ +@@ -1760,8 +1760,15 @@ + if (strncmp (whois_data, nomatch, sizeof nomatch -1)) + { + register char const *rwhois_data; ++ char const *orgname = strstr (whois_data, "OrgName:"); + +- if (!strncmp (whois_data, ripe1, sizeof ripe1 - 1)) ++ if (orgname) ++ { ++ orgname += sizeof "OrgName:"; ++ while (isspace (*orgname)) ++ orgname++; ++ } ++ if (orgname && !strncmp (orgname, ripe1, sizeof ripe1 - 1)) + { + if (try_ripe (dotted_quad)) + break; +@@ -1769,7 +1776,7 @@ + return 0; + } + +- if (!strncmp (whois_data, ripe2, sizeof ripe2 - 1)) ++ if (orgname && !strncmp (orgname, ripe2, sizeof ripe2 - 1)) + { + if (try_ripe (dotted_quad)) + break; +@@ -1777,7 +1784,7 @@ + return 0; + } + +- if (!strncmp (whois_data, apnic, sizeof apnic - 1)) ++ if (orgname && !strncmp (orgname, apnic, sizeof apnic - 1)) + { + if (try_apnic (dotted_quad)) + break; +@@ -1802,6 +1809,7 @@ + goto try_next_addr; + } + ++#if 0 /* needs fixing */ + if (!substr (whois_data, updated)) + { + /* Handle a special case. ARIN has returned to us a list of +@@ -1813,6 +1821,7 @@ + if ((whois_data = arin_grunge (whois_data, addr)) == NULL) + return 1; + } ++#endif + if ((rwhois_data = fetch_rwhois_data (whois_data, dotted_quad))) + return present_rwhois_style_results (rwhois_data, whois_data); + else -- 2.41.0