Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-4]: src/usr.sbin/pkg_install/lib pullup 1.26->1.27 (cgd): Add s...



details:   https://anonhg.NetBSD.org/src/rev/959fd5386b96
branches:  netbsd-1-4
changeset: 468929:959fd5386b96
user:      perry <perry%NetBSD.org@localhost>
date:      Wed Jun 23 15:00:57 1999 +0000

description:
pullup 1.26->1.27 (cgd): Add support for fetching packages from HTTP URLs

diffstat:

 usr.sbin/pkg_install/lib/file.c |  16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)

diffs (50 lines):

diff -r 794029363550 -r 959fd5386b96 usr.sbin/pkg_install/lib/file.c
--- a/usr.sbin/pkg_install/lib/file.c   Wed Jun 23 14:59:44 1999 +0000
+++ b/usr.sbin/pkg_install/lib/file.c   Wed Jun 23 15:00:57 1999 +0000
@@ -1,11 +1,11 @@
-/*     $NetBSD: file.c,v 1.25.2.1 1999/04/12 03:10:06 hubertf Exp $    */
+/*     $NetBSD: file.c,v 1.25.2.2 1999/06/23 15:00:57 perry Exp $      */
 
 #include <sys/cdefs.h>
 #ifndef lint
 #if 0
 static const char *rcsid = "from FreeBSD Id: file.c,v 1.29 1997/10/08 07:47:54 charnier Exp";
 #else
-__RCSID("$NetBSD: file.c,v 1.25.2.1 1999/04/12 03:10:06 hubertf Exp $");
+__RCSID("$NetBSD: file.c,v 1.25.2.2 1999/06/23 15:00:57 perry Exp $");
 #endif
 #endif
 
@@ -182,6 +182,8 @@
        ++fname;
     if (!strncmp(fname, "ftp://";, 6))
        return TRUE;
+    if (!strncmp(fname, "http://";, 7))
+       return TRUE;
     return FALSE;
 }
 
@@ -194,7 +196,10 @@
     while (isspace((unsigned char)*fname))
        ++fname;
     /* Don't ever call this on a bad URL! */
-    fname += strlen("ftp://";);
+    if (!strncmp(fname, "ftp://";, 6))
+       fname += strlen("ftp://";);
+    else
+       fname += strlen("http://";);
     /* Do we have a place to stick our work? */
     if ((ret = where) != NULL) {
        while (*fname && *fname != '/' && max--)
@@ -219,7 +224,10 @@
     while (isspace((unsigned char)*fname))
        ++fname;
     /* Don't ever call this on a bad URL! */
-    fname += strlen("ftp://";);
+    if (!strncmp(fname, "ftp://";, 6))
+       fname += strlen("ftp://";);
+    else
+       fname += strlen("http://";);
     /* Do we have a place to stick our work? */
     if ((ret = where) != NULL) {
        while (*fname && *fname != '/')



Home | Main Index | Thread Index | Old Index