mirror of
https://git.savannah.gnu.org/git/tar.git
synced 2026-09-20 07:04:14 +00:00
Prefer C99 formats like %jd to doing it by hand
It’s now safe to assume support for C99 formats like %jd, so remove some of the longwinded formatting code put in only to be portable to pre-C99 platforms. * gnulib.modules: Add intprops. * src/buffer.c (format_total_stats, try_new_volume) (write_volume_label): * src/checkpoint.c (format_checkpoint_string): * src/compare.c (verify_volume): * src/create.c (to_chars_subst, dump_regular_file): * src/incremen.c (read_num): * src/list.c (read_and, from_header, simple_print_header) (print_for_mkdir): * src/sparse.c (sparse_dump_region): * src/system.c (dec_to_env, sys_exec_info_script) (sys_exec_checkpoint_script): * src/xheader.c (out_of_range_header): Prefer C99 formats like %jd and %ju to STRINGIFY_BIGINT. * src/common.h: Sort includes. Include intprops.h, verify.h. All other includes of verify.h removed. (intmax, uintmax): New functions and macros. (STRINGIFY_BIGINT): Remove; no longer used. (TIMESPEC_STRSIZE_BOUND): Make it 1 byte bigger, for negatives. * src/create.c (MAX_VAL_WITH_DIGITS, to_base256): Use *_WIDTH macros rather than assuming no padding bits. Prefer UINTMAX_MAX to (uintmax_t) -1. * src/list.c (tartime): Use strftime result rather than running strlen later. * src/misc.c (timetostr): New function. Prefer it when printing time_t values.
This commit is contained in:
@@ -63,6 +63,7 @@ gitlog-to-changelog
|
||||
hash
|
||||
human
|
||||
idx
|
||||
intprops
|
||||
inttostr
|
||||
inttypes
|
||||
largefile
|
||||
|
||||
Reference in New Issue
Block a user