Commit Graph

28 Commits

Author SHA1 Message Date
Lassi Kortela 874ffe9007 Add write_simple_defaults() helper 2019-10-14 00:42:04 +03:00
Lassi Kortela 219578cff9 Remove temp xwrite/x... and old princ/print 2019-08-25 23:27:59 +03:00
Lassi Kortela 924a45b7bd Implement Scheme printer procedures in C 2019-08-25 22:39:35 +03:00
Lassi Kortela 8fb0cbf472 Finish re-arranging printer options 2019-08-25 17:32:14 +03:00
Lassi Kortela 844b2e219c Rename pr.opts.pretty into pr.opts.indent 2019-08-25 17:29:18 +03:00
Lassi Kortela fe4b63b9a3 Turn pr.opts.readably into pr.opts.display 2019-08-25 17:27:16 +03:00
Lassi Kortela 726b7cad29 Decode printer options into a printer_options struct 2019-08-25 17:19:47 +03:00
Lassi Kortela 49e0a3ad1f Put all printer state into a global struct 2019-08-25 16:56:02 +03:00
Lassi Kortela 6defff3696 Refactor print_width and enforce minimum value 20 2019-08-25 13:42:26 +03:00
Lassi Kortela 96962da3d3 Rename print_circle_prefix -> write_cycle_prefix 2019-08-25 13:20:30 +03:00
Lassi Kortela 84c10258b3 Rename printer vars that track cyclic structures 2019-08-25 13:15:27 +03:00
Lassi Kortela dd3cc748ec Rename Lisp printer state variables 2019-08-25 12:58:40 +03:00
Lassi Kortela 098a991ed8 Turn print_princ into print_readably 2019-08-25 12:49:56 +03:00
Lassi Kortela 4550e1ba79 Rename SCR_WIDTH to print_width 2019-08-25 12:45:48 +03:00
Lassi Kortela 8b6b2d96e4 Comment variables used by Lisp printer 2019-08-25 12:41:24 +03:00
Lassi Kortela 023937e5ea Use backward compatible variable initializers 2019-08-19 01:14:09 +03:00
Lassi Kortela d5bb6b3116 Start changing all instances of 0x to #x
After this commit -0x123 is still supported, but 0x123 is not.
2019-08-10 15:51:43 +03:00
Lassi Kortela c84c71adcc Get rid of INLINE and STATIC_INLINE
Nowadays compilers have good optimizers that know when to inline static
functions depending on the user's chosen optimization level (and speed vs size
optimization). We don't need to annotate functions manually.
2019-08-09 21:35:20 +03:00
Lassi Kortela d6a4029dde Replace idiosyncratic C types with standard ones
For number types, we rely on classic C types (char, short, int, long) to be
the correct sizes. For precise bit widths, use standard intN_t and uintN_t.
For size_t, just use system size_t.
2019-08-09 21:00:03 +03:00
Lassi Kortela fe4550dad7 Replace cvalue_t with struct 2019-08-09 19:36:20 +03:00
Lassi Kortela b48261f21c Replace fltype_t with struct 2019-08-09 19:33:04 +03:00
Lassi Kortela 193ced5e73 Replace cons_t with struct 2019-08-09 19:28:14 +03:00
Lassi Kortela d6f1579e17 Replace cprim_t with struct 2019-08-09 19:26:48 +03:00
Lassi Kortela fdcdd865b4 Replace function_t with struct 2019-08-09 19:26:48 +03:00
Lassi Kortela f2fb37e520 Replace ios_t with struct 2019-08-09 19:26:20 +03:00
Lassi Kortela 41cf0e7b2c Replace htable_t with struct 2019-08-09 19:26:09 +03:00
Lassi Kortela 79d44c0780 Get rid of almost all recursive includes
Simple rule: include files should never include include files.

"Notes on Programming in C", Rob Pike, February 21, 1989
<https://www.lysator.liu.se/c/pikestyle.html>
2019-08-09 19:00:17 +03:00
Lassi Kortela 0701b22d29 Rename #include'd C files from .c to .h 2019-08-09 18:30:02 +03:00