foundational_lib2 1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Articles/1.html +524 -0
- data/Articles/10.html +63 -0
- data/Articles/11.html +153 -0
- data/Articles/12.html +15 -0
- data/Articles/13.html +14 -0
- data/Articles/14.html +299 -0
- data/Articles/15.html +125 -0
- data/Articles/16.html +908 -0
- data/Articles/2.html +83 -0
- data/Articles/3.html +46 -0
- data/Articles/4.html +108 -0
- data/Articles/5.html +186 -0
- data/Articles/6.html +49 -0
- data/Articles/7.html +25 -0
- data/Articles/8.html +128 -0
- data/Articles/9.html +72 -0
- data/Articles/convert_html_to_markdown.sh +8 -0
- data/Articles/css.css +54 -0
- data/Articles/format.rb +95 -0
- data/Articles/index.html +34 -0
- data/Articles_MD/1.html.md +451 -0
- data/Articles_MD/10.html.md +57 -0
- data/Articles_MD/11.html.md +231 -0
- data/Articles_MD/12.html.md +16 -0
- data/Articles_MD/13.html.md +15 -0
- data/Articles_MD/14.html.md +280 -0
- data/Articles_MD/15.html.md +135 -0
- data/Articles_MD/16.html.md +840 -0
- data/Articles_MD/17.html.md +838 -0
- data/Articles_MD/2.html.md +82 -0
- data/Articles_MD/3.html.md +163 -0
- data/Articles_MD/4.html.md +137 -0
- data/Articles_MD/5.html.md +175 -0
- data/Articles_MD/6.html.md +47 -0
- data/Articles_MD/7.html.md +24 -0
- data/Articles_MD/8.html.md +71 -0
- data/Articles_MD/9.html.md +68 -0
- data/Articles_MD/index.html.md +25 -0
- data/DOCS.md +11153 -0
- data/GENERATE_CUSTOM_FOUNDATIONALLIB.rb +89 -0
- data/LICENSE.md +16 -0
- data/NOTE.md +29 -0
- data/README.md +120 -0
- data/custom_library_example.h +13999 -0
- data/docs/Doxyfile +2746 -0
- data/docs/LICENSE +21 -0
- data/docs/Makefile +39 -0
- data/docs/custom-alternative.css +54 -0
- data/docs/custom.css +57 -0
- data/docs/doxygen-awesome-darkmode-toggle.js +157 -0
- data/docs/doxygen-awesome-fragment-copy-button.js +85 -0
- data/docs/doxygen-awesome-interactive-toc.js +81 -0
- data/docs/doxygen-awesome-paragraph-link.js +51 -0
- data/docs/doxygen-awesome-sidebar-only-darkmode-toggle.css +40 -0
- data/docs/doxygen-awesome-sidebar-only.css +116 -0
- data/docs/doxygen-awesome-tabs.js +90 -0
- data/docs/doxygen-awesome.css +2669 -0
- data/docs/doxygen-custom/custom-alternative.css +54 -0
- data/docs/doxygen-custom/custom.css +57 -0
- data/docs/doxygen-custom/header.html +90 -0
- data/docs/doxygen-custom/toggle-alternative-theme.js +12 -0
- data/docs/header.html +90 -0
- data/docs/html/html/annotated.html +145 -0
- data/docs/html/html/annotated_dup.js +10 -0
- data/docs/html/html/bc_s.png +0 -0
- data/docs/html/html/bdwn.png +0 -0
- data/docs/html/html/classes.html +149 -0
- data/docs/html/html/closed.png +0 -0
- data/docs/html/html/custom-alternative.css +54 -0
- data/docs/html/html/custom.css +57 -0
- data/docs/html/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html +141 -0
- data/docs/html/html/dir_68267d1309a1af8e8297ef4c3efbcdba.js +4 -0
- data/docs/html/html/doc.png +0 -0
- data/docs/html/html/doxygen-awesome-darkmode-toggle.js +157 -0
- data/docs/html/html/doxygen-awesome-fragment-copy-button.js +85 -0
- data/docs/html/html/doxygen-awesome-interactive-toc.js +81 -0
- data/docs/html/html/doxygen-awesome-paragraph-link.js +51 -0
- data/docs/html/html/doxygen-awesome-sidebar-only-darkmode-toggle.css +40 -0
- data/docs/html/html/doxygen-awesome-sidebar-only.css +116 -0
- data/docs/html/html/doxygen-awesome-tabs.js +90 -0
- data/docs/html/html/doxygen-awesome.css +2669 -0
- data/docs/html/html/doxygen.css +1793 -0
- data/docs/html/html/doxygen.svg +26 -0
- data/docs/html/html/dynsections.js +121 -0
- data/docs/html/html/files.html +140 -0
- data/docs/html/html/files_dup.js +4 -0
- data/docs/html/html/folderclosed.png +0 -0
- data/docs/html/html/folderopen.png +0 -0
- data/docs/html/html/foundationallib_8h.html +17294 -0
- data/docs/html/html/foundationallib_8h.js +445 -0
- data/docs/html/html/foundationallib_8h__incl.map +15 -0
- data/docs/html/html/foundationallib_8h__incl.md5 +1 -0
- data/docs/html/html/foundationallib_8h__incl.svg +202 -0
- data/docs/html/html/foundationallib_8h_source.html +9125 -0
- data/docs/html/html/functions.html +188 -0
- data/docs/html/html/functions_vars.html +188 -0
- data/docs/html/html/globals.html +158 -0
- data/docs/html/html/globals_b.html +137 -0
- data/docs/html/html/globals_c.html +173 -0
- data/docs/html/html/globals_d.html +185 -0
- data/docs/html/html/globals_defs.html +361 -0
- data/docs/html/html/globals_dup.js +19 -0
- data/docs/html/html/globals_e.html +221 -0
- data/docs/html/html/globals_f.html +560 -0
- data/docs/html/html/globals_func.html +158 -0
- data/docs/html/html/globals_func.js +19 -0
- data/docs/html/html/globals_func_b.html +137 -0
- data/docs/html/html/globals_func_c.html +173 -0
- data/docs/html/html/globals_func_d.html +179 -0
- data/docs/html/html/globals_func_e.html +218 -0
- data/docs/html/html/globals_func_f.html +341 -0
- data/docs/html/html/globals_func_g.html +140 -0
- data/docs/html/html/globals_func_i.html +188 -0
- data/docs/html/html/globals_func_j.html +137 -0
- data/docs/html/html/globals_func_l.html +152 -0
- data/docs/html/html/globals_func_m.html +152 -0
- data/docs/html/html/globals_func_p.html +374 -0
- data/docs/html/html/globals_func_r.html +194 -0
- data/docs/html/html/globals_func_s.html +386 -0
- data/docs/html/html/globals_func_u.html +140 -0
- data/docs/html/html/globals_func_w.html +140 -0
- data/docs/html/html/globals_g.html +140 -0
- data/docs/html/html/globals_i.html +188 -0
- data/docs/html/html/globals_j.html +137 -0
- data/docs/html/html/globals_l.html +152 -0
- data/docs/html/html/globals_m.html +152 -0
- data/docs/html/html/globals_p.html +374 -0
- data/docs/html/html/globals_r.html +194 -0
- data/docs/html/html/globals_s.html +389 -0
- data/docs/html/html/globals_type.html +144 -0
- data/docs/html/html/globals_u.html +140 -0
- data/docs/html/html/globals_vars.html +135 -0
- data/docs/html/html/globals_w.html +140 -0
- data/docs/html/html/graph_legend.html +194 -0
- data/docs/html/html/graph_legend.md5 +1 -0
- data/docs/html/html/graph_legend.svg +117 -0
- data/docs/html/html/index.html +134 -0
- data/docs/html/html/jquery.js +35 -0
- data/docs/html/html/logo.drawio.svg +1 -0
- data/docs/html/html/menu.js +51 -0
- data/docs/html/html/menudata.js +75 -0
- data/docs/html/html/nav_f.png +0 -0
- data/docs/html/html/nav_g.png +0 -0
- data/docs/html/html/nav_h.png +0 -0
- data/docs/html/html/navtree.css +146 -0
- data/docs/html/html/navtree.js +546 -0
- data/docs/html/html/navtreedata.js +57 -0
- data/docs/html/html/navtreeindex0.js +253 -0
- data/docs/html/html/navtreeindex1.js +253 -0
- data/docs/html/html/navtreeindex2.js +18 -0
- data/docs/html/html/open.png +0 -0
- data/docs/html/html/resize.js +140 -0
- data/docs/html/html/search/all_0.html +37 -0
- data/docs/html/html/search/all_0.js +12 -0
- data/docs/html/html/search/all_1.html +37 -0
- data/docs/html/html/search/all_1.js +4 -0
- data/docs/html/html/search/all_10.html +37 -0
- data/docs/html/html/search/all_10.js +6 -0
- data/docs/html/html/search/all_11.html +37 -0
- data/docs/html/html/search/all_11.js +5 -0
- data/docs/html/html/search/all_12.html +37 -0
- data/docs/html/html/search/all_12.js +4 -0
- data/docs/html/html/search/all_13.html +37 -0
- data/docs/html/html/search/all_13.js +5 -0
- data/docs/html/html/search/all_2.html +37 -0
- data/docs/html/html/search/all_2.js +17 -0
- data/docs/html/html/search/all_3.html +37 -0
- data/docs/html/html/search/all_3.js +21 -0
- data/docs/html/html/search/all_4.html +37 -0
- data/docs/html/html/search/all_4.js +34 -0
- data/docs/html/html/search/all_5.html +37 -0
- data/docs/html/html/search/all_5.js +147 -0
- data/docs/html/html/search/all_6.html +37 -0
- data/docs/html/html/search/all_6.js +5 -0
- data/docs/html/html/search/all_7.html +37 -0
- data/docs/html/html/search/all_7.js +22 -0
- data/docs/html/html/search/all_8.html +37 -0
- data/docs/html/html/search/all_8.js +4 -0
- data/docs/html/html/search/all_9.html +37 -0
- data/docs/html/html/search/all_9.js +4 -0
- data/docs/html/html/search/all_a.html +37 -0
- data/docs/html/html/search/all_a.js +9 -0
- data/docs/html/html/search/all_b.html +37 -0
- data/docs/html/html/search/all_b.js +9 -0
- data/docs/html/html/search/all_c.html +37 -0
- data/docs/html/html/search/all_c.js +4 -0
- data/docs/html/html/search/all_d.html +37 -0
- data/docs/html/html/search/all_d.js +83 -0
- data/docs/html/html/search/all_e.html +37 -0
- data/docs/html/html/search/all_e.js +25 -0
- data/docs/html/html/search/all_f.html +37 -0
- data/docs/html/html/search/all_f.js +91 -0
- data/docs/html/html/search/classes_0.html +37 -0
- data/docs/html/html/search/classes_0.js +5 -0
- data/docs/html/html/search/classes_1.html +37 -0
- data/docs/html/html/search/classes_1.js +5 -0
- data/docs/html/html/search/classes_2.html +37 -0
- data/docs/html/html/search/classes_2.js +5 -0
- data/docs/html/html/search/classes_3.html +37 -0
- data/docs/html/html/search/classes_3.js +4 -0
- data/docs/html/html/search/close.svg +31 -0
- data/docs/html/html/search/defines_0.html +37 -0
- data/docs/html/html/search/defines_0.js +4 -0
- data/docs/html/html/search/defines_1.html +37 -0
- data/docs/html/html/search/defines_1.js +4 -0
- data/docs/html/html/search/defines_2.html +37 -0
- data/docs/html/html/search/defines_2.js +74 -0
- data/docs/html/html/search/files_0.html +37 -0
- data/docs/html/html/search/files_0.js +4 -0
- data/docs/html/html/search/functions_0.html +37 -0
- data/docs/html/html/search/functions_0.js +11 -0
- data/docs/html/html/search/functions_1.html +37 -0
- data/docs/html/html/search/functions_1.js +4 -0
- data/docs/html/html/search/functions_2.html +37 -0
- data/docs/html/html/search/functions_2.js +16 -0
- data/docs/html/html/search/functions_3.html +37 -0
- data/docs/html/html/search/functions_3.js +18 -0
- data/docs/html/html/search/functions_4.html +37 -0
- data/docs/html/html/search/functions_4.js +31 -0
- data/docs/html/html/search/functions_5.html +37 -0
- data/docs/html/html/search/functions_5.js +72 -0
- data/docs/html/html/search/functions_6.html +37 -0
- data/docs/html/html/search/functions_6.js +5 -0
- data/docs/html/html/search/functions_7.html +37 -0
- data/docs/html/html/search/functions_7.js +21 -0
- data/docs/html/html/search/functions_8.html +37 -0
- data/docs/html/html/search/functions_8.js +4 -0
- data/docs/html/html/search/functions_9.html +37 -0
- data/docs/html/html/search/functions_9.js +9 -0
- data/docs/html/html/search/functions_a.html +37 -0
- data/docs/html/html/search/functions_a.js +9 -0
- data/docs/html/html/search/functions_b.html +37 -0
- data/docs/html/html/search/functions_b.js +83 -0
- data/docs/html/html/search/functions_c.html +37 -0
- data/docs/html/html/search/functions_c.js +23 -0
- data/docs/html/html/search/functions_d.html +37 -0
- data/docs/html/html/search/functions_d.js +87 -0
- data/docs/html/html/search/functions_e.html +37 -0
- data/docs/html/html/search/functions_e.js +5 -0
- data/docs/html/html/search/functions_f.html +37 -0
- data/docs/html/html/search/functions_f.js +5 -0
- data/docs/html/html/search/mag_sel.svg +74 -0
- data/docs/html/html/search/nomatches.html +13 -0
- data/docs/html/html/search/search.css +257 -0
- data/docs/html/html/search/search.js +816 -0
- data/docs/html/html/search/search_l.png +0 -0
- data/docs/html/html/search/search_m.png +0 -0
- data/docs/html/html/search/search_r.png +0 -0
- data/docs/html/html/search/searchdata.js +33 -0
- data/docs/html/html/search/typedefs_0.html +37 -0
- data/docs/html/html/search/typedefs_0.js +4 -0
- data/docs/html/html/search/typedefs_1.html +37 -0
- data/docs/html/html/search/typedefs_1.js +5 -0
- data/docs/html/html/search/typedefs_2.html +37 -0
- data/docs/html/html/search/typedefs_2.js +4 -0
- data/docs/html/html/search/variables_0.html +37 -0
- data/docs/html/html/search/variables_0.js +4 -0
- data/docs/html/html/search/variables_1.html +37 -0
- data/docs/html/html/search/variables_1.js +4 -0
- data/docs/html/html/search/variables_2.html +37 -0
- data/docs/html/html/search/variables_2.js +5 -0
- data/docs/html/html/search/variables_3.html +37 -0
- data/docs/html/html/search/variables_3.js +5 -0
- data/docs/html/html/search/variables_4.html +37 -0
- data/docs/html/html/search/variables_4.js +4 -0
- data/docs/html/html/search/variables_5.html +37 -0
- data/docs/html/html/search/variables_5.js +4 -0
- data/docs/html/html/search/variables_6.html +37 -0
- data/docs/html/html/search/variables_6.js +4 -0
- data/docs/html/html/search/variables_7.html +37 -0
- data/docs/html/html/search/variables_7.js +5 -0
- data/docs/html/html/search/variables_8.html +37 -0
- data/docs/html/html/search/variables_8.js +5 -0
- data/docs/html/html/search/variables_9.html +37 -0
- data/docs/html/html/search/variables_9.js +5 -0
- data/docs/html/html/search/variables_a.html +37 -0
- data/docs/html/html/search/variables_a.js +4 -0
- data/docs/html/html/splitbar.png +0 -0
- data/docs/html/html/struct_dict.html +195 -0
- data/docs/html/html/struct_dict.js +6 -0
- data/docs/html/html/struct_dict_key_value.html +197 -0
- data/docs/html/html/struct_dict_key_value.js +6 -0
- data/docs/html/html/struct_frozen_dict.html +195 -0
- data/docs/html/html/struct_frozen_dict.js +6 -0
- data/docs/html/html/struct_frozen_set.html +195 -0
- data/docs/html/html/struct_frozen_set.js +6 -0
- data/docs/html/html/struct_set.html +195 -0
- data/docs/html/html/struct_set.js +6 -0
- data/docs/html/html/struct_set_key.html +179 -0
- data/docs/html/html/struct_set_key.js +5 -0
- data/docs/html/html/struct_thread_data.html +291 -0
- data/docs/html/html/struct_thread_data.js +12 -0
- data/docs/html/html/sync_off.png +0 -0
- data/docs/html/html/sync_on.png +0 -0
- data/docs/html/html/tab_a.png +0 -0
- data/docs/html/html/tab_b.png +0 -0
- data/docs/html/html/tab_h.png +0 -0
- data/docs/html/html/tab_s.png +0 -0
- data/docs/html/html/tabs.css +1 -0
- data/docs/html/html/toggle-alternative-theme.js +12 -0
- data/docs/img/screenshot.png +0 -0
- data/docs/img/testimage.png +0 -0
- data/docs/img/theme-variants-base.drawio.svg +117 -0
- data/docs/img/theme-variants-sidebar-only.drawio.svg +102 -0
- data/docs/logo.drawio.svg +1 -0
- data/docs/package.json +34 -0
- data/docs/src/foundationallib.h +13061 -0
- data/docs/toggle-alternative-theme.js +12 -0
- data/example_of_transpilation_comments.txt +167 -0
- data/foundationallib.gemspec +14 -0
- data/foundationallib.h +13999 -0
- data/platforms/README.md +17 -0
- data/platforms/header_and_separate_compilation_unit/Makefile +18 -0
- data/platforms/header_and_separate_compilation_unit/foundationallib_noninline.c +13014 -0
- data/platforms/header_and_separate_compilation_unit/foundationallib_noninline.h +316 -0
- data/platforms/header_and_separate_compilation_unit/foundationallib_noninline.o +0 -0
- data/platforms/header_and_separate_compilation_unit/non_inline_example +0 -0
- data/platforms/header_and_separate_compilation_unit/non_inline_example.c +11 -0
- data/platforms/header_and_separate_compilation_unit_all_safe_funcs/Makefile +18 -0
- data/platforms/header_and_separate_compilation_unit_all_safe_funcs/foundationallib_noninline.c +13014 -0
- data/platforms/header_and_separate_compilation_unit_all_safe_funcs/foundationallib_noninline.h +317 -0
- data/platforms/header_and_separate_compilation_unit_all_safe_funcs/foundationallib_noninline.o +0 -0
- data/platforms/header_and_separate_compilation_unit_all_safe_funcs/non_inline_example +0 -0
- data/platforms/header_and_separate_compilation_unit_all_safe_funcs/non_inline_example.c +11 -0
- data/platforms/header_and_separate_compilation_unit_all_safe_funcs/wont_compile.c +8 -0
- data/tests/decoupled_thorough_tests +0 -0
- data/tests/decoupled_thorough_tests.c +95 -0
- data/tests/decoupled_thorough_tests.exe +0 -0
- data/tests/decoupled_thorough_tests32 +0 -0
- data/tests/deps_for_testing +9 -0
- data/tests/deps_for_testing.sh +23 -0
- data/tests/destination_file.txt +1 -0
- data/tests/ex_ample.txt +1 -0
- data/tests/existing_file.txt +127 -0
- data/tests/lib_and_tests +0 -0
- data/tests/lib_and_tests.c +15920 -0
- data/tests/lib_and_tests.exe +0 -0
- data/tests/lib_and_tests32 +0 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_append_string_to_array.c +33 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_append_string_to_array_no_initial_alloc.c +51 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_array_total_string_length.c +25 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_arraydup.c +33 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_calculate_average_in_int_array.c +70 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_calculate_sum_in_int_array.c +47 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_common_prefix_length.c +23 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_common_suffix_length.c +23 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_concatenate_five_strings.c +32 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_concatenate_four_strings.c +39 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_concatenate_string_array.c +28 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_concatenate_strings.c +47 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_concatenate_three_strings.c +43 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_count_occurrences_of_substr.c +21 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_count_occurrences_of_substr_len.c +66 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_dict_add.c +49 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_dict_del_key.c +26 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_dict_del_keys.c +69 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_dict_del_values.c +69 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_dict_destructor.c +69 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_dict_get.c +69 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_dict_get_check.c +75 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_dict_hash.c +18 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_dict_iter.c +69 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_dict_new_instance.c +69 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_dict_reserve_more.c +21 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_dict_resize.c +8 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_dict_size.c +79 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_dict_to_array.c +26 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_dict_to_string.c +29 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_dup_format.c +58 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_ends_with.c +48 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_equal_array_of_char_ptrs.c +55 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_equal_array_of_chars.c +53 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_equal_array_of_double_ptrs.c +50 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_equal_array_of_doubles.c +35 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_equal_array_of_float_ptrs.c +36 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_equal_array_of_floats.c +45 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_equal_array_of_int_ptrs.c +51 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_equal_array_of_ints.c +55 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_equal_array_of_long_long_ptrs.c +27 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_equal_array_of_long_longs.c +53 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_equal_array_of_long_ptrs.c +66 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_equal_array_of_longs.c +47 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_equal_array_of_short_ptrs.c +36 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_equal_array_of_shorts.c +52 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_equal_array_of_size_t_ptrs.c +62 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_equal_array_of_size_ts.c +62 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_equal_array_of_uchar_ptrs.c +46 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_equal_array_of_uchars.c +60 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_equal_array_of_uint_ptrs.c +37 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_equal_array_of_uints.c +36 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_equal_array_of_ulong_long_ptrs.c +56 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_equal_array_of_ulong_longs.c +46 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_equal_array_of_ulong_ptrs.c +38 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_equal_array_of_ulongs.c +37 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_equal_array_of_ushort_ptrs.c +30 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_equal_array_of_ushorts.c +55 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_equal_strings.c +45 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_filter.c +59 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_filter_int.c +39 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_find_first_of.c +48 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_find_last_of.c +48 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_find_max_int_in_array.c +55 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_find_min_int_in_array.c +58 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_first_non_repeating_char.c +42 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_format_string.c +68 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_free_array.c +63 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_free_string_array.c +50 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_frozen_dict_del_keys.c +28 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_frozen_dict_del_values.c +64 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_frozen_dict_destructor.c +23 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_frozen_dict_get.c +27 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_frozen_dict_get_check.c +32 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_frozen_dict_new_instance.c +23 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_frozen_dict_size.c +33 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_frozen_dict_to_array.c +51 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_frozen_dict_to_string.c +48 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_frozen_set_del_keys.c +35 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_frozen_set_destructor.c +55 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_frozen_set_in.c +70 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_frozen_set_iter.c +71 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_frozen_set_new_instance.c +26 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_frozen_set_size.c +46 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_frozen_set_to_array.c +70 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_frozen_set_to_string.c +52 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_generate_range.c +62 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_index_of_char.c +77 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_int_to_string.c +54 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_is_alphanumeric.c +50 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_is_array_digit.c +67 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_is_array_lower.c +52 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_is_array_upper.c +28 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_is_numeric.c +36 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_is_string_alpha.c +43 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_is_string_digit.c +54 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_is_string_lower.c +50 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_is_string_space.c +48 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_is_string_upper.c +72 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_is_valid_integer.c +16 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_is_valid_utf8.c +46 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_join.c +53 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_last_index_of_char.c +15 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_list_comprehension.c +95 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_list_comprehension_multithreaded.c +41 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_longest_common_prefix.c +35 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_longest_common_suffix.c +61 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_map.c +46 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_map_int.c +59 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_prepend_string_to_array.c +68 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_prepend_string_to_array_no_initial_alloc.c +57 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_rand_number_from_range_inclusive_signed.c +41 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_rand_number_from_range_inclusive_unsigned.c +23 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_reduce.c +49 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_reduce_int.c +44 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_reject_array.c +47 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_replace_all.c +73 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_replace_all_with_callback.c +46 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_replace_all_with_lens.c +61 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_replicate.c +56 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_reverse_int_array.c +58 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_reverse_string.c +58 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_reverse_string_in_place.c +60 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_reverse_words.c +58 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_sample_strings.c +48 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_select_array.c +29 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_set_add.c +69 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_set_del_key.c +29 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_set_del_keys.c +35 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_set_destructor.c +31 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_set_hash.c +44 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_set_in.c +52 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_set_iter.c +69 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_set_new_instance.c +30 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_set_reserve_more.c +36 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_set_resize.c +37 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_set_size.c +42 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_set_to_array.c +41 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_set_to_string.c +81 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_shellescape.c +53 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_shuffle_strings_in_place.c +39 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_split.c +64 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_starts_with.c +39 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_str_to_double.c +32 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_string_array_uniq.c +60 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_string_array_uniq_adjacent.c +54 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_string_to_int.c +55 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_string_to_json.c +98 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_string_to_lowercase.c +73 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_string_to_title_case.c +80 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_string_to_uppercase.c +78 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_strip.c +84 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_trim_chars.c +85 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/testall.sh +15 -0
- data/tests/run_test_suite.sh +117 -0
- data/tests/source_file.txt +1 -0
- data/tests/test_log.txt +1047 -0
- data/tools/FUTURE +18 -0
- data/tools/HEADERS.h +316 -0
- data/tools/HEADERS_ONLY_FUNCTIONS.h +284 -0
- data/tools/HEADERS_WITH_PREFIX.h +33 -0
- data/tools/RSUB_LICENSE.txt +25 -0
- data/tools/benchmark_libc.c +263 -0
- data/tools/deprecated/GENERATE_CUSTOM_FOUNDATIONALLIB.sh.old +67 -0
- data/tools/deps_for_testing.sh +23 -0
- data/tools/documentation_generate +17 -0
- data/tools/foundationallib.h +13999 -0
- data/tools/funcs_c +15858 -0
- data/tools/funcs_c_with_tests.c +15920 -0
- data/tools/gen_video_new +444 -0
- data/tools/gen_video_new_times +41 -0
- data/tools/generate_promo_video_for_library.rb +19 -0
- data/tools/index.html +147 -0
- data/tools/lib.html +20 -0
- data/tools/lib2.html +22 -0
- data/tools/lib3.html +22 -0
- data/tools/lynx.rb +145 -0
- data/tools/make_image_of_docs +741 -0
- data/tools/pic.png +0 -0
- data/tools/pic2.png +0 -0
- data/tools/pic3.png +0 -0
- data/tools/play_with_string_replace_functions.c +236 -0
- data/tools/rsub +0 -0
- data/tools/rsub.c +501 -0
- data/tools/run_lib +365 -0
- data/tools/update +44 -0
- data/tools/with_tests +0 -0
- data/tools/with_tests32 +0 -0
- data/transpile_slow_scripting_into_c.rb +225 -0
- metadata +693 -0
data/tools/run_lib
ADDED
@@ -0,0 +1,365 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
$dangerous_c_functions_to_fail_to_compile_if_detected = [
|
3
|
+
"gets", "fgets",
|
4
|
+
"strcpy", "strcat",
|
5
|
+
"sprintf", "vsprintf",
|
6
|
+
"scanf", "fscanf",
|
7
|
+
"system",
|
8
|
+
"chown", "chmod", "chgrp",
|
9
|
+
"alloca",
|
10
|
+
"execl", "execle", "execlp", "execv", "execve", "execvp",
|
11
|
+
"bcopy", "bzero",
|
12
|
+
]
|
13
|
+
|
14
|
+
puts "Not using #{$dangerous_c_functions_to_fail_to_compile_if_detected.inspect}"
|
15
|
+
|
16
|
+
file_name = "funcs_c"
|
17
|
+
FILE_NAME = file_name
|
18
|
+
at_exit do
|
19
|
+
system "rm -f destination_file.txt ex_ample.txt existing_file.txt source_file.txt"
|
20
|
+
end
|
21
|
+
|
22
|
+
NETWORKING = false
|
23
|
+
|
24
|
+
if ARGV[0] == "short"
|
25
|
+
short = "short"
|
26
|
+
elsif ARGV[0] == "supershort"
|
27
|
+
short = "supershort"
|
28
|
+
else
|
29
|
+
short = ""
|
30
|
+
end
|
31
|
+
|
32
|
+
|
33
|
+
def format_file(file, suf = "")
|
34
|
+
#return
|
35
|
+
|
36
|
+
require "shellwords"
|
37
|
+
|
38
|
+
c = <<CMD
|
39
|
+
clang-format -i -style="{BasedOnStyle: LLVM, IndentWidth: 4, UseTab: Never, IndentCaseLabels: true, ColumnLimit: 500, BreakBeforeBraces: Allman}"
|
40
|
+
CMD
|
41
|
+
#"
|
42
|
+
c.strip!
|
43
|
+
file = file.shellescape
|
44
|
+
c << " " << file
|
45
|
+
c << suf
|
46
|
+
puts c
|
47
|
+
system c, exception: true
|
48
|
+
end
|
49
|
+
|
50
|
+
def fix(string)
|
51
|
+
string.gsub(/\n{3,}/, "\n\n").gsub(/\*\/\n+FOUN/m, "*/\nFOUN")
|
52
|
+
end
|
53
|
+
|
54
|
+
def write_file(a, b)
|
55
|
+
File.write(a, fix(b))
|
56
|
+
end
|
57
|
+
|
58
|
+
FORMAT = true
|
59
|
+
|
60
|
+
if FORMAT && short == ""
|
61
|
+
format_file file_name
|
62
|
+
end
|
63
|
+
|
64
|
+
|
65
|
+
VALGRIND = "valgrind --leak-check=full --show-leak-kinds=all --exit-on-first-error=yes --error-exitcode=1"
|
66
|
+
if FORMAT
|
67
|
+
system "which clang-format > /dev/null", exception: true
|
68
|
+
end
|
69
|
+
require "fileutils"
|
70
|
+
|
71
|
+
begin
|
72
|
+
FileUtils.cd "tools"
|
73
|
+
rescue StandardError
|
74
|
+
end
|
75
|
+
|
76
|
+
begin
|
77
|
+
FileUtils.mkdir_p "../platforms/header_and_separate_compilation_unit"
|
78
|
+
rescue StandardError
|
79
|
+
end
|
80
|
+
|
81
|
+
data = <<INTRO
|
82
|
+
/*
|
83
|
+
* 2023, Gregory Cohen <gregorycohennew@gmail.com>
|
84
|
+
*
|
85
|
+
*
|
86
|
+
* DONATION REQUEST: If this free software has helped you and you find
|
87
|
+
* it valuable, please consider making a donation to support the ongoing
|
88
|
+
* development and maintenance of this project. Your contribution helps
|
89
|
+
* ensure the availability of this library to the community and encourages
|
90
|
+
* further improvements.
|
91
|
+
*
|
92
|
+
*
|
93
|
+
* Donations can be made at:
|
94
|
+
* https://www.paypal.com/paypalme/cfoundationallib
|
95
|
+
*
|
96
|
+
*
|
97
|
+
*
|
98
|
+
* This code is in the public domain.
|
99
|
+
*
|
100
|
+
* You are free to use it for any commercial or noncommercial purpose.
|
101
|
+
*
|
102
|
+
*/
|
103
|
+
|
104
|
+
#ifndef _FOUNDATIONAL_LIB_HEADER_GUARD
|
105
|
+
#define _FOUNDATIONAL_LIB_HEADER_GUARD
|
106
|
+
|
107
|
+
#ifdef _WIN32
|
108
|
+
#define _CRT_RAND_S
|
109
|
+
#endif
|
110
|
+
|
111
|
+
#include <stdint.h> /* FOR SIZE_MAX */
|
112
|
+
#include <ctype.h>
|
113
|
+
#include <stdarg.h>
|
114
|
+
#include <stdio.h>
|
115
|
+
#include <stdlib.h>
|
116
|
+
#include <string.h>
|
117
|
+
#include <errno.h>
|
118
|
+
#include <assert.h>
|
119
|
+
|
120
|
+
/* Make sure memmem() is defined in all cases to avoid warnings or errors. */
|
121
|
+
void *memmem(const void *haystack, size_t haystacklen, const void *needle, size_t needlelen);
|
122
|
+
|
123
|
+
// structs (types)
|
124
|
+
struct Dict;
|
125
|
+
struct FrozenDict;
|
126
|
+
struct Set;
|
127
|
+
struct FrozenSet;
|
128
|
+
|
129
|
+
#ifndef FOUNDATIONAL_LIB_AGGRESSIVE_DIE_TYPE
|
130
|
+
/**
|
131
|
+
* @brief Type of the aggressive die variable.
|
132
|
+
*
|
133
|
+
* This macro defines the type of the aggressive die variable, which
|
134
|
+
* uses 1 byte of overhead by default. It can be configured as static
|
135
|
+
* or nonstatic based on user preference.
|
136
|
+
*/
|
137
|
+
#define FOUNDATIONAL_LIB_AGGRESSIVE_DIE_TYPE unsigned char
|
138
|
+
#endif
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
INTRO
|
143
|
+
|
144
|
+
# C++ is more strict, so catch more possible errors
|
145
|
+
write_file file_name, fix(File.read(file_name))
|
146
|
+
|
147
|
+
def get_headers(foundational_lib_func_replacement, hg = true)
|
148
|
+
require "set"
|
149
|
+
malloc_func = false
|
150
|
+
|
151
|
+
current_func = ""
|
152
|
+
|
153
|
+
malloc_funcs = Set.new
|
154
|
+
|
155
|
+
file = File.read("funcs_c").gsub("static", "")
|
156
|
+
|
157
|
+
$dangerous_c_functions_to_fail_to_compile_if_detected.map do |i|
|
158
|
+
"(" + i + "\\([^\\n]+?\\)" + ")"
|
159
|
+
end.each do |q|
|
160
|
+
if match = file.match(/#{q}/mi)
|
161
|
+
raise match.to_s
|
162
|
+
end
|
163
|
+
end
|
164
|
+
|
165
|
+
if match = file.match(/^(size_t|void)/)
|
166
|
+
raise match.to_s
|
167
|
+
end
|
168
|
+
if match = file.match(/=\s*(malloc|realloc|calloc)\(/)
|
169
|
+
raise match.to_s
|
170
|
+
end
|
171
|
+
if match = file.match(/^\s*free\(/)
|
172
|
+
raise match.to_s
|
173
|
+
end
|
174
|
+
|
175
|
+
line_num = 0
|
176
|
+
match = file.gsub("char *", "").gsub("\n") do |i|
|
177
|
+
"\n#{line_num += 1}."
|
178
|
+
end.split("\n").grep(/ALLOC|CPY/).map do |i|
|
179
|
+
i.split("//")[0]
|
180
|
+
end.grep(/ [\*\-\+\/] /)
|
181
|
+
match -= match.grep(/FOUNDATIONAL_LIB_FUNC|#define|^.*\*\/\s*$|^\s*\d+\.\s*\* /)
|
182
|
+
|
183
|
+
match -= match.grep(/Safe/)
|
184
|
+
|
185
|
+
if match.size > 0
|
186
|
+
# If unsable allocation, fail to compile.
|
187
|
+
match.join("\n").gsub("()", "(char *)").split("\n").each_with_index do |i, index|
|
188
|
+
puts i
|
189
|
+
cmd = "micro +%s:80 %s" % [i.split(".", 2).first.to_i + 1, FILE_NAME]
|
190
|
+
puts cmd
|
191
|
+
system cmd
|
192
|
+
exit
|
193
|
+
puts "#{index} | #{i}"
|
194
|
+
end
|
195
|
+
|
196
|
+
exit if ARGV.first == "e"
|
197
|
+
end
|
198
|
+
|
199
|
+
file.split("\n").each_with_index do |line, index|
|
200
|
+
index += 1
|
201
|
+
if match = (line.match /(?:static inline|FOUNDATIONAL_LIB_FUNC) ([_0-9a-zA-Z\* ]+) ([\*_a-zA-Z0-9]+)\(.+/)
|
202
|
+
if match[2].match /test/
|
203
|
+
else
|
204
|
+
current_func = match[0].gsub("FOUNDATIONAL_LIB_FUNC", foundational_lib_func_replacement).split("{", 2)[0].strip
|
205
|
+
end
|
206
|
+
next
|
207
|
+
elsif line.match /FOUNDATIONAL_LIB_FUNC/
|
208
|
+
unless line.match /#ifndef|#define/
|
209
|
+
raise [index, line].inspect
|
210
|
+
end
|
211
|
+
end
|
212
|
+
if !malloc_func || ((line.match /FOUNDATIONAL_LIB_MEMORY_ALLOCATOR_/) && !line.match(/FOUNDATIONAL_LIB_MEMORY_ALLOCATOR_FREE|#ifndef|#ifdef|#define/))
|
213
|
+
# puts "%s" % [current_func, line.strip.clear]
|
214
|
+
unless current_func.strip == ""
|
215
|
+
malloc_funcs.add current_func + ";"
|
216
|
+
end
|
217
|
+
end
|
218
|
+
end
|
219
|
+
funcs = malloc_funcs.to_a.sort
|
220
|
+
|
221
|
+
# Remove internal functions like lib compare ushorts etc.
|
222
|
+
funcs -= funcs.grep(/FOUNDATIONAL/)
|
223
|
+
|
224
|
+
# raise(match.to_s) if match = funcs.grep(/FOUNDATIONAL/)
|
225
|
+
|
226
|
+
hg = ""
|
227
|
+
hge = ""
|
228
|
+
if hg
|
229
|
+
hg = "#ifndef _FOUNDATIONAL_LIB_HEADER_GUARD
|
230
|
+
#define _FOUNDATIONAL_LIB_HEADER_GUARD
|
231
|
+
"
|
232
|
+
|
233
|
+
hge = "#endif"
|
234
|
+
end
|
235
|
+
|
236
|
+
"
|
237
|
+
#{hg}
|
238
|
+
#include <ctype.h>
|
239
|
+
#include <stdarg.h>
|
240
|
+
#include <stdio.h>
|
241
|
+
#ifdef _WIN32
|
242
|
+
#define _CRT_RAND_S
|
243
|
+
#endif
|
244
|
+
#include <stdlib.h>
|
245
|
+
|
246
|
+
|
247
|
+
#include <string.h>
|
248
|
+
|
249
|
+
|
250
|
+
#include <errno.h>
|
251
|
+
|
252
|
+
|
253
|
+
#ifndef FOUNDATIONAL_LIB_AGGRESSIVE_DIE_TYPE
|
254
|
+
/**
|
255
|
+
* @brief Type of the aggressive die variable.
|
256
|
+
*
|
257
|
+
* This macro defines the type of the aggressive die variable, which
|
258
|
+
* uses 1 byte of overhead by default. It can be configured as static
|
259
|
+
* or nonstatic based on user preference.
|
260
|
+
*/
|
261
|
+
#define FOUNDATIONAL_LIB_AGGRESSIVE_DIE_TYPE static unsigned char
|
262
|
+
#endif
|
263
|
+
|
264
|
+
struct Dict;
|
265
|
+
struct FrozenDict;
|
266
|
+
struct Set;
|
267
|
+
struct FrozenSet;
|
268
|
+
" << ($funcs = funcs.join("\n")) << "\n" << hge
|
269
|
+
end
|
270
|
+
|
271
|
+
# If even a single function is not documented, fail.
|
272
|
+
nondocs = []
|
273
|
+
|
274
|
+
File.read(file_name).gsub(/FOUNDATIONAL_LIB_([A-Z]+)\s*\nFOUNDATIONAL_LIB_FUNC [a-z]+ test[a-zA-Z0-9_]+/m) do |i|
|
275
|
+
raise i
|
276
|
+
end
|
277
|
+
|
278
|
+
File.read(file_name).gsub(/\}\s+(?:FOUNDATIONAL_LIB_[A-Z]+\s+)*(static inline|FOUNDATIONAL_LIB_FUNC)([^\n]+)/m) do |i|
|
279
|
+
nondocs << i
|
280
|
+
nil
|
281
|
+
end
|
282
|
+
|
283
|
+
nondocs -= nondocs.grep(/test/)
|
284
|
+
unless nondocs.size == 0
|
285
|
+
puts nondocs
|
286
|
+
raise "lacking docs"
|
287
|
+
end
|
288
|
+
|
289
|
+
main = nil
|
290
|
+
|
291
|
+
data2 = data + (File.read(file_name).gsub(/(int main|((FOUNDATIONAL_LIB_FUNC|static inline) (int|void|char) \**test.*?))\s*\(.*?\)\s*.*?\n\}/m) do |i|
|
292
|
+
if i.match /int main/
|
293
|
+
main = i
|
294
|
+
end
|
295
|
+
|
296
|
+
if i.match /#define/
|
297
|
+
raise i.to_s
|
298
|
+
end
|
299
|
+
""
|
300
|
+
end)
|
301
|
+
raise if main.nil?
|
302
|
+
DELIM = "Philosophy of this is in"
|
303
|
+
data2 = data2.split(DELIM, 2)
|
304
|
+
|
305
|
+
data2[1].gsub!(/^.*[tT]est.*$/, "")
|
306
|
+
|
307
|
+
raise if data2[0].size < 100
|
308
|
+
|
309
|
+
#puts data2[0]
|
310
|
+
data2 = data2.join(DELIM)
|
311
|
+
|
312
|
+
data2 = data2.gsub("#include <assert.h>\n", "") + "\n#endif"
|
313
|
+
|
314
|
+
puts nondocs.sort
|
315
|
+
write_file "HEADERS.h", get_headers("")
|
316
|
+
write_file "HEADERS_ONLY_FUNCTIONS.h", $funcs + "\n"
|
317
|
+
write_file "HEADERS_WITH_PREFIX.h", get_headers("FOUNDATIONAL_LIB_FUNC")
|
318
|
+
write_file "foundationallib.h", data2
|
319
|
+
write_file "../foundationallib.h", data2
|
320
|
+
|
321
|
+
# If the person wants a module to link with,
|
322
|
+
# then we change the per compilation unit aggressive die variable
|
323
|
+
# (used to control error handling at runtime, it usually takes 1 byte
|
324
|
+
# per compilation unit), and make it global
|
325
|
+
# for the whole program - 1 byte of overhead to control error
|
326
|
+
# handling (actually, this can save on code,
|
327
|
+
# if aggressive die is set to true (1) )
|
328
|
+
#
|
329
|
+
# The variable will be defined in this file only, and not the header then.
|
330
|
+
|
331
|
+
regex = /(FOUNDATIONAL_LIB_PURE|FOUNDATIONAL_LIB_NOTHROW|FOUNDATIONAL_LIB_MALLOC|FOUNDATIONAL_LIB_WARN_UNUSED_RESULT|FOUNDATIONAL_LIB_NONNULL|FOUNDATIONAL_LIB_PRINTF_FUNC)\n/m
|
332
|
+
write_file("../platforms/header_and_separate_compilation_unit/foundationallib_noninline.c",
|
333
|
+
("#include \"./foundationallib_noninline.h\"\n" + "#define FOUNDATIONAL_LIB_UNSAFE_FUNCTIONS_ENABLED 0\n\n" + data2.gsub(regex, " \\1 ").gsub(/static inline/, " ").gsub(/inline/, " ").gsub("#ifndef _FOUNDATIONAL_LIB_HEADER_GUARD\n#define _FOUNDATIONAL_LIB_HEADER_GUARD", "#if 1")))
|
334
|
+
|
335
|
+
write_file "../platforms/header_and_separate_compilation_unit/foundationallib_noninline.h", get_headers("")
|
336
|
+
format_file("../platforms/header_and_separate_compilation_unit/foundationallib_noninline.c", "&")
|
337
|
+
|
338
|
+
write_file("../platforms/header_and_separate_compilation_unit_all_safe_funcs/foundationallib_noninline.c",
|
339
|
+
("#include \"./foundationallib_noninline.h\"\n" + "#define FOUNDATIONAL_LIB_UNSAFE_FUNCTIONS_ENABLED 0\n\n" + data2.gsub(regex, " \\1 ").gsub(/static inline/, " ").gsub(/inline/, " ").gsub("#ifndef _FOUNDATIONAL_LIB_HEADER_GUARD\n#define _FOUNDATIONAL_LIB_HEADER_GUARD", "#if 1")))
|
340
|
+
|
341
|
+
format_file("../platforms/header_and_separate_compilation_unit_all_safe_funcs/foundationallib_noninline.c", "&")
|
342
|
+
write_file "../platforms/header_and_separate_compilation_unit_all_safe_funcs/foundationallib_noninline.h", "#define FOUNDATIONAL_LIB_UNSAFE_FUNCTIONS_ENABLED 0\n\n" + get_headers("")
|
343
|
+
|
344
|
+
omit_list =/FOUNDATIONAL_LIB_PURE|FOUNDATIONAL_LIB_NOTHROW|FOUNDATIONAL_LIB_MALLOC|FOUNDATIONAL_LIB_WARN_UNUSED_RESULT|FOUNDATIONAL_LIB_NONNULL|FOUNDATIONAL_LIB_PRINTF_FUNC/m
|
345
|
+
write_file "../docs/src/foundationallib.h", data2.gsub(omit_list, "")
|
346
|
+
write_file wtests = file_name.sub(/_c.c$/, "") + "_with_tests.c", wtests_data = data.sub("struct FrozenSet;\n", "struct FrozenSet;\n\n#define test_foundationallib_test_error_handler(msg) perror(msg); exit(1);\n\n") + File.read(file_name) + "\n#endif"
|
347
|
+
write_file "../tests/lib_and_tests.c", wtests_data
|
348
|
+
puts "Copied."
|
349
|
+
if ARGV[0] == "norun"
|
350
|
+
puts "No run"
|
351
|
+
else
|
352
|
+
if NETWORKING
|
353
|
+
curl_flag = "-lcurl"
|
354
|
+
else
|
355
|
+
curl_flag = ""
|
356
|
+
end
|
357
|
+
|
358
|
+
# C++ is more strict, so catch more possible errors
|
359
|
+
cmd = "set -x; set -e;
|
360
|
+
gcc -DFOUNDATIONAL_LIB_LIBC_LOCKING_IO_OPERATIONS=0 -DFOUNDATIONAL_LIB_ASSERT_ARGUMENT_CHECKING=0 -O2 -pedantic -xc -m32 -g #{wtests} -o with_tests32 -Wall -Wextra -Werror -Wfatal-errors #{curl_flag} &&\\
|
361
|
+
g++ -DFOUNDATIONAL_LIB_ASSERT_ARGUMENT_CHECKING=1 -pedantic -xc++ -g #{wtests} -o with_tests -Wall -Wextra -Werror -Wfatal-errors #{curl_flag} &&\\
|
362
|
+
./with_tests #{short} && #{VALGRIND} ./with_tests #{short}"
|
363
|
+
puts cmd
|
364
|
+
system cmd, exception: true
|
365
|
+
end
|
data/tools/update
ADDED
@@ -0,0 +1,44 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
set -x
|
3
|
+
set -e
|
4
|
+
|
5
|
+
cd ../tools/..
|
6
|
+
for file in `find -name '*.c'`
|
7
|
+
do
|
8
|
+
clang-format -style="{BasedOnStyle: LLVM, IndentWidth: 4, UseTab: Never, IndentCaseLabels: true, ColumnLimit: 500, BreakBeforeBraces: Allman}" -i "$file"
|
9
|
+
done
|
10
|
+
|
11
|
+
cd ./tools
|
12
|
+
|
13
|
+
if test "$1" = "fast"; then
|
14
|
+
cond=true
|
15
|
+
echo Fast
|
16
|
+
else
|
17
|
+
echo Checking
|
18
|
+
./run_lib 2>&1 | grep -q 'ERROR SUMMARY: 0 errors from 0 contexts'
|
19
|
+
fi
|
20
|
+
|
21
|
+
if [ $? -eq 0 ]; then
|
22
|
+
./documentation_generate
|
23
|
+
./make_image_of_docs
|
24
|
+
cd ../tests
|
25
|
+
./run_test_suite.sh
|
26
|
+
cd ../tools
|
27
|
+
ruby lynx.rb
|
28
|
+
cd ..
|
29
|
+
./GENERATE_CUSTOM_FOUNDATIONALLIB.rb foundationallib.h MY_COMPANY_ custom_library_example.h
|
30
|
+
|
31
|
+
cd platforms/header_and_separate_compilation_unit
|
32
|
+
|
33
|
+
make clean || true
|
34
|
+
make
|
35
|
+
|
36
|
+
./non_inline_example
|
37
|
+
|
38
|
+
exit 0
|
39
|
+
else
|
40
|
+
echo Failed to run
|
41
|
+
exit 1
|
42
|
+
fi
|
43
|
+
|
44
|
+
exit 1
|
data/tools/with_tests
ADDED
Binary file
|
data/tools/with_tests32
ADDED
Binary file
|
@@ -0,0 +1,225 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
#
|
3
|
+
#
|
4
|
+
#
|
5
|
+
# transpile_slow_scripting_into_c.rb
|
6
|
+
# Usage: transpile_slow_into_c.rb <file-to-transpile> <out-file [/dev/stdout] by default>
|
7
|
+
|
8
|
+
# The output then has helpful comments to allow you to easily transpile the scripting language into fast C, either with ChatGPT or manually.
|
9
|
+
# This is an invaluable resource to help you speed up code - in general.
|
10
|
+
# And the C functions in this library are very very fast and tested.
|
11
|
+
#
|
12
|
+
# I would appreciate someone making this script longer and better to acommodate for more languages.
|
13
|
+
# That would be a great contribution. Please email me <gregorycohennew@gmail.com>.
|
14
|
+
#
|
15
|
+
#
|
16
|
+
# It would be great if this took an OpenAI API key and then used GPT4 to transpile.
|
17
|
+
# Could do a hell of a good and safe job - because these functions are really obvious how they work and have exceptional error handling.
|
18
|
+
#
|
19
|
+
|
20
|
+
def green(str = "", file = STDOUT)
|
21
|
+
if file.tty?
|
22
|
+
green = "\033[0;32m"
|
23
|
+
nc = "\033[0m" # No Color
|
24
|
+
file.puts green << str << nc << "\n"
|
25
|
+
else
|
26
|
+
file.puts str
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
if ARGV.size != 1 && ARGV.size != 2
|
31
|
+
GREEN = '\033[0;32m'
|
32
|
+
NC = '\033[0m' # No Color
|
33
|
+
green "transpile_slow_into_c.rb"
|
34
|
+
green
|
35
|
+
green "Usage: transpile_slow_into_c.rb <file-to-transpile> <out-file [/dev/stdout] by default>"
|
36
|
+
green
|
37
|
+
green
|
38
|
+
green "The output then has helpful comments to allow you to easily transpile the scripting language into fast C, either with ChatGPT or manually."
|
39
|
+
green "This is an invaluable resource to help you speed up code - in general."
|
40
|
+
|
41
|
+
green "And the C functions in this library are very very fast and tested."
|
42
|
+
|
43
|
+
green
|
44
|
+
|
45
|
+
green "I would appreciate someone making this script longer and better to acommodate for more languages."
|
46
|
+
|
47
|
+
green "That would be a great contribution. Please email me <gregorycohennew@gmail.com>."
|
48
|
+
green
|
49
|
+
green "It would be great if this took an OpenAI API key and then used GPT4 to transpile."
|
50
|
+
green "Could do a hell of a good and safe job - because these functions are really obvious how they work and have exceptional error handling."
|
51
|
+
|
52
|
+
exit 1
|
53
|
+
end
|
54
|
+
outfile = ARGV[1] || "/dev/stdout"
|
55
|
+
green("Writing to #{outfile}", file = STDERR)
|
56
|
+
|
57
|
+
H = File.read(`find -name HEADERS_ONLY_FUNCTIONS.h`.chomp("\n"))
|
58
|
+
H_LINES = H.split("\n")
|
59
|
+
$out = String.new
|
60
|
+
|
61
|
+
def puts(str = "")
|
62
|
+
$out << str << "\n"
|
63
|
+
end
|
64
|
+
|
65
|
+
$comments = 0
|
66
|
+
in_ = File.read(ARGV.first)
|
67
|
+
|
68
|
+
def tr(*a)
|
69
|
+
$comments += 1
|
70
|
+
first = a.shift.split(/\s+OR\s+/i)
|
71
|
+
rest = a.flatten
|
72
|
+
if rest.size > 1
|
73
|
+
q = "# "
|
74
|
+
q2 = q + " "
|
75
|
+
newline = "\n"
|
76
|
+
else
|
77
|
+
q = ""
|
78
|
+
q2 = ""
|
79
|
+
newline = " "
|
80
|
+
end
|
81
|
+
|
82
|
+
num = 0
|
83
|
+
|
84
|
+
first = first.map do |i|
|
85
|
+
res = String.new
|
86
|
+
if first.size > 1
|
87
|
+
#num += 1
|
88
|
+
#res << num.to_s << ". "
|
89
|
+
end
|
90
|
+
res + i + "()"
|
91
|
+
end.join(" or ")
|
92
|
+
|
93
|
+
num = 0
|
94
|
+
|
95
|
+
rest = rest.map do |i|
|
96
|
+
if i.class == Array
|
97
|
+
raise rest.to_s
|
98
|
+
end
|
99
|
+
res = String.new
|
100
|
+
if rest.size > 1
|
101
|
+
num += 1
|
102
|
+
res << num.to_s << ". "
|
103
|
+
end
|
104
|
+
res << i.chomp(";")
|
105
|
+
|
106
|
+
if rest.size > 1
|
107
|
+
res << "\n"
|
108
|
+
else
|
109
|
+
res << " "
|
110
|
+
end
|
111
|
+
|
112
|
+
res << q
|
113
|
+
end.join(" or ")
|
114
|
+
|
115
|
+
" # Transpile #{first} with | #{newline}" << q2 << (rest) << " as appropriate."
|
116
|
+
end
|
117
|
+
|
118
|
+
line_n = 0
|
119
|
+
in_.each_line do |line|
|
120
|
+
line_n += 1
|
121
|
+
if line_n == 2
|
122
|
+
require "shellwords"
|
123
|
+
puts "# Generated from #{File.basename __FILE__}"
|
124
|
+
nlines = "#\n" + `echo #{"Allows for easy transpilation from slow languages that hinder people's lives in many ways (scriping languages) into machine-efficient code that actually runs the same operations without wasting CPU power, electricity, money, time, user's (programmer's) programmatic interactivity (ability to quickly run and recompile near-instantly) or people's attention, and is somewhat ideal.".shellescape} | fmt -w 78`
|
125
|
+
nlines << "\n" << `echo #{"You can easily (manually, or with AI) transpile this code now into code that actually runs fast - and actually compiles quickly (C++, Crystal and Rust can't do this and are awful at it, especially the latter two - Zig maybe is good); is safe; has good error handling; and performs the intended operations, with ease.".shellescape} | fmt -w 78`
|
126
|
+
nlines.gsub! "\n", "\n# "
|
127
|
+
|
128
|
+
puts nlines
|
129
|
+
nlines = nil
|
130
|
+
end
|
131
|
+
|
132
|
+
newline = line.chomp("\n")
|
133
|
+
if newline.strip == ""
|
134
|
+
puts
|
135
|
+
next
|
136
|
+
end
|
137
|
+
|
138
|
+
if (newline.include? "length") || (newline.include? "size")
|
139
|
+
newline << tr("length or size", (["strlen()"] + H_LINES.grep(/_size\(/)))
|
140
|
+
end
|
141
|
+
|
142
|
+
if newline.include? "replace"
|
143
|
+
newline << tr("replace", H_LINES.grep(/replace_all\(/))
|
144
|
+
end
|
145
|
+
if newline.include? "uniq"
|
146
|
+
newline << tr("uniq", H_LINES.grep(/uniq\(/))
|
147
|
+
end
|
148
|
+
|
149
|
+
# PHP
|
150
|
+
if newline.include? "file_get_contents"
|
151
|
+
newline << tr("file_get_contents", H_LINES.grep(/read_file_into_array\(/))
|
152
|
+
end
|
153
|
+
|
154
|
+
# Python, Ruby
|
155
|
+
if newline.include? "readlines"
|
156
|
+
newline << tr("readlines", H_LINES.grep(/read_file_into_array\(/))
|
157
|
+
end
|
158
|
+
|
159
|
+
# Ruby
|
160
|
+
if newline.include? "File.read"
|
161
|
+
newline << tr("File.read", H_LINES.grep(/read_file_into_string\(/))
|
162
|
+
end
|
163
|
+
|
164
|
+
if newline.include? "sort"
|
165
|
+
newline << tr("sort", H_LINES.grep(/sort(?:ed)?_long_longs\(/)).chomp("\n").chomp(".") + " or similar functions depending on the type name"
|
166
|
+
end
|
167
|
+
if newline.include? "gsub!"
|
168
|
+
newline << tr("gsub!", H_LINES.grep(/replace_all.*\(/))
|
169
|
+
elsif newline.include? "gsub"
|
170
|
+
newline << tr("gsub", H_LINES.grep(/replace_all.*\(/))
|
171
|
+
end
|
172
|
+
|
173
|
+
if newline.include? "delete"
|
174
|
+
newline << tr("delete", H_LINES.grep(/del_key\(/))
|
175
|
+
end
|
176
|
+
|
177
|
+
if newline.include? "split"
|
178
|
+
newline << tr("split", H_LINES.grep(/split\(/))
|
179
|
+
end
|
180
|
+
|
181
|
+
if newline.include? "join"
|
182
|
+
newline << tr("join", H_LINES.grep(/join\(/))
|
183
|
+
end
|
184
|
+
|
185
|
+
if newline.include? "strip"
|
186
|
+
newline << tr("strip", H_LINES.grep(/strip\(/))
|
187
|
+
end
|
188
|
+
if newline.include? "map"
|
189
|
+
fs = H_LINES.grep(/filesystem.*\(/)
|
190
|
+
newline << tr("map", H_LINES.grep(/map.*\(/) - fs)
|
191
|
+
end
|
192
|
+
|
193
|
+
if newline.include? "start_with?"
|
194
|
+
newline << tr("start_with?", H_LINES.grep(/starts_with.*\(/))
|
195
|
+
end
|
196
|
+
if newline.include? "start_with"
|
197
|
+
newline << tr("start_with", H_LINES.grep(/starts_with.*\(/))
|
198
|
+
end
|
199
|
+
|
200
|
+
if newline.include? "end_with?"
|
201
|
+
newline << tr("end_with?", H_LINES.grep(/ends_with.*\(/))
|
202
|
+
end
|
203
|
+
|
204
|
+
if newline.include? "end_with"
|
205
|
+
newline << tr("end_with", H_LINES.grep(/ends_with.*\(/))
|
206
|
+
end
|
207
|
+
if newline.include? "starts_with"
|
208
|
+
newline << tr("starts_with", H_LINES.grep(/starts_with.*\(/))
|
209
|
+
end
|
210
|
+
if newline.include? "ends_with"
|
211
|
+
newline << tr("ends_with", H_LINES.grep(/ends_with.*\(/))
|
212
|
+
end
|
213
|
+
|
214
|
+
if newline.include? "count"
|
215
|
+
newline << tr("count", H_LINES.grep(/count.*\(/))
|
216
|
+
end
|
217
|
+
|
218
|
+
puts newline
|
219
|
+
end
|
220
|
+
|
221
|
+
File.open(outfile, "w") do |file|
|
222
|
+
file.puts $out
|
223
|
+
end
|
224
|
+
|
225
|
+
green("Wrote #{$comments} transpilation comments.", file = STDERR)
|