Commit b45456dc518f98e959988873d3ff6c7c36ecf287

Thomas de Grivel 2024-07-15T22:39:24

rename c3 -> kc3

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
diff --git a/env b/env
index a0eb41b..9a086eb 100644
--- a/env
+++ b/env
@@ -1,2 +1 @@
-export PATH="$HOME/.c3/bin:$PATH"
-export LD_LIBRARY_PATH="$HOME/.c3/lib:$LD_LIBRARY_PATH"
+export LD_LIBRARY_PATH="$PWD/libkc3/.libs:$LD_LIBRARY_PATH"
diff --git a/lib/kc3/0.1/complex.facts b/lib/kc3/0.1/complex.facts
index a390845..1f8c1bf 100644
--- a/lib/kc3/0.1/complex.facts
+++ b/lib/kc3/0.1/complex.facts
@@ -1,4 +1,4 @@
-%{module: C3.Facts.Dump,
+%{module: KC3.Facts.Dump,
   version: 1}
 replace {Complex, :is_a, :module}
 replace {Complex, :symbol, Complex.cast}
diff --git a/lib/kc3/0.1/f128.facts b/lib/kc3/0.1/f128.facts
index 9acc7c4..4f7cba0 100644
--- a/lib/kc3/0.1/f128.facts
+++ b/lib/kc3/0.1/f128.facts
@@ -1,4 +1,4 @@
-%{module: C3.Facts.Dump,
+%{module: KC3.Facts.Dump,
   version: 1}
 replace {F128, :is_a, :module}
 replace {F128, :symbol, F128.cast}
diff --git a/lib/kc3/0.1/f32.facts b/lib/kc3/0.1/f32.facts
index 83d2d79..8396522 100644
--- a/lib/kc3/0.1/f32.facts
+++ b/lib/kc3/0.1/f32.facts
@@ -1,4 +1,4 @@
-%{module: C3.Facts.Dump,
+%{module: KC3.Facts.Dump,
   version: 1}
 replace {F32, :is_a, :module}
 replace {F32, :symbol, F32.cast}
diff --git a/lib/kc3/0.1/f64.facts b/lib/kc3/0.1/f64.facts
index 76afff9..0f771c5 100644
--- a/lib/kc3/0.1/f64.facts
+++ b/lib/kc3/0.1/f64.facts
@@ -1,4 +1,4 @@
-%{module: C3.Facts.Dump,
+%{module: KC3.Facts.Dump,
   version: 1}
 replace {F64, :is_a, :module}
 replace {F64, :symbol, F64.cast}
diff --git a/lib/kc3/0.1/gl/dvec2.c3 b/lib/kc3/0.1/gl/dvec2.c3
deleted file mode 100644
index 114f995..0000000
--- a/lib/kc3/0.1/gl/dvec2.c3
+++ /dev/null
@@ -1,6 +0,0 @@
-defmodule GL.Dvec2 do
-
-  defstruct [x: (F64) 0,
-             y: (F64) 0]
-
-end
diff --git a/lib/kc3/0.1/gl/dvec2.kc3 b/lib/kc3/0.1/gl/dvec2.kc3
new file mode 100644
index 0000000..114f995
--- /dev/null
+++ b/lib/kc3/0.1/gl/dvec2.kc3
@@ -0,0 +1,6 @@
+defmodule GL.Dvec2 do
+
+  defstruct [x: (F64) 0,
+             y: (F64) 0]
+
+end
diff --git a/lib/kc3/0.1/gl/dvec3.c3 b/lib/kc3/0.1/gl/dvec3.c3
deleted file mode 100644
index 6d2bbeb..0000000
--- a/lib/kc3/0.1/gl/dvec3.c3
+++ /dev/null
@@ -1,7 +0,0 @@
-defmodule GL.Dvec3 do
-
-  defstruct [x: (F64) 0,
-             y: (F64) 0,
-             z: (F64) 0]
-
-end
diff --git a/lib/kc3/0.1/gl/dvec3.kc3 b/lib/kc3/0.1/gl/dvec3.kc3
new file mode 100644
index 0000000..6d2bbeb
--- /dev/null
+++ b/lib/kc3/0.1/gl/dvec3.kc3
@@ -0,0 +1,7 @@
+defmodule GL.Dvec3 do
+
+  defstruct [x: (F64) 0,
+             y: (F64) 0,
+             z: (F64) 0]
+
+end
diff --git a/lib/kc3/0.1/gl/object.c3 b/lib/kc3/0.1/gl/object.c3
deleted file mode 100644
index 6c9efa4..0000000
--- a/lib/kc3/0.1/gl/object.c3
+++ /dev/null
@@ -1,12 +0,0 @@
-defmodule GL.Object do
-
-  defstruct [vertex: (GL.Vertex[]) {},
-             triangle: (GL.Triangle[]) {},
-             gl_mode: (U32) 0,
-             gl_vao: (U32) 0,
-             gl_vbo: (U32) 0,
-             gl_ebo: (U32) 0]
-
-  def clean = cfn Void "gl_object_clean" (GL.Object)
-
-end
diff --git a/lib/kc3/0.1/gl/object.kc3 b/lib/kc3/0.1/gl/object.kc3
new file mode 100644
index 0000000..6c9efa4
--- /dev/null
+++ b/lib/kc3/0.1/gl/object.kc3
@@ -0,0 +1,12 @@
+defmodule GL.Object do
+
+  defstruct [vertex: (GL.Vertex[]) {},
+             triangle: (GL.Triangle[]) {},
+             gl_mode: (U32) 0,
+             gl_vao: (U32) 0,
+             gl_vbo: (U32) 0,
+             gl_ebo: (U32) 0]
+
+  def clean = cfn Void "gl_object_clean" (GL.Object)
+
+end
diff --git a/lib/kc3/0.1/gl/sphere.c3 b/lib/kc3/0.1/gl/sphere.c3
deleted file mode 100644
index 4ba9ce4..0000000
--- a/lib/kc3/0.1/gl/sphere.c3
+++ /dev/null
@@ -1,9 +0,0 @@
-defmodule GL.Sphere do
-
-  defstruct [object: %GL.Object{},
-             segments_u: (Uw) 3,
-             segments_v: (Uw) 2]
-
-  def clean = cfn Void "gl_sphere_clean" (GL.Sphere)
-
-end
diff --git a/lib/kc3/0.1/gl/sphere.kc3 b/lib/kc3/0.1/gl/sphere.kc3
new file mode 100644
index 0000000..4ba9ce4
--- /dev/null
+++ b/lib/kc3/0.1/gl/sphere.kc3
@@ -0,0 +1,9 @@
+defmodule GL.Sphere do
+
+  defstruct [object: %GL.Object{},
+             segments_u: (Uw) 3,
+             segments_v: (Uw) 2]
+
+  def clean = cfn Void "gl_sphere_clean" (GL.Sphere)
+
+end
diff --git a/lib/kc3/0.1/gl/triangle.c3 b/lib/kc3/0.1/gl/triangle.c3
deleted file mode 100644
index 1e496b0..0000000
--- a/lib/kc3/0.1/gl/triangle.c3
+++ /dev/null
@@ -1,7 +0,0 @@
-defmodule GL.Triangle do
-
-  defstruct [a: (U32) 0,
-             b: (U32) 1,
-             c: (U32) 2]
-
-end
diff --git a/lib/kc3/0.1/gl/triangle.kc3 b/lib/kc3/0.1/gl/triangle.kc3
new file mode 100644
index 0000000..1e496b0
--- /dev/null
+++ b/lib/kc3/0.1/gl/triangle.kc3
@@ -0,0 +1,7 @@
+defmodule GL.Triangle do
+
+  defstruct [a: (U32) 0,
+             b: (U32) 1,
+             c: (U32) 2]
+
+end
diff --git a/lib/kc3/0.1/gl/vec2.c3 b/lib/kc3/0.1/gl/vec2.c3
deleted file mode 100644
index 5cc7a88..0000000
--- a/lib/kc3/0.1/gl/vec2.c3
+++ /dev/null
@@ -1,6 +0,0 @@
-defmodule GL.Vec2 do
-
-  defstruct [x: (F32) 0,
-             y: (F32) 0]
-
-end
diff --git a/lib/kc3/0.1/gl/vec2.kc3 b/lib/kc3/0.1/gl/vec2.kc3
new file mode 100644
index 0000000..5cc7a88
--- /dev/null
+++ b/lib/kc3/0.1/gl/vec2.kc3
@@ -0,0 +1,6 @@
+defmodule GL.Vec2 do
+
+  defstruct [x: (F32) 0,
+             y: (F32) 0]
+
+end
diff --git a/lib/kc3/0.1/gl/vec3.c3 b/lib/kc3/0.1/gl/vec3.c3
deleted file mode 100644
index bb3d548..0000000
--- a/lib/kc3/0.1/gl/vec3.c3
+++ /dev/null
@@ -1,7 +0,0 @@
-defmodule GL.Vec3 do
-
-  defstruct [x: (F32) 0,
-             y: (F32) 0,
-             z: (F32) 0]
-
-end
diff --git a/lib/kc3/0.1/gl/vec3.kc3 b/lib/kc3/0.1/gl/vec3.kc3
new file mode 100644
index 0000000..bb3d548
--- /dev/null
+++ b/lib/kc3/0.1/gl/vec3.kc3
@@ -0,0 +1,7 @@
+defmodule GL.Vec3 do
+
+  defstruct [x: (F32) 0,
+             y: (F32) 0,
+             z: (F32) 0]
+
+end
diff --git a/lib/kc3/0.1/gl/vertex.c3 b/lib/kc3/0.1/gl/vertex.c3
deleted file mode 100644
index cc90688..0000000
--- a/lib/kc3/0.1/gl/vertex.c3
+++ /dev/null
@@ -1,7 +0,0 @@
-defmodule GL.Vertex do
-
-  defstruct [position:  %GL.Vec3{},
-             normal:    %GL.Vec3{},
-             tex_coord: %GL.Vec2{}]
-
-end
diff --git a/lib/kc3/0.1/gl/vertex.kc3 b/lib/kc3/0.1/gl/vertex.kc3
new file mode 100644
index 0000000..cc90688
--- /dev/null
+++ b/lib/kc3/0.1/gl/vertex.kc3
@@ -0,0 +1,7 @@
+defmodule GL.Vertex do
+
+  defstruct [position:  %GL.Vec3{},
+             normal:    %GL.Vec3{},
+             tex_coord: %GL.Vec2{}]
+
+end
diff --git a/lib/kc3/0.1/integer.facts b/lib/kc3/0.1/integer.facts
index 3c36642..313c57f 100644
--- a/lib/kc3/0.1/integer.facts
+++ b/lib/kc3/0.1/integer.facts
@@ -1,4 +1,4 @@
-%{module: C3.Facts.Dump,
+%{module: KC3.Facts.Dump,
   version: 1}
 replace {Integer, :is_a, :module}
 replace {Integer, :symbol, Integer.cast}
diff --git a/lib/kc3/0.1/map.facts b/lib/kc3/0.1/map.facts
index 1e77a2a..6dd56a4 100644
--- a/lib/kc3/0.1/map.facts
+++ b/lib/kc3/0.1/map.facts
@@ -1,4 +1,4 @@
-%{module: C3.Facts.Dump,
+%{module: KC3.Facts.Dump,
   version: 1}
 add {Map, :is_a, :module}
 add {Map, :symbol, Map.cast}
diff --git a/lib/kc3/0.1/ptr.facts b/lib/kc3/0.1/ptr.facts
index aba9455..7d7a113 100644
--- a/lib/kc3/0.1/ptr.facts
+++ b/lib/kc3/0.1/ptr.facts
@@ -1,4 +1,4 @@
-%{module: C3.Facts.Dump,
+%{module: KC3.Facts.Dump,
   version: 1}
 replace {Ptr, :is_a, :module}
 replace {Ptr, :symbol, Ptr.cast}
diff --git a/lib/kc3/0.1/ptr_free.facts b/lib/kc3/0.1/ptr_free.facts
index ccdd3d9..320da15 100644
--- a/lib/kc3/0.1/ptr_free.facts
+++ b/lib/kc3/0.1/ptr_free.facts
@@ -1,4 +1,4 @@
-%{module: C3.Facts.Dump,
+%{module: KC3.Facts.Dump,
   version: 1}
 replace {PtrFree, :is_a, :module}
 replace {PtrFree, :symbol, PtrFree.cast}
diff --git a/lib/kc3/0.1/ratio.facts b/lib/kc3/0.1/ratio.facts
index 2fcee68..750d4b5 100644
--- a/lib/kc3/0.1/ratio.facts
+++ b/lib/kc3/0.1/ratio.facts
@@ -1,4 +1,4 @@
-%{module: C3.Facts.Dump,
+%{module: KC3.Facts.Dump,
   version: 1}
 replace {Ratio, :is_a, :module}
 replace {Ratio, :symbol, Ratio.cast}
diff --git a/lib/kc3/0.1/s16.facts b/lib/kc3/0.1/s16.facts
index b7c9b40..08ec873 100644
--- a/lib/kc3/0.1/s16.facts
+++ b/lib/kc3/0.1/s16.facts
@@ -1,4 +1,4 @@
-%{module: C3.Facts.Dump,
+%{module: KC3.Facts.Dump,
   version: 1}
 replace {S16, :is_a, :module}
 replace {S16, :symbol, S16.cast}
diff --git a/lib/kc3/0.1/s32.facts b/lib/kc3/0.1/s32.facts
index bd47184..c2e110f 100644
--- a/lib/kc3/0.1/s32.facts
+++ b/lib/kc3/0.1/s32.facts
@@ -1,4 +1,4 @@
-%{module: C3.Facts.Dump,
+%{module: KC3.Facts.Dump,
   version: 1}
 replace {S32, :is_a, :module}
 replace {S32, :symbol, S32.cast}
diff --git a/lib/kc3/0.1/s64.facts b/lib/kc3/0.1/s64.facts
index 8d32745..7bb761e 100644
--- a/lib/kc3/0.1/s64.facts
+++ b/lib/kc3/0.1/s64.facts
@@ -1,4 +1,4 @@
-%{module: C3.Facts.Dump,
+%{module: KC3.Facts.Dump,
   version: 1}
 replace {S64, :is_a, :module}
 replace {S64, :symbol, S64.cast}
diff --git a/lib/kc3/0.1/s8.facts b/lib/kc3/0.1/s8.facts
index 3d4dce0..bb5b3cd 100644
--- a/lib/kc3/0.1/s8.facts
+++ b/lib/kc3/0.1/s8.facts
@@ -1,4 +1,4 @@
-%{module: C3.Facts.Dump,
+%{module: KC3.Facts.Dump,
   version: 1}
 replace {S8, :is_a, :module}
 replace {S8, :symbol, S8.cast}
diff --git a/lib/kc3/0.1/str.facts b/lib/kc3/0.1/str.facts
index 459033c..b25372e 100644
--- a/lib/kc3/0.1/str.facts
+++ b/lib/kc3/0.1/str.facts
@@ -1,4 +1,4 @@
-%{module: C3.Facts.Dump,
+%{module: KC3.Facts.Dump,
   version: 1}
 replace {Str, :is_a, :module}
 replace {Str, :symbol, Str.cast}
diff --git a/lib/kc3/0.1/sw.facts b/lib/kc3/0.1/sw.facts
index 01309e7..986e73e 100644
--- a/lib/kc3/0.1/sw.facts
+++ b/lib/kc3/0.1/sw.facts
@@ -1,4 +1,4 @@
-%{module: C3.Facts.Dump,
+%{module: KC3.Facts.Dump,
   version: 1}
 replace {Sw, :is_a, :module}
 replace {Sw, :symbol, Sw.cast}
diff --git a/lib/kc3/0.1/sym.facts b/lib/kc3/0.1/sym.facts
index dd32895..6fd21c4 100644
--- a/lib/kc3/0.1/sym.facts
+++ b/lib/kc3/0.1/sym.facts
@@ -1,4 +1,4 @@
-%{module: C3.Facts.Dump,
+%{module: KC3.Facts.Dump,
   version: 1}
 replace {Sym, :is_a, :module}
 replace {Sym, :symbol, Sym.cast}
diff --git a/lib/kc3/0.1/u16.facts b/lib/kc3/0.1/u16.facts
index 70c376a..9028492 100644
--- a/lib/kc3/0.1/u16.facts
+++ b/lib/kc3/0.1/u16.facts
@@ -1,4 +1,4 @@
-%{module: C3.Facts.Dump,
+%{module: KC3.Facts.Dump,
   version: 1}
 replace {U16, :is_a, :module}
 replace {U16, :symbol, U16.cast}
diff --git a/lib/kc3/0.1/u32.facts b/lib/kc3/0.1/u32.facts
index 4d4d606..1bc592a 100644
--- a/lib/kc3/0.1/u32.facts
+++ b/lib/kc3/0.1/u32.facts
@@ -1,4 +1,4 @@
-%{module: C3.Facts.Dump,
+%{module: KC3.Facts.Dump,
   version: 1}
 replace {U32, :is_a, :module}
 replace {U32, :symbol, U32.cast}
diff --git a/lib/kc3/0.1/u64.facts b/lib/kc3/0.1/u64.facts
index cd5339b..e490099 100644
--- a/lib/kc3/0.1/u64.facts
+++ b/lib/kc3/0.1/u64.facts
@@ -1,4 +1,4 @@
-%{module: C3.Facts.Dump,
+%{module: KC3.Facts.Dump,
   version: 1}
 replace {U64, :is_a, :module}
 replace {U64, :symbol, U64.cast}
diff --git a/lib/kc3/0.1/u8.facts b/lib/kc3/0.1/u8.facts
index c2459e1..12b1575 100644
--- a/lib/kc3/0.1/u8.facts
+++ b/lib/kc3/0.1/u8.facts
@@ -1,4 +1,4 @@
-%{module: C3.Facts.Dump,
+%{module: KC3.Facts.Dump,
   version: 1}
 replace {U8, :is_a, :module}
 replace {U8, :symbol, U8.cast}
diff --git a/lib/kc3/0.1/uw.facts b/lib/kc3/0.1/uw.facts
index 99fe9d1..4feef1e 100644
--- a/lib/kc3/0.1/uw.facts
+++ b/lib/kc3/0.1/uw.facts
@@ -1,4 +1,4 @@
-%{module: C3.Facts.Dump,
+%{module: KC3.Facts.Dump,
   version: 1}
 replace {Uw, :is_a, :module}
 replace {Uw, :symbol, Uw.cast}
diff --git a/lib/kc3/0.1/var.facts b/lib/kc3/0.1/var.facts
index 7b74bd2..ff2934a 100644
--- a/lib/kc3/0.1/var.facts
+++ b/lib/kc3/0.1/var.facts
@@ -1,3 +1,3 @@
-%{module: C3.Facts.Dump,
+%{module: KC3.Facts.Dump,
   version: 1}
 replace {Var, :is_a, :module}
diff --git a/lib/kc3/0.1/void.facts b/lib/kc3/0.1/void.facts
index 5243ce3..e6ff745 100644
--- a/lib/kc3/0.1/void.facts
+++ b/lib/kc3/0.1/void.facts
@@ -1,4 +1,4 @@
-%{module: C3.Facts.Dump,
+%{module: KC3.Facts.Dump,
   version: 1}
 replace {Void, :is_a, :module}
 replace {Void, :symbol, Void.cast}
diff --git a/libkc3/env.c b/libkc3/env.c
index 2b828c3..9be9d9b 100644
--- a/libkc3/env.c
+++ b/libkc3/env.c
@@ -2012,7 +2012,7 @@ s_env * env_init_args (s_env *env, int *argc, char ***argv)
   s_str dir;
   sw r;
   assert(env);
-  if (*argc && *argv) {
+  if (argc && argv && *argc && *argv) {
     env->argc = (*argc)--;
     env->argv = (*argv)++;
     str_init_1(&argv0, NULL, env->argv[0]);
diff --git a/libkc3/facts.c b/libkc3/facts.c
index 3d2f225..efdc262 100644
--- a/libkc3/facts.c
+++ b/libkc3/facts.c
@@ -188,7 +188,7 @@ sw facts_dump (s_facts *facts, s_buf *buf)
   tag_init_var(&predicate, &g_sym_Tag);
   tag_init_var(&object, &g_sym_Tag);
   if ((r = buf_write_1(buf,
-                       "%{module: C3.Facts.Dump,\n"
+                       "%{module: KC3.Facts.Dump,\n"
                        "  version: 1}\n")) < 0)
     return r;
   result += r;
@@ -317,7 +317,7 @@ sw facts_load (s_facts *facts, s_buf *buf, const s_str *path)
   assert(facts);
   assert(buf);
   if ((r = buf_read_1(buf,
-                      "%{module: C3.Facts.Dump,\n"
+                      "%{module: KC3.Facts.Dump,\n"
                       "  version: 1}\n")) <= 0) {
     err_write_1("facts_load: invalid or missing header: ");
     err_puts(path->ptr.pchar);
diff --git a/libkc3_window/cairo/xcb/demo/configure b/libkc3_window/cairo/xcb/demo/configure
index 0daf1a3..eb0762f 100755
--- a/libkc3_window/cairo/xcb/demo/configure
+++ b/libkc3_window/cairo/xcb/demo/configure
@@ -17,10 +17,10 @@ export SRC_TOP="$(dirname "$PWD")"
 
 . ../../../../config.subr
 
-PROG=c3_window_cairo_xcb_demo
-PROG_ASAN=c3_window_cairo_xcb_demo_asan
-PROG_COV=c3_window_cairo_xcb_demo_cov
-PROG_DEBUG=c3_window_cairo_xcb_demo_debug
+PROG=kc3_window_cairo_xcb_demo
+PROG_ASAN=kc3_window_cairo_xcb_demo_asan
+PROG_COV=kc3_window_cairo_xcb_demo_cov
+PROG_DEBUG=kc3_window_cairo_xcb_demo_debug
 
 echo "PROG = $PROG" >> ${CONFIG_MK}
 echo "PROG_ASAN = $PROG_ASAN" >> ${CONFIG_MK}
diff --git a/libkc3_window/sdl2/demo/configure b/libkc3_window/sdl2/demo/configure
index 3fae7b7..9c1e950 100755
--- a/libkc3_window/sdl2/demo/configure
+++ b/libkc3_window/sdl2/demo/configure
@@ -17,10 +17,10 @@ export SRC_TOP="$(dirname "$PWD")"
 
 . ../../../config.subr
 
-PROG=c3_window_sdl2_demo
-PROG_ASAN=c3_window_sdl2_demo_asan
-PROG_COV=c3_window_sdl2_demo_cov
-PROG_DEBUG=c3_window_sdl2_demo_debug
+PROG=kc3_window_sdl2_demo
+PROG_ASAN=kc3_window_sdl2_demo_asan
+PROG_COV=kc3_window_sdl2_demo_cov
+PROG_DEBUG=kc3_window_sdl2_demo_debug
 
 echo "PROG = $PROG" >> ${CONFIG_MK}
 echo "PROG_ASAN = $PROG_ASAN" >> ${CONFIG_MK}
diff --git a/libkc3_window/sdl2/window_sdl2.c b/libkc3_window/sdl2/window_sdl2.c
index dc7551d..fa02a9b 100644
--- a/libkc3_window/sdl2/window_sdl2.c
+++ b/libkc3_window/sdl2/window_sdl2.c
@@ -119,7 +119,7 @@ s_window_sdl2 * window_sdl2_init (s_window_sdl2 *window,
 {
   s_window_sdl2 tmp = {0};
   assert(window);
-  title = title ? title : "C3.Window.Sdl2";
+  title = title ? title : "KC3.Window.Sdl2";
   window_init((s_window *) &tmp, x, y, w, h, title, sequence_count);
   tmp.button = window_sdl2_default_button_cb;
   tmp.key    = window_sdl2_default_key_cb;
diff --git a/test/Makefile b/test/Makefile
index 0981d55..da98a29 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -18,10 +18,10 @@ CLEANFILES = \
 	*.lo \
 	*.o \
 	.libs \
-	ic3/*.diff \
-	ic3/*.err \
-	ic3/*.out \
-	ic3/*.ret \
+	ikc3/*.diff \
+	ikc3/*.err \
+	ikc3/*.out \
+	ikc3/*.ret \
 	libkc3_test \
 	libkc3_test_asan \
 	libkc3_test_cov \
@@ -71,31 +71,31 @@ lldb_test: debug
 
 test: libkc3_test
 	time ./libkc3_test
-	IC3=${SRC_TOP}/ic3/ic3 time ./ic3_test
+	IKC3=${SRC_TOP}/ikc3/ikc3 time ./ikc3_test
 
 test_asan: libkc3_test_asan
 	time ./libkc3_test_asan
-	IC3=${SRC_TOP}/ic3/ic3_asan time ./ic3_test
+	IKC3=${SRC_TOP}/ikc3/ikc3_asan time ./ikc3_test
 
 test_cov:
 	time ./libkc3_test_cov
-	IC3=${SRC_TOP}/ic3/ic3_cov time ./ic3_test
+	IKC3=${SRC_TOP}/ikc3/ikc3_cov time ./ikc3_test
 
 test_debug: libkc3_test_debug
 	time ./libkc3_test_debug
-	IC3=${SRC_TOP}/ic3/ic3_debug time ./ic3_test
+	IKC3=${SRC_TOP}/ikc3/ikc3_debug time ./ikc3_test
 
-test_ic3:
-	IC3=${SRC_TOP}/ic3/ic3 time ./ic3_test
+test_ikc3:
+	IKC3=${SRC_TOP}/ikc3/ikc3 time ./ikc3_test
 
-test_ic3_asan:
-	IC3=${SRC_TOP}/ic3/ic3_asan time ./ic3_test
+test_ikc3_asan:
+	IKC3=${SRC_TOP}/ikc3/ikc3_asan time ./ikc3_test
 
-test_ic3_cov:
-	IC3=${SRC_TOP}/ic3/ic3_cov time ./ic3_test
+test_ikc3_cov:
+	IKC3=${SRC_TOP}/ikc3/ikc3_cov time ./ikc3_test
 
-test_ic3_debug:
-	IC3=${SRC_TOP}/ic3/ic3_debug time ./ic3_test
+test_ikc3_debug:
+	IKC3=${SRC_TOP}/ikc3/ikc3_debug time ./ikc3_test
 
 test_libkc3: libkc3_test
 	time ./libkc3_test
@@ -106,7 +106,7 @@ test_libkc3_cov: libkc3_test_cov
 test_valgrind: libkc3_test
 	valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes ./libkc3_test
 
-.PHONY: all asan cov debug clean clean_cov distclean ic3_test_cov libkc3_test_cov test test_asan test_cov test_debug test_ic3 test_valgrind
+.PHONY: all asan cov debug clean clean_cov distclean ikc3_test_cov libkc3_test_cov test test_asan test_cov test_debug test_ikc3 test_valgrind
 
 include config.mk
 include sources.mk
diff --git a/test/env_test.c b/test/env_test.c
index 78eb1e4..0ac6cee 100644
--- a/test/env_test.c
+++ b/test/env_test.c
@@ -44,7 +44,7 @@ TEST_CASE(env_eval_call)
   env_init(&env, 0, NULL);
   test_context("env_eval_call(1 + 2) -> 3");
   call_init(&call);
-  call.ident.module = sym_1("C3");
+  call.ident.module = sym_1("KC3");
   call.ident.sym = sym_1("operator_add");
   call.arguments = list_new_1("[1, 2]");
   tag_init_u8(&expected, 3);
diff --git a/test/facts_test.c b/test/facts_test.c
index e041074..9663d71 100644
--- a/test/facts_test.c
+++ b/test/facts_test.c
@@ -265,7 +265,7 @@ TEST_CASE(facts_load)
   s_str path;
   facts_init(&facts);
   str_init_1(&path, NULL, "facts_test_load_file.facts");
-  TEST_EQ(facts_load_file(&facts, &path), 760);
+  TEST_EQ(facts_load_file(&facts, &path), 761);
   TEST_EQ(facts_count(&facts), 23);
   while (p[i]) {
     fact_test_init_1(&fact, p[i]);
@@ -467,7 +467,7 @@ TEST_CASE(facts_open_file)
   }
   facts_init(&facts);
   str_init_1(&path, NULL, "facts_test_open_file.1.facts");
-  TEST_EQ(facts_open_file(&facts, &path), 760);
+  TEST_EQ(facts_open_file(&facts, &path), 761);
   TEST_EQ(facts_count(&facts), 23);
   i = 0;
   while (p[i]) {
@@ -502,7 +502,7 @@ TEST_CASE(facts_open_file)
     exit(1);
   }
   str_init_1(&path, NULL, "facts_test_open_file.2.facts");
-  TEST_EQ(facts_open_file(&facts, &path), 1523);
+  TEST_EQ(facts_open_file(&facts, &path), 1524);
   TEST_EQ(facts_count(&facts), 46);
   i = 0;
   while (p[i]) {
@@ -534,7 +534,7 @@ TEST_CASE(facts_open_file)
     exit(1);
   }
   str_init_1(&path, NULL, "facts_test_open_file.3.facts");
-  TEST_EQ(facts_open_file(&facts, &path), 1550);
+  TEST_EQ(facts_open_file(&facts, &path), 1551);
   TEST_EQ(facts_count(&facts), 0);
   i = 0;
   while (p[i]) {
diff --git a/test/facts_test_dump_file.expected.facts b/test/facts_test_dump_file.expected.facts
index a49fe23..19ea675 100644
--- a/test/facts_test_dump_file.expected.facts
+++ b/test/facts_test_dump_file.expected.facts
@@ -1,4 +1,4 @@
-%{module: C3.Facts.Dump,
+%{module: KC3.Facts.Dump,
   version: 1}
 add {-18446744073709551616, -18446744073709551616, -18446744073709551616}
 add {-4294967296, -4294967296, -4294967296}
diff --git a/test/facts_test_load_file.facts b/test/facts_test_load_file.facts
index 2ea637c..d86dd0a 100644
--- a/test/facts_test_load_file.facts
+++ b/test/facts_test_load_file.facts
@@ -1,4 +1,4 @@
-%{module: C3.Facts.Dump,
+%{module: KC3.Facts.Dump,
   version: 1}
 add {a, a, a}
 add {-18446744073709551616, -18446744073709551616, -18446744073709551616}
diff --git a/test/facts_test_open_file.1.expected.facts b/test/facts_test_open_file.1.expected.facts
index 61a8b67..3b9a294 100644
--- a/test/facts_test_open_file.1.expected.facts
+++ b/test/facts_test_open_file.1.expected.facts
@@ -1,4 +1,4 @@
-%{module: C3.Facts.Dump,
+%{module: KC3.Facts.Dump,
   version: 1}
 add {a, a, a}
 add {-18446744073709551616, -18446744073709551616, -18446744073709551616}
diff --git a/test/facts_test_open_file.1.in.facts b/test/facts_test_open_file.1.in.facts
index 2ea637c..d86dd0a 100644
--- a/test/facts_test_open_file.1.in.facts
+++ b/test/facts_test_open_file.1.in.facts
@@ -1,4 +1,4 @@
-%{module: C3.Facts.Dump,
+%{module: KC3.Facts.Dump,
   version: 1}
 add {a, a, a}
 add {-18446744073709551616, -18446744073709551616, -18446744073709551616}
diff --git a/test/facts_test_open_file.2.expected.facts b/test/facts_test_open_file.2.expected.facts
index 637ad54..1ec9bf1 100644
--- a/test/facts_test_open_file.2.expected.facts
+++ b/test/facts_test_open_file.2.expected.facts
@@ -1,4 +1,4 @@
-%{module: C3.Facts.Dump,
+%{module: KC3.Facts.Dump,
   version: 1}
 add {a, a, a}
 add {-18446744073709551616, -18446744073709551616, -18446744073709551616}
diff --git a/test/facts_test_open_file.2.in.facts b/test/facts_test_open_file.2.in.facts
index 637ad54..1ec9bf1 100644
--- a/test/facts_test_open_file.2.in.facts
+++ b/test/facts_test_open_file.2.in.facts
@@ -1,4 +1,4 @@
-%{module: C3.Facts.Dump,
+%{module: KC3.Facts.Dump,
   version: 1}
 add {a, a, a}
 add {-18446744073709551616, -18446744073709551616, -18446744073709551616}
diff --git a/test/facts_test_open_file.3.expected.facts b/test/facts_test_open_file.3.expected.facts
index e089a6d..000d31f 100644
--- a/test/facts_test_open_file.3.expected.facts
+++ b/test/facts_test_open_file.3.expected.facts
@@ -1,4 +1,4 @@
-%{module: C3.Facts.Dump,
+%{module: KC3.Facts.Dump,
   version: 1}
 add {a, a, a}
 add {-18446744073709551616, -18446744073709551616, -18446744073709551616}
diff --git a/test/facts_test_open_file.3.in.facts b/test/facts_test_open_file.3.in.facts
index 43cba38..d2b5e7b 100644
--- a/test/facts_test_open_file.3.in.facts
+++ b/test/facts_test_open_file.3.in.facts
@@ -1,4 +1,4 @@
-%{module: C3.Facts.Dump,
+%{module: KC3.Facts.Dump,
   version: 1}
 add {a, a, a}
 add {-18446744073709551616, -18446744073709551616, -18446744073709551616}
diff --git a/test/facts_test_save.expected.facts b/test/facts_test_save.expected.facts
index a49fe23..19ea675 100644
--- a/test/facts_test_save.expected.facts
+++ b/test/facts_test_save.expected.facts
@@ -1,4 +1,4 @@
-%{module: C3.Facts.Dump,
+%{module: KC3.Facts.Dump,
   version: 1}
 add {-18446744073709551616, -18446744073709551616, -18446744073709551616}
 add {-4294967296, -4294967296, -4294967296}
diff --git a/test/ikc3/access.in b/test/ikc3/access.in
index 462ab9a..31f4601 100644
--- a/test/ikc3/access.in
+++ b/test/ikc3/access.in
@@ -24,7 +24,7 @@ quote map.a.b.c + map.a.b.c
 map.a.b.c + map.a.b.c
 quote "0 #{map.a.b.c} 2"
 "0 #{map.a.b.c} 2"
-quote op = %C3.Operator{}
-op = %C3.Operator{}
+quote op = %KC3.Operator{}
+op = %KC3.Operator{}
 quote op.sym
 op.sym
diff --git a/test/ikc3/access.out.expected b/test/ikc3/access.out.expected
index 50f61e9..dff8b47 100644
--- a/test/ikc3/access.out.expected
+++ b/test/ikc3/access.out.expected
@@ -24,7 +24,7 @@ map.a.b.c + map.a.b.c
 2
 "0 #{map.a.b.c} 2"
 "0 1 2"
-op = %C3.Operator{}
-%C3.Operator{sym: :+, symbol_value: ?, operator_precedence: 0, operator_associativity: :left}
+op = %KC3.Operator{}
+%KC3.Operator{sym: :+, symbol_value: ?, operator_precedence: 0, operator_associativity: :left}
 op.sym
 :+
diff --git a/test/ikc3/call.in b/test/ikc3/call.in
index c865ba5..b589450 100644
--- a/test/ikc3/call.in
+++ b/test/ikc3/call.in
@@ -8,7 +8,7 @@ quote Test.test(1, 2)
 quote Test.test(1, 2, 3)
 quote first([1, 2])
 first([1, 2])
-quote C3.first([2, 3])
-C3.first([2, 3])
+quote KC3.first([2, 3])
+KC3.first([2, 3])
 quote (1 + 2)
 (1 + 2)
diff --git a/test/ikc3/def.out.expected b/test/ikc3/def.out.expected
index e2980a2..f8b5f99 100644
--- a/test/ikc3/def.out.expected
+++ b/test/ikc3/def.out.expected
@@ -83,9 +83,9 @@ fn (x) { List.reverse(x) }
 reverse([1, 2, 3])
 [3, 2, 1]
 module()
-C3
+KC3
 search_modules()
-[C3]
+[KC3]
 reverse
 fn (x) { List.reverse(x) }
 def reverse = fn (x) { [:reversed | List.reverse(x)] }
@@ -95,9 +95,9 @@ fn (x) { [:reversed | List.reverse(x)] }
 reverse([1, 2, 3])
 [:reversed, 3, 2, 1]
 module()
-C3
+KC3
 search_modules()
-[C3]
+[KC3]
 reverse
 fn (x) { [:reversed | List.reverse(x)] }
 def reverse = fn (x) { List.reverse(x) }
@@ -107,8 +107,8 @@ fn (x) { List.reverse(x) }
 reverse([1, 2, 3])
 [3, 2, 1]
 module()
-C3
+KC3
 search_modules()
-[C3]
+[KC3]
 reverse
 fn (x) { List.reverse(x) }
diff --git a/test/ikc3/defoperator.in b/test/ikc3/defoperator.in
index be7fb0c..62c9192 100644
--- a/test/ikc3/defoperator.in
+++ b/test/ikc3/defoperator.in
@@ -1,7 +1,7 @@
-quote %C3.Operator{}
-%C3.Operator{}
-quote def operator_muul = %C3.Operator{sym: :****, symbol_value: cfn Tag "tag_mul" (Tag, Tag, Result), operator_precedence: 11, operator_associativity: :left}
-def operator_muul = %C3.Operator{sym: :****, symbol_value: cfn Tag "tag_mul" (Tag, Tag, Result), operator_precedence: 11, operator_associativity: :left}
+quote %KC3.Operator{}
+%KC3.Operator{}
+quote def operator_muul = %KC3.Operator{sym: :****, symbol_value: cfn Tag "tag_mul" (Tag, Tag, Result), operator_precedence: 11, operator_associativity: :left}
+def operator_muul = %KC3.Operator{sym: :****, symbol_value: cfn Tag "tag_mul" (Tag, Tag, Result), operator_precedence: 11, operator_associativity: :left}
 quote 4 **** 4
 4 **** 4
 quote 4 **** 4 **** 4
diff --git a/test/ikc3/defoperator.out.expected b/test/ikc3/defoperator.out.expected
index 3e92379..5a32f3e 100644
--- a/test/ikc3/defoperator.out.expected
+++ b/test/ikc3/defoperator.out.expected
@@ -1,6 +1,6 @@
-%C3.Operator{}
-%C3.Operator{sym: :+, symbol_value: ?, operator_precedence: 0, operator_associativity: :left}
-def operator_muul = %C3.Operator{sym: :****, symbol_value: cfn Tag "tag_mul" (Tag, Tag, Result), operator_precedence: 11, operator_associativity: :left}
+%KC3.Operator{}
+%KC3.Operator{sym: :+, symbol_value: ?, operator_precedence: 0, operator_associativity: :left}
+def operator_muul = %KC3.Operator{sym: :****, symbol_value: cfn Tag "tag_mul" (Tag, Tag, Result), operator_precedence: 11, operator_associativity: :left}
 operator_muul
 4 **** 4
 16
diff --git a/test/ikc3_test b/test/ikc3_test
index d2938bc..99fbef3 100755
--- a/test/ikc3_test
+++ b/test/ikc3_test
@@ -1,5 +1,5 @@
 #!/bin/sh
-cd "$(dirname $0)/ic3" || exit
+cd "$(dirname $0)/ikc3" || exit
 
 TEST_COLOR_KO=""
 TEST_COLOR_OK=""
@@ -8,11 +8,11 @@ TEST_COUNT=0
 TEST_KO=0
 TEST_OK=0
 
-if [ "x$IC3" = "x" ]; then
-    if [ -f ../../ic3/ic3 ]; then
-	IC3=../../ic3/ic3
-    elif [ -f ../../ic3 ]; then
-	IC3=../../ic3
+if [ "x$IKC3" = "x" ]; then
+    if [ -f ../../ikc3/ikc3 ]; then
+	IKC3=../../ikc3/ikc3
+    elif [ -f ../../ikc3 ]; then
+	IKC3=../../ikc3
     fi
 fi
 
@@ -29,10 +29,10 @@ test_ok() {
 }
 
 if [ $# = 0 ]; then
-    if [ "x${IC3_TEST_TARGETS}" = "x" ]; then
+    if [ "x${IKC3_TEST_TARGETS}" = "x" ]; then
         TARGETS="$(ls -1 *.in | sed -e 's/[.]in$//')"
     else
-        TARGETS="${IC3_TEST_TARGETS}"
+        TARGETS="${IKC3_TEST_TARGETS}"
     fi
 else
     TARGETS="$@"
@@ -40,7 +40,7 @@ fi
 
 for TARGET in $TARGETS; do
     RESULT=test_ok
-    $IC3 < ${TARGET}.in > ${TARGET}.out 2>&1
+    $IKC3 < ${TARGET}.in > ${TARGET}.out 2>&1
     echo $? > ${TARGET}.ret
     if ! diff -abu ${TARGET}.out.expected ${TARGET}.out > ${TARGET}.diff
     then