forked from petervaro/cutils
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTODO
931 lines (814 loc) · 33.2 KB
/
TODO
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
## INFO ########################################################################
## ##
## cutils ##
## ====== ##
## ##
## Modern and Lightweight C Utilities ##
## Version: 0.8.96.310 (20141027) ##
## ##
## File: TODO ##
## ##
## For more information about the project, visit <http://www.cutils.org>. ##
## Copyright (C) 2014 Peter Varo ##
## ##
## This program is free software: you can redistribute it and/or modify it ##
## under the terms of the GNU General Public License as published by the ##
## Free Software Foundation, either version 3 of the License, or ##
## (at your option) any later version. ##
## ##
## This program is distributed in the hope that it will be useful, but ##
## WITHOUT ANY WARRANTY; without even the implied warranty of ##
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ##
## See the GNU General Public License for more details. ##
## ##
## You should have received a copy of the GNU General Public License ##
## along with this program, most likely a file in the root directory, ##
## called 'LICENSE'. If not, see <http://www.gnu.org/licenses>. ##
## ##
######################################################################## INFO ##
#---------------------------- 13 POSTS IN 7 FILES -----------------------------#
FIXME:
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 1
- file: doc/src/05_ccom.yaml
line: 104
note: |
We need to use the String
"object" of cutils here
instead of this simple struct
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 2
- file: internal/c11.py
line: 458
note: |
define __paste(_0,_1,_2,_3,_4) _0##_1##_2##_3##_4
^
highlighted as number
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 3
- file: internal/c11.py
line: 462
note: |
some_var, ## \ <-- line-breaker
amother_var
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 4
- file: internal/c11.py
line: 602
note: |
format prefixes: -= 0w.pmc
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 5
- file: internal/generator.py
line: 295
note: |
better guard ending and meaningful comment
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 6
- file: internal/generator.py
line: 472
note: |
getting 'default' key will raise KeyError even if
'subtype_name' is in 'func_wrapping' !!!
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 7
- file: internal/singly_linked_list.py
line: 203
note: |
try to make both find and findall type-safe
by replacing the const void* to type specific pointer
the main problem is, cannot pass
bool(*)(const type*,...) --> bool(*)(const void*,...)
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 8
- file: pycutils/cutils/ccom.py
line: 183
note: |
for some reason, if a comment-type ever existed in the TODO
file, but after a while its posts are all gone, the keyword
still remains there, according to the current TODO file,
which still have the "QUESTIONS" keyword, and comment
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 9
- file: pycutils/cutils/cdoc.py
line: 146
note: |
replace newline only if newline character is
the first token in that line or it is after
a similar token (prevent: \\\n)
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 10
- file: pycutils/cutils/cdoc.py
line: 263
note: |
if external file changed -> change the whole file
check for all special features and find out how
to store them properly in the cache files
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 11
- file: pycutils/cutils/clic.py
line: 44
note: |
if modules cannot be found?
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 12
- file: pycutils/cutils/clic.py
line: 211
note: |
what if none of the files changed only INFO has been updated?
Scan through all files and folders
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 13
- file: pycutils/cutils/clic.py
line: 236
note: |
make it more generic than ./ -- what if ../../?
#---------------------------- 63 POSTS IN 26 FILES ----------------------------#
TODO:
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 1
- file: call.h
line: 33
note: |
rename this to 'cutils.h'?
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 2
- file: cbug.h
line: 33
note: |
sdebug() -> expands to string literal or
debugexc(func, msg, len) -> calls raise() or ccraise()
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 3
- file: cdar.c
line: 410
note: |
change behaviour: return false, instead of limiting,
just like in csll; also: correct the documentation
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 4
- file: cdar.c
line: 1241
note: |
map() should return the modified object
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 5
- file: cdar.c
line: 1309
note: |
'void*' could mean (and should mean) any item not just
pointers, therefore casting it to a pointer and then
dereferencing it won't work. the question is now:
is there any way to determine if the given item is a
pointer, and it is a pointer to NULL? otherwise the
following doesn't make any sense:
if (!*(char*)item)
*buffer = REPRESENTATION_OF_NULL_POINTERS;
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 6
- file: cexc.h
line: 158
note: |
OPTION 1: catch returns 1 if error, else 0, CON: if func removed by macro?
OPTION 2: use ccatch for that? (the callback does what the
`if (catch())` would have done)
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 7
- file: cfps.h
line: 35
note: |
At the moment in a single scope only the first appearence of
these functions will work. NOTE: If you want to use both printfps
and getfps at the same time, use the getfps function only, and pass
a getter function which can also implement the printing functionality
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 8
- file: cout.c
line: 37
note: |
- add arrays (eg. char[]) => _Generic sees char* and char[] differently
- add pointers (eg. int*)
- add qualifiers (eg. const void*)
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 9
- file: cref.h
line: 358
note: |
%ju and %lf and %td and %hd and %hu
http://www.mekong.net/tech/printf.htm
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 10
- file: cshm.c
line: 53
note: |
Newest xxhash has XXH64 which is way faster than XXH32, but works only
on 64 bit systems. Update xxhash to latest. Create an architecture
dependent macro dispatcher between the hash functions
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 11
- file: cshm.c
line: 294
note: |
try to get a pointer from the SinglyLinkedList_void_ptr_append()
which is "empty" and has the size of 'item_size' and can be
casted to SHMItem => so adding a new item to the hashmap will
only require one malloc instead of two
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 12
- file: csll.c
line: 795
note: |
pop() has only three extra statements compared to pull()
1) else if (!destination) ...
2) char *dest = (char *)destination;
3) memcpy(dest + (count - counter)*item_size, node_curr->data, item_size);
try to "merge" these two together -- with a macro?
also sub() has the same lines except no popping and freeing
(and their error message "names" differes of course)
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 13
- file: csll.c
line: 1124
note: |
this is considered to be a very dangerous function, because right now
the function can't check the current SLLNode's size. It's not a problem,
when the size is lesser than or equal to the new item, but it will lead
to SEGFAULT when it is greater. One solution can be to store the
item_size in each SLLNode, however, that is a very large extra memory
overhead. Also, if the content of the list is homogeneous, it is a very
redundant solution too. Another possible option is, to offer a
pre-defined SLLBoundedNode, which knows its own size, and which can be
added as the 'data' of a regular SLLNode. In that case only a very thin
wrapper will be needed, to get access to the original item data
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 14
- file: dev/proj.py
line: 49
note: |
generate documentation to some better place, maybe /tmp ?
after committed, change the branch copy the content and
then commit changed to the gh-pages branch and switch
back to master branch
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 15
- file: dev/proj.py
line: 54
note: |
Make error messages and reports of cver/cdoc/ccom/clic similar!
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 16
- file: doc/src/00_cutils.yaml
line: 30
note: |
consider changing `clic` -> `ccom` and `ccom` -> `ctag`
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 17
- file: doc/src/15_cdar.yaml
line: 58
note: |
finish dependings
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 18
- file: doc/src/16_cstr.yaml
line: 56
note: |
Implement cstr: dynamic null-terminated char array (char *)
format(string)
format("%s %%s", "hello") -> "hello %s"
probably this should be implemented for String (pop)
concat(string1, string2) -- is this necessary?
rethink all string methods!
Update: But C already has escape sequence!
char str[3];
sprintf(str, "%%%c", 'd');
printf(str, 12);
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 19
- file: doc/src/19_cmap.yaml
line: 55
note: |
Implement cmap: Hash Map
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 20
- file: doc/src/23_call.yaml
line: 38
note: |
write about defining flags and CUTILS_NAMESPACE before call.h
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 21
- file: internal/c11.py
line: 37
note: |
At the moment tmLanguage doesn't support multiline regexes
only through begin/patterns/end, which makes it impossible to
catch something like this:
r'/(\\\s*\n)*/((\\\s*\n)?.*)*'
Which should produce a match on this:
/\
/ Comment: another kind of two-lines one-liner
This notation is a valid C syntax according to the standard.
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 22
- file: internal/c11.py
line: 132
note: |
static-assertion keyword?
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 23
- file: internal/c11.py
line: 296
note: |
enum ?
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 24
- file: internal/convert.py
line: 122
note: |
decide if we need `word-wrap: break-word;` or not?
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 25
- file: internal/dynamic_array.c
line: 30
note: |
add String to cdar
DynamicArray_String: String
DynamicArray_string: char *
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 26
- file: internal/dynamic_array.c
line: 34
note: |
add DynamicArray to cdar
DynamicArray_DynamicArray: nested arrays
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 27
- file: internal/dynamic_array.c
line: 37
note: |
implement: reverses count number of sub data starts at index
void
darv_reversesub(cutils_cdar_DynamicArray_void_ptr *dynarr,
size_t index,
size_t count)
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 28
- file: internal/dynamic_array.c
line: 43
note: |
Implement `swapto`
#define swapto(dar_ptr_src, dar_ptr_dst, index_src, index_dst, count)
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 29
- file: internal/dynamic_array.c
line: 46
note: |
Implement `appendto` (or `concatanate` or `add` or `extend`)
#define appendto(dar_ptr_dst, dar_ptr_src)
do {
if (!dar_ptr_src) break;
append(dar_ptr_dst, len(dar_ptr_src), raw(dar_ptr_src));
} while (0)
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 30
- file: internal/dynamic_array.c
line: 53
note: |
Implement `insertto`
#define insertto(dar_ptr_dst, index, dar_ptr_src)
do {
if (!dar_ptr_src) break;
insert(dar_ptr_dst, index, len(dar_ptr_src), raw(dar_ptr_src));
} while (0)
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 31
- file: internal/dynamic_array.c
line: 60
note: |
Implement `setto`
#define setto(dar_ptr_dst, index, dar_ptr_dst)
do {
if (!dar_ptr_dst) break;
set(dar_ptr_dst, index, len(dar_ptr_dst), raw(dar_ptr_dst));
} while (0)
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 32
- file: internal/dynamic_array.c
line: 67
note: |
Implement `popto`
#define popto(dar_ptr_dst, index, count, dar_ptr_src)
do {
void *temp = malloc((size(dar_ptr_dst) / len(dar_ptr_dst)) * count);
if (!temp) break;
pop(dar_ptr_src, index, count, temp);
append(dar_ptr_dst, count, temp);
free(temp);
} while (0)
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 33
- file: internal/dynamic_array.c
line: 77
note: |
copy() => new(&darf2, len(darf1), raw(darf1));
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 34
- file: internal/dynamic_array.c
line: 79
note: |
slice() => creates a new DynamicArray_type from sub of array
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 35
- file: internal/dynamic_array.c
line: 81
note: |
findmax() => find the first n appereances of an item, where n<=max
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 36
- file: internal/dynamic_array.c
line: 83
note: |
#define at(dar_ptr, index, data_ptr) get(dar_ptr, index, 1, data_ptr)
#define pop(dar_ptr, data_ptr) pull(dar_ptr, len(dar_ptr) - 1, 1, data_ptr)
#define append(dar_ptr, data_ptr) push(data_ptr, len(dar_ptr) - 1, 1, data_ptr)
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 37
- file: internal/dynamic_array.c
line: 464
note: |
change behaviour: return false, instead of limiting,
just like in csll; also: correct the documentation
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 38
- file: internal/dynamic_array.c
line: 1295
note: |
map() should return the modified object
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 39
- file: internal/dynamic_array.c
line: 1363
note: |
'void*' could mean (and should mean) any item not just
pointers, therefore casting it to a pointer and then
dereferencing it won't work. the question is now:
is there any way to determine if the given item is a
pointer, and it is a pointer to NULL? otherwise the
following doesn't make any sense:
if (!*(char*)item)
*buffer = REPRESENTATION_OF_NULL_POINTERS;
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 40
- file: internal/generator.py
line: 50
note: |
make generic naming available to user
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 41
- file: internal/generator.py
line: 309
note: |
Reduce the levels of formatting from 3
to at most 2 with an elegant solution...
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 42
- file: internal/singly_linked_list.c
line: 30
note: |
consider to implement SinglyLinkedList.reserved_head and reserved_tail
members as SLLNode* which will hold the deleted nodes, and whenever a
new node has to be inserted, it will insert from reserved_head, and
replace its data -- super fast; less allocations (less fragmented
memory blocks); takes way more space. Also: resize() will add empty
nodes to reserved_tail (or removed from there) and size() will return
the total number of nodes (length + reserved_length)
- - -
Update1: after refactoring SLL, so now each node can be vary in size,
it is most likely that the previous problem is not a problem any more,
since, it is very unlikely that a node will match an "empty" one
later on
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 43
- file: internal/singly_linked_list.c
line: 805
note: |
pop() has only three extra statements compared to pull()
1) else if (!destination) ...
2) char *dest = (char *)destination;
3) memcpy(dest + (count - counter)*item_size, node_curr->data, item_size);
try to "merge" these two together -- with a macro?
also sub() has the same lines except no popping and freeing
(and their error message "names" differes of course)
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 44
- file: internal/singly_linked_list.c
line: 1134
note: |
this is considered to be a very dangerous function, because right now
the function can't check the current SLLNode's size. It's not a problem,
when the size is lesser than or equal to the new item, but it will lead
to SEGFAULT when it is greater. One solution can be to store the
item_size in each SLLNode, however, that is a very large extra memory
overhead. Also, if the content of the list is homogeneous, it is a very
redundant solution too. Another possible option is, to offer a
pre-defined SLLBoundedNode, which knows its own size, and which can be
added as the 'data' of a regular SLLNode. In that case only a very thin
wrapper will be needed, to get access to the original item data
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 45
- file: internal/singly_linked_list.py
line: 233
note: |
is there a way to make this inline?
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 46
- file: internal/singly_linked_list.py
line: 246
note: |
is there a way to make this inline?
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 47
- file: internal/singly_linked_list.py
line: 258
note: |
is there a way to make this inline?
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 48
- file: internal/static_hash_map.c
line: 53
note: |
Newest xxhash has XXH64 which is way faster than XXH32, but works only
on 64 bit systems. Update xxhash to latest. Create an architecture
dependent macro dispatcher between the hash functions
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 49
- file: internal/static_hash_map.c
line: 294
note: |
try to get a pointer from the SinglyLinkedList_void_ptr_append()
which is "empty" and has the size of 'item_size' and can be
casted to SHMItem => so adding a new item to the hashmap will
only require one malloc instead of two
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 50
- file: internal/types.py
line: 51
note: |
Finish OpenGL types, create formatting functions for them
(And actually design the whole extension system of cutils)
http://www.opengl.org/wiki/OpenGL_Type
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 51
- file: pycutils/cutils/ccom.py
line: 91
note: |
consider: can <space> be anything?
Like this example:
some line of code # tag: starts here
# another line goes here
# and the third here..
the code goes on...
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 52
- file: pycutils/cutils/ccom.py
line: 180
note: |
Make hidden files OS independent, probably using
https://docs.python.org/3.4/library/tempfile.html ?
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 53
- file: pycutils/cutils/ccom.py
line: 188
note: |
Add explicit-remove/browsing capabilities of the .*_cache files
(for example: if git reverted changes --> remove hash from cache file)
The best solution would be a complete CLI tool, to read and manage
and use the cutils command line tools
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 54
- file: pycutils/cutils/cdoc.py
line: 31
note: |
add 'since' to indicate which version the given feature is availbe from
like: since: version 3.14
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 55
- file: pycutils/cutils/cdoc.py
line: 557
note: |
support formatted TODO import
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 56
- file: pycutils/cutils/cdoc.py
line: 617
note: |
add `members` support in TYPE
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 57
- file: pycutils/cutils/cdoc.py
line: 701
note: |
Implement a Schema validator for better user-feedback
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 58
- file: pycutils/cutils/cdoc.py
line: 703
note: |
add FOOT key
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 59
- file: pycutils/cutils/cdoc.py
line: 705
note: |
add EXEC to cdoc to add "interactive" python snippets to code
EXEC: |
with open('VERSION') as file:
# Insert to USER:About
DOC[USER][0].insert(0, {'name': 'Version', 'info': file.read()})
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 60
- file: pycutils/cutils/cdoc.py
line: 828
note: |
do we really need a separate OrderedDict for pages ???
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 61
- file: pycutils/cutils/cdoc.py
line: 832
note: |
Create real dependency graphs
Document object:
parents = set() # other documents depending on this document
children = set() # other documents this document depending on
If document changed:
set all parents of document => changed
If any of its children changed:
set all parents of child => changed
-- The loop should check if a document's change flag has already
been set. If not, hash file, and set flag, and notify all
dependencies (parents)
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 62
- file: pycutils/cutils/cdoc.py
line: 903
note: |
add -reset flags which will remove the cache files
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 63
- file: pycutils/cutils/cenv.py
line: 38
note: |
Add makefile variable naming option:
-prefix=myapp => myapp_NAME, myapp_C_SOURCES, etc.
#----------------------------- 6 POSTS IN 3 FILES -----------------------------#
HACK:
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 1
- file: makefile
line: 122
note: |
cp -f internal/static_hash_map.h cshm.h
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 2
- file: etc/cutils_modern_api.c
line: 101
note: |
the re-casting of the pointers is a dirty but useful hack which is
needed to set the assignment-expression to a function call instead of
the function name itself. If re-casting is not added, the code will
also work, however the compiler will generate 2 warnings.
more info: http://stackoverflow.com/questions/24743520
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 3
- file: internal/generator.py
line: 82
note: |
Make this 'first_arg' type detection smarter...
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 4
- file: internal/generator.py
line: 229
note: |
even uglier, dirtier and filthier then the other hack below..
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 5
- file: internal/generator.py
line: 378
note: |
this is a dirty and filthy hack, just to make this
supported-method system work. fixit ASAP!
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 6
- file: internal/generator.py
line: 412
note: |
Because of the unordered nature of a dictionary, if
'SUPPORTED' will be processed first and 'SUPPORT_n'
(function.supported) later, then the output will never
be formatted properly. To solve this undeterministic bug,
'SUPPORTED' is formatted directly here. Solve this!!!
#----------------------------- 7 POSTS IN 5 FILES -----------------------------#
NOTE:
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 1
- file: csll.c
line: 1340
note: |
maybe rename const void *item --> const void *target ?
if it will be done, do the same in DynamicArray methods as well
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 2
- file: csll.c
line: 1487
note: |
If the list is modified directly or through another iterator, while
there is an iterator already created, it will lead to undefined
behaviour, as the 'next' pointer will most likely point to a deleted
node. An example:
SinglyLinkedList_type_iterator *i1 = iter(list);
SinglyLinkedList_type_iterator *i2 = iter(list);
next(i1);
pull(i1);
next(i2);
If possible, solve this. One option is to create a virtual-pointer
array inside the list object, and the nodes are going to point to the
entries of the this array, instead of directly pointing to each other.
However this is a working solution, this will make the linked-list
super heavy, probably unnecessarily heavy.
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 3
- file: doc/src/00_cutils.yaml
line: 32
note: |
Timing: 1) CCOL
2) update doc -> menu: fork me, etc.
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 4
- file: doc/src/05_ccom.yaml
line: 100
note: |
length of the char
array stored in string
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 5
- file: internal/singly_linked_list.c
line: 1350
note: |
maybe rename const void *item --> const void *target ?
if it will be done, do the same in DynamicArray methods as well
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 6
- file: internal/singly_linked_list.c
line: 1497
note: |
If the list is modified directly or through another iterator, while
there is an iterator already created, it will lead to undefined
behaviour, as the 'next' pointer will most likely point to a deleted
node. An example:
SinglyLinkedList_type_iterator *i1 = iter(list);
SinglyLinkedList_type_iterator *i2 = iter(list);
next(i1);
pull(i1);
next(i2);
If possible, solve this. One option is to create a virtual-pointer
array inside the list object, and the nodes are going to point to the
entries of the this array, instead of directly pointing to each other.
However this is a working solution, this will make the linked-list
super heavy, probably unnecessarily heavy.
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 7
- file: internal/xxhash.c
line: 141
note: |
although _rotl exists for minGW (GCC under windows), performance seems poor
#----------------------------- 5 POSTS IN 5 FILES -----------------------------#
ALERT:
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 1
- file: capi.h
line: 632
note: |
D O N ' T R E M O V E T H E N E X T C O M M E N T !!!
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 2
- file: cshm.h
line: 30
note: |
DON NOT ADD GUARD TO THIS FILE !!!
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 3
- file: internal/dynamic_array.h
line: 30
note: |
DON NOT ADD GUARD TO THIS FILE !!!
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 4
- file: internal/singly_linked_list.h
line: 30
note: |
DON NOT ADD GUARD TO THIS FILE !!!
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# 5
- file: internal/static_hash_map.h
line: 30
note: |
DON NOT ADD GUARD TO THIS FILE !!!