home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso
/
misc
/
volume38
/
libftp
/
part01
/
FtpRetr.c
< prev
next >
Wrap
C/C++ Source or Header
|
1993-07-13
|
375b
|
19 lines
#include "FtpLibrary.h"
STATUS FtpRetr(FTP * con , char * command , char *in , char * out)
{
FILE *o;
int c;
if ( FtpData(con,command,in,"r") < 1 )
return con->errno;
if ( (o=fopen(out,"w")) == NULL )
return EXIT(con,QUIT);
while ( (c=FtpRead(con)) != EOF )
putc(c,o);
if ( c != EOF ) return con -> errno ;
fclose(o);
return FtpClose(con);
}