19#define FTP_MAX_ANSWERS 10
21#define FTP_Ctrl(x) ((x) - '@')
22#define FTP_FREE(x) memset ( &x , '\0' , sizeof x )
23#define FTP_CUT(x) ((x)&0xff)
31#define ftp_account(ftp,acc) ftp_command(ftp,"ACCT %s",acc,230,EOF)
32#define ftp_user(ftp,user) ftp_command(ftp,"USER %s",user,230,331,332,EOF)
33#define ftp_password(ftp,pas) ftp_command(ftp,"PASS %s",pas,230,332,EOF)
34#define ftp_type(ftp,type) ftp_command(ftp,"TYPE %s",type,200,EOF)
35#define ftp_chdir(ftp,dir) ftp_command(ftp,"CWD %s",dir,200,250,EOF)
36#define ftp_mkdir(ftp,dir) ftp_command(ftp,"XMKD %s",dir,200,257,EOF)
37#define ftp_rm(ftp,dir) ftp_command(ftp,"DELE %s",dir,200,250,EOF)
38#define ftp_ascii(ftp) ftp_type(ftp,"A")
39#define ftp_binary(ftp) ftp_type(ftp,"I")
40#define ftp_open_read(ftp,file) ftp_data(ftp,"RETR %s",file)
41#define ftp_open_write(ftp,file) ftp_data(ftp,"STOR %s",file)
42#define ftp_open_append(ftp,file) ftp_data(ftp,"APPE %s",file)
54 int EXPRT ftp_send(
int sock,
const char *buffer,
int n_bytes);
int EXPRT ftp_data(FTP_CON *con, const char *command, const char *param)
char EXPRT * ftp_pwd(FTP_CON *con)
void EXPRT ftp_debug(int(*debug_func)(const char *message), int(*error_func)(const char *message))
int EXPRT ftp_receive(int sock, char *buffer, int bsize)
int EXPRT ftp_port(FTP_CON *con, int, int, int, int, int, int)
int EXPRT ftp_command(FTP_CON *con, const char *command, const char *param,...)
int EXPRT ftp_send_message(FTP_CON *con, const char *message)
int EXPRT ftp_send(int sock, const char *buffer, int n_bytes)
int EXPRT ftp_dir(FTP_CON *con, const char *file)
int EXPRT ftp_get(FTP_CON *con, const char *local_name, const char *remote_name)
int EXPRT ftp_bye(FTP_CON *con)
int EXPRT ftp_login(FTP_CON **con, const char *host, unsigned short port, const char *user, const char *pass, const char *acct)
int EXPRT ftp_move(FTP_CON *con, const char *old_name, const char *new_name)
int EXPRT ftp_close(FTP_CON *con)
int EXPRT ftp_connect(FTP_CON **con, const char *host_name, unsigned short port)
BOOL EXPRT ftp_good(int number,...)
int EXPRT ftp_get_message(FTP_CON *con, char *message)
int EXPRT ftp_put(FTP_CON *con, const char *local_name, const char *remote_name)
char host_name[HOST_NAME_LENGTH]
#define message(type, str)
TH1X EXPRT * h1_book(const char *name, const char *title, int bins, double min, double max)