X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Fftp.h;h=5765b628333f3bb07d4566f55e96f27366394f61;hb=d3c8a942b99443abf0c11d9759994022ed6da597;hp=faf057bb9a54a7e203121f9fa89c4461364af3d9;hpb=52d7763743e415b0a374a9845a7d9a67b9f8e321;p=oftp diff --git a/src/ftp.h b/src/ftp.h index faf057b..5765b62 100644 --- a/src/ftp.h +++ b/src/ftp.h @@ -22,13 +22,7 @@ enum { }; enum { - FTP_REMOTE, - FTP_LOCAL -}; - -enum { - FTP_MOD_REMDIR = 0x100, - FTP_MOD_LOCDIR = 0x200 + FTP_MOD_DIR = 0x100 }; struct ftp_op { @@ -62,8 +56,8 @@ struct ftp { int num_crecv; char drecv[256]; - char *curdir[2]; - struct ftp_dirent *dirent[2]; /* dynamic array */ + char *curdir; + struct ftp_dirent *dirent; /* dynamic array */ int last_resp; int modified; @@ -94,9 +88,10 @@ int ftp_list(struct ftp *ftp); int ftp_retrieve(struct ftp *ftp, const char *fname); int ftp_store(struct ftp *ftp, const char *fname); -const char *ftp_curdir(struct ftp *ftp, int whichdir); -int ftp_num_dirent(struct ftp *ftp, int whichdir); -struct ftp_dirent *ftp_dirent(struct ftp *ftp, int whichdir, int idx); +const char *ftp_curdir(struct ftp *ftp); +int ftp_num_dirent(struct ftp *ftp); +struct ftp_dirent *ftp_dirent(struct ftp *ftp, int idx); +int ftp_direntcmp(const void *a, const void *b); #endif /* FTP_H_ */