diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2015-07-31 06:15:16 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2015-07-31 06:15:16 -0700 |
commit | dbbfc2c41a3710bc64df7b477fcfa536da79233f (patch) | |
tree | e4527f7c82e8304c59b71792b10ee240f98eae61 /tests/010/seq.expected | |
parent | ab1a633e67d04bb36b2b00461e1a72a786bab917 (diff) | |
download | txr-dbbfc2c41a3710bc64df7b477fcfa536da79233f.tar.gz txr-dbbfc2c41a3710bc64df7b477fcfa536da79233f.tar.bz2 txr-dbbfc2c41a3710bc64df7b477fcfa536da79233f.zip |
Multi-line, indented printing of structure.
* eval.c (op_error): New static function.
(macro_form_p, fboundp): Static to external.
(special_operator_p): New function.
(eval_init): Register macrolet and symacrolet to op_error.
These are recognized and processed by expand, but we want
them in the op table so they are reported by special_operator_p.
* eval.h (fboundp, macro_form_p, special_operator_p): Declared.
* hash.c (print_key_val): Break long lines on spaces
between pairs with stream_width_check.
(hash_print_op): Implement split and indented printing.
* lib.c (obj_print_impl): New static function, resulting
from a merge of obj_print and obj_pprint. Fixes some
wrong-way recursion bugs: obj_pprint recursed into obj_print
in some places. Adds support for multi-line printing of
vectors and lists, with indentation using the new
interfaces in streams.
* stream.c (strm_base_init): Update initializer.
(put_indent, indent_mode_put_string): New static functions.
(put_string): Use indent_mode_put_string in either of the
two indent modes.
(put_char): Implement indent mode.
(get_indent_mode, test_set_indent_mode,
set_indent_mode, get_indent, set_indent,
inc_indent, width_check): New functions.
* stream.h (enum indent_mode): New.
(struct strm_base): indent_on member becomes indent_mode.
New members data_width and code_width.
(get_indent_mode, test_set_indent_mode,
set_indent_mode, get_indent, set_indent,
inc_indent, width_check): Declared.
* tests/009/json.expected: Updated.
* tests/010/seq.expected: Likewise.
* tests/011/macros-2.expected: Likewise.
Diffstat (limited to 'tests/010/seq.expected')
-rw-r--r-- | tests/010/seq.expected | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/010/seq.expected b/tests/010/seq.expected index 5d589d40..9c4d860d 100644 --- a/tests/010/seq.expected +++ b/tests/010/seq.expected @@ -6,6 +6,11 @@ nil #\d "ac" exception! #(8 7 6 5 4 3 2 1) -#((7 . #\h) (8 . #\g) (6 . #\f) (5 . #\e) (4 . #\d) (3 . #\c) (2 . #\b) (1 . #\a)) -(100 99 98 97 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 81 80 79 78 77 76 75 74 73 72 71 70 69 68 67 66 65 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1) +#((7 . #\h) (8 . #\g) (6 . #\f) (5 . #\e) (4 . #\d) (3 . #\c) (2 . #\b) + (1 . #\a)) +(100 99 98 97 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 81 + 80 79 78 77 76 75 74 73 72 71 70 69 68 67 66 65 64 63 62 61 60 + 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 + 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 + 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1) #((8 . #\g) (6 . #\f)) #((7 . #\h) (5 . #\e) (4 . #\d) (3 . #\c) (2 . #\b) (1 . #\a)) |