Commit Graph

377 Commits

Author SHA1 Message Date
Lassi Kortela 10ffed569e Fix build errors and warnings for OpenBSD 2019-08-09 20:20:17 +03:00
Lassi Kortela b7b4269455 Replace strcpy() and strcat() with safer functions 2019-08-09 20:14:42 +03:00
Lassi Kortela b5946dea77 Remove unused INITFILE config option 2019-08-09 20:11:02 +03:00
Lassi Kortela bb78dc0634 Fix compiler warnings (clang -Wextra) 2019-08-09 19:53:35 +03:00
Lassi Kortela 7d93f262a7 Set C compiler options -Wextra -std=gnu99 2019-08-09 19:50:21 +03:00
Lassi Kortela 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
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 c9f5e4faeb Replace symbol_t with struct 2019-08-09 19:30:15 +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 ece07d2e1a Replace cvtable_t with struct 2019-08-09 19:26:48 +03:00
Lassi Kortela 428e7a3825 Replace builtinspec_t with struct 2019-08-09 19:26:48 +03:00
Lassi Kortela e54797e4eb Replace fl_exception_context_t with struct 2019-08-09 19:26:48 +03:00
Lassi Kortela 262ace1efd Replace fl_readstate_t with struct 2019-08-09 19:26:42 +03:00
Lassi Kortela b561f9d4b0 Replace gensym_t with struct 2019-08-09 19:26:33 +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
Lassi Kortela d69e40aa3a Delete unused C file 2019-08-09 18:22:10 +03:00
Lassi Kortela 1caa8f9cf3 Update copyright statement in LICENSE file 2019-08-09 18:10:54 +03:00
Lassi Kortela 85efbbc7ce Sort C file names in build.sh 2019-08-09 17:30:49 +03:00
Lassi Kortela b4c3c64f94 Generate new boot image after tabs-to-spaces conversion 2019-08-09 17:25:13 +03:00
Lassi Kortela 04b3c3b292 Replace tabs with spaces in Lisp printer 2019-08-09 17:25:13 +03:00
Lassi Kortela 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
Lassi Kortela 09c6368668 Run renamed .inc files by clang-format for the first time 2019-08-09 17:25:13 +03:00
Lassi Kortela 4128fbc535 Rename .inc files to use .h extension 2019-08-09 17:18:21 +03:00
Lassi Kortela 8e35d98142 Move bootstrap images into a scheme-boot directory 2019-08-09 15:53:31 +03:00
Lassi Kortela aaf73c8439 Consolidate all Lisp files into scheme-* with .scm extension 2019-08-09 15:21:56 +03:00
Lassi Kortela d6f54bc13c Consolidate all C files into a "c" subdirectory 2019-08-09 15:02:58 +03:00
Lassi Kortela 53e6421ce1 Remove curiosity files from tree 2019-08-09 15:02:04 +03:00
Lassi Kortela 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
Lassi Kortela 82e09fa92b Avoid clang warnings about undefined signed shift behavior
Calls to fixnum(-1) would cause them.
2019-08-09 14:06:36 +03:00
Lassi Kortela b128aee83d Add .editorconfig file to match clang-format 2019-08-09 14:03:13 +03:00
Lassi Kortela 6a6a7071a9 Run clang-format on all C code for the first time 2019-08-09 14:02:02 +03:00
Lassi Kortela 7ab81c9e56 Change some more clang-format settings to my liking 2019-08-09 13:59:27 +03:00
Lassi Kortela 0fdee2f7b8 Change clang-format to keep "} else" brace on same line 2019-08-09 13:59:18 +03:00
Lassi Kortela 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
Lassi Kortela 8c85386640 Run whatstyle to derive clang-format settings
find . -name "*.c" | xargs whatstyle --formatter clang-format
2019-08-09 13:47:35 +03:00
Lassi Kortela 32c77aefbc Add scripts/format.sh
Runs clang-format on all our C code
2019-08-09 13:47:35 +03:00
Lassi Kortela ff266c8862 Delete attic directory 2019-08-08 18:20:01 +03:00
Lassi Kortela 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
Jeff Bezanson f3137447c8 fix part of #53, assertion failure on invalid dotted list 2019-08-08 18:09:02 +03:00
Jeff Bezanson 245d472567 fix part of #53, error check for invalid `set!` location 2019-08-08 18:09:02 +03:00
Jeff Bezanson 150a160960 fix part of #53, assertion failure in print_traverse 2019-08-08 18:09:02 +03:00
jniewerth 0b6dd2ca11 Fix "use-after-relocate" in stream_to_string
cvalue_string() can cause a gc - this potentially makes the ios_t-pointer that is cached in the local variable "st" invalid.
2019-08-08 18:09:02 +03:00