Copyright (C) 1999-2000 Steinar H. Gunderson
This program is is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License, version 2 if the
+ it under the terms of the GNU General Public License, version 2 of the
License as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+#ifndef _CMDS_H
+#define _CMDS_H 1
+
+#include <ftpd.h>
+
/*
* TRAP_ERROR: This is a quick way of doing a test for an error condition.
* if an error occurs (or more precisely, if the value supplied is
}
#endif
-#define CMD_PROTO(cmd) int cmd_ ## cmd ## (struct conn * const c)
+#define CMD_PROTO(cmd) int cmd_ ## cmd (struct conn * const c)
int do_chdir(struct conn * const c, const char * const newd);
CMD_PROTO(user);
void do_listing(struct conn * const c, struct list_options * const lo);
int get_num_files(struct conn * const c, const char * const pathname,
struct list_options * const lo);
-void list_core(struct conn * const c, const char * const pathname,
- struct list_options * const lo
+int list_core(struct conn * const c, const char * const pathname,
+ char * const disp_pathname, struct list_options * const lo
#if HAVE_MMAP
- , const int size
+ , const int size, int pos
#endif
);
char classify(const mode_t mode);
void do_store(struct conn * const c, int append);
char *do_pwd(struct conn * const c, char * const retbuf, const char * const dir);
+#ifndef HAVE_POLL
+/*
+ * Even on select()-only systems, we use some poll() constants, so
+ * we'll have to make them up if we don't already have them. These
+ * are taken from my glibc 2.1 system.
+ */
+#define POLLIN 0x001
+#define POLLOUT 0x004
+#endif
+
+#endif