Mercurial > gftp.yaz
diff lib/gftp.h @ 532:bccfdbfaac00
2004-8-17 Brian Masney <masneyb@gftp.org>
* lib/gftp.h lib/misc.c lib/protocols.c lib/rfc2068.c lib/rfc959.c -
added #defines for encoding and decoding file sizes that will work
properly for large files (GFTP_OFF_T_HEX_PRINTF_MOD,
GFTP_OFF_T_INTL_PRINTF_MOD, GFTP_OFF_T_PRINTF_MOD,
GFTP_OFF_T_11PRINTF_MOD and gftp_parse_file_size). Fixed file size
not being displayed properly when the system does not support the '
printf formatter
* acinclude.m4 (AC_INTL_PRINTF) - check to see if _LARGEFILE_SOURCE
is defined. If so, use %'lld instead of %'ld
author | masneyb |
---|---|
date | Wed, 18 Aug 2004 01:58:43 +0000 |
parents | e67a52327b24 |
children | fd9ce7797984 |
line wrap: on
line diff
--- a/lib/gftp.h Wed Aug 18 00:56:58 2004 +0000 +++ b/lib/gftp.h Wed Aug 18 01:58:43 2004 +0000 @@ -158,9 +158,17 @@ #endif #if defined (_LARGEFILE_SOURCE) -#define GFTP_OFF_T_PRINTF_MOD "%'lld" +#define GFTP_OFF_T_HEX_PRINTF_MOD "%llx" +#define GFTP_OFF_T_INTL_PRINTF_MOD "%'lld" +#define GFTP_OFF_T_PRINTF_MOD "%lld" +#define GFTP_OFF_T_11PRINTF_MOD "%11lld" +#define gftp_parse_file_size(str) strtoll (str, NULL, 10) #else -#define GFTP_OFF_T_PRINTF_MOD "%'ld" +#define GFTP_OFF_T_HEX_PRINTF_MOD "%lx" +#define GFTP_OFF_T_INTL_PRINTF_MOD "%'ld" +#define GFTP_OFF_T_PRINTF_MOD "%ld" +#define GFTP_OFF_T_11PRINTF_MOD "%11ld" +#define gftp_parse_file_size(str) strtol (str, NULL, 10) #endif /* Server types (used by FTP protocol from SYST command) */ @@ -763,8 +771,6 @@ char * gftp_build_path ( const char *first_element, ... ); -off_t gftp_parse_file_size ( char *str ); - void gftp_locale_init ( void ); char * gftp_scramble_password ( const char *password );