History

move headers and docs to their own dirs to declutter src/

Sigrid Solveig Haflínudóttir committed 3 months ago

Commit 77a7e801 parent 6e4532193 files · +221 −210Browse files

Unified · Split

93 files
  1. .gitignore +1 −1
  2. 3rd/iswprint.c +1 −1
  3. 3rd/mp/mptod.c +1 −1
  4. 3rd/wcwidth.c +1 −1
  5. boot/sl.boot +1 −1
  6. mkfile +27 −9
  7. src/bcc_null.c +1 −1
  8. src/bcc_tcc.c +4 −4
  9. src/bitvector.c +2 −2
  10. src/builtins.c +9 −9
  11. src/compress.c +3 −3
  12. src/cvalues.c +8 −8
  13. src/docs/array.sl +0 −0
  14. src/docs/compress.sl +0 −0
  15. src/docs/debug.sl +0 −0
  16. src/docs/docs.sl +18 −18
  17. src/docs/io.sl +0 −0
  18. src/docs/list.sl +0 −0
  19. src/docs/misc.sl +0 −0
  20. src/docs/number.sl +0 −0
  21. src/docs/process.sl +0 −0
  22. src/docs/random.sl +0 −0
  23. src/docs/seq.sl +0 −0
  24. src/docs/string.sl +0 −0
  25. src/docs/struct.sl +0 −0
  26. src/docs/sys.sl +0 −0
  27. src/docs/table.sl +0 −0
  28. src/docs/time.sl +0 −0
  29. src/docs/type.sl +0 −0
  30. src/docs/vm.sl +0 −0
  31. src/dos/platform.h +2 −2
  32. src/dos/sys.c +2 −2
  33. src/equal.c +6 −6
  34. src/hashing.c +2 −2
  35. src/htable.c +3 −7
  36. src/inc/arith.h +0 −0
  37. src/inc/bitvector.h +0 −0
  38. src/inc/cc.h +0 −0
  39. src/inc/cvalues.h +0 −0
  40. src/inc/equal.h +0 −0
  41. src/inc/hashing.h +0 −0
  42. src/inc/htable.h +0 −0
  43. src/inc/htable_c.h +0 −0
  44. src/inc/htable_h.h +0 −0
  45. src/inc/ieee754.h +0 −0
  46. src/inc/io.h +0 −0
  47. src/inc/ios.h +0 −0
  48. src/inc/mem.h +0 −0
  49. src/inc/mem_dlmalloc.h +0 −0
  50. src/inc/nan.h +0 −0
  51. src/inc/opcodes.h +0 −0
  52. src/inc/operators.h +0 −0
  53. src/inc/overflow.h +0 −0
  54. src/inc/print.h +0 −0
  55. src/inc/priv.h +3 −3
  56. src/inc/process.h +0 −0
  57. src/inc/read.h +0 −0
  58. src/inc/sl.h +0 −0
  59. src/inc/str.h +0 −0
  60. src/inc/table.h +0 −0
  61. src/inc/time.h +0 −0
  62. src/inc/types.h +0 −0
  63. src/io.c +6 −6
  64. src/ios.c +3 −3
  65. src/macos/platform.h +3 −3
  66. src/macos/sys.c +3 −3
  67. src/nan.c +2 −2
  68. src/opcodes.c +1 −1
  69. src/operators.c +2 −2
  70. src/plan9/lsd.c +4 −4
  71. src/plan9/platform.h +2 −2
  72. src/plan9/sys.c +5 −5
  73. src/posix/platform.h +2 −2
  74. src/posix/sys.c +3 −3
  75. src/print.c +8 −8
  76. src/process.c +6 −6
  77. src/process_null.c +4 −3
  78. src/ptrhash.c +2 −7
  79. src/random.c +5 −5
  80. src/read.c +7 −7
  81. src/sl.c +14 −14
  82. src/slmain.c +5 −5
  83. src/slmath.c +2 −2
  84. src/str.c +8 −8
  85. src/table.c +6 −6
  86. src/types.c +4 −4
  87. src/vm_funcs.c +4 −4
  88. src/vm_jmptbl.c +4 −4
  89. src/windows/platform.h +2 −2
  90. src/windows/sys.c +3 −3
  91. tools/bootstrap.sh +1 −0
  92. tools/gen.sl +3 −3
  93. tools/mkboot1.sl +2 −2
.gitignore+1−1
@@ -4,7 +4,7 @@ · 3 unmodified lines
44 *.bak
55 instructions.sl
66 builtins.sl
7−docs_ops.sl
7+src/docs/ops.sl
88 builtin_fns.h
99 *.core
1010 sl.boot.s
3rd/iswprint.c+1−1
@@ -21,7 +21,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE · 20 unmodified lines
2121 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2222 */
2323
24−#include "slpriv.h"
24+#include "inc/priv.h"
2525
2626 // straight from musl
2727 int
3rd/mp/mptod.c+1−1
@@ -1,6 +1,6 @@
11 #include "platform.h"
22 #include "mp.h"
3−#include "nan.h"
3+#include "inc/nan.h"
44
55 double
66 mptod(mpint *a)
3rd/wcwidth.c+1−1
@@ -16,7 +16,7 @@ · 15 unmodified lines
1616 * https://github.com/termux/termux-packages/tree/master/packages/libandroid-support
1717 */
1818
19−#include "slpriv.h"
19+#include "inc/priv.h"
2020
2121 struct width_interval {
2222 int start;
boot/sl.boot+1−1
@@ -1154,4 +1154,4 @@ vec->list #fn("A17080z2:" #(list) 6) vinfo · 1153 unmodified lines
11541154 #6# vinfo:sym #.car void
11551155 #3# void? #fn("A180DIQ:" 6) zero?
11561156 #fn("A180El2:" 6) zip #fn("r0707180z3:" #(map list) 7) zip-with
1157−#fn("r1708081z3:" #(map) 7))
1157+#fn("r1708081z3:" #(map) 7))
mkfile+27−9
@@ -11,12 +11,34 @@ CFLAGS=$CFLAGS -p -Isrc -I3rd -I3rd/brieflz -I3rd/pcg-c -Isrc/plan9 \ · 10 unmodified lines
1111 CLEANFILES=src/plan9/sl.boot.s src/plan9/builtin_fns.h
1212
1313 HFILES=\
14− src/equal.h\
15− src/sl.h\
16− src/slpriv.h\
17− src/opcodes.h\
18− src/plan9/platform.h\
14+ src/inc/arith.h\
15+ src/inc/bitvector.h\
16+ src/inc/cc.h\
17+ src/inc/cvalues.h\
18+ src/inc/equal.h\
19+ src/inc/hashing.h\
20+ src/inc/htable.h\
21+ src/inc/htable_c.h\
22+ src/inc/htable_h.h\
23+ src/inc/ieee754.h\
24+ src/inc/io.h\
25+ src/inc/ios.h\
26+ src/inc/mem.h\
27+ src/inc/nan.h\
28+ src/inc/opcodes.h\
29+ src/inc/operators.h\
30+ src/inc/overflow.h\
31+ src/inc/print.h\
32+ src/inc/priv.h\
33+ src/inc/process.h\
34+ src/inc/read.h\
35+ src/inc/sl.h\
36+ src/inc/str.h\
37+ src/inc/table.h\
38+ src/inc/time.h\
39+ src/inc/types.h\
1940 src/plan9/lsd.h\
41+ src/plan9/platform.h\
2042
2143 OFILES=\
2244 3rd/brieflz/brieflz.$O\
@@ -77,10 +99,6 @@ src/plan9/builtin_fns.h:D: · 54 unmodified lines
7799 {attr=""}' \
78100 `{ls $CFILES >[2]/dev/null} | sort >$target
79101
80−src/cvalues.$O: src/sl_arith_any.h
81−src/equal.$O: src/htable_c.h
82−src/ptrhash.$O: src/htable_c.h
83−
84102 OFILES_lzpack=\
85103 3rd/brieflz/brieflz_lzpack.$O\
86104 3rd/brieflz/depacks_lzpack.$O\
src/bcc_null.c+1−1
@@ -1,4 +1,4 @@
1−#include "slpriv.h"
1+#include "inc/priv.h"
22
33 void
44 bcc_init(void)
src/bcc_tcc.c+4−4
@@ -1,7 +1,7 @@
1−#include "slpriv.h"
2−#include "cvalues.h"
3−#include "print.h"
4−#include "types.h"
1+#include "inc/priv.h"
2+#include "inc/cvalues.h"
3+#include "inc/print.h"
4+#include "inc/types.h"
55 #include "libtcc.h"
66
77 static sl_v ccsym, vtbtypesym[VT_BTYPE+1];
src/bitvector.c+2−2
@@ -1,5 +1,5 @@
1−#include "slpriv.h"
2−#include "bitvector.h"
1+#include "inc/priv.h"
2+#include "inc/bitvector.h"
33
44 u32int *
55 bitvector_resize(u32int *b, u64int oldsz, u64int newsz)
src/builtins.c+9−9
@@ -1,13 +1,13 @@
1−#include "slpriv.h"
2−#include "sl_io.h"
3−#include "str.h"
1+#include "inc/priv.h"
2+#include "inc/io.h"
3+#include "inc/str.h"
4+#include "inc/operators.h"
5+#include "inc/cvalues.h"
6+#include "inc/time.h"
7+#include "inc/table.h"
8+#include "inc/nan.h"
9+#include "inc/ieee754.h"
410 #include "tbl.h"
5−#include "operators.h"
6−#include "cvalues.h"
7−#include "timefuncs.h"
8−#include "table.h"
9−#include "nan.h"
10−#include "ieee754.h"
1111
1212 usize
1313 llength(sl_v v)
src/compress.c+3−3
@@ -1,6 +1,6 @@
1−#include "slpriv.h"
2−#include "cvalues.h"
3−#include "types.h"
1+#include "inc/priv.h"
2+#include "inc/cvalues.h"
3+#include "inc/types.h"
44 #include "brieflz.h"
55
66 static sl_v sl_sizesym, sl_tosym;
src/cvalues.c+8−8
@@ -1,9 +1,9 @@
1−#include "slpriv.h"
2−#include "operators.h"
3−#include "cvalues.h"
4−#include "types.h"
5−#include "sl_io.h"
6−#include "equal.h"
1+#include "inc/priv.h"
2+#include "inc/operators.h"
3+#include "inc/cvalues.h"
4+#include "inc/types.h"
5+#include "inc/io.h"
6+#include "inc/equal.h"
77
88 enum {
99 MAX_INL_SIZE = 384,
@@ -1064,7 +1064,7 @@ return_from_s64(s64int Saccum) · 1054 unmodified lines
10641064 sl_v
10651065 sl_add_any(sl_v *args, u32int nargs)
10661066 {
1067−#include "sl_arith_any.h"
1067+#include "inc/arith.h"
10681068 }
10691069
10701070 #define ACCUM_DEFAULT 1
@@ -1075,7 +1075,7 @@ sl_add_any(sl_v *args, u32int nargs) · 4 unmodified lines
10751075 sl_v
10761076 sl_mul_any(sl_v *args, u32int nargs)
10771077 {
1078−#include "sl_arith_any.h"
1078+#include "inc/arith.h"
10791079 }
10801080
10811081 sl_v
src/docs/array.slrenamed from src/docs_array.sl+0−0

File renamed without changes.

src/docs/compress.slrenamed from src/docs_compress.sl+0−0

File renamed without changes.

src/docs/debug.slrenamed from src/docs_debug.sl+0−0

File renamed without changes.

src/docs/docs.slrenamed from src/docs.sl+18−18
@@ -52,21 +52,21 @@ · 51 unmodified lines
5252 (doc-group doc
5353 «Writing and reading documentation.»)
5454
55−(load "../src/docs_array.sl")
56−(load "../src/docs_compress.sl")
57−(load "../src/docs_debug.sl")
58−(load "../src/docs_io.sl")
59−(load "../src/docs_list.sl")
60−(load "../src/docs_misc.sl")
61−(load "../src/docs_number.sl")
62−(load "../src/docs_ops.sl")
63−(load "../src/docs_process.sl")
64−(load "../src/docs_random.sl")
65−(load "../src/docs_seq.sl")
66−(load "../src/docs_string.sl")
67−(load "../src/docs_struct.sl")
68−(load "../src/docs_sys.sl")
69−(load "../src/docs_table.sl")
70−(load "../src/docs_time.sl")
71−(load "../src/docs_type.sl")
72−(load "../src/docs_vm.sl")
55+(load "../src/docs/array.sl")
56+(load "../src/docs/compress.sl")
57+(load "../src/docs/debug.sl")
58+(load "../src/docs/io.sl")
59+(load "../src/docs/list.sl")
60+(load "../src/docs/misc.sl")
61+(load "../src/docs/number.sl")
62+(load "../src/docs/ops.sl")
63+(load "../src/docs/process.sl")
64+(load "../src/docs/random.sl")
65+(load "../src/docs/seq.sl")
66+(load "../src/docs/string.sl")
67+(load "../src/docs/struct.sl")
68+(load "../src/docs/sys.sl")
69+(load "../src/docs/table.sl")
70+(load "../src/docs/time.sl")
71+(load "../src/docs/type.sl")
72+(load "../src/docs/vm.sl")
src/docs/io.slrenamed from src/docs_io.sl+0−0

File renamed without changes.

src/docs/list.slrenamed from src/docs_list.sl+0−0

File renamed without changes.

src/docs/misc.slrenamed from src/docs_misc.sl+0−0

File renamed without changes.

src/docs/number.slrenamed from src/docs_number.sl+0−0

File renamed without changes.

src/docs/process.slrenamed from src/docs_process.sl+0−0

File renamed without changes.

src/docs/random.slrenamed from src/docs_random.sl+0−0

File renamed without changes.

src/docs/seq.slrenamed from src/docs_seq.sl+0−0

File renamed without changes.

src/docs/string.slrenamed from src/docs_string.sl+0−0

File renamed without changes.

src/docs/struct.slrenamed from src/docs_struct.sl+0−0

File renamed without changes.

src/docs/sys.slrenamed from src/docs_sys.sl+0−0

File renamed without changes.

src/docs/table.slrenamed from src/docs_table.sl+0−0

File renamed without changes.

src/docs/time.slrenamed from src/docs_time.sl+0−0

File renamed without changes.

src/docs/type.slrenamed from src/docs_type.sl+0−0

File renamed without changes.

src/docs/vm.slrenamed from src/docs_vm.sl+0−0

File renamed without changes.

src/dos/platform.h+2−2
@@ -45,7 +45,7 @@ void sys_seed(void *p, int sz); · 44 unmodified lines
4545 #define sl_segfree(s, sz) MEM_FREE(s)
4646 #define sl_segused(s, sz, used) do{}while(0)
4747
48−#include "cc.h"
49−#include "mem.h"
48+#include "inc/cc.h"
49+#include "inc/mem.h"
5050 #include "mp.h"
5151 #include "utf.h"
src/dos/sys.c+2−2
@@ -1,8 +1,8 @@
1−#include "slpriv.h"
2−#include "timefuncs.h"
31 #include <fcntl.h>
42 #include <time.h>
53 #include <locale.h>
4+#include "inc/priv.h"
5+#include "inc/time.h"
66
77 u64int
88 sec_realtime(void)
src/equal.c+6−6
@@ -1,8 +1,8 @@
1−#include "slpriv.h"
2−#include "operators.h"
3−#include "cvalues.h"
4−#include "equal.h"
5−#include "hashing.h"
1+#include "inc/priv.h"
2+#include "inc/operators.h"
3+#include "inc/cvalues.h"
4+#include "inc/equal.h"
5+#include "inc/hashing.h"
66
77 enum {
88 BOUNDED_COMPARE_BOUND = 128,
@@ -410,4 +410,4 @@ hash_lispvalue(sl_v a) · 401 unmodified lines
410410 #define HFUNC(v) hash_lispvalue((sl_v)(v))
411411 #define EQFUNC(x, y) equal_lispvalue((sl_v)(x), (sl_v)(y))
412412
413−#include "htable_c.h"
413+#include "inc/htable_c.h"
src/hashing.c+2−2
@@ -1,5 +1,5 @@
1−#include "slpriv.h"
2−#include "hashing.h"
1+#include "inc/priv.h"
2+#include "inc/hashing.h"
33 #if defined(USE_XXHASH)
44 #include <xxhash.h>
55 #else
src/htable.c+3−7
@@ -1,10 +1,6 @@
1−/*
2− functions common to all hash table instantiations
3−*/
4−
5−#include "slpriv.h"
6−#include "htable.h"
7−#include "hashing.h"
1+#include "inc/priv.h"
2+#include "inc/htable.h"
3+#include "inc/hashing.h"
84
95 sl_htable *
106 htable_new(sl_htable *h, usize numpairs)
src/inc/arith.hrenamed from src/sl_arith_any.h+0−0

File renamed without changes.

src/inc/bitvector.hrenamed from src/bitvector.h+0−0

File renamed without changes.

src/inc/cc.hrenamed from src/cc.h+0−0

File renamed without changes.

src/inc/cvalues.hrenamed from src/cvalues.h+0−0

File renamed without changes.

src/inc/equal.hrenamed from src/equal.h+0−0

File renamed without changes.

src/inc/hashing.hrenamed from src/hashing.h+0−0

File renamed without changes.

src/inc/htable.hrenamed from src/htable.h+0−0

File renamed without changes.

src/inc/htable_c.hrenamed from src/htable_c.h+0−0

File renamed without changes.

src/inc/htable_h.hrenamed from src/htable_h.h+0−0

File renamed without changes.

src/inc/ieee754.hrenamed from src/ieee754.h+0−0

File renamed without changes.

src/inc/io.hrenamed from src/sl_io.h+0−0

File renamed without changes.

src/inc/ios.hrenamed from src/ios.h+0−0

File renamed without changes.

src/inc/mem.hrenamed from src/mem.h+0−0

File renamed without changes.

src/inc/mem_dlmalloc.hrenamed from src/mem_dlmalloc.h+0−0

File renamed without changes.

src/inc/nan.hrenamed from src/nan.h+0−0

File renamed without changes.

src/inc/opcodes.hrenamed from src/opcodes.h+0−0

File renamed without changes.

src/inc/operators.hrenamed from src/operators.h+0−0

File renamed without changes.

src/inc/overflow.hrenamed from src/overflow.h+0−0

File renamed without changes.

src/inc/print.hrenamed from src/print.h+0−0

File renamed without changes.

src/inc/priv.hrenamed from src/slpriv.h+3−3
@@ -1,8 +1,8 @@
11 #pragma once
22
3−#include "sl.h"
4−#include "ios.h"
5−#include "htable_h.h"
3+#include "inc/sl.h"
4+#include "inc/ios.h"
5+#include "inc/htable_h.h"
66 HTPROT(ptrhash)
77
88 // all allocations on the heap are 8-byte aligned
src/inc/process.hrenamed from src/sl_process.h+0−0

File renamed without changes.

src/inc/read.hrenamed from src/read.h+0−0

File renamed without changes.

src/inc/sl.hrenamed from src/sl.h+0−0

File renamed without changes.

src/inc/str.hrenamed from src/str.h+0−0

File renamed without changes.

src/inc/table.hrenamed from src/table.h+0−0

File renamed without changes.

src/inc/time.hrenamed from src/timefuncs.h+0−0

File renamed without changes.

src/inc/types.hrenamed from src/types.h+0−0

File renamed without changes.

src/io.c+6−6
@@ -1,9 +1,9 @@
1−#include "slpriv.h"
2−#include "cvalues.h"
3−#include "types.h"
4−#include "print.h"
5−#include "read.h"
6−#include "sl_io.h"
1+#include "inc/priv.h"
2+#include "inc/cvalues.h"
3+#include "inc/types.h"
4+#include "inc/print.h"
5+#include "inc/read.h"
6+#include "inc/io.h"
77
88 static sl_v iosym, rdsym, wrsym, apsym, crsym, truncsym;
99 static sl_v linesym, blocksym, memorysym;
src/ios.c+3−3
@@ -1,6 +1,6 @@
1−#include "slpriv.h"
2−#include "str.h"
3−#include "timefuncs.h"
1+#include "inc/priv.h"
2+#include "inc/str.h"
3+#include "inc/time.h"
44
55 #define MOST_OF(x) ((x) - ((x)>>4))
66
src/macos/platform.h+3−3
@@ -43,8 +43,8 @@ void sys_seed(void *p, int sz); · 42 unmodified lines
4343 #define HEAP_SIZE0 128*1024
4444 #define STACK_SIZE0 8*1024
4545
46−#include "cc.h"
47−#include "mem_dlmalloc.h"
48−#include "mem.h"
46+#include "inc/cc.h"
47+#include "inc/mem_dlmalloc.h"
48+#include "inc/mem.h"
4949 #include "mp.h"
5050 #include "utf.h"
src/macos/sys.c+3−3
@@ -1,9 +1,9 @@
1−#include <OSUtils.h>
2−#include "slpriv.h"
3−#include "timefuncs.h"
41 #include <fcntl.h>
52 #include <sys/time.h>
63 #include <time.h>
4+#include <OSUtils.h>
5+#include "inc/priv.h"
6+#include "inc/time.h"
77
88 u64int
99 sec_realtime(void)
src/nan.c+2−2
@@ -1,6 +1,6 @@
11 #include "platform.h"
2−#include "nan.h"
3−#include "ieee754.h"
2+#include "inc/nan.h"
3+#include "inc/ieee754.h"
44
55 double D_NNAN, D_NINF;
66 #if defined(__TINYC__) || defined(__plan9__)
src/opcodes.c+1−1
@@ -1,4 +1,4 @@
1−#include "slpriv.h"
1+#include "inc/priv.h"
22
33 const sl_builtin builtins[N_OPCODES] = {
44 [OP_BUILTINP] = {"builtin?", 1},
src/operators.c+2−2
@@ -1,5 +1,5 @@
1−#include "slpriv.h"
2−#include "operators.h"
1+#include "inc/priv.h"
2+#include "inc/operators.h"
33
44 mpint *
55 conv_to_bignum(sl_v v, const void *data, sl_numtype tag)
src/plan9/lsd.c+4−4
@@ -1,11 +1,11 @@
1−#include "slpriv.h"
1+#include "inc/priv.h"
22 #include <draw.h>
33 #include <bio.h>
44 #include <ctype.h>
55 #include <mach.h>
6−#include "cvalues.h"
7−#include "types.h"
8−#include "sl_io.h"
6+#include "inc/cvalues.h"
7+#include "inc/types.h"
8+#include "inc/io.h"
99
1010 static char aout[1024];
1111 static sl_v gpregsym, fpregsym, mkregsym, mksymbolsym, mkframesym;
src/plan9/platform.h+2−2
@@ -139,5 +139,5 @@ int ftruncate(int f, soffset sz); · 138 unmodified lines
139139 #define sl_enum_flags
140140 #define sl_offsetof(x, y) offsetof(x, y)
141141
142−#include "mem.h"
143−#include "overflow.h"
142+#include "inc/mem.h"
143+#include "inc/overflow.h"
src/plan9/sys.c+5−5
@@ -1,9 +1,9 @@
1−#include "slpriv.h"
2−#include "lsd.h"
3−#include "nan.h"
4−#include "sl_process.h"
5−#include "timefuncs.h"
1+#include "inc/priv.h"
62 #include <tos.h>
3+#include "inc/nan.h"
4+#include "inc/process.h"
5+#include "inc/time.h"
6+#include "lsd.h"
77
88 u64int
99 sec_realtime(void)
src/posix/platform.h+2−2
@@ -84,7 +84,7 @@ void sys_seed(void *p, int sz); · 83 unmodified lines
8484 #endif
8585 #endif
8686
87−#include "cc.h"
88−#include "mem.h"
87+#include "inc/cc.h"
88+#include "inc/mem.h"
8989 #include "mp.h"
9090 #include "utf.h"
src/posix/sys.c+3−3
@@ -1,6 +1,6 @@
1−#include "slpriv.h"
2−#include "sl_process.h"
3−#include "timefuncs.h"
1+#include "inc/priv.h"
2+#include "inc/process.h"
3+#include "inc/time.h"
44 #include <errno.h>
55 #include <fcntl.h>
66 #include <locale.h>
src/print.c+8−8
@@ -1,11 +1,11 @@
1−#include "slpriv.h"
2−#include "str.h"
3−#include "bitvector.h"
4−#include "operators.h"
5−#include "cvalues.h"
6−#include "ieee754.h"
7−#include "print.h"
8−#include "read.h"
1+#include "inc/priv.h"
2+#include "inc/str.h"
3+#include "inc/bitvector.h"
4+#include "inc/operators.h"
5+#include "inc/cvalues.h"
6+#include "inc/ieee754.h"
7+#include "inc/print.h"
8+#include "inc/read.h"
99
1010 enum {
1111 SMALL_STR_LEN = 24,
src/process.c+6−6
@@ -1,9 +1,9 @@
1−#include "slpriv.h"
2−#include "cvalues.h"
3−#include "print.h"
4−#include "sl_io.h"
5−#include "sl_process.h"
6−#include "types.h"
1+#include "inc/priv.h"
2+#include "inc/cvalues.h"
3+#include "inc/print.h"
4+#include "inc/io.h"
5+#include "inc/process.h"
6+#include "inc/types.h"
77
88 static const sl_type *processtype;
99 static sl_v runningsym, exitedsym, streamsym;
src/process_null.c+4−3
@@ -1,10 +1,11 @@
1−#include "slpriv.h"
2−#include "sl_process.h"
1+#include "inc/priv.h"
2+#include "inc/process.h"
33
44 int
55 sys_pipe(int fd[2], bool rd, bool wr)
66 {
7− USED(fd); USED(rd); USED(wr);
7+ USED(rd); USED(wr);
8+ fd[0] = fd[1] = -1;
89 return -1;
910 }
1011
src/ptrhash.c+2−7
@@ -1,9 +1,4 @@
1−/*
2− pointer hash table
3− optimized for storing info about particular values
4−*/
5−
6−#include "slpriv.h"
1+#include "inc/priv.h"
72
83 static inline sl_v
94 ptrhash(sl_v a)
@@ -15,4 +10,4 @@ ptrhash(sl_v a) · 5 unmodified lines
1510 #define HFUNC(v) ptrhash((sl_v)(v))
1611 #define EQFUNC(x, y) ((x) == (y))
1712
18−#include "htable_c.h"
13+#include "inc/htable_c.h"
src/random.c+5−5
@@ -1,8 +1,8 @@
1−#include "slpriv.h"
2−#include "cvalues.h"
3−#include "equal.h"
4−#include "operators.h"
5−#include "types.h"
1+#include "inc/priv.h"
2+#include "inc/cvalues.h"
3+#include "inc/equal.h"
4+#include "inc/operators.h"
5+#include "inc/types.h"
66 #include "pcg_variants.h"
77
88 typedef pcg32x2_random_t pcg_t;
src/read.c+7−7
@@ -1,11 +1,11 @@
1−#include "slpriv.h"
2−#include "cvalues.h"
3−#include "read.h"
4−#include "nan.h"
1+#include "inc/priv.h"
2+#include "inc/cvalues.h"
3+#include "inc/read.h"
4+#include "inc/nan.h"
5+#include "inc/str.h"
6+#include "inc/table.h"
7+#include "inc/equal.h"
58 #include "tbl.h"
6−#include "str.h"
7−#include "table.h"
8−#include "equal.h"
99
1010 enum {
1111 TOK_NONE, TOK_OPEN, TOK_CLOSE, TOK_DOT, TOK_QUOTE, TOK_SYM, TOK_NUM,
src/sl.c+14−14
@@ -1,18 +1,18 @@
1−#include "slpriv.h"
2−#include "bitvector.h"
3−#include "cvalues.h"
4−#include "equal.h"
5−#include "hashing.h"
6−#include "operators.h"
7−#include "print.h"
8−#include "read.h"
9−#include "sl_io.h"
10−#include "sl_process.h"
11−#include "str.h"
12−#include "table.h"
1+#include "inc/priv.h"
2+#include "inc/bitvector.h"
3+#include "inc/cvalues.h"
4+#include "inc/equal.h"
5+#include "inc/hashing.h"
6+#include "inc/operators.h"
7+#include "inc/print.h"
8+#include "inc/read.h"
9+#include "inc/io.h"
10+#include "inc/process.h"
11+#include "inc/str.h"
12+#include "inc/table.h"
13+#include "inc/time.h"
14+#include "inc/types.h"
1315 #include "tbl.h"
14−#include "timefuncs.h"
15−#include "types.h"
1616
1717 sl_v sl_builtinssym, sl_quote, sl_lambda, sl_comma, sl_commaat;
1818 sl_v sl_commadot, sl_trycatch, sl_backquote;
src/slmain.c+5−5
@@ -1,9 +1,9 @@
1−#include "slpriv.h"
2−#include "cvalues.h"
3−#include "print.h"
4−#include "sl_io.h"
1+#include "inc/priv.h"
2+#include "inc/cvalues.h"
3+#include "inc/print.h"
4+#include "inc/io.h"
5+#include "inc/nan.h"
56 #include "brieflz.h"
6−#include "nan.h"
77
88 #if !defined(ARGBEGIN)
99 /* straight from 9front */
src/slmath.c+2−2
@@ -1,5 +1,5 @@
1−#include "slpriv.h"
2−#include "cvalues.h"
1+#include "inc/priv.h"
2+#include "inc/cvalues.h"
33
44 BUILTIN("atan", atan)
55 {
src/str.c+8−8
@@ -1,11 +1,11 @@
1−#include "slpriv.h"
2−#include "operators.h"
3−#include "cvalues.h"
4−#include "print.h"
5−#include "read.h"
6−#include "equal.h"
7−#include "sl_io.h"
8−#include "str.h"
1+#include "inc/priv.h"
2+#include "inc/operators.h"
3+#include "inc/cvalues.h"
4+#include "inc/print.h"
5+#include "inc/read.h"
6+#include "inc/equal.h"
7+#include "inc/io.h"
8+#include "inc/str.h"
99
1010 static sl_v basesym;
1111
src/table.c+6−6
@@ -1,9 +1,9 @@
1−#include "slpriv.h"
2−#include "equal.h"
3−#include "cvalues.h"
4−#include "types.h"
5−#include "print.h"
6−#include "table.h"
1+#include "inc/priv.h"
2+#include "inc/equal.h"
3+#include "inc/cvalues.h"
4+#include "inc/types.h"
5+#include "inc/print.h"
6+#include "inc/table.h"
77
88 const sl_type *sl_tabletype;
99
src/types.c+4−4
@@ -1,7 +1,7 @@
1−#include "slpriv.h"
2−#include "cvalues.h"
3−#include "equal.h"
4−#include "types.h"
1+#include "inc/priv.h"
2+#include "inc/cvalues.h"
3+#include "inc/equal.h"
4+#include "inc/types.h"
55
66 sl_type *
77 get_type(sl_v t, usize sz)
src/vm_funcs.c+4−4
@@ -1,7 +1,7 @@
1−#include "slpriv.h"
2−#include "equal.h"
3−#include "cvalues.h"
4−#include "sl_io.h"
1+#include "inc/priv.h"
2+#include "inc/equal.h"
3+#include "inc/cvalues.h"
4+#include "inc/io.h"
55
66 #define OP_ARGS \
77 int nargs, const u8int *ip, usize top_frame, usize obp, \
src/vm_jmptbl.c+4−4
@@ -1,7 +1,7 @@
1−#include "slpriv.h"
2−#include "equal.h"
3−#include "cvalues.h"
4−#include "sl_io.h"
1+#include "inc/priv.h"
2+#include "inc/equal.h"
3+#include "inc/cvalues.h"
4+#include "inc/io.h"
55
66 #define ENTER do{ \
77 sl.stack[ipd] = (uintptr)ip; \
src/windows/platform.h+2−2
@@ -52,7 +52,7 @@ int vdprintf(int fd, const char *fmt, va_list args); · 51 unmodified lines
5252 #define sl_segfree(s, sz) MEM_FREE(s)
5353 #define sl_segused(s, sz, used) do{}while(0)
5454
55−#include "cc.h"
56−#include "mem.h"
55+#include "inc/cc.h"
56+#include "inc/mem.h"
5757 #include "mp.h"
5858 #include "utf.h"
src/windows/sys.c+3−3
@@ -1,12 +1,12 @@
11 #define _CRT_RAND_S // rand_s
22 #define _GNU_SOURCE // vasprintf
3−#include "slpriv.h"
4−#include "timefuncs.h"
5−#undef MEM_FREE
63 #include <time.h>
74 #include <fcntl.h>
85 #include <locale.h>
96 #include <windows.h>
7+#undef MEM_FREE
8+#include "inc/priv.h"
9+#include "inc/time.h"
1010
1111 static void __stdcall (*get_sys_time)(LPFILETIME);
1212
tools/bootstrap.sh+1−0
@@ -12,5 +12,6 @@ ninja -C "$B" && \ · 11 unmodified lines
1212 cd "$P/boot" && \
1313 $* "$T/mkboot1.sl" && \
1414 sed -E 's/^ +//g' <sl.boot >sl.boot.cut && \
15+echo >>sl.boot.cut &&
1516 mv sl.boot.cut sl.boot && \
1617 ninja -C "$B" || { cp "$P/boot/sl.boot.bak" "$P/boot/sl.boot"; exit 1; }
tools/gen.sl+3−3
@@ -498,7 +498,7 @@ · 497 unmodified lines
498498 (c-code (buffer))
499499 (instructions (new "instructions.sl"))
500500 (builtins (new "builtins.sl"))
501− (docs-ops (new "docs_ops.sl"))
501+ (docs-ops (new "docs/ops.sl"))
502502 (op-to-u8 (table))
503503 (c-op-to-op-arg (table))
504504 (op-to-argc (table))
@@ -536,7 +536,7 @@ · 31 unmodified lines
536536 (io-write c-header "\tN_OPCODES\n}sl_op;\n\n")
537537 (io-write c-header "extern const sl_builtin builtins[N_OPCODES];\n")
538538
539− (io-write c-code "#include \"slpriv.h\"\n\n")
539+ (io-write c-code "#include \"inc/priv.h\"\n\n")
540540 (io-write c-code "const sl_builtin builtins[N_OPCODES] = {\n")
541541 (for-each
542542 (λ (c la) (begin (io-write c-code (str "\t[" c))
@@ -573,6 +573,6 @@ · 30 unmodified lines
573573
574574 ;; at last, copy the buffers to the actual files in git repo.
575575 (io-pos! c-header 0)
576− (io-copy (new "opcodes.h") c-header)
576+ (io-copy (new "inc/opcodes.h") c-header)
577577 (io-pos! c-code 0)
578578 (io-copy (new "opcodes.c") c-code))
tools/mkboot1.sl+2−2
@@ -1,7 +1,7 @@
11 (load "../src/builtins.sl")
22 (load "../src/instructions.sl")
33 (load "../src/system.sl")
4−#.(load "../src/docs.sl")
5−#.(load "../src/docs_ops.sl")
4+#.(load "../src/docs/docs.sl")
5+#.(load "../src/docs/ops.sl")
66 (load "../src/compiler.sl")
77 (make-system-image "sl.boot")

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t