Mercurial > gftp.yaz
diff lib/protocols.c @ 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/protocols.c Wed Aug 18 00:56:58 2004 +0000 +++ b/lib/protocols.c Wed Aug 18 01:58:43 2004 +0000 @@ -2318,17 +2318,10 @@ tempfle = templist->data; attribs = gftp_convert_attributes_from_mode_t (tempfle->st_mode); -#if defined (_LARGEFILE_SOURCE) - printf ("%s:%s:%lld:%lld:%s:%s:%s\n", + printf ("%s:%s:" GFTP_OFF_T_PRINTF_MOD ":" GFTP_OFF_T_PRINTF_MOD ":%s:%s:%s\n", tempfle->file, tempfle->destfile, tempfle->size, tempfle->startsize, tempfle->user, tempfle->group, attribs); -#else - printf ("%s:%s:%ld:%ld:%s:%s:%s\n", - tempfle->file, tempfle->destfile, - tempfle->size, tempfle->startsize, - tempfle->user, tempfle->group, attribs); -#endif g_free (attribs); if (templist->next == NULL) @@ -2341,17 +2334,10 @@ tempfle = templist->data; attribs = gftp_convert_attributes_from_mode_t (tempfle->st_mode); -#if defined (_LARGEFILE_SOURCE) - printf ("%s:%s:%lld:%lld:%s:%s:%s\n", + printf ("%s:%s:" GFTP_OFF_T_PRINTF_MOD ":" GFTP_OFF_T_PRINTF_MOD ":%s:%s:%s\n", tempfle->file, tempfle->destfile, tempfle->size, tempfle->startsize, tempfle->user, tempfle->group, attribs); -#else - printf ("%s:%s:%ld:%ld:%s:%s:%s\n", - tempfle->file, tempfle->destfile, - tempfle->size, tempfle->startsize, - tempfle->user, tempfle->group, attribs); -#endif g_free (attribs); if (templist == list)