Commit f9ee76374d4a53a32788610348f227b3f9d1304b

Thomas de Grivel 2024-07-28T05:02:34

initialize tmp

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
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
diff --git a/config.subr b/config.subr
index fbb90b2..34147b5 100644
--- a/config.subr
+++ b/config.subr
@@ -771,6 +771,15 @@ if ${HAVE_GCOV}; then
     echo "GCOV = $GCOV" >> ${CONFIG_MK}
 fi
 
+if [ "x$GDB" = "x" ]; then
+    if which egdb >/dev/null 2>&1; then
+        GDB=egdb
+    else
+        GDB=gdb
+    fi
+fi
+echo "GDB = $GDB" >> ${CONFIG_MK}
+
 if [ "x$GMAKE" = "x" ]; then
     if which gmake >/dev/null 2>&1; then
         GMAKE=gmake
diff --git a/lib/kc3/0.1/buf_rw.kc3 b/lib/kc3/0.1/buf_rw.kc3
index b7f76c6..9faea82 100644
--- a/lib/kc3/0.1/buf_rw.kc3
+++ b/lib/kc3/0.1/buf_rw.kc3
@@ -3,4 +3,6 @@ defmodule BufRW do
   defstruct [r: %Buf{},
              w: %Buf{}]
 
+  def init_alloc = cfn BufRW "buf_rw_init_alloc" (Result, Uw)
+
 end
diff --git a/libkc3/buf_parse.c b/libkc3/buf_parse.c
index da5be7a..ad2d11a 100644
--- a/libkc3/buf_parse.c
+++ b/libkc3/buf_parse.c
@@ -128,7 +128,7 @@ sw buf_parse_array_data (s_buf *buf, s_array *dest)
   if ((r = buf_parse_array_data_rec(buf, &tmp, address, &tag,
                                     0)) <= 0) {
     err_write_1("buf_parse_array_data: buf_parse_array_data_rec: ");
-    err_inspect_sw(&r);
+    err_inspect_sw_decimal(&r);
     err_write_1("\n");
     goto restore;
   }
@@ -303,7 +303,7 @@ sw buf_parse_array_dimensions (s_buf *buf, s_array *dest)
                                           0)) < 0) {
     err_write_1("buf_parse_array_dimensions:"
                 " buf_parse_array_dimensions_rec: ");
-    err_inspect_sw(&r);
+    err_inspect_sw_decimal(&r);
     err_write_1("\n");
     goto clean;
   }
@@ -519,7 +519,7 @@ sw buf_parse_block_inner (s_buf *buf, bool short_form, s_block *block)
       goto ok;
     if ((r = buf_read_1(buf, "\n")) < 0) {
       err_write_1("buf_parse_block_inner: line ");
-      err_inspect_sw(&buf->line);
+      err_inspect_sw_decimal(&buf->line);
       err_puts(": missing separator: ");
       err_inspect_buf(buf);
       err_write_1("\n");
@@ -529,7 +529,7 @@ sw buf_parse_block_inner (s_buf *buf, bool short_form, s_block *block)
     if (! r) {
       if ((r = buf_read_1(buf, ";")) <= 0) {
         err_write_1("buf_parse_block_inner: line ");
-        err_inspect_sw(&buf->line);
+        err_inspect_sw_decimal(&buf->line);
         err_puts(": missing separator: ");
         err_inspect_buf(buf);
         err_write_1("\n");
@@ -1407,7 +1407,7 @@ sw buf_parse_digit (s_buf *buf, const s_str *base, u8 *dest)
   if ((digit = str_character_position(base, c)) >= 0) {
     if (digit > 255) {
       err_write_1("buf_parse_digit: digit overflow: ");
-      err_inspect_sw(&digit);
+      err_inspect_sw_decimal(&digit);
       err_write_1("\n");
       assert(! "buf_parse_digit: digit overflow");
       return -1;
@@ -2509,93 +2509,93 @@ sw buf_parse_list (s_buf *buf, s_list **list)
 
 sw buf_parse_list_paren (s_buf *buf, s_list **list)
 {
-  u8 b;
   s_list **i;
   sw r;
   sw result = 0;
+  s_buf_save save;
   i = list;
+  buf_save_init(buf, &save);
   if ((r = buf_read_1(buf, "(")) <= 0)
-    return r;
+    goto clean;
   result += r;
   if ((r = buf_parse_comments(buf)) < 0)
-    return r;
+    goto restore;
   result += r;
   if ((r = buf_ignore_spaces(buf)) < 0)
-    return r;
+    goto restore;
   result += r;
   if ((r = buf_read_1(buf, ")")) < 0)
-    return r;
+    goto restore;
   if (r > 0) {
     result += r;
     *list = NULL;
-    return result;
+    r = result;
+    goto clean;
   }
   *i = NULL;
   while (1) {
     *i = list_new(NULL);
     if ((r = buf_parse_tag(buf, &(*i)->tag)) <= 0)
-      goto eat_and_clean;
+      goto restore;
     result += r;
     if ((r = buf_parse_comments(buf)) < 0)
-      goto eat_and_clean;
+      goto restore;
     result += r;
     if ((r = buf_ignore_spaces(buf)) < 0)
-      goto eat_and_clean;
+      goto restore;
     result += r;
     if ((r = buf_read_1(buf, ")")) < 0)
-      goto eat_and_clean;
+      goto restore;
     if (r > 0) {
       result += r;
-      return result;
+      r = result;
+      goto clean;
     }
     if ((r = buf_read_1(buf, ",")) < 0)
-      goto eat_and_clean;
+      goto restore;
     if (r > 0) {
       result += r;
       i = &(*i)->next.data.list;
       if ((r = buf_parse_comments(buf)) < 0)
-        goto eat_and_clean;
+        goto restore;
       result += r;
       if ((r = buf_ignore_spaces(buf)) < 0)
-        goto eat_and_clean;
+        goto restore;
       result += r;
       continue;
     }
     if ((r = buf_read_1(buf, "|")) < 0)
-      goto eat_and_clean;
+      goto restore;
     if (r > 0) {
       result += r;
       if ((r = buf_parse_comments(buf)) < 0)
-        goto eat_and_clean;
+        goto restore;
       result += r;
       if ((r = buf_ignore_spaces(buf)) < 0)
-        goto eat_and_clean;
+        goto restore;
       result += r;
       if ((r = buf_parse_tag(buf, &(*i)->next)) <= 0)
-        goto eat_and_clean;
+        goto restore;
       result += r;
       if ((r = buf_parse_comments(buf)) < 0)
-        goto eat_and_clean;
+        goto restore;
       result += r;
       if ((r = buf_ignore_spaces(buf)) < 0)
-        goto eat_and_clean;
+        goto restore;
       result += r;
       if ((r = buf_read_1(buf, ")")) <= 0)
-        goto eat_and_clean;
+        goto restore;
       result += r;
       r = result;
       goto clean;
     }
-    goto eat_and_clean;
+    goto restore;
   }
- eat_and_clean:
-  while (1)
-    if ((r = buf_read_u8(buf, &b)) < 0 ||
-        (r && b == ')') ||
-        ! r)
-      goto clean;
- clean:
+ restore:
   list_delete_all(*list);
+  buf_save_restore_rpos(buf, &save);
+ clean:
+  buf_save_clean(buf, &save);
   return r;
 }
 
diff --git a/libkc3/io.c b/libkc3/io.c
index cf493c4..ba1cb4d 100644
--- a/libkc3/io.c
+++ b/libkc3/io.c
@@ -12,6 +12,16 @@
  */
 #include "buf.h"
 #include "buf_inspect.h"
+#include "buf_inspect_s8_decimal.h"
+#include "buf_inspect_s16_decimal.h"
+#include "buf_inspect_s32_decimal.h"
+#include "buf_inspect_s64_decimal.h"
+#include "buf_inspect_sw_decimal.h"
+#include "buf_inspect_u8_decimal.h"
+#include "buf_inspect_u16_decimal.h"
+#include "buf_inspect_u32_decimal.h"
+#include "buf_inspect_u64_decimal.h"
+#include "buf_inspect_uw_decimal.h"
 #include "env.h"
 #include "io.h"
 #include "tag_type.h"
@@ -171,28 +181,38 @@ sw io_write_str (const s_str *x)
   return r;
 }
 
-DEF_ERR_IO_INSPECT(array,      const s_array *)
-DEF_ERR_IO_INSPECT(call,       const s_call *)
-DEF_ERR_IO_INSPECT(character,  const character *)
-DEF_ERR_IO_INSPECT(f32,        const f32 *)
-DEF_ERR_IO_INSPECT(fact,       const s_fact *)
-DEF_ERR_IO_INSPECT(fn_pattern, const s_list *)
-DEF_ERR_IO_INSPECT(ident,      const s_ident *)
-DEF_ERR_IO_INSPECT(list,       const s_list * const *)
-DEF_ERR_IO_INSPECT(map,        const s_map *)
-DEF_ERR_IO_INSPECT(pointer,    const void *)
-DEF_ERR_IO_INSPECT(ptr,        const u_ptr_w *)
-DEF_ERR_IO_INSPECT(s8,         const s8 *)
-DEF_ERR_IO_INSPECT(s16,        const s16 *)
-DEF_ERR_IO_INSPECT(s32,        const s32 *)
-DEF_ERR_IO_INSPECT(s64,        const s64 *)
-DEF_ERR_IO_INSPECT(str,        const s_str *)
-DEF_ERR_IO_INSPECT(sw,         const sw *)
-DEF_ERR_IO_INSPECT(sym,        const s_sym * const *)
-DEF_ERR_IO_INSPECT(tag,        const s_tag *)
-DEF_ERR_IO_INSPECT(tuple,      const s_tuple *)
-DEF_ERR_IO_INSPECT(u8,         const u8 *)
-DEF_ERR_IO_INSPECT(u16,        const u16 *)
-DEF_ERR_IO_INSPECT(u32,        const u32 *)
-DEF_ERR_IO_INSPECT(u64,        const u64 *)
-DEF_ERR_IO_INSPECT(uw,         const uw *)
+DEF_ERR_IO_INSPECT(array,       const s_array *)
+DEF_ERR_IO_INSPECT(call,        const s_call *)
+DEF_ERR_IO_INSPECT(character,   const character *)
+DEF_ERR_IO_INSPECT(f32,         const f32 *)
+DEF_ERR_IO_INSPECT(fact,        const s_fact *)
+DEF_ERR_IO_INSPECT(fn_pattern,  const s_list *)
+DEF_ERR_IO_INSPECT(ident,       const s_ident *)
+DEF_ERR_IO_INSPECT(list,        const s_list * const *)
+DEF_ERR_IO_INSPECT(map,         const s_map *)
+DEF_ERR_IO_INSPECT(pointer,     const void *)
+DEF_ERR_IO_INSPECT(ptr,         const u_ptr_w *)
+DEF_ERR_IO_INSPECT(s8,          const s8 *)
+DEF_ERR_IO_INSPECT(s8_decimal,  const s8 *)
+DEF_ERR_IO_INSPECT(s16,         const s16 *)
+DEF_ERR_IO_INSPECT(s16_decimal, const s16 *)
+DEF_ERR_IO_INSPECT(s32,         const s32 *)
+DEF_ERR_IO_INSPECT(s32_decimal, const s32 *)
+DEF_ERR_IO_INSPECT(s64,         const s64 *)
+DEF_ERR_IO_INSPECT(s64_decimal, const s64 *)
+DEF_ERR_IO_INSPECT(str,         const s_str *)
+DEF_ERR_IO_INSPECT(sw,          const sw *)
+DEF_ERR_IO_INSPECT(sw_decimal,  const sw *)
+DEF_ERR_IO_INSPECT(sym,         const s_sym * const *)
+DEF_ERR_IO_INSPECT(tag,         const s_tag *)
+DEF_ERR_IO_INSPECT(tuple,       const s_tuple *)
+DEF_ERR_IO_INSPECT(u8,          const u8 *)
+DEF_ERR_IO_INSPECT(u8_decimal,  const u8 *)
+DEF_ERR_IO_INSPECT(u16,         const u16 *)
+DEF_ERR_IO_INSPECT(u16_decimal, const u16 *)
+DEF_ERR_IO_INSPECT(u32,         const u32 *)
+DEF_ERR_IO_INSPECT(u32_decimal, const u32 *)
+DEF_ERR_IO_INSPECT(u64,         const u64 *)
+DEF_ERR_IO_INSPECT(u64_decimal, const u64 *)
+DEF_ERR_IO_INSPECT(uw,          const uw *)
+DEF_ERR_IO_INSPECT(uw_decimal,  const uw *)
diff --git a/libkc3/io.h b/libkc3/io.h
index 5b7c922..db051b5 100644
--- a/libkc3/io.h
+++ b/libkc3/io.h
@@ -41,38 +41,48 @@ sw io_write (const void *x, uw len);
 sw io_write_1 (const char *x);
 sw io_write_str (const s_str *x);
 
-PROTOTYPES_ERR_IO_INSPECT(array,      const s_array *);
-PROTOTYPES_ERR_IO_INSPECT(bool,       const bool *);
-PROTOTYPES_ERR_IO_INSPECT(buf,        const s_buf *);
-PROTOTYPES_ERR_IO_INSPECT(call,       const s_call *);
-PROTOTYPES_ERR_IO_INSPECT(cfn,        const s_cfn *);
-PROTOTYPES_ERR_IO_INSPECT(character,  const character *);
-PROTOTYPES_ERR_IO_INSPECT(f32,        const f32 *);
-PROTOTYPES_ERR_IO_INSPECT(f64,        const f64 *);
-PROTOTYPES_ERR_IO_INSPECT(fact,       const s_fact *);
-PROTOTYPES_ERR_IO_INSPECT(facts_spec, const p_facts_spec);
-PROTOTYPES_ERR_IO_INSPECT(fn,         const s_fn *);
-PROTOTYPES_ERR_IO_INSPECT(fn_pattern, const s_list *);
-PROTOTYPES_ERR_IO_INSPECT(ident,      const s_ident *);
-PROTOTYPES_ERR_IO_INSPECT(integer,    const s_integer *);
-PROTOTYPES_ERR_IO_INSPECT(list,       const s_list * const *);
-PROTOTYPES_ERR_IO_INSPECT(map,        const s_map *);
-PROTOTYPES_ERR_IO_INSPECT(pointer,    const void *);
-PROTOTYPES_ERR_IO_INSPECT(ptr,        const u_ptr_w *);
-PROTOTYPES_ERR_IO_INSPECT(s8,         const s8 *);
-PROTOTYPES_ERR_IO_INSPECT(s16,        const s16 *);
-PROTOTYPES_ERR_IO_INSPECT(s32,        const s32 *);
-PROTOTYPES_ERR_IO_INSPECT(s64,        const s64 *);
-PROTOTYPES_ERR_IO_INSPECT(str,        const s_str *);
-PROTOTYPES_ERR_IO_INSPECT(sw,         const sw *);
-PROTOTYPES_ERR_IO_INSPECT(sym,        const s_sym * const *);
-PROTOTYPES_ERR_IO_INSPECT(tag,        const s_tag *);
-PROTOTYPES_ERR_IO_INSPECT(tag_type,   e_tag_type);
-PROTOTYPES_ERR_IO_INSPECT(tuple,      const s_tuple *);
-PROTOTYPES_ERR_IO_INSPECT(u8,         const u8 *);
-PROTOTYPES_ERR_IO_INSPECT(u16,        const u16 *);
-PROTOTYPES_ERR_IO_INSPECT(u32,        const u32 *);
-PROTOTYPES_ERR_IO_INSPECT(u64,        const u64 *);
-PROTOTYPES_ERR_IO_INSPECT(uw,         const uw *);
+PROTOTYPES_ERR_IO_INSPECT(array,       const s_array *);
+PROTOTYPES_ERR_IO_INSPECT(bool,        const bool *);
+PROTOTYPES_ERR_IO_INSPECT(buf,         const s_buf *);
+PROTOTYPES_ERR_IO_INSPECT(call,        const s_call *);
+PROTOTYPES_ERR_IO_INSPECT(cfn,         const s_cfn *);
+PROTOTYPES_ERR_IO_INSPECT(character,   const character *);
+PROTOTYPES_ERR_IO_INSPECT(f32,         const f32 *);
+PROTOTYPES_ERR_IO_INSPECT(f64,         const f64 *);
+PROTOTYPES_ERR_IO_INSPECT(fact,        const s_fact *);
+PROTOTYPES_ERR_IO_INSPECT(facts_spec,  const p_facts_spec);
+PROTOTYPES_ERR_IO_INSPECT(fn,          const s_fn *);
+PROTOTYPES_ERR_IO_INSPECT(fn_pattern,  const s_list *);
+PROTOTYPES_ERR_IO_INSPECT(ident,       const s_ident *);
+PROTOTYPES_ERR_IO_INSPECT(integer,     const s_integer *);
+PROTOTYPES_ERR_IO_INSPECT(list,        const s_list * const *);
+PROTOTYPES_ERR_IO_INSPECT(map,         const s_map *);
+PROTOTYPES_ERR_IO_INSPECT(pointer,     const void *);
+PROTOTYPES_ERR_IO_INSPECT(ptr,         const u_ptr_w *);
+PROTOTYPES_ERR_IO_INSPECT(s8,          const s8 *);
+PROTOTYPES_ERR_IO_INSPECT(s8_decimal,  const s8 *);
+PROTOTYPES_ERR_IO_INSPECT(s16,         const s16 *);
+PROTOTYPES_ERR_IO_INSPECT(s16_decimal, const s16 *);
+PROTOTYPES_ERR_IO_INSPECT(s32,         const s32 *);
+PROTOTYPES_ERR_IO_INSPECT(s32_decimal, const s32 *);
+PROTOTYPES_ERR_IO_INSPECT(s64,         const s64 *);
+PROTOTYPES_ERR_IO_INSPECT(s64_decimal, const s64 *);
+PROTOTYPES_ERR_IO_INSPECT(str,         const s_str *);
+PROTOTYPES_ERR_IO_INSPECT(sw,          const sw *);
+PROTOTYPES_ERR_IO_INSPECT(sw_decimal,  const sw *);
+PROTOTYPES_ERR_IO_INSPECT(sym,         const s_sym * const *);
+PROTOTYPES_ERR_IO_INSPECT(tag,         const s_tag *);
+PROTOTYPES_ERR_IO_INSPECT(tag_type,    e_tag_type);
+PROTOTYPES_ERR_IO_INSPECT(tuple,       const s_tuple *);
+PROTOTYPES_ERR_IO_INSPECT(u8,          const u8 *);
+PROTOTYPES_ERR_IO_INSPECT(u8_decimal,  const u8 *);
+PROTOTYPES_ERR_IO_INSPECT(u16,         const u16 *);
+PROTOTYPES_ERR_IO_INSPECT(u16_decimal, const u16 *);
+PROTOTYPES_ERR_IO_INSPECT(u32,         const u32 *);
+PROTOTYPES_ERR_IO_INSPECT(u32_decimal, const u32 *);
+PROTOTYPES_ERR_IO_INSPECT(u64,         const u64 *);
+PROTOTYPES_ERR_IO_INSPECT(u64_decimal, const u64 *);
+PROTOTYPES_ERR_IO_INSPECT(uw,          const uw *);
+PROTOTYPES_ERR_IO_INSPECT(uw_decimal,  const uw *);
 
 #endif /* LIBKC3_IO_H */
diff --git a/libkc3/list.c b/libkc3/list.c
index b46a773..2e63bd1 100644
--- a/libkc3/list.c
+++ b/libkc3/list.c
@@ -168,6 +168,8 @@ sw list_length (const s_list *list)
 s_list * list_next (const s_list *list)
 {
   assert(list);
+  if (! list)
+    return NULL;
   switch (list->next.type) {
   case TAG_LIST: return list->next.data.list;
   default: return NULL;
diff --git a/libkc3/list_init.c b/libkc3/list_init.c
index 735d784..a5f0294 100644
--- a/libkc3/list_init.c
+++ b/libkc3/list_init.c
@@ -42,7 +42,7 @@ s_list * list_init_array (s_list *list, const s_sym *type,
                           uw dimension, const uw *dimensions,
                           s_list *next)
 {
-  s_list tmp;
+  s_list tmp = {0};
   assert(list);
   list_init(&tmp, next);
   if (! tag_init_array(&tmp.tag, type, dimension, dimensions))
@@ -54,7 +54,7 @@ s_list * list_init_array (s_list *list, const s_sym *type,
 s_list * list_init_array_copy (s_list *list, const s_array *a,
                                s_list *next)
 {
-  s_list tmp;
+  s_list tmp = {0};
   assert(list);
   list_init(&tmp, next);
   if (! tag_init_array_copy(&tmp.tag, a))
@@ -65,7 +65,7 @@ s_list * list_init_array_copy (s_list *list, const s_array *a,
 
 s_list * list_init_bool (s_list *list, bool b, s_list *next)
 {
-  s_list tmp;
+  s_list tmp = {0};
   assert(list);
   list_init(&tmp, next);
   if (! tag_init_bool(&tmp.tag, b))
@@ -76,7 +76,7 @@ s_list * list_init_bool (s_list *list, bool b, s_list *next)
 
 s_list * list_init_call (s_list *list, s_list *next)
 {
-  s_list tmp;
+  s_list tmp = {0};
   assert(list);
   list_init(&tmp, next);
   if (! tag_init_call(&tmp.tag))
@@ -87,7 +87,7 @@ s_list * list_init_call (s_list *list, s_list *next)
 
 s_list * list_init_character (s_list *list, character c, s_list *next)
 {
-  s_list tmp;
+  s_list tmp = {0};
   assert(list);
   list_init(&tmp, next);
   if (! tag_init_character(&tmp.tag, c))
@@ -98,7 +98,7 @@ s_list * list_init_character (s_list *list, character c, s_list *next)
 
 s_list * list_init_complex (s_list *list, s_complex *c, s_list *next)
 {
-  s_list tmp;
+  s_list tmp = {0};
   assert(list);
   list_init(&tmp, next);
   if (! tag_init_complex(&tmp.tag, c))
@@ -109,7 +109,7 @@ s_list * list_init_complex (s_list *list, s_complex *c, s_list *next)
 
 s_list * list_init_f32 (s_list *list, f32 f, s_list *next)
 {
-  s_list tmp;
+  s_list tmp = {0};
   assert(list);
   list_init(&tmp, next);
   if (! tag_init_f32(&tmp.tag, f))
@@ -120,7 +120,7 @@ s_list * list_init_f32 (s_list *list, f32 f, s_list *next)
 
 s_list * list_init_f64 (s_list *list, f64 f, s_list *next)
 {
-  s_list tmp;
+  s_list tmp = {0};
   assert(list);
   list_init(&tmp, next);
   if (! tag_init_f64(&tmp.tag, f))
@@ -131,7 +131,7 @@ s_list * list_init_f64 (s_list *list, f64 f, s_list *next)
 
 s_list * list_init_f128 (s_list *list, f128 f, s_list *next)
 {
-  s_list tmp;
+  s_list tmp = {0};
   assert(list);
   list_init(&tmp, next);
   if (! tag_init_f128(&tmp.tag, f))
@@ -142,7 +142,7 @@ s_list * list_init_f128 (s_list *list, f128 f, s_list *next)
 
 s_list * list_init_fn_copy (s_list *list, const s_fn *fn, s_list *next)
 {
-  s_list tmp;
+  s_list tmp = {0};
   assert(list);
   list_init(&tmp, next);
   if (! tag_init_fn_copy(&tmp.tag, fn))
@@ -154,7 +154,7 @@ s_list * list_init_fn_copy (s_list *list, const s_fn *fn, s_list *next)
 s_list * list_init_ident (s_list *list, const s_ident *ident,
                           s_list *next)
 {
-  s_list tmp;
+  s_list tmp = {0};
   assert(list);
   list_init(&tmp, next);
   if (! tag_init_ident(&tmp.tag, ident))
@@ -165,7 +165,7 @@ s_list * list_init_ident (s_list *list, const s_ident *ident,
 
 s_list * list_init_ident_1 (s_list *list, const char *p, s_list *next)
 {
-  s_list tmp;
+  s_list tmp = {0};
   assert(list);
   list_init(&tmp, next);
   if (! tag_init_ident_1(&tmp.tag, p))
@@ -176,7 +176,7 @@ s_list * list_init_ident_1 (s_list *list, const char *p, s_list *next)
 
 s_list * list_init_integer_1 (s_list *list, const char *p, s_list *next)
 {
-  s_list tmp;
+  s_list tmp = {0};
   assert(list);
   list_init(&tmp, next);
   if (! tag_init_integer_1(&tmp.tag, p))
@@ -188,7 +188,7 @@ s_list * list_init_integer_1 (s_list *list, const char *p, s_list *next)
 s_list * list_init_integer_copy (s_list *list, const s_integer *i,
                                  s_list *next)
 {
-  s_list tmp;
+  s_list tmp = {0};
   assert(list);
   list_init(&tmp, next);
   if (! tag_init_integer_copy(&tmp.tag, i))
@@ -199,7 +199,7 @@ s_list * list_init_integer_copy (s_list *list, const s_integer *i,
 
 s_list * list_init_integer_zero (s_list *list, s_list *next)
 {
-  s_list tmp;
+  s_list tmp = {0};
   assert(list);
   list_init(&tmp, next);
   if (! tag_init_integer_zero(&tmp.tag))
@@ -210,7 +210,7 @@ s_list * list_init_integer_zero (s_list *list, s_list *next)
 
 s_list * list_init_map (s_list *list, uw count, s_list *next)
 {
-  s_list tmp;
+  s_list tmp = {0};
   assert(list);
   list_init(&tmp, next);
   if (! tag_init_map(&tmp.tag, count))
@@ -221,7 +221,7 @@ s_list * list_init_map (s_list *list, uw count, s_list *next)
 
 s_list * list_init_map_1 (s_list *list, const char *p, s_list *next)
 {
-  s_list tmp;
+  s_list tmp = {0};
   assert(list);
   list_init(&tmp, next);
   if (! tag_init_map_1(&tmp.tag, p))
@@ -232,7 +232,7 @@ s_list * list_init_map_1 (s_list *list, const char *p, s_list *next)
 
 s_list * list_init_ptr (s_list *list, void *p, s_list *next)
 {
-  s_list tmp;
+  s_list tmp = {0};
   assert(list);
   list_init(&tmp, next);
   if (! tag_init_ptr(&tmp.tag, p))
@@ -243,7 +243,7 @@ s_list * list_init_ptr (s_list *list, void *p, s_list *next)
 
 s_list * list_init_ptr_free (s_list *list, void *p, s_list *next)
 {
-  s_list tmp;
+  s_list tmp = {0};
   assert(list);
   list_init(&tmp, next);
   if (! tag_init_ptr_free(&tmp.tag, p))
@@ -255,7 +255,7 @@ s_list * list_init_ptr_free (s_list *list, void *p, s_list *next)
 s_list * list_init_quote_copy (s_list *list, const s_quote *quote,
                                s_list *next)
 {
-  s_list tmp;
+  s_list tmp = {0};
   assert(list);
   list_init(&tmp, next);
   if (! tag_init_quote_copy(&tmp.tag, quote))
@@ -266,7 +266,7 @@ s_list * list_init_quote_copy (s_list *list, const s_quote *quote,
 
 s_list * list_init_ratio_1 (s_list *list, const char *p, s_list *next)
 {
-  s_list tmp;
+  s_list tmp = {0};
   assert(list);
   list_init(&tmp, next);
   if (! tag_init_ratio_1(&tmp.tag, p))
@@ -277,7 +277,7 @@ s_list * list_init_ratio_1 (s_list *list, const char *p, s_list *next)
 
 s_list * list_init_ratio (s_list *list, s_list *next)
 {
-  s_list tmp;
+  s_list tmp = {0};
   assert(list);
   list_init(&tmp, next);
   if (! tag_init_ratio(&tmp.tag))
@@ -289,7 +289,7 @@ s_list * list_init_ratio (s_list *list, s_list *next)
 s_list * list_init_ratio_copy (s_list *list, const s_ratio *r,
                                s_list *next)
 {
-  s_list tmp;
+  s_list tmp = {0};
   assert(list);
   list_init(&tmp, next);
   if (! tag_init_ratio_copy(&tmp.tag, r))
@@ -300,7 +300,7 @@ s_list * list_init_ratio_copy (s_list *list, const s_ratio *r,
 
 s_list * list_init_ratio_zero (s_list *list, s_list *next)
 {
-  s_list tmp;
+  s_list tmp = {0};
   assert(list);
   list_init(&tmp, next);
   if (! tag_init_ratio_zero(&tmp.tag))
@@ -311,7 +311,7 @@ s_list * list_init_ratio_zero (s_list *list, s_list *next)
 
 s_list * list_init_s8 (s_list *list, s8 i, s_list *next)
 {
-  s_list tmp;
+  s_list tmp = {0};
   assert(list);
   list_init(&tmp, next);
   if (! tag_init_s8(&tmp.tag, i))
@@ -322,7 +322,7 @@ s_list * list_init_s8 (s_list *list, s8 i, s_list *next)
 
 s_list * list_init_s16 (s_list *list, s16 i, s_list *next)
 {
-  s_list tmp;
+  s_list tmp = {0};
   assert(list);
   list_init(&tmp, next);
   if (! tag_init_s16(&tmp.tag, i))
@@ -333,7 +333,7 @@ s_list * list_init_s16 (s_list *list, s16 i, s_list *next)
 
 s_list * list_init_s32 (s_list *list, s32 i, s_list *next)
 {
-  s_list tmp;
+  s_list tmp = {0};
   assert(list);
   list_init(&tmp, next);
   if (! tag_init_s32(&tmp.tag, i))
@@ -344,7 +344,7 @@ s_list * list_init_s32 (s_list *list, s32 i, s_list *next)
 
 s_list * list_init_s64 (s_list *list, s64 i, s_list *next)
 {
-  s_list tmp;
+  s_list tmp = {0};
   assert(list);
   list_init(&tmp, next);
   if (! tag_init_s64(&tmp.tag, i))
@@ -356,7 +356,7 @@ s_list * list_init_s64 (s_list *list, s64 i, s_list *next)
 s_list * list_init_str (s_list *list, char *p_free, uw size,
                         const char *p, s_list *next)
 {
-  s_list tmp;
+  s_list tmp = {0};
   assert(list);
   list_init(&tmp, next);
   if (! tag_init_str(&tmp.tag, p_free, size, p))
@@ -368,7 +368,7 @@ s_list * list_init_str (s_list *list, char *p_free, uw size,
 s_list * list_init_str_1 (s_list *list, char *p_free, const char *p,
                           s_list *next)
 {
-  s_list tmp;
+  s_list tmp = {0};
   assert(list);
   list_init(&tmp, next);
   if (! tag_init_str_1(&tmp.tag, p_free, p))
@@ -380,7 +380,7 @@ s_list * list_init_str_1 (s_list *list, char *p_free, const char *p,
 s_list * list_init_str_cat (s_list *list, const s_str *a,
                             const s_str *b, s_list *next)
 {
-  s_list tmp;
+  s_list tmp = {0};
   assert(list);
   list_init(&tmp, next);
   if (! tag_init_str_cat(&tmp.tag, a, b))
@@ -391,7 +391,7 @@ s_list * list_init_str_cat (s_list *list, const s_str *a,
 
 s_list * list_init_str_empty (s_list *list, s_list *next)
 {
-  s_list tmp;
+  s_list tmp = {0};
   assert(list);
   list_init(&tmp, next);
   if (! tag_init_str_empty(&tmp.tag))
@@ -403,7 +403,7 @@ s_list * list_init_str_empty (s_list *list, s_list *next)
 s_list * list_init_struct (s_list *list, const s_sym *module,
                            s_list *next)
 {
-  s_list tmp;
+  s_list tmp = {0};
   assert(list);
   list_init(&tmp, next);
   if (! tag_init_struct(&tmp.tag, module))
@@ -416,7 +416,7 @@ s_list * list_init_struct_with_data (s_list *list, const s_sym *module,
                                      void *data, bool free_data,
                                      s_list *next)
 {
-  s_list tmp;
+  s_list tmp = {0};
   assert(list);
   list_init(&tmp, next);
   if (! tag_init_struct_with_data(&tmp.tag, module, data, free_data))
@@ -428,7 +428,7 @@ s_list * list_init_struct_with_data (s_list *list, const s_sym *module,
 s_list * list_init_struct_type (s_list *list, const s_sym *module,
                                 const s_list *spec, s_list *next)
 {
-  s_list tmp;
+  s_list tmp = {0};
   assert(list);
   list_init(&tmp, next);
   if (! tag_init_struct_type(&tmp.tag, module, spec))
@@ -442,7 +442,7 @@ s_list * list_init_struct_type_update_clean (s_list *list,
                                              const s_cfn *clean,
                                              s_list *next)
 {
-  s_list tmp;
+  s_list tmp = {0};
   assert(list);
   list_init(&tmp, next);
   if (! tag_init_struct_type_update_clean(&tmp.tag, st, clean))
@@ -453,7 +453,7 @@ s_list * list_init_struct_type_update_clean (s_list *list,
 
 s_list * list_init_sw (s_list *list, sw i, s_list *next)
 {
-  s_list tmp;
+  s_list tmp = {0};
   assert(list);
   list_init(&tmp, next);
   if (! tag_init_sw(&tmp.tag, i))
@@ -464,7 +464,7 @@ s_list * list_init_sw (s_list *list, sw i, s_list *next)
 
 s_list * list_init_sym (s_list *list, const s_sym *sym, s_list *next)
 {
-  s_list tmp;
+  s_list tmp = {0};
   assert(list);
   list_init(&tmp, next);
   if (! tag_init_sym(&tmp.tag, sym))
@@ -475,7 +475,7 @@ s_list * list_init_sym (s_list *list, const s_sym *sym, s_list *next)
 
 s_list * list_init_tuple (s_list *list, uw count, s_list *next)
 {
-  s_list tmp;
+  s_list tmp = {0};
   assert(list);
   list_init(&tmp, next);
   if (! tag_init_tuple(&tmp.tag, count))
@@ -487,7 +487,7 @@ s_list * list_init_tuple (s_list *list, uw count, s_list *next)
 s_list * list_init_tuple_2 (s_list *list, const s_tag *a,
                             const s_tag *b, s_list *next)
 {
-  s_list tmp;
+  s_list tmp = {0};
   assert(list);
   list_init(&tmp, next);
   if (! tag_init_tuple_2(&tmp.tag, a, b))
@@ -498,7 +498,7 @@ s_list * list_init_tuple_2 (s_list *list, const s_tag *a,
 
 s_list * list_init_u8 (s_list *list, u8 i, s_list *next)
 {
-  s_list tmp;
+  s_list tmp = {0};
   assert(list);
   list_init(&tmp, next);
   if (! tag_init_u8(&tmp.tag, i))
@@ -509,7 +509,7 @@ s_list * list_init_u8 (s_list *list, u8 i, s_list *next)
 
 s_list * list_init_u16 (s_list *list, u16 i, s_list *next)
 {
-  s_list tmp;
+  s_list tmp = {0};
   assert(list);
   list_init(&tmp, next);
   if (! tag_init_u16(&tmp.tag, i))
@@ -520,7 +520,7 @@ s_list * list_init_u16 (s_list *list, u16 i, s_list *next)
 
 s_list * list_init_u32 (s_list *list, u32 i, s_list *next)
 {
-  s_list tmp;
+  s_list tmp = {0};
   assert(list);
   list_init(&tmp, next);
   if (! tag_init_u32(&tmp.tag, i))
@@ -531,7 +531,7 @@ s_list * list_init_u32 (s_list *list, u32 i, s_list *next)
 
 s_list * list_init_u64 (s_list *list, u64 i, s_list *next)
 {
-  s_list tmp;
+  s_list tmp = {0};
   assert(list);
   list_init(&tmp, next);
   if (! tag_init_u64(&tmp.tag, i))
@@ -543,7 +543,7 @@ s_list * list_init_u64 (s_list *list, u64 i, s_list *next)
 s_list * list_init_unquote_copy (s_list *list,
                                  const s_unquote *unquote, s_list *next)
 {
-  s_list tmp;
+  s_list tmp = {0};
   assert(list);
   list_init(&tmp, next);
   if (! tag_init_unquote_copy(&tmp.tag, unquote))
@@ -554,7 +554,7 @@ s_list * list_init_unquote_copy (s_list *list,
 
 s_list * list_init_uw (s_list *list, uw i, s_list *next)
 {
-  s_list tmp;
+  s_list tmp = {0};
   assert(list);
   list_init(&tmp, next);
   if (! tag_init_uw(&tmp.tag, i))
@@ -565,7 +565,7 @@ s_list * list_init_uw (s_list *list, uw i, s_list *next)
 
 s_list * list_init_var (s_list *list, const s_sym *type, s_list *next)
 {
-  s_list tmp;
+  s_list tmp = {0};
   assert(list);
   list_init(&tmp, next);
   if (! tag_init_var(&tmp.tag, type))
@@ -576,7 +576,7 @@ s_list * list_init_var (s_list *list, const s_sym *type, s_list *next)
 
 s_list * list_init_void (s_list *list, s_list *next)
 {
-  s_list tmp;
+  s_list tmp = {0};
   assert(list);
   list_init(&tmp, next);
   if (! tag_init_void(&tmp.tag))
diff --git a/libkc3/map.c b/libkc3/map.c
index 03d2e62..84331ad 100644
--- a/libkc3/map.c
+++ b/libkc3/map.c
@@ -193,10 +193,10 @@ s_map * map_init_from_lists (s_map *map, const s_list *keys,
 
 s_list ** map_map (const s_map *map, const s_fn *fn, s_list **result)
 {
-  s_list *args;
+  s_list *args = NULL;
   uw i = 0;
-  s_list **t;
-  s_list *tmp;
+  s_list **t = NULL;
+  s_list *tmp = NULL;
   assert(map);
   assert(fn);
   assert(result);
@@ -302,7 +302,7 @@ s_map * map_sort (s_map *map)
 s_map * map_update (const s_map *map, const s_tag *key,
                     const s_tag *value, s_map *dest)
 {
-  s_map tmp;
+  s_map tmp = {0};
   uw i = 0;
   map_init_copy(&tmp, map);
   while (i < map->count) {
@@ -321,8 +321,8 @@ s_map * map_update (const s_map *map, const s_tag *key,
 
 s_map * map_update_list (const s_map *map, const s_list *alist, s_map *dest)
 {
-  const s_list *i;
-  s_map tmp;
+  const s_list *i = NULL;
+  s_map tmp = {0};
   assert(map);
   map_init_copy(&tmp, map);
   i = alist;
diff --git a/libkc3/ratio.c b/libkc3/ratio.c
index dd28145..f96b997 100644
--- a/libkc3/ratio.c
+++ b/libkc3/ratio.c
@@ -22,9 +22,9 @@
 
 s_ratio * ratio_add (const s_ratio *a, const s_ratio *b, s_ratio *dest)
 {
-  s_ratio tmp;
-  s_integer i;
-  s_integer j;
+  s_ratio tmp = {0};
+  s_integer i = {0};
+  s_integer j = {0};
   assert(a);
   assert(b);
   assert(dest);
@@ -115,10 +115,10 @@ s_ratio * ratio_init (s_ratio *dest)
 
 s_ratio * ratio_init_1 (s_ratio *q, const char *p)
 {
-  s_buf buf;
+  s_buf buf = {0};
   uw len;
   sw r;
-  s_ratio tmp;
+  s_ratio tmp = {0};
   assert(q);
   assert(p);
   if (! p)
@@ -475,9 +475,9 @@ s_tag * ratio_sqrt (const s_ratio *r, s_tag *dest)
 s_ratio * ratio_sub (const s_ratio *a, const s_ratio *b,
                            s_ratio *dest)
 {
-  s_ratio tmp;
-  s_integer i;
-  s_integer j;
+  s_ratio tmp = {0};
+  s_integer i = {0};
+  s_integer j = {0};
   assert(a);
   assert(b);
   assert(dest);
diff --git a/libkc3/str.c b/libkc3/str.c
index f5cfba5..f58568d 100644
--- a/libkc3/str.c
+++ b/libkc3/str.c
@@ -68,8 +68,8 @@ sw str_character_position (const s_str *str, character c)
 {
   uw i = 0;
   sw r = 0;
-  s_str tmp;
-  character tmp_c;
+  s_str tmp = {0};
+  character tmp_c = 0;
   assert(str);
   tmp = *str;
   while (tmp.size && (r = str_read_character_utf8(&tmp, &tmp_c)) > 0) {
@@ -136,7 +136,7 @@ s_str * str_init_1 (s_str *str, char *free, const char *p)
 
 s_str * str_init_alloc (s_str *str, uw size, const char *p)
 {
-  s_str tmp;
+  s_str tmp = {0};
   assert(str);
   tmp.free.p = alloc(size + 1);
   if (! tmp.free.p)
@@ -636,8 +636,8 @@ uw * str_rindex_character (const s_str *str, character c, uw *dest)
 {
   uw i = 0;
   sw result = -1;
-  s_str s;
-  character tmp;
+  s_str s = {0};
+  character tmp = 0;
   s = *str;
   while (str_read_character_utf8(&s, &tmp) > 0) {
     if (c == tmp)
diff --git a/libkc3/struct.c b/libkc3/struct.c
index 75969b3..e82ec13 100644
--- a/libkc3/struct.c
+++ b/libkc3/struct.c
@@ -55,7 +55,7 @@ s_tag * struct_access (const s_struct *s, const s_sym *key, s_tag *dest)
 
 s_struct * struct_allocate (s_struct *s)
 {
-  s_struct tmp;
+  s_struct tmp = {0};
   assert(s);
   assert(s->type);
   if (s->data) {
diff --git a/libkc3/struct_type.c b/libkc3/struct_type.c
index a2839e2..146e438 100644
--- a/libkc3/struct_type.c
+++ b/libkc3/struct_type.c
@@ -175,7 +175,7 @@ s_struct_type * struct_type_init_update_clean (s_struct_type *st,
 s_struct_type * struct_type_init_copy (s_struct_type *st,
                                        const s_struct_type *src)
 {
-  s_struct_type tmp;
+  s_struct_type tmp = {0};
   assert(st);
   assert(src);
   assert(src->module);
diff --git a/libkc3/sym.c b/libkc3/sym.c
index e3ff5df..6d12f4f 100644
--- a/libkc3/sym.c
+++ b/libkc3/sym.c
@@ -133,7 +133,7 @@ const s_sym * sym_array_type (const s_sym *sym)
   sw r;
   bool separator;
   s_str str;
-  const s_sym *tmp;
+  const s_sym *tmp = {0};
   assert(sym);
   buf_init_alloc(&buf, sym->str.size);
   str = sym->str;
@@ -196,7 +196,7 @@ void sym_delete_all (void)
   sym_list = g_sym_list;
   g_sym_list = NULL;
   while (sym_list) {
-    s_sym_list *tmp;
+    s_sym_list *tmp = NULL;
     tmp = sym_list;
     sym_list = sym_list->next;
     if (tmp->free_sym)
@@ -408,7 +408,7 @@ void sym_init_g_sym (void)
 
 const s_sym ** sym_init_str (const s_sym **sym, const s_str *src)
 {
-  const s_sym *tmp;
+  const s_sym *tmp = NULL;
   tmp = sym_find(src);
   if (! tmp)
     tmp = sym_new(src);
@@ -420,7 +420,7 @@ const s_sym ** sym_init_str (const s_sym **sym, const s_str *src)
 
 bool sym_register (const s_sym *sym, s_sym *free_sym)
 {
-  s_sym_list *tmp;
+  s_sym_list *tmp = NULL;
   assert(sym);
   if (sym_find(&sym->str))
     return false;
@@ -656,8 +656,8 @@ bool * sym_must_clean (const s_sym *sym, bool *must_clean)
 
 const s_sym * sym_new (const s_str *src)
 {
-  s_sym *sym;
-  s_sym_list *tmp;
+  s_sym *sym = NULL;
+  s_sym_list *tmp = NULL;
   sym = alloc(sizeof(s_sym));
   if (! sym)
     return NULL;
diff --git a/libkc3/tag_add.c b/libkc3/tag_add.c
index 5ab1cd0..cd9b707 100644
--- a/libkc3/tag_add.c
+++ b/libkc3/tag_add.c
@@ -18,10 +18,10 @@
 
 s_tag * tag_add (const s_tag *a, const s_tag *b, s_tag *dest)
 {
-  s_complex c;
-  s_integer tmp;
-  s_integer tmp2;
-  s_ratio r;
+  s_complex c = {0};
+  s_integer tmp = {0};
+  s_integer tmp2 = {0};
+  s_ratio r = {0};
   assert(a);
   assert(b);
   assert(dest);
diff --git a/libkc3/tag_band.c b/libkc3/tag_band.c
index 7664ad2..214640b 100644
--- a/libkc3/tag_band.c
+++ b/libkc3/tag_band.c
@@ -16,8 +16,8 @@
 
 s_tag * tag_band (const s_tag *a, const s_tag *b, s_tag *result)
 {
-  s_integer tmp;
-  s_integer tmp2;
+  s_integer tmp = {0};
+  s_integer tmp2 = {0};
   assert(a);
   assert(b);
   assert(result);
diff --git a/libkc3/tag_bor.c b/libkc3/tag_bor.c
index dcfcc53..a8ce33b 100644
--- a/libkc3/tag_bor.c
+++ b/libkc3/tag_bor.c
@@ -16,8 +16,8 @@
 
 s_tag * tag_bor (const s_tag *a, const s_tag *b, s_tag *result)
 {
-  s_integer tmp;
-  s_integer tmp2;
+  s_integer tmp = {0};
+  s_integer tmp2 = {0};
   assert(a);
   assert(b);
   assert(result);
diff --git a/libkc3/tag_bxor.c b/libkc3/tag_bxor.c
index 9f3f8a1..563e6b7 100644
--- a/libkc3/tag_bxor.c
+++ b/libkc3/tag_bxor.c
@@ -16,8 +16,8 @@
 
 s_tag * tag_bxor (const s_tag *a, const s_tag *b, s_tag *result)
 {
-  s_integer tmp;
-  s_integer tmp2;
+  s_integer tmp = {0};
+  s_integer tmp2 = {0};
   assert(a);
   assert(b);
   assert(result);
diff --git a/libkc3/tag_div.c b/libkc3/tag_div.c
index 6108989..3b393fc 100644
--- a/libkc3/tag_div.c
+++ b/libkc3/tag_div.c
@@ -19,10 +19,10 @@
 
 s_tag * tag_div (const s_tag *a, const s_tag *b, s_tag *dest)
 {
-  s_complex c;
-  s_integer tmp;
-  s_integer tmp2;
-  s_ratio r;
+  s_complex c = {0};
+  s_integer tmp = {0};
+  s_integer tmp2 = {0};
+  s_ratio r = {0};
   assert(a);
   assert(b);
   assert(dest);
diff --git a/libkc3/tag_init.rb b/libkc3/tag_init.rb
index 245839b..e233c06 100644
--- a/libkc3/tag_init.rb
+++ b/libkc3/tag_init.rb
@@ -214,7 +214,7 @@ EOF
 
 #{list_init_proto[0..-2]}
 {
-  s_list tmp;
+  s_list tmp = {0};
   assert(list);
   list_init(&tmp, next);
   if (! tag_init_#{name_suffix}(&tmp.tag#{comma_args}))
diff --git a/libkc3/tag_mod.c b/libkc3/tag_mod.c
index 0d168f9..0323b31 100644
--- a/libkc3/tag_mod.c
+++ b/libkc3/tag_mod.c
@@ -17,8 +17,8 @@
 
 s_tag * tag_mod (const s_tag *a, const s_tag *b, s_tag *dest)
 {
-  s_integer tmp;
-  s_integer tmp2;
+  s_integer tmp = {0};
+  s_integer tmp2 = {0};
   assert(a);
   assert(b);
   assert(dest);
diff --git a/libkc3/tag_mul.c b/libkc3/tag_mul.c
index 7c305c0..6ac6ff3 100644
--- a/libkc3/tag_mul.c
+++ b/libkc3/tag_mul.c
@@ -19,10 +19,10 @@
 
 s_tag * tag_mul (const s_tag *a, const s_tag *b, s_tag *dest)
 {
-  s_complex c;
-  s_ratio r;
-  s_integer tmp;
-  s_integer tmp2;
+  s_complex c = {0};
+  s_ratio r = {0};
+  s_integer tmp = {0};
+  s_integer tmp2 = {0};
   assert(a);
   assert(b);
   assert(dest);
diff --git a/libkc3/tag_neg.c b/libkc3/tag_neg.c
index e3a867a..52bae1b 100644
--- a/libkc3/tag_neg.c
+++ b/libkc3/tag_neg.c
@@ -17,7 +17,7 @@
 
 s_tag * tag_neg (const s_tag *tag, s_tag *result)
 {
-  s_integer tmp;
+  s_integer tmp = {0};
   switch (tag->type) {
   case TAG_INTEGER:
     result->type = TAG_INTEGER;
diff --git a/libkc3/tag_shift_left.c b/libkc3/tag_shift_left.c
index 988f89b..6afe744 100644
--- a/libkc3/tag_shift_left.c
+++ b/libkc3/tag_shift_left.c
@@ -16,8 +16,8 @@
 
 s_tag * tag_shift_left (const s_tag *a, const s_tag *b, s_tag *result)
 {
-  s_integer tmp;
-  s_integer tmp2;
+  s_integer tmp = {0};
+  s_integer tmp2 = {0};
   s_tag tmp_a;
   switch (a->type) {
   case TAG_BOOL:
diff --git a/libkc3/tag_shift_right.c b/libkc3/tag_shift_right.c
index 413bd5e..41f8d66 100644
--- a/libkc3/tag_shift_right.c
+++ b/libkc3/tag_shift_right.c
@@ -16,8 +16,8 @@
 
 s_tag * tag_shift_right (const s_tag *a, const s_tag *b, s_tag *result)
 {
-  s_integer tmp;
-  s_integer tmp2;
+  s_integer tmp = {0};
+  s_integer tmp2 = {0};
   s_tag tmp_a;
   switch (a->type) {
   case TAG_BOOL:
diff --git a/libkc3/tag_sub.c b/libkc3/tag_sub.c
index a47572e..3a5165e 100644
--- a/libkc3/tag_sub.c
+++ b/libkc3/tag_sub.c
@@ -20,8 +20,8 @@
 s_tag * tag_sub (const s_tag *a, const s_tag *b, s_tag *dest)
 {
   s_complex c;
-  s_integer tmp;
-  s_integer tmp2;
+  s_integer tmp = {0};
+  s_integer tmp2 = {0};
   s_ratio r;
   assert(a);
   assert(b);
diff --git a/libkc3/time.c b/libkc3/time.c
index f44af84..c5b438a 100644
--- a/libkc3/time.c
+++ b/libkc3/time.c
@@ -34,7 +34,7 @@ f64 * time_to_f64 (const s_time *time, f64 *dest)
 
 s_tag * time_to_tag (const s_time *time, s_tag *dest)
 {
-  s_tag tmp;
+  s_tag tmp = {0};
   assert(time);
   if (! tag_init_tuple(&tmp, 2))
     return NULL;
diff --git a/libkc3/tuple.c b/libkc3/tuple.c
index 7b00067..0d0ec66 100644
--- a/libkc3/tuple.c
+++ b/libkc3/tuple.c
@@ -42,7 +42,7 @@ void tuple_delete (s_tuple *tuple)
 s_tuple * tuple_init (s_tuple *tuple, uw count)
 {
   uw i;
-  s_tuple tmp;
+  s_tuple tmp = {0};
   assert(tuple);
   assert(2 <= count);
   tmp.count = count;
diff --git a/libkc3/var.c b/libkc3/var.c
index c01246a..6de5913 100644
--- a/libkc3/var.c
+++ b/libkc3/var.c
@@ -35,7 +35,7 @@ s_tag * var_init_cast (s_tag *tag, const s_sym * const *type,
                        const s_tag *src)
 {
   void *data;
-  s_tag tmp;
+  s_tag tmp = {0};
   assert(tag);
   assert(type);
   assert(src);
diff --git a/test/Makefile b/test/Makefile
index 314339f..8de70e0 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -72,16 +72,16 @@ gcovr:
 	gcovr --gcov-executable ${GCOV} --html-details test.html
 
 gdb_test: debug
-	if [ -f libkc3_test_debug.core ]; then gdb .libs/libkc3_test_debug libkc3_test_debug.core; else gdb .libs/libkc3_test_debug; fi
+	if [ -f libkc3_test_debug.core ]; then ${GDB} .libs/libkc3_test_debug libkc3_test_debug.core; else ${GDB} .libs/libkc3_test_debug; fi
 
 gdb_test_ekc3:
-	cd ekc3 && gdb ../../kc3s/.libs/kc3s_debug
+	cd ekc3 && ${GDB} ../../kc3s/.libs/kc3s_debug
 
 gdb_test_http:
-	cd http && gdb ../../ikc3/.libs/ikc3_debug
+	cd http && ${GDB} ../../ikc3/.libs/ikc3_debug
 
 gdb_test_ikc3:
-	cd ikc3 && gdb ../../ikc3/.libs/ikc3_debug
+	cd ikc3 && ${GDB} ../../ikc3/.libs/ikc3_debug
 
 lldb_test: debug
 	if [ -f libkc3_test_debug.core ]; then lldb .libs/libkc3_test_debug libkc3_test_debug.core; else lldb .libs/libkc3_test_debug; fi