]> git.eshelyaron.com Git - emacs.git/commit
Turn large macros in print.c to functions
authorMattias Engdegård <mattiase@acm.org>
Mon, 8 Aug 2022 10:39:12 +0000 (12:39 +0200)
committerMattias Engdegård <mattiase@acm.org>
Mon, 8 Aug 2022 11:12:47 +0000 (13:12 +0200)
commit14f0ebc9ac8d2f0f272bdb1eac4dd2ea0b50a0f4
tree78a4c03d17437d7bb691784e665db23f546dd137
parent60738e569d24b74b9e6973225d143b3468bfc60f
Turn large macros in print.c to functions

This is easier to read and maintain, and makes the state explicit.
It is a pure refactoring; the compiled code should be equivalent.

* src/print.c (PRINTPREPARE, PRINTFINISH): Replace with...
(struct print_context, print_prepare, print_finish): ...these new
functions and explicit state in a struct.
(Fwrite_char, write_string, Fterpri, Fprin1, Fprin1_to_string)
(Fprinc, Fprint): Adapt callers.
src/print.c