aboutsummaryrefslogtreecommitdiffstats
path: root/ftp.c
diff options
context:
space:
mode:
authorDai Sato <satodai@w3m.jp>2006-04-07 13:21:11 +0000
committerDai Sato <satodai@w3m.jp>2006-04-07 13:21:11 +0000
commit22d66ca5850bf0190aa48d7f4442484f01fc7d02 (patch)
tree5b96b7e5bd65f08ad23867bc0738a0fef56f35df /ftp.c
parentapply multiple patches on w3m-dev(-en) ML since Jun 2005 to Jan 2006. (diff)
downloadw3m-22d66ca5850bf0190aa48d7f4442484f01fc7d02.tar.gz
w3m-22d66ca5850bf0190aa48d7f4442484f01fc7d02.zip
rewind to 10 Feb 2006.
Diffstat (limited to 'ftp.c')
-rw-r--r--ftp.c19
1 files changed, 1 insertions, 18 deletions
diff --git a/ftp.c b/ftp.c
index 957ba6c..0ebb930 100644
--- a/ftp.c
+++ b/ftp.c
@@ -1,8 +1,6 @@
-/* $Id: ftp.c,v 1.36 2006/04/05 14:18:54 inu Exp $ */
+/* $Id: ftp.c,v 1.37 2006/04/07 13:21:11 inu Exp $ */
#include <stdio.h>
-#ifndef __MINGW32_VERSION
#include <pwd.h>
-#endif /* __MINGW32_VERSION */
#include <Str.h>
#include <signal.h>
#include <setjmp.h>
@@ -16,14 +14,10 @@
#include <malloc.h>
#endif /* DEBUG */
-#ifndef __MINGW32_VERSION
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
#include <arpa/inet.h>
-#else
-#include <winsock.h>
-#endif /* __MINGW32_VERSION */
typedef struct _FTP {
char *host;
@@ -377,14 +371,7 @@ openFTPStream(ParsedURL *pu, URLFile *uf)
term_cbreak();
}
else {
-#ifndef __MINGW32_VERSION
pwd = Strnew_charp((char *)getpass("Password: "));
-#else
- term_raw();
- pwd = Strnew_charp(inputLine("Password: ", NULL, IN_PASSWORD));
- pwd = Str_conv_to_system(pwd);
- term_cbreak();
-#endif /* __MINGW32_VERSION */
}
add_auth_cookie_flag = TRUE;
}
@@ -393,12 +380,8 @@ openFTPStream(ParsedURL *pu, URLFile *uf)
else if (ftppasswd != NULL && *ftppasswd != '\0')
pass = ftppasswd;
else {
-#ifndef __MINGW32_VERSION
struct passwd *mypw = getpwuid(getuid());
tmp = Strnew_charp(mypw ? mypw->pw_name : "anonymous");
-#else
- tmp = Strnew_charp("anonymous");
-#endif __MINGW32_VERSION
Strcat_char(tmp, '@');
pass = tmp->ptr;
}