formatting.c cleanup
Peter Eisentraut <peter@eisentraut.org>
Attachments
- v1-0001-formatting.c-cleanup-Remove-dashes-in-comments.patch (text/plain) patch v1-0001
- v1-0002-formatting.c-cleanup-Move-loop-variables-definiti.patch (text/plain) patch v1-0002
- v1-0003-formatting.c-cleanup-Use-size_t-for-string-length.patch (text/plain) patch v1-0003
- v1-0004-formatting.c-cleanup-Add-some-const-char-qualifie.patch (text/plain) patch v1-0004
- v1-0005-formatting.c-cleanup-Use-array-syntax-instead-of-.patch (text/plain) patch v1-0005
- v1-0006-formatting.c-cleanup-Remove-unnecessary-extra-par.patch (text/plain) patch v1-0006
- v1-0007-formatting.c-cleanup-Remove-unnecessary-extra-lin.patch (text/plain) patch v1-0007
- v1-0008-formatting.c-cleanup-Remove-unnecessary-zeroize-m.patch (text/plain) patch v1-0008
- v1-0009-formatting.c-cleanup-Improve-formatting-of-some-s.patch (text/plain) patch v1-0009
- v1-0010-formatting.c-cleanup-Change-TmFromChar.clock-fiel.patch (text/plain) patch v1-0010
- v1-0011-formatting.c-cleanup-Change-several-int-fields-to.patch (text/plain) patch v1-0011
- v1-0012-formatting.c-cleanup-Rename-DCH_S_-to-DCH_SUFFIX_.patch (text/plain) patch v1-0012
- v1-0013-formatting.c-cleanup-Change-fill_str-return-type-.patch (text/plain) patch v1-0013
The file formatting.c contains some hard to read and understand code. For the attached patch series, I made a few more or less mechanical passes over it to modernize the code a bit, renamed some symbols to be clearer, adjusted some types to make things more self-documenting, removed some redundant code to make some things more compact. I hope this helps a bit.
Commits
-
formatting.c cleanup: Change fill_str() return type to void
- aa4535307e3d 19 (unreleased) landed
-
formatting.c cleanup: Change TmFromChar.clock field to bool
- ce5f6817e4d5 19 (unreleased) landed
-
formatting.c cleanup: Change several int fields to enums
- 378212c68ab0 19 (unreleased) landed
-
formatting.c cleanup: Rename DCH_S_* to DCH_SUFFIX_*
- da2052ab9a25 19 (unreleased) landed
-
formatting.c cleanup: Improve formatting of some struct declarations
- e2cf524e4ad8 19 (unreleased) landed
-
formatting.c cleanup: Remove unnecessary zeroize macros
- 9a1a5dfee8bb 19 (unreleased) landed
-
formatting.c cleanup: Remove unnecessary extra line breaks in error message literals
- 38506f55fd4a 19 (unreleased) landed
-
formatting.c cleanup: Remove unnecessary extra parentheses
- 2724830929ba 19 (unreleased) landed
-
formatting.c cleanup: Use array syntax instead of pointer arithmetic
- 6271d9922e04 19 (unreleased) landed
-
formatting.c cleanup: Add some const pointer qualifiers
- b9def57a3c95 19 (unreleased) landed
-
formatting.c cleanup: Use size_t for string length variables and arguments
- d98b3cdbafb8 19 (unreleased) landed
-
formatting.c cleanup: Move loop variables definitions into for statement
- 03fbb0814c50 19 (unreleased) landed
-
formatting.c cleanup: Remove dashes in comments
- 95924672d534 19 (unreleased) landed