From 6e3dd1d808499561627be1845c8f91158f0d2448 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Thu, 7 Aug 1997 20:08:55 +0000 Subject: (struct ftp_conn_syshooks): Add FIX_NLIST_NAME field. (ftp_conn_unix_fix_nlist_name): New declaration. --- libftpconn/ftpconn.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/libftpconn/ftpconn.h b/libftpconn/ftpconn.h index d794f90a..dbd1d479 100644 --- a/libftpconn/ftpconn.h +++ b/libftpconn/ftpconn.h @@ -81,6 +81,15 @@ struct ftp_conn_syshooks it returns 0, then it is finishe,d and FD and STATE are deallocated. */ error_t (*cont_get_stats) (struct ftp_conn *conn, int fd, void *state, ftp_conn_add_stat_fun_t add_stat, void *hook); + + /* Some ftp servers return output from the nlist command that contains more + *than just the simple names. This hook, if non-zero, should look at + *NAME and rewrite it to compensate, changing *NAME to point to the + *rewritten name. If the result is not longer than the original, *NAME + *may be modified in place, otherwise a malloced string should be + *returned in *NAME, which will automatically be freed. DIR is the name + *of the directory passed to the nlist command. */ + error_t (*fix_nlist_name) (struct ftp_conn *conn, char *dir, char **name); }; /* Type parameter for the cntl_debug hook. */ @@ -179,6 +188,9 @@ extern error_t ftp_conn_unix_cont_get_stats (struct ftp_conn *conn, ftp_conn_add_stat_fun_t add_stat, void *hook); +extern error_t ftp_conn_unix_fix_nlist_name (struct ftp_conn *conn, char *dir, + char **name); + extern struct ftp_conn_syshooks ftp_conn_unix_syshooks; error_t -- cgit v1.2.3