fixed warning and minor portability fix
Modified: trunk/reactos/apps/utils/net/ftp/fake.c
Modified: trunk/reactos/apps/utils/net/ftp/ftp.c
_____
Modified: trunk/reactos/apps/utils/net/ftp/fake.c
--- trunk/reactos/apps/utils/net/ftp/fake.c 2005-04-17 19:16:39 UTC
(rev 14653)
+++ trunk/reactos/apps/utils/net/ftp/fake.c 2005-04-17 19:32:24 UTC
(rev 14654)
@@ -235,7 +235,7 @@
static char input[256];
HANDLE in;
HANDLE err;
- int count;
+ DWORD count;
in = GetStdHandle (STD_INPUT_HANDLE);
err = GetStdHandle (STD_ERROR_HANDLE);
_____
Modified: trunk/reactos/apps/utils/net/ftp/ftp.c
--- trunk/reactos/apps/utils/net/ftp/ftp.c 2005-04-17 19:16:39 UTC
(rev 14653)
+++ trunk/reactos/apps/utils/net/ftp/ftp.c 2005-04-17 19:32:24 UTC
(rev 14654)
@@ -97,7 +97,7 @@
sig_t lostpeer();
off_t restart_point = 0;
-int cin, cout;
+SOCKET cin, cout;
int dataconn(char *mode);
int command(char *fmt, ...);
@@ -113,7 +113,8 @@
char *hookup(char *host, int port)
{
register struct hostent *hp = 0;
- int s,len;
+ int len;
+ SOCKET s;
static char hostnamebuf[80];
bzero((char *)&hisctladdr, sizeof (hisctladdr));
@@ -136,7 +137,7 @@
}
hostname = hostnamebuf;
s = socket(hisctladdr.sin_family, SOCK_STREAM, 0);
- if (s < 0) {
+ if (s == INVALID_SOCKET) {
perror("ftp: socket");
code = -1;
return (0);
@@ -1327,8 +1328,8 @@
char name[MAXHOSTNAMELEN];
struct sockaddr_in mctl;
struct sockaddr_in hctl;
- FILE *in;
- FILE *out;
+ SOCKET in;
+ SOCKET out;
int tpe;
int cpnd;
int sunqe;
@@ -1371,10 +1372,10 @@
hisctladdr = op->hctl;
ip->mctl = myctladdr;
myctladdr = op->mctl;
- (int) ip->in = cin; // What the hell am I looking at...?
- cin = (int) op->in;
- (int) ip->out = cout; // Same again...
- cout = (int) op->out;
+ ip->in = cin;
+ cin = op->in;
+ ip->out = cout;
+ cout = op->out;
ip->tpe = type;
type = op->tpe;
if (!type)
Show replies by date