95 lines
2.7 KiB
Text
95 lines
2.7 KiB
Text
$NetBSD: patch-ac,v 1.7 2002/06/28 19:05:23 agc Exp $
|
|
|
|
--- plpftp/ftp.cc.orig Mon Jan 17 06:49:41 2000
|
|
+++ plpftp/ftp.cc
|
|
@@ -34,6 +34,10 @@
|
|
#include <sys/stat.h>
|
|
#include <signal.h>
|
|
|
|
+#ifdef __NetBSD__
|
|
+#include <stdio.h>
|
|
+#endif
|
|
+
|
|
#include "defs.h"
|
|
#include "ftp.h"
|
|
#include "rfsv.h"
|
|
@@ -335,7 +339,7 @@
|
|
// never used to do this
|
|
char dateBuff[100];
|
|
struct tm *t;
|
|
- t = localtime(&time);
|
|
+ t = localtime((time_t *)&time);
|
|
strftime(dateBuff, 100, "%c", t);
|
|
cout << a.opAttr(attr);
|
|
cout << " " << dec << setw(10) << setfill(' ') << size;
|
|
@@ -365,7 +369,7 @@
|
|
else {
|
|
char dateBuff[100];
|
|
struct tm *t;
|
|
- t = localtime(&mtime);
|
|
+ t = localtime((time_t *)&mtime);
|
|
strftime(dateBuff, 100, "%c %Z", t);
|
|
cout << dateBuff << endl;
|
|
}
|
|
@@ -457,7 +461,7 @@
|
|
long attr = s.getDWord(8);
|
|
char dateBuff[100];
|
|
struct tm *t;
|
|
- t = localtime(&date);
|
|
+ t = localtime((time_t *)&date);
|
|
strftime(dateBuff, 100, "%c", t);
|
|
cout << a.opAttr(attr);
|
|
cout << " " << dec << setw(10) << setfill(' ') << size;
|
|
@@ -849,7 +853,7 @@
|
|
static long maskAttr;
|
|
|
|
static char*
|
|
-filename_generator(char *text, int state)
|
|
+filename_generator(const char *text, int state)
|
|
{
|
|
static int len;
|
|
|
|
@@ -884,7 +888,7 @@
|
|
}
|
|
|
|
static char *
|
|
-command_generator(char *text, int state)
|
|
+command_generator(const char *text, int state)
|
|
{
|
|
static int idx, len;
|
|
char *name;
|
|
@@ -907,13 +911,13 @@
|
|
}
|
|
|
|
static char **
|
|
-do_completion(char *text, int start, int end)
|
|
+do_completion(const char *text, int start, int end)
|
|
{
|
|
char **matches = NULL;
|
|
|
|
- rl_completion_entry_function = (Function *)null_completion;
|
|
+ rl_completion_entry_function = (CPFunction *)null_completion;
|
|
if (start == 0)
|
|
- matches = completion_matches(text, command_generator);
|
|
+ matches = rl_completion_matches(text, command_generator);
|
|
else {
|
|
int idx = 0;
|
|
char *name;
|
|
@@ -934,7 +938,7 @@
|
|
maskAttr = 0x0010;
|
|
}
|
|
|
|
- matches = completion_matches(text, filename_generator);
|
|
+ matches = rl_completion_matches(text, filename_generator);
|
|
}
|
|
return matches;
|
|
}
|
|
@@ -945,7 +949,7 @@
|
|
{
|
|
#if HAVE_LIBREADLINE
|
|
rl_readline_name = "plpftp";
|
|
- rl_completion_entry_function = (Function *)null_completion;
|
|
+ rl_completion_entry_function = (CPFunction *)null_completion;
|
|
rl_attempted_completion_function = (CPPFunction *)do_completion;
|
|
#endif
|
|
}
|