aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/git-hooks/commit-msg
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2021-07-25 21:01:31 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2021-07-26 00:59:37 -0700
commit0a41ad2cfb6aa7af21f40fc870a0b917410b1d4b (patch)
tree39b03b7e34e6da2e341c4a46fc0540c5032b9374 /scripts/git-hooks/commit-msg
parentls: simplify sprintf usage (diff)
downloadcoreutils-0a41ad2cfb6aa7af21f40fc870a0b917410b1d4b.tar.gz
coreutils-0a41ad2cfb6aa7af21f40fc870a0b917410b1d4b.zip
ls: demacroize
Prefer functions or constants to macros where either will do. That’s cleaner, and nowadays there’s no performance reason to prefer macros. All uses changed. * src/ls.c (INITIAL_TABLE_SIZE, MIN_COLUMN_WIDTH): Now constants instead of macros. (file_or_link_mode): New function, replacing the old macro FILE_OR_LINK_MODE. (dired_outbyte): New function, replacing the old macro DIRED_PUTCHAR. (dired_outbuf): New function, replacing the old macro DIRED_FPUTS. (dired_outstring): New function, replacing the old macro DIRED_FPUTS_LITERAL. (dired_indent): New function, replacing the old macro DIRED_INDENT. (push_current_dired_pos): New function, replacing the old macro PUSH_CURRENT_DIRED_POS. (assert_matching_dev_ino): New function, replacing the old macro ASSERT_MATCHING_DEV_INO. (do_stat, do_lstat, stat_for_mode, stat_for_ino, fstat_for_ino) (signal_init, signal_restore, cmp_ctime, cmp_mtime, cmp_atime) (cmp_btime, cmp_size, cmp_name, cmp_extension) (fileinfo_name_width, cmp_width, cmp_version): No longer inline; compilers can deduce this well enough nowadays. (main): Protect unused assert with ‘if (false)’ rather than commenting it out, so that the compiler checks the code. (print_dir): Output the space and newline in the same buffer as the human-readable number they surround. (dirfirst_check): New function, replacing the old macro DIRFIRST_CHECK. Simplify by using subtraction. (off_cmp): New function, replacing the old macro longdiff. (print_long_format): No need to null-terminate the string now. (format_user_or_group): Let printf count the bytes.
Diffstat (limited to 'scripts/git-hooks/commit-msg')
0 files changed, 0 insertions, 0 deletions