• Paul Eggert's avatar
    Refactor low-level printing for simplicity · 96bfe816
    Paul Eggert authored
    * 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.
    96bfe816
eval.c 111 KB