diff options
author | wiz <wiz@pkgsrc.org> | 2002-07-05 13:14:23 +0000 |
---|---|---|
committer | wiz <wiz@pkgsrc.org> | 2002-07-05 13:14:23 +0000 |
commit | cd21fd6491575e8fab450240abe956643d8d455a (patch) | |
tree | 5fd9c3693d476edf6be6c0f5eb3f074002b62fbb /pkgtools | |
parent | bb2cc9141ceea8afceb39e13deeb002653d78839 (diff) | |
download | pkgsrc-cd21fd6491575e8fab450240abe956643d8d455a.tar.gz |
Remove $Id$ from patch, and standardize. regen distinfo.
Diffstat (limited to 'pkgtools')
-rw-r--r-- | pkgtools/pkg_install/distinfo | 4 | ||||
-rw-r--r-- | pkgtools/pkg_install/patches/patch-ah | 152 |
2 files changed, 77 insertions, 79 deletions
diff --git a/pkgtools/pkg_install/distinfo b/pkgtools/pkg_install/distinfo index 25661bf5ad9..6980348f04b 100644 --- a/pkgtools/pkg_install/distinfo +++ b/pkgtools/pkg_install/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.10 2002/07/05 13:12:35 abs Exp $ +$NetBSD: distinfo,v 1.11 2002/07/05 13:14:23 wiz Exp $ SHA1 (pkg_install-20020402.tar.gz) = 36094d2e056207a9cfd7ccc63a1e8bdfa7b88c33 Size (pkg_install-20020402.tar.gz) = 81920 bytes @@ -9,4 +9,4 @@ SHA1 (patch-ad) = 4adf3b44a81ce34bedf74530cccdca0b8a4f066d SHA1 (patch-ae) = 021db3f24f483c3eb10c966eeb8cde4b3b5baf2d SHA1 (patch-af) = b1d9ce8d3c3e592a67db7ac9676a72317a1485c5 SHA1 (patch-ag) = e30435f0a626a893934c725c605486a145e27690 -SHA1 (patch-ah) = 4cd06f65911763c35498b4b1772389d3f15ebc09 +SHA1 (patch-ah) = ae0cee4e6f6efd740fc0d4288f8f71dd0039a913 diff --git a/pkgtools/pkg_install/patches/patch-ah b/pkgtools/pkg_install/patches/patch-ah index 3e3aa23b5a8..cdbdaaf0322 100644 --- a/pkgtools/pkg_install/patches/patch-ah +++ b/pkgtools/pkg_install/patches/patch-ah @@ -1,77 +1,75 @@ -*** /dev/null Wed Apr 10 16:37:55 2002 ---- lib/fgetln.c Fri Jun 21 17:18:19 2002 -*************** -*** 0 **** ---- 1,72 ---- -+ /* $Id: patch-ah,v 1.1 2002/07/03 22:43:41 abs Exp $ */ -+ -+ /* -+ * Copyright 1999 Luke Mewburn <lukem@netbsd.org>. -+ * All rights reserved. -+ * -+ * Redistribution and use in source and binary forms, with or without -+ * modification, are permitted provided that the following conditions -+ * are met: -+ * 1. Redistributions of source code must retain the above copyright -+ * notice, this list of conditions and the following disclaimer. -+ * 2. Redistributions in binary form must reproduce the above copyright -+ * notice, this list of conditions and the following disclaimer in the -+ * documentation and/or other materials provided with the distribution. -+ * 3. The name of the author may not be used to endorse or promote products -+ * derived from this software without specific prior written permission. -+ * -+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR -+ * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE -+ * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+ */ -+ -+ #include "lib.h" -+ #include <err.h> -+ -+ #define BUFCHUNKS BUFSIZ -+ -+ char * -+ fgetln(FILE *fp, size_t *len) -+ { -+ static char *buf; -+ static size_t bufsize; -+ size_t buflen; -+ char curbuf[BUFCHUNKS]; -+ char *p; -+ -+ if (buf == NULL) { -+ bufsize = BUFCHUNKS; -+ buf = (char *)malloc(bufsize); -+ if (buf == NULL) -+ err(1, "Unable to allocate buffer for fgetln()"); -+ } -+ -+ *buf = '\0'; -+ buflen = 0; -+ while ((p = fgets(curbuf, sizeof(curbuf), fp)) != NULL) { -+ size_t l; -+ -+ l = strlen(p); -+ if (bufsize < buflen + l) { -+ bufsize += BUFCHUNKS; -+ if ((buf = (char *)realloc(buf, bufsize)) == NULL) -+ err(1, "Unable to allocate %ld bytes of memory", -+ (long)bufsize); -+ } -+ strcpy(buf + buflen, p); -+ buflen += l; -+ if (p[l - 1] == '\n') -+ break; -+ } -+ if (p == NULL && *buf == '\0') -+ return (NULL); -+ *len = strlen(buf); -+ return (buf); -+ } +$NetBSD: patch-ah,v 1.2 2002/07/05 13:14:24 wiz Exp $ + +--- lib/fgetln.c.orig Fri Jul 5 15:12:30 2002 ++++ lib/fgetln.c +@@ -0,0 +1,70 @@ ++/* ++ * Copyright 1999 Luke Mewburn <lukem@netbsd.org>. ++ * All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions ++ * are met: ++ * 1. Redistributions of source code must retain the above copyright ++ * notice, this list of conditions and the following disclaimer. ++ * 2. Redistributions in binary form must reproduce the above copyright ++ * notice, this list of conditions and the following disclaimer in the ++ * documentation and/or other materials provided with the distribution. ++ * 3. The name of the author may not be used to endorse or promote products ++ * derived from this software without specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR ++ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES ++ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ++ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, ++ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ++ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS ++ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ++ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR ++ * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE ++ * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ */ ++ ++#include "lib.h" ++#include <err.h> ++ ++#define BUFCHUNKS BUFSIZ ++ ++char * ++fgetln(FILE *fp, size_t *len) ++{ ++ static char *buf; ++ static size_t bufsize; ++ size_t buflen; ++ char curbuf[BUFCHUNKS]; ++ char *p; ++ ++ if (buf == NULL) { ++ bufsize = BUFCHUNKS; ++ buf = (char *)malloc(bufsize); ++ if (buf == NULL) ++ err(1, "Unable to allocate buffer for fgetln()"); ++ } ++ ++ *buf = '\0'; ++ buflen = 0; ++ while ((p = fgets(curbuf, sizeof(curbuf), fp)) != NULL) { ++ size_t l; ++ ++ l = strlen(p); ++ if (bufsize < buflen + l) { ++ bufsize += BUFCHUNKS; ++ if ((buf = (char *)realloc(buf, bufsize)) == NULL) ++ err(1, "Unable to allocate %ld bytes of memory", ++ (long)bufsize); ++ } ++ strcpy(buf + buflen, p); ++ buflen += l; ++ if (p[l - 1] == '\n') ++ break; ++ } ++ if (p == NULL && *buf == '\0') ++ return (NULL); ++ *len = strlen(buf); ++ return (buf); ++} |