Lassi Kortela
924a45b7bd
Implement Scheme printer procedures in C
2019-08-25 22:39:35 +03:00
Lassi Kortela
e3d60bb776
Add const to many utility functions
2019-08-25 22:12:34 +03:00
Lassi Kortela
55cb24023b
Make Lisp core use xwrite/xdisplay/xnewline
2019-08-25 22:07:38 +03:00
Lassi Kortela
6e87c8ad26
Remove unused get-datum and put-datum procedures
2019-08-25 21:30:36 +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
2b9e15920b
Fix off-by-one error
2019-08-23 00:40:41 +03:00
Lassi Kortela
9d4bf19367
Fix regression in ios_printf implementation
...
There was some problem with the way the varargs are handled. We had to
need to make (at least one) copy of them with va_copy(). The code is
brittle and I don't understand it, so just rip it all out and replace
with a fixed-size static buffer. It's a hack but we'll soon get rid of
printf completely so this will get us through the day until then.
2019-08-23 00:38:10 +03:00
Lassi Kortela
49e2ac5ae0
Add Docker to platforms in readme
2019-08-22 01:50:30 +03:00
Lassi Kortela
2e81ccd308
Fix nested bullet points in readme
2019-08-22 01:47:36 +03:00
Lassi Kortela
078cade0d2
Add platform list to readme
2019-08-22 01:43:21 +03:00
Lassi Kortela
da02e9e554
Add missing sys/stat.h
...
Fixes failed OpenBSD build. How did it work before?
2019-08-22 00:05:57 +03:00
Lassi Kortela
862a2c9d68
Add Windows build script using Open Watcom C compiler
2019-08-21 22:22:39 +03:00
Lassi Kortela
34d417b4fc
Change library name to (upscheme 2019 unstable)
...
The "unstable" is a new addition.
2019-08-21 22:18:53 +03:00
Lassi Kortela
682cbf2400
Add builtin_spawn stub for Windows
2019-08-21 22:18:20 +03:00
Lassi Kortela
1e306391a7
Add compiler name to build directory name
2019-08-21 22:18:01 +03:00
Lassi Kortela
2ff16a0182
Add Windows ID functions
...
Mostly of them are dummy placeholders that return false
2019-08-21 22:17:06 +03:00
Lassi Kortela
b2027fe023
Split setenv/unsetenv by platform
...
Windows apparently doesn't have unsetenv() at all, so use the WinAPI
native envar functions instead of the usual C ones.
2019-08-21 22:16:07 +03:00
Lassi Kortela
5caf337589
Stub builtin_environment_stack for Windows
2019-08-21 22:15:19 +03:00
Lassi Kortela
0d95c386ac
Fix socket includes
2019-08-21 22:14:04 +03:00
Lassi Kortela
ebefb2a519
Stub time functions for Windows
...
Need to rethink all time stuff and read the relevant SRFIs.
2019-08-21 22:12:19 +03:00
Lassi Kortela
6ffe6bf174
Add truly sinful float hacks for Watcom
2019-08-21 22:11:05 +03:00
Lassi Kortela
439eeb2b06
Use vsnprintf() instead of vasprintf()
...
Windows doesn't reliably offer *asprintf() (sprintf functions that
automatically malloc as much memory as they need) so hand-roll the
equivalent on all platforms.
2019-08-21 22:10:13 +03:00
Lassi Kortela
c76379e6f5
Brace try/except in main() for Watcom
2019-08-21 22:08:21 +03:00
Lassi Kortela
60ff06fb6d
Reorganize error functions and includes
...
These functions are complicated because they need to be marked
"noreturn" for the compiler. There are several fundamentally
incompatible ways of doing that. Since we have only a few "noreturn"
functions, let's just list all of those in one header file of which
there is a completely different version for each compiler.
2019-08-21 22:06:13 +03:00
Lassi Kortela
debbcdf857
Add missing #endif
2019-08-19 09:49:14 +03:00
Lassi Kortela
ddb6116df9
Add bits and endian for Watcom compiler
2019-08-19 01:20:40 +03:00
Lassi Kortela
a6fd653000
Add missing includes for Windows
2019-08-19 01:20:02 +03:00
Lassi Kortela
69f46bd4c2
Do not use special _fileno for windows
2019-08-19 01:19:03 +03:00
Lassi Kortela
d12fd5cea7
Split _enonfatal() for Windows
2019-08-19 01:18:36 +03:00
Lassi Kortela
35acc782d9
Remove asm byteswap implementations
2019-08-19 01:17:54 +03:00
Lassi Kortela
e2dffd97fe
Remove time.now and parsetime functions
2019-08-19 01:15:28 +03:00
Lassi Kortela
023937e5ea
Use backward compatible variable initializers
2019-08-19 01:14:09 +03:00
Lassi Kortela
486ec48a76
Remove spurious time includes
2019-08-18 13:44:06 +03:00
Lassi Kortela
d065a0039d
Define float_t and double_t for Watcom C
2019-08-18 13:40:25 +03:00
Lassi Kortela
9571262535
Use backward compatible variable initializers
2019-08-18 13:40:04 +03:00
Lassi Kortela
7025b8cd32
Split fl_path_exists() into Unix and Windows
2019-08-18 13:39:08 +03:00
Lassi Kortela
3448e8f150
Include missing <stdarg.h>
2019-08-18 13:36:43 +03:00
Lassi Kortela
3dc58baa4a
Include <sys/types.h> to get off_t
...
This header is even shipped by Windows compilers. The iostream stuff
uses off_t.
2019-08-18 00:09:43 +03:00
Lassi Kortela
baea23ab29
Switch to portable noreturn attributes
2019-08-18 00:07:46 +03:00