home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso
/
misc
/
volume38
/
libftp
/
part01
/
FtpGetMessage.c
< prev
next >
Wrap
C/C++ Source or Header
|
1993-07-13
|
559b
|
28 lines
#include "FtpLibrary.h"
extern char * FtpMessageList[];
int FtpGetMessage(FTP *con , char * Message )
{
int i=0,n;
while(1)
{
if ( read ( con -> sock , &Message[i] , 1 ) != 1 )
return QUIT;
if ( Message[i] == Ctrl('J') && Message[i-1] == Ctrl('M'))
break;
i++;
}
Message[i-1] = 0;
FtpInitMessageList();
FtpMessageList[n=FtpNumber(Message)] =
( char * ) malloc ( strlen(Message) + 1);
strcpy(FtpMessageList[n] , Message );
if ( con -> debug != NULL )
(*con->debug)(con,n,Message);
return n;
}