aboutsummaryrefslogtreecommitdiffstats
path: root/src/cmds.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmds.c')
-rw-r--r--src/cmds.c25
1 files changed, 15 insertions, 10 deletions
diff --git a/src/cmds.c b/src/cmds.c
index 7be3a7782a17..a8e33bdbc3f6 100644
--- a/src/cmds.c
+++ b/src/cmds.c
@@ -1,5 +1,5 @@
-/* $NetBSD: cmds.c,v 1.17 2010/01/12 06:55:47 lukem Exp $ */
-/* from NetBSD: cmds.c,v 1.130 2009/07/13 19:05:41 roy Exp */
+/* $NetBSD: cmds.c,v 1.18 2013/05/05 11:17:30 lukem Exp $ */
+/* from NetBSD: cmds.c,v 1.135 2012/12/22 16:57:09 christos Exp */
/*-
* Copyright (c) 1996-2009 The NetBSD Foundation, Inc.
@@ -101,7 +101,7 @@
#if 0
static char sccsid[] = "@(#)cmds.c 8.6 (Berkeley) 10/9/94";
#else
-__RCSID(" NetBSD: cmds.c,v 1.130 2009/07/13 19:05:41 roy Exp ");
+__RCSID(" NetBSD: cmds.c,v 1.135 2012/12/22 16:57:09 christos Exp ");
#endif
#endif /* not lint */
@@ -116,6 +116,7 @@ __RCSID(" NetBSD: cmds.c,v 1.130 2009/07/13 19:05:41 roy Exp ");
#include <ctype.h>
#include <err.h>
+#include <errno.h>
#include <glob.h>
#include <limits.h>
#include <netdb.h>
@@ -149,7 +150,7 @@ static struct types {
static sigjmp_buf jabort;
static int confirm(const char *, const char *);
-static void mintr(int);
+__dead static void mintr(int);
static void mabort(const char *);
static void set_type(const char *);
@@ -563,14 +564,14 @@ void
reget(int argc, char *argv[])
{
- (void)getit(argc, argv, 1, "r+");
+ (void)getit(argc, argv, 1, restart_point ? "r+" : "a");
}
void
get(int argc, char *argv[])
{
- (void)getit(argc, argv, 0, restart_point ? "r+" : "w" );
+ (void)getit(argc, argv, 0, restart_point ? "r+" : "w");
}
/*
@@ -619,10 +620,14 @@ getit(int argc, char *argv[], int restartit, const char *gmode)
ret = stat(locfile, &stbuf);
if (restartit == 1) {
if (ret < 0) {
- warn("Can't stat `%s'", locfile);
- goto freegetit;
+ if (errno != ENOENT) {
+ warn("Can't stat `%s'", locfile);
+ goto freegetit;
+ }
+ restart_point = 0;
}
- restart_point = stbuf.st_size;
+ else
+ restart_point = stbuf.st_size;
} else {
if (ret == 0) {
time_t mtime;
@@ -2677,7 +2682,7 @@ setoption(int argc, char *argv[])
return;
}
-#define OPTIONINDENT ((int) sizeof("http_proxy"))
+#define OPTIONINDENT ((int) sizeof("https_proxy"))
if (argc == 1) {
for (o = optiontab; o->name != NULL; o++) {
fprintf(ttyout, "%-*s\t%s\n", OPTIONINDENT,