diff options
author | Miles Bader <miles@gnu.org> | 1997-08-07 20:08:55 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 1997-08-07 20:08:55 +0000 |
commit | 6e3dd1d808499561627be1845c8f91158f0d2448 (patch) | |
tree | 49070c7b70ecc37b861dd556d3fb32ac9ef9b3b5 /libftpconn/ftpconn.h | |
parent | 90a2fa5596f52f9bfc6f65d0d6a88f1d4bdd8607 (diff) |
(struct ftp_conn_syshooks):
Add FIX_NLIST_NAME field.
(ftp_conn_unix_fix_nlist_name):
New declaration.
Diffstat (limited to 'libftpconn/ftpconn.h')
-rw-r--r-- | libftpconn/ftpconn.h | 12 |
1 files changed, 12 insertions, 0 deletions
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 |