diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2015-04-19 08:53:35 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2015-04-19 08:55:36 -0700 |
commit | 96bfe816d8107003dba7fd824c2ac2b999a84ae9 (patch) | |
tree | 515ecdd0b9cd007a7b1a16c09ff69b6a8f46cd84 /lisp/emacs-lisp | |
parent | 65ac8bc6a9e256b60c8ddfa3c99a1b28145a0763 (diff) | |
download | emacs-96bfe816d8107003dba7fd824c2ac2b999a84ae9.tar.gz emacs-96bfe816d8107003dba7fd824c2ac2b999a84ae9.tar.bz2 emacs-96bfe816d8107003dba7fd824c2ac2b999a84ae9.zip |
Refactor low-level printing for simplicity
* src/print.c (PRINTDECLARE): Remove. Move its contents into
PRINTPREPARE; doable now that we assume C99. All callers changed.
(PRINTCHAR): Remove, as it adds more mystery than clarity.
All callers changed.
(strout): Assume that caller computes length. All callers changed.
(print_c_string): New function.
(write_string, write_string_1): Compute length instead of asking
the caller to compute it. All callers changed.
(write_string): Simplify by using write_string_1.
(write_string_1): Simplify by using print_c_string.
(Fterpri): Compute default val more clearly.
(Fprin1_to_string, print_object):
Assume C99 to avoid unnecessary nesting.
(print_object): Prefer print_c_string to multiple printchar, or
to calling strout with -1 length. Coalesce into sprintf when
this is easy.
Diffstat (limited to 'lisp/emacs-lisp')
0 files changed, 0 insertions, 0 deletions