Deleted Added
full compact
url.c (195212) url.c (206043)
1/*
2 * FreeBSD install - a package for the installation and maintainance
3 * of non-core utilities.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 5 unchanged lines hidden (view full) ---

14 * Jordan K. Hubbard
15 * 18 July 1993
16 *
17 * URL file access utilities.
18 *
19 */
20
21#include <sys/cdefs.h>
1/*
2 * FreeBSD install - a package for the installation and maintainance
3 * of non-core utilities.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 5 unchanged lines hidden (view full) ---

14 * Jordan K. Hubbard
15 * 18 July 1993
16 *
17 * URL file access utilities.
18 *
19 */
20
21#include <sys/cdefs.h>
22__FBSDID("$FreeBSD: head/usr.sbin/pkg_install/lib/url.c 195212 2009-06-30 20:53:57Z brian $");
22__FBSDID("$FreeBSD: head/usr.sbin/pkg_install/lib/url.c 206043 2010-04-01 14:27:29Z flz $");
23
24#include "lib.h"
25#include <err.h>
26#include <fetch.h>
27#include <libgen.h>
28#include <sys/wait.h>
29#include <stdio.h>
30

--- 72 unchanged lines hidden (view full) ---

103 return NULL;
104 }
105 }
106
107 fetchDebug = (Verbose > 0);
108 if ((ftp = fetchGetURL(fname, Verbose ? "v" : NULL)) == NULL) {
109 printf("Error: Unable to get %s: %s\n",
110 fname, fetchLastErrString);
23
24#include "lib.h"
25#include <err.h>
26#include <fetch.h>
27#include <libgen.h>
28#include <sys/wait.h>
29#include <stdio.h>
30

--- 72 unchanged lines hidden (view full) ---

103 return NULL;
104 }
105 }
106
107 fetchDebug = (Verbose > 0);
108 if ((ftp = fetchGetURL(fname, Verbose ? "v" : NULL)) == NULL) {
109 printf("Error: Unable to get %s: %s\n",
110 fname, fetchLastErrString);
111 /* If the fetch fails, yank the package. */
112 if (keep_package && unlink(pkg) < 0 && Verbose) {
113 warnx("failed to remove partially fetched package: %s", pkg);
114 }
111 return NULL;
112 }
113
114 if (isatty(0) || Verbose)
115 printf("Fetching %s...", fname), fflush(stdout);
116 pen[0] = '\0';
117 if ((rp = make_playpen(pen, 0)) == NULL) {
118 printf("Error: Unable to construct a new playpen for FTP!\n");

--- 49 unchanged lines hidden ---
115 return NULL;
116 }
117
118 if (isatty(0) || Verbose)
119 printf("Fetching %s...", fname), fflush(stdout);
120 pen[0] = '\0';
121 if ((rp = make_playpen(pen, 0)) == NULL) {
122 printf("Error: Unable to construct a new playpen for FTP!\n");

--- 49 unchanged lines hidden ---