Commit Graph
331 Commits
Author SHA1 Message Date
lassik 36fd757689 Replace ptrint_t with standard intptr_t 2019-08-09 21:07:16 +03:00
lassik b35ab48437 Replace "preferred int type" with intptr_t 2019-08-09 21:04:19 +03:00
lassik 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
lassik d5d7406276 Remove unused Boehm GC hooks 2019-08-09 20:37:42 +03:00
lassik 10ffed569e Fix build errors and warnings for OpenBSD 2019-08-09 20:20:17 +03:00
lassik b7b4269455 Replace strcpy() and strcat() with safer functions 2019-08-09 20:14:42 +03:00
lassik b5946dea77 Remove unused INITFILE config option 2019-08-09 20:11:02 +03:00
lassik bb78dc0634 Fix compiler warnings (clang -Wextra) 2019-08-09 19:53:35 +03:00
lassik 7d93f262a7 Set C compiler options -Wextra -std=gnu99 2019-08-09 19:50:21 +03:00
lassik 45a7ec7bc4 Remove include protections
Since we no longer have recursive includes, we don't need them. Removing the
protections uncovered a couple of accidental double-includes: good.
2019-08-09 19:47:22 +03:00
lassik fe4550dad7 Replace cvalue_t with struct 2019-08-09 19:36:20 +03:00
lassik b48261f21c Replace fltype_t with struct 2019-08-09 19:33:04 +03:00
lassik c9f5e4faeb Replace symbol_t with struct 2019-08-09 19:30:15 +03:00
lassik 193ced5e73 Replace cons_t with struct 2019-08-09 19:28:14 +03:00
lassik d6f1579e17 Replace cprim_t with struct 2019-08-09 19:26:48 +03:00
lassik fdcdd865b4 Replace function_t with struct 2019-08-09 19:26:48 +03:00
lassik ece07d2e1a Replace cvtable_t with struct 2019-08-09 19:26:48 +03:00
lassik 428e7a3825 Replace builtinspec_t with struct 2019-08-09 19:26:48 +03:00
lassik e54797e4eb Replace fl_exception_context_t with struct 2019-08-09 19:26:48 +03:00
lassik 262ace1efd Replace fl_readstate_t with struct 2019-08-09 19:26:42 +03:00
lassik b561f9d4b0 Replace gensym_t with struct 2019-08-09 19:26:33 +03:00
lassik f2fb37e520 Replace ios_t with struct 2019-08-09 19:26:20 +03:00
lassik 41cf0e7b2c Replace htable_t with struct 2019-08-09 19:26:09 +03:00
lassik 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
lassik 0701b22d29 Rename #include'd C files from .c to .h 2019-08-09 18:30:02 +03:00
lassik d69e40aa3a Delete unused C file 2019-08-09 18:22:10 +03:00
lassik 1caa8f9cf3 Update copyright statement in LICENSE file 2019-08-09 18:10:54 +03:00
lassik 85efbbc7ce Sort C file names in build.sh 2019-08-09 17:30:49 +03:00
lassik b4c3c64f94 Generate new boot image after tabs-to-spaces conversion 2019-08-09 17:25:13 +03:00
lassik 04b3c3b292 Replace tabs with spaces in Lisp printer 2019-08-09 17:25:13 +03:00
lassik be9b2b364e Clean up whitespace
- Tabs to spaces
- Remove invisible whitespace at ends of lines
- Break or shorten long lines (not for all files)
2019-08-09 17:25:13 +03:00
lassik 09c6368668 Run renamed .inc files by clang-format for the first time 2019-08-09 17:25:13 +03:00
lassik 4128fbc535 Rename .inc files to use .h extension 2019-08-09 17:18:21 +03:00
lassik 8e35d98142 Move bootstrap images into a scheme-boot directory 2019-08-09 15:53:31 +03:00
lassik aaf73c8439 Consolidate all Lisp files into scheme-* with .scm extension 2019-08-09 15:21:56 +03:00
lassik d6f54bc13c Consolidate all C files into a "c" subdirectory 2019-08-09 15:02:58 +03:00
lassik 53e6421ce1 Remove curiosity files from tree 2019-08-09 15:02:04 +03:00
lassik 349a42510f Replace makefiles with a simple shell script
Build, bootstrap and test everything in one go. Put build artifacts in a
separate subdirectory which is emptied at the start of every build.
2019-08-09 14:56:16 +03:00
lassik 82e09fa92b Avoid clang warnings about undefined signed shift behavior
Calls to fixnum(-1) would cause them.
2019-08-09 14:06:36 +03:00
lassik b128aee83d Add .editorconfig file to match clang-format 2019-08-09 14:03:13 +03:00
lassik 6a6a7071a9 Run clang-format on all C code for the first time 2019-08-09 14:02:02 +03:00
lassik 7ab81c9e56 Change some more clang-format settings to my liking 2019-08-09 13:59:27 +03:00
lassik 0fdee2f7b8 Change clang-format to keep "} else" brace on same line 2019-08-09 13:59:18 +03:00
lassik 0270f8628d Change clang-format AlignEscapedNewlines setting
whatstyle didn't catch that the original codebase is aligning
backslashes at the ends of lines in long preprocessor macro
definitions. The "Left" setting closely matches the original code.
2019-08-09 13:58:51 +03:00
lassik 8c85386640 Run whatstyle to derive clang-format settings
find . -name "*.c" | xargs whatstyle --formatter clang-format
2019-08-09 13:47:35 +03:00
lassik 32c77aefbc Add scripts/format.sh
Runs clang-format on all our C code
2019-08-09 13:47:35 +03:00
lassik ff266c8862 Delete attic directory 2019-08-08 18:20:01 +03:00
lassik 4a23167463 Add .mailmap file for Git 2019-08-08 18:12:32 +03:00
Pouar c753bb3e76 use _XOPEN_SOURCE instead of manually prototyping wcwidth, also avoids a
conflict in musl
2019-08-08 18:09:02 +03:00
Jeff Bezanson b04d8035c8 replace use of "TCO" in README. closes #55 2019-08-08 18:09:02 +03:00