├── .github └── pull_request_template.md ├── .gitignore ├── LICENSE ├── README.md ├── docs ├── amalgamate.md ├── implementation.md └── platforms.md ├── experimental └── ghost │ ├── crypto │ ├── README.md │ ├── ghost_bzero_explicit.h │ ├── ghost_memset_explicit.h │ ├── ghost_sysrandom.h │ └── map_conceal │ │ ├── ghost_map_conceal.h │ │ └── ghost_unmap_conceal.h │ └── system │ └── ghost_syscall.h ├── include └── ghost │ ├── algorithm │ ├── README.md │ ├── fnv1a │ │ ├── ghost_fnv1a_cstr_u32.h │ │ ├── ghost_fnv1a_cstr_u64.h │ │ ├── ghost_fnv1a_cstr_z.h │ │ ├── ghost_fnv1a_u32.h │ │ ├── ghost_fnv1a_u64.h │ │ └── ghost_fnv1a_z.h │ ├── knuth_hash │ │ ├── ghost_knuth_hash_u16.h │ │ ├── ghost_knuth_hash_u32.h │ │ ├── ghost_knuth_hash_u64.h │ │ └── ghost_knuth_hash_z.h │ └── qsort │ │ ├── README.md │ │ ├── ghost_bsd_qsort_r.h │ │ ├── ghost_c11_qsort_s.h │ │ ├── ghost_gnu_qsort_r.h │ │ ├── ghost_qsort.h │ │ └── ghost_win_qsort_s.h │ ├── core │ ├── ghost_config.h │ ├── ghost_has.h │ └── ghost_version.h │ ├── debug │ ├── README.md │ ├── ghost_abort.h │ ├── ghost_assert.h │ ├── ghost_assert_fail.h │ ├── ghost_backtrace.h │ ├── ghost_check.h │ ├── ghost_debug.h │ ├── ghost_debugbreak.h │ ├── ghost_ensure.h │ ├── ghost_fatal.h │ ├── ghost_pretty_function.h │ ├── ghost_pretty_function_opt.h │ ├── ghost_static_assert.h │ └── ghost_static_assert_expr.h │ ├── detect │ ├── README.md │ ├── ghost_cproc.h │ ├── ghost_gcc.h │ ├── ghost_glibc.h │ ├── ghost_libc.h │ ├── ghost_musl.h │ ├── ghost_musl_version.h │ ├── ghost_unix.h │ ├── ghost_x86_32.h │ └── ghost_x86_64.h │ ├── error │ ├── README.md │ ├── ghost_errno.h │ ├── ghost_errno_is.h │ ├── ghost_errno_load.h │ ├── ghost_errno_store.h │ ├── ghost_errno_t.h │ ├── ghost_perror.h │ ├── ghost_rsize_t.h │ ├── ghost_strerror.h │ ├── ghost_strerror_r.h │ └── ghost_strerror_s.h │ ├── format │ ├── README.md │ ├── ghost_asprintf.h │ ├── ghost_format_i16.h │ ├── ghost_format_i32.h │ ├── ghost_format_i64.h │ ├── ghost_format_i8.h │ ├── ghost_format_ip.h │ ├── ghost_format_pd.h │ ├── ghost_format_z.h │ ├── ghost_snprintf.h │ ├── ghost_sscanf.h │ ├── ghost_vasprintf.h │ ├── ghost_vsnprintf.h │ └── ghost_vsscanf.h │ ├── ghost_common.h │ ├── ghost_core.h │ ├── ghost_debug_all.h │ ├── ghost_format_all.h │ ├── ghost_header_common.h │ ├── ghost_language_all.h │ ├── ghost_malloc_all.h │ ├── ghost_malloc_common.h │ ├── ghost_math_all.h │ ├── ghost_math_common.h │ ├── ghost_preprocessor_all.h │ ├── ghost_serialization_all.h │ ├── ghost_silence_all.h │ ├── ghost_string_all.h │ ├── ghost_thread_all.h │ ├── ghost_thread_common.h │ ├── ghost_type_all.h │ ├── ghost_type_common.h │ ├── header │ ├── README.md │ ├── c │ │ ├── ghost_complex_h.h │ │ ├── ghost_errno_h.h │ │ ├── ghost_inttypes_h.h │ │ ├── ghost_limits_h.h │ │ ├── ghost_math_h.h │ │ ├── ghost_signal_h.h │ │ ├── ghost_stdarg_h.h │ │ ├── ghost_stdbool_h.h │ │ ├── ghost_stdckdint_h.h │ │ ├── ghost_stddef_h.h │ │ ├── ghost_stdint_h.h │ │ ├── ghost_stdio_h.h │ │ ├── ghost_stdlib_h.h │ │ ├── ghost_string_h.h │ │ ├── ghost_threads_h.h │ │ ├── ghost_time_h.h │ │ └── ghost_uchar_h.h │ ├── cxx │ │ ├── ghost_cxx_bit_h.h │ │ ├── ghost_cxx_complex_h.h │ │ ├── ghost_cxx_limits_h.h │ │ ├── ghost_cxx_type_traits_h.h │ │ └── ghost_cxx_version_h.h │ ├── linux │ │ └── ghost_features_h.h │ ├── posix │ │ ├── ghost_pthread_h.h │ │ ├── ghost_strings_h.h │ │ ├── ghost_sys_mman_h.h │ │ ├── ghost_sys_types_h.h │ │ ├── ghost_termios_h.h │ │ └── ghost_unistd_h.h │ └── windows │ │ ├── ghost_gdiplus_h.h │ │ └── ghost_windows_h.h │ ├── impl │ ├── README.md │ ├── algorithm │ │ └── qsort │ │ │ ├── ghost_impl_ex_bsd_qsort_r.h │ │ │ ├── ghost_impl_ex_c11_qsort_s.h │ │ │ ├── ghost_impl_ex_gnu_qsort_r.h │ │ │ ├── ghost_impl_ex_win_qsort_s.h │ │ │ ├── ghost_impl_qsort_config.h │ │ │ ├── ghost_impl_qsort_internal.h │ │ │ ├── ghost_impl_qsort_internal_declare.h │ │ │ └── ghost_impl_qsort_internal_define.h │ ├── binding │ │ ├── README.md │ │ ├── jemalloc │ │ │ └── ghost_impl_jemalloc.h │ │ └── libbsd │ │ │ ├── ghost_impl_libbsd_config.h │ │ │ └── ghost_impl_libbsd_string_h.h │ ├── format │ │ └── ghost_impl_format_c99_specifiers.h │ ├── ghost_impl_always_inline.h │ ├── ghost_impl_assumptions.h │ ├── ghost_impl_defs.h │ ├── ghost_impl_function.h │ ├── ghost_impl_function_wrapper.h │ ├── ghost_impl_glibc_compat.h │ ├── ghost_impl_inline.h │ ├── ghost_impl_libc_asm.h │ ├── ghost_impl_libc_noexcept.h │ ├── ghost_impl_noinline.h │ ├── header │ │ ├── ghost_impl_cosmopolitan.h │ │ └── ghost_impl_headers.h │ ├── language │ │ ├── ghost_impl_attribute_namespace_clang.h │ │ ├── ghost_impl_attribute_namespace_gnu.h │ │ └── ghost_impl_standard_attribute.h │ ├── malloc │ │ ├── ghost_impl_attrib_alloc_size.h │ │ ├── ghost_impl_attrib_malloc.h │ │ ├── ghost_impl_ex_calloc.h │ │ ├── ghost_impl_ex_calloc_0any.h │ │ ├── ghost_impl_ex_calloc_0null.h │ │ ├── ghost_impl_ex_malloc.h │ │ ├── ghost_impl_ex_malloc_0any.h │ │ ├── ghost_impl_ex_malloc_0null.h │ │ ├── ghost_impl_ex_realloc.h │ │ ├── ghost_impl_ex_realloc_0alloc.h │ │ ├── ghost_impl_ex_realloc_0any.h │ │ ├── ghost_impl_ex_realloc_0free.h │ │ └── ghost_impl_ex_realloc_0null.h │ ├── math │ │ ├── ghost_impl_has_builtin_add_overflow.h │ │ ├── ghost_impl_has_builtin_ffs.h │ │ ├── ghost_impl_has_builtin_mul_overflow.h │ │ └── ghost_impl_has_builtin_sub_overflow.h │ ├── serialization │ │ └── ghost_impl_endian.h │ ├── thread │ │ ├── ghost_impl_ex_ithread_create.h │ │ ├── ghost_impl_ex_ithread_detach.h │ │ ├── ghost_impl_ex_ithread_exit.h │ │ ├── ghost_impl_ex_ithread_id.h │ │ ├── ghost_impl_ex_ithread_join.h │ │ ├── ghost_impl_ex_ithread_t.h │ │ ├── ghost_impl_ex_vpthread_create.h │ │ ├── ghost_impl_ex_vpthread_detach.h │ │ ├── ghost_impl_ex_vpthread_exit.h │ │ ├── ghost_impl_ex_vpthread_id.h │ │ ├── ghost_impl_ex_vpthread_join.h │ │ ├── ghost_impl_ex_vpthread_t.h │ │ ├── ghost_impl_pthread_mutexattr_settype.h │ │ └── ghost_impl_thread_aux.h │ └── type │ │ ├── ghost_impl_intptr_uintptr.h │ │ └── llong │ │ └── ghost_impl_llong_is_distinct.h │ ├── io │ ├── README.md │ ├── ghost_close.h │ ├── ghost_close_nointr.h │ ├── ghost_fileno.h │ ├── ghost_flockfile.h │ ├── ghost_ftrylockfile.h │ ├── ghost_funlockfile.h │ ├── ghost_is_input_echo.h │ ├── ghost_is_input_echo_ex.h │ ├── ghost_isatty.h │ ├── ghost_set_input_echo.h │ └── ghost_set_input_echo_ex.h │ ├── language │ ├── README.md │ ├── ghost_alignas.h │ ├── ghost_alignat.h │ ├── ghost_alignof.h │ ├── ghost_always_inline.h │ ├── ghost_always_inline_opt.h │ ├── ghost_always_inline_stmt.h │ ├── ghost_array_count.h │ ├── ghost_asm_label.h │ ├── ghost_assume.h │ ├── ghost_auto.h │ ├── ghost_auto_cast.h │ ├── ghost_bit_cast.h │ ├── ghost_bless.h │ ├── ghost_cast.h │ ├── ghost_cold.h │ ├── ghost_complex.h │ ├── ghost_compound_literal.h │ ├── ghost_const_cast.h │ ├── ghost_container_of.h │ ├── ghost_cplusplus.h │ ├── ghost_cxx_exceptions.h │ ├── ghost_deprecated.h │ ├── ghost_deprecated_reason.h │ ├── ghost_discard.h │ ├── ghost_discard_force.h │ ├── ghost_dllexport.h │ ├── ghost_dllimport.h │ ├── ghost_emit_always_inline.h │ ├── ghost_emit_inline.h │ ├── ghost_expect.h │ ├── ghost_expect_false.h │ ├── ghost_expect_true.h │ ├── ghost_extern_c.h │ ├── ghost_extern_c_push_pop.h │ ├── ghost_fallthrough.h │ ├── ghost_generic.h │ ├── ghost_header_always_inline.h │ ├── ghost_header_function.h │ ├── ghost_header_inline.h │ ├── ghost_header_noinline.h │ ├── ghost_hidden.h │ ├── ghost_hidden_push_pop.h │ ├── ghost_hosted.h │ ├── ghost_hot.h │ ├── ghost_inline.h │ ├── ghost_inline_opt.h │ ├── ghost_is_aligned.h │ ├── ghost_max_align.h │ ├── ghost_may_alias.h │ ├── ghost_maybe_unused.h │ ├── ghost_nodiscard.h │ ├── ghost_nodiscard_reason.h │ ├── ghost_noemit_always_inline.h │ ├── ghost_noemit_inline.h │ ├── ghost_noinline.h │ ├── ghost_noreturn.h │ ├── ghost_noreturn_opt.h │ ├── ghost_null.h │ ├── ghost_offsetof.h │ ├── ghost_optimize_for_size.h │ ├── ghost_optimize_for_size_opt.h │ ├── ghost_reinterpret_cast.h │ ├── ghost_remove_quals.h │ ├── ghost_restrict.h │ ├── ghost_selectany_var.h │ ├── ghost_static_cast.h │ ├── ghost_static_init.h │ ├── ghost_stdc_version.h │ ├── ghost_struct_hack.h │ ├── ghost_struct_hack_access.h │ ├── ghost_struct_hack_sizeof.h │ ├── ghost_thread_local.h │ ├── ghost_typeof.h │ ├── ghost_unreachable.h │ ├── ghost_va_copy.h │ ├── ghost_weak.h │ └── ghost_zero_init.h │ ├── malloc │ ├── README.md │ ├── ghost_aligned_free.h │ ├── ghost_aligned_malloc.h │ ├── ghost_alloc.h │ ├── ghost_alloc_array.h │ ├── ghost_alloc_array_zero.h │ ├── ghost_alloc_zero.h │ ├── ghost_alloca.h │ ├── ghost_calloc.h │ ├── ghost_calloc_0any.h │ ├── ghost_calloc_0null.h │ ├── ghost_free.h │ ├── ghost_free_nonnull.h │ ├── ghost_malloc.h │ ├── ghost_malloc_0any.h │ ├── ghost_malloc_0null.h │ ├── ghost_malloc_good_size.h │ ├── ghost_malloc_size.h │ ├── ghost_malloc_system.h │ ├── ghost_memdup.h │ ├── ghost_realloc.h │ ├── ghost_realloc_0alloc.h │ ├── ghost_realloc_0any.h │ ├── ghost_realloc_0free.h │ ├── ghost_realloc_0null.h │ ├── ghost_strdup.h │ ├── ghost_strdupa.h │ ├── ghost_strndup.h │ └── ghost_strndupa.h │ ├── math │ ├── README.md │ ├── abs │ │ ├── ghost_abs_d.h │ │ └── ghost_abs_f.h │ ├── checked_add │ │ ├── ghost_checked_add_i32.h │ │ ├── ghost_checked_add_u32.h │ │ └── ghost_checked_add_z.h │ ├── checked_mul │ │ └── ghost_checked_mul_z.h │ ├── checked_sub │ │ └── ghost_checked_sub_z.h │ ├── clamp │ │ └── ghost_clamp_z.h │ ├── compare │ │ ├── ghost_compare_c.h │ │ ├── ghost_compare_c16.h │ │ ├── ghost_compare_c32.h │ │ ├── ghost_compare_c8.h │ │ ├── ghost_compare_d.h │ │ ├── ghost_compare_f.h │ │ ├── ghost_compare_f32.h │ │ ├── ghost_compare_f64.h │ │ ├── ghost_compare_h.h │ │ ├── ghost_compare_i.h │ │ ├── ghost_compare_i16.h │ │ ├── ghost_compare_i32.h │ │ ├── ghost_compare_i64.h │ │ ├── ghost_compare_i8.h │ │ ├── ghost_compare_ip.h │ │ ├── ghost_compare_l.h │ │ ├── ghost_compare_ld.h │ │ ├── ghost_compare_ll.h │ │ ├── ghost_compare_pd.h │ │ ├── ghost_compare_sc.h │ │ ├── ghost_compare_sz.h │ │ ├── ghost_compare_u.h │ │ ├── ghost_compare_u16.h │ │ ├── ghost_compare_u32.h │ │ ├── ghost_compare_u64.h │ │ ├── ghost_compare_u8.h │ │ ├── ghost_compare_uc.h │ │ ├── ghost_compare_uh.h │ │ ├── ghost_compare_ul.h │ │ ├── ghost_compare_ull.h │ │ ├── ghost_compare_up.h │ │ └── ghost_compare_z.h │ ├── fast_invsqrt │ │ └── ghost_fast_invsqrt_f.h │ ├── ffs │ │ ├── README.md │ │ ├── ghost_ffs_u.h │ │ ├── ghost_ffs_u16.h │ │ ├── ghost_ffs_u32.h │ │ ├── ghost_ffs_u64.h │ │ └── ghost_ffs_u8.h │ ├── ghost_checked_mul.h │ ├── ghost_compare.h │ ├── ghost_max.h │ ├── ghost_max_all.h │ ├── ghost_min.h │ ├── ghost_min_all.h │ ├── infinity │ │ ├── ghost_infinity_d.h │ │ ├── ghost_infinity_f.h │ │ ├── ghost_infinity_ld.h │ │ ├── ghost_negative_infinity_d.h │ │ ├── ghost_negative_infinity_f.h │ │ └── ghost_negative_infinity_ld.h │ ├── is_pow2 │ │ └── ghost_is_pow2_z.h │ ├── max │ │ ├── ghost_max_c.h │ │ ├── ghost_max_c16.h │ │ ├── ghost_max_c32.h │ │ ├── ghost_max_c8.h │ │ ├── ghost_max_d.h │ │ ├── ghost_max_f.h │ │ ├── ghost_max_f32.h │ │ ├── ghost_max_f64.h │ │ ├── ghost_max_h.h │ │ ├── ghost_max_i.h │ │ ├── ghost_max_i16.h │ │ ├── ghost_max_i32.h │ │ ├── ghost_max_i64.h │ │ ├── ghost_max_i8.h │ │ ├── ghost_max_il16.h │ │ ├── ghost_max_il32.h │ │ ├── ghost_max_il64.h │ │ ├── ghost_max_il8.h │ │ ├── ghost_max_ip.h │ │ ├── ghost_max_l.h │ │ ├── ghost_max_ld.h │ │ ├── ghost_max_ll.h │ │ ├── ghost_max_pd.h │ │ ├── ghost_max_sc.h │ │ ├── ghost_max_sz.h │ │ ├── ghost_max_u.h │ │ ├── ghost_max_u16.h │ │ ├── ghost_max_u32.h │ │ ├── ghost_max_u64.h │ │ ├── ghost_max_u8.h │ │ ├── ghost_max_uc.h │ │ ├── ghost_max_uh.h │ │ ├── ghost_max_ul.h │ │ ├── ghost_max_ul16.h │ │ ├── ghost_max_ul32.h │ │ ├── ghost_max_ul64.h │ │ ├── ghost_max_ul8.h │ │ ├── ghost_max_ull.h │ │ ├── ghost_max_up.h │ │ └── ghost_max_z.h │ ├── min │ │ ├── ghost_min_c.h │ │ ├── ghost_min_c16.h │ │ ├── ghost_min_c32.h │ │ ├── ghost_min_c8.h │ │ ├── ghost_min_d.h │ │ ├── ghost_min_f.h │ │ ├── ghost_min_f32.h │ │ ├── ghost_min_f64.h │ │ ├── ghost_min_h.h │ │ ├── ghost_min_i.h │ │ ├── ghost_min_i16.h │ │ ├── ghost_min_i32.h │ │ ├── ghost_min_i64.h │ │ ├── ghost_min_i8.h │ │ ├── ghost_min_il16.h │ │ ├── ghost_min_il32.h │ │ ├── ghost_min_il64.h │ │ ├── ghost_min_il8.h │ │ ├── ghost_min_ip.h │ │ ├── ghost_min_l.h │ │ ├── ghost_min_ld.h │ │ ├── ghost_min_ll.h │ │ ├── ghost_min_pd.h │ │ ├── ghost_min_sc.h │ │ ├── ghost_min_sz.h │ │ ├── ghost_min_u.h │ │ ├── ghost_min_u16.h │ │ ├── ghost_min_u32.h │ │ ├── ghost_min_u64.h │ │ ├── ghost_min_u8.h │ │ ├── ghost_min_uc.h │ │ ├── ghost_min_uh.h │ │ ├── ghost_min_ul.h │ │ ├── ghost_min_ul16.h │ │ ├── ghost_min_ul32.h │ │ ├── ghost_min_ul64.h │ │ ├── ghost_min_ul8.h │ │ ├── ghost_min_ull.h │ │ ├── ghost_min_up.h │ │ └── ghost_min_z.h │ ├── popcount │ │ ├── ghost_popcount_u32.h │ │ └── ghost_popcount_u64.h │ ├── rotl │ │ ├── ghost_rotl_u16.h │ │ ├── ghost_rotl_u32.h │ │ ├── ghost_rotl_u64.h │ │ └── ghost_rotl_u8.h │ ├── rotr │ │ ├── ghost_rotr_u32.h │ │ └── ghost_rotr_u64.h │ └── sqrt │ │ ├── ghost_sqrt_d.h │ │ └── ghost_sqrt_f.h │ ├── preprocessor │ ├── ghost_blank.h │ ├── ghost_bool_pp.h │ ├── ghost_concat.h │ ├── ghost_contains_comma.h │ ├── ghost_count_args.h │ ├── ghost_counter.h │ ├── ghost_cparser_pp.h │ ├── ghost_defer.h │ ├── ghost_defer_more.h │ ├── ghost_expand.h │ ├── ghost_expand_more.h │ ├── ghost_first.h │ ├── ghost_has_builtin.h │ ├── ghost_has_include.h │ ├── ghost_if_else.h │ ├── ghost_if_else_block.h │ ├── ghost_insert_comma.h │ ├── ghost_is_1.h │ ├── ghost_is_blank.h │ ├── ghost_is_parens.h │ ├── ghost_msvc_traditional.h │ ├── ghost_not.h │ ├── ghost_nothing.h │ ├── ghost_omit_va_args.h │ ├── ghost_pp_va_args.h │ ├── ghost_rest.h │ └── ghost_stringify.h │ ├── serialization │ ├── README.md │ ├── bswap │ │ ├── ghost_bswap_u16.h │ │ ├── ghost_bswap_u32.h │ │ └── ghost_bswap_u64.h │ ├── ghost_big_endian.h │ ├── ghost_bswap.h │ ├── ghost_bswap_all.h │ ├── ghost_hswap_all.h │ ├── ghost_little_endian.h │ ├── ghost_load_all.h │ ├── ghost_ntoh.h │ ├── ghost_store_all.h │ ├── hswap │ │ ├── ghost_betoh_u16.h │ │ ├── ghost_betoh_u32.h │ │ ├── ghost_betoh_u64.h │ │ ├── ghost_htobe_u16.h │ │ ├── ghost_htobe_u32.h │ │ ├── ghost_htobe_u64.h │ │ ├── ghost_htole_u16.h │ │ ├── ghost_htole_u32.h │ │ ├── ghost_htole_u64.h │ │ ├── ghost_letoh_u16.h │ │ ├── ghost_letoh_u32.h │ │ └── ghost_letoh_u64.h │ ├── load │ │ ├── ghost_load_be.h │ │ ├── ghost_load_be_f32.h │ │ ├── ghost_load_be_f64.h │ │ ├── ghost_load_be_i16.h │ │ ├── ghost_load_be_i32.h │ │ ├── ghost_load_be_i64.h │ │ ├── ghost_load_be_u16.h │ │ ├── ghost_load_be_u32.h │ │ ├── ghost_load_be_u64.h │ │ ├── ghost_load_he.h │ │ ├── ghost_load_he_f32.h │ │ ├── ghost_load_he_f64.h │ │ ├── ghost_load_he_i16.h │ │ ├── ghost_load_he_i32.h │ │ ├── ghost_load_he_i64.h │ │ ├── ghost_load_he_u16.h │ │ ├── ghost_load_he_u32.h │ │ ├── ghost_load_he_u64.h │ │ ├── ghost_load_i8.h │ │ ├── ghost_load_le.h │ │ ├── ghost_load_le_f32.h │ │ ├── ghost_load_le_f64.h │ │ ├── ghost_load_le_i16.h │ │ ├── ghost_load_le_i32.h │ │ ├── ghost_load_le_i64.h │ │ ├── ghost_load_le_u16.h │ │ ├── ghost_load_le_u32.h │ │ ├── ghost_load_le_u64.h │ │ └── ghost_load_u8.h │ ├── ntoh │ │ └── TODO │ └── store │ │ ├── ghost_store_be_f32.h │ │ ├── ghost_store_be_f64.h │ │ ├── ghost_store_be_i16.h │ │ ├── ghost_store_be_i32.h │ │ ├── ghost_store_be_i64.h │ │ ├── ghost_store_be_u16.h │ │ ├── ghost_store_be_u32.h │ │ ├── ghost_store_be_u64.h │ │ ├── ghost_store_he_i16.h │ │ ├── ghost_store_he_i32.h │ │ ├── ghost_store_he_i64.h │ │ ├── ghost_store_he_u16.h │ │ ├── ghost_store_he_u32.h │ │ ├── ghost_store_he_u64.h │ │ ├── ghost_store_i8.h │ │ ├── ghost_store_le_i16.h │ │ ├── ghost_store_le_i32.h │ │ ├── ghost_store_le_i64.h │ │ ├── ghost_store_le_u16.h │ │ ├── ghost_store_le_u32.h │ │ ├── ghost_store_le_u64.h │ │ └── ghost_store_u8.h │ ├── silence │ ├── ghost_silence_align_padding.h │ ├── ghost_silence_cast_truncates_constant.h │ ├── ghost_silence_constant_comparison.h │ ├── ghost_silence_constant_overflow.h │ ├── ghost_silence_cxx_compat.h │ ├── ghost_silence_deprecated.h │ ├── ghost_silence_insufficient_macro_args.h │ ├── ghost_silence_long_long.h │ ├── ghost_silence_missing_declarations.h │ ├── ghost_silence_missing_function_declarations.h │ ├── ghost_silence_missing_variable_declarations.h │ ├── ghost_silence_not_inlined.h │ ├── ghost_silence_pedantic.h │ ├── ghost_silence_push_pop.h │ ├── ghost_silence_push_pop_opt.h │ ├── ghost_silence_stringop_truncation.h │ ├── ghost_silence_unreachable.h │ ├── ghost_silence_unused_function.h │ ├── ghost_silence_unused_parameter.h │ └── ghost_silence_unused_result.h │ ├── string │ ├── README.md │ ├── ghost_bcmp.h │ ├── ghost_bcopy.h │ ├── ghost_bzero.h │ ├── ghost_index.h │ ├── ghost_memccpy.h │ ├── ghost_memchr.h │ ├── ghost_memcmp.h │ ├── ghost_memcpy.h │ ├── ghost_memlcmp.h │ ├── ghost_memmem.h │ ├── ghost_memmove.h │ ├── ghost_mempcpy.h │ ├── ghost_memrchr.h │ ├── ghost_memset.h │ ├── ghost_rindex.h │ ├── ghost_stpcpy.h │ ├── ghost_stpncpy.h │ ├── ghost_strcat.h │ ├── ghost_strchr.h │ ├── ghost_strchrnul.h │ ├── ghost_strcmp.h │ ├── ghost_strcpy.h │ ├── ghost_strcspn.h │ ├── ghost_strlcat.h │ ├── ghost_strlcpy.h │ ├── ghost_strlen.h │ ├── ghost_strncat.h │ ├── ghost_strncmp.h │ ├── ghost_strncpy.h │ ├── ghost_strnlen.h │ ├── ghost_strnlen_s.h │ ├── ghost_strnstr.h │ ├── ghost_strpbrk.h │ ├── ghost_strrchr.h │ ├── ghost_strsep.h │ ├── ghost_strset.h │ ├── ghost_strspn.h │ ├── ghost_strstr.h │ ├── ghost_strtok.h │ └── ghost_strtok_r.h │ ├── system │ └── map_anon │ │ ├── ghost_map_anon.h │ │ └── ghost_unmap_anon.h │ ├── thread │ ├── README.md │ ├── condition │ │ ├── ghost_condition_broadcast.h │ │ ├── ghost_condition_destroy.h │ │ ├── ghost_condition_init.h │ │ ├── ghost_condition_signal.h │ │ ├── ghost_condition_t.h │ │ └── ghost_condition_wait.h │ ├── ghost_condition.h │ ├── ghost_ithread.h │ ├── ghost_mutex.h │ ├── ghost_once.h │ ├── ghost_thread_config.h │ ├── ghost_thread_id.h │ ├── ghost_thread_options.h │ ├── ghost_thread_yield.h │ ├── ghost_tss.h │ ├── ghost_vpthread.h │ ├── ghost_vthread.h │ ├── ithread │ │ ├── ghost_ithread_create.h │ │ ├── ghost_ithread_detach.h │ │ ├── ghost_ithread_exit.h │ │ ├── ghost_ithread_id.h │ │ ├── ghost_ithread_is_current.h │ │ ├── ghost_ithread_join.h │ │ └── ghost_ithread_t.h │ ├── mutex │ │ ├── ghost_mutex_config.h │ │ ├── ghost_mutex_destroy.h │ │ ├── ghost_mutex_init.h │ │ ├── ghost_mutex_init_recursive.h │ │ ├── ghost_mutex_init_s.h │ │ ├── ghost_mutex_lock.h │ │ ├── ghost_mutex_t.h │ │ ├── ghost_mutex_trylock.h │ │ └── ghost_mutex_unlock.h │ ├── once │ │ ├── ghost_once_fn.h │ │ ├── ghost_once_init_fn.h │ │ ├── ghost_once_init_s.h │ │ └── ghost_once_t.h │ ├── thread_id │ │ ├── ghost_thread_id_compare.h │ │ ├── ghost_thread_id_current.h │ │ ├── ghost_thread_id_equal.h │ │ ├── ghost_thread_id_hash.h │ │ ├── ghost_thread_id_is_current.h │ │ └── ghost_thread_id_t.h │ ├── thread_options │ │ └── ghost_thread_options_t.h │ ├── tss │ │ ├── ghost_tss_config.h │ │ ├── ghost_tss_destroy.h │ │ ├── ghost_tss_get.h │ │ ├── ghost_tss_init.h │ │ ├── ghost_tss_init_dtor.h │ │ ├── ghost_tss_set.h │ │ └── ghost_tss_t.h │ ├── vpthread │ │ ├── ghost_vpthread_create.h │ │ ├── ghost_vpthread_detach.h │ │ ├── ghost_vpthread_exit.h │ │ ├── ghost_vpthread_id.h │ │ ├── ghost_vpthread_is_current.h │ │ ├── ghost_vpthread_join.h │ │ └── ghost_vpthread_t.h │ └── vthread │ │ ├── ghost_vthread_create.h │ │ ├── ghost_vthread_detach.h │ │ ├── ghost_vthread_exit.h │ │ ├── ghost_vthread_id.h │ │ ├── ghost_vthread_is_current.h │ │ ├── ghost_vthread_join.h │ │ └── ghost_vthread_t.h │ └── type │ ├── bool │ ├── ghost_bool.h │ ├── ghost_bool_width.h │ ├── ghost_false.h │ └── ghost_true.h │ ├── char │ ├── ghost_char.h │ ├── ghost_char_c.h │ ├── ghost_char_is_signed.h │ ├── ghost_char_max.h │ ├── ghost_char_min.h │ └── ghost_char_width.h │ ├── char16_t │ ├── ghost_char16_c.h │ ├── ghost_char16_is_distinct.h │ ├── ghost_char16_s.h │ ├── ghost_char16_t.h │ └── ghost_char16_width.h │ ├── char32_t │ ├── ghost_char32_c.h │ ├── ghost_char32_is_distinct.h │ ├── ghost_char32_s.h │ ├── ghost_char32_t.h │ └── ghost_char32_width.h │ ├── char8_t │ ├── ghost_char8_c.h │ ├── ghost_char8_is_distinct.h │ ├── ghost_char8_is_signed.h │ ├── ghost_char8_s.h │ ├── ghost_char8_t.h │ └── ghost_char8_width.h │ ├── double │ ├── ghost_double.h │ ├── ghost_double_c.h │ └── ghost_double_width.h │ ├── float │ ├── ghost_float.h │ ├── ghost_float_c.h │ └── ghost_float_width.h │ ├── float32_t │ ├── ghost_float32_c.h │ ├── ghost_float32_t.h │ └── ghost_float32_width.h │ ├── float64_t │ ├── ghost_float64_c.h │ ├── ghost_float64_t.h │ └── ghost_float64_width.h │ ├── ghost_bool_all.h │ ├── ghost_char16_all.h │ ├── ghost_char32_all.h │ ├── ghost_char8_all.h │ ├── ghost_char_all.h │ ├── ghost_double_all.h │ ├── ghost_float128_all.h │ ├── ghost_float16_all.h │ ├── ghost_float32_all.h │ ├── ghost_float64_all.h │ ├── ghost_float_all.h │ ├── ghost_int16_all.h │ ├── ghost_int32_all.h │ ├── ghost_int64_all.h │ ├── ghost_int8_all.h │ ├── ghost_int_all.h │ ├── ghost_int_least16_all.h │ ├── ghost_int_least32_all.h │ ├── ghost_int_least64_all.h │ ├── ghost_int_least8_all.h │ ├── ghost_intptr_all.h │ ├── ghost_ldouble_all.h │ ├── ghost_llong_all.h │ ├── ghost_long_all.h │ ├── ghost_ptrdiff_all.h │ ├── ghost_schar_all.h │ ├── ghost_short_all.h │ ├── ghost_size_all.h │ ├── ghost_ssize_all.h │ ├── ghost_uchar_all.h │ ├── ghost_uint16_all.h │ ├── ghost_uint32_all.h │ ├── ghost_uint64_all.h │ ├── ghost_uint8_all.h │ ├── ghost_uint_all.h │ ├── ghost_uint_least16_all.h │ ├── ghost_uint_least32_all.h │ ├── ghost_uint_least64_all.h │ ├── ghost_uint_least8_all.h │ ├── ghost_uintptr_all.h │ ├── ghost_ullong_all.h │ ├── ghost_ulong_all.h │ ├── ghost_ushort_all.h │ ├── ghost_wchar_all.h │ ├── int │ ├── ghost_int.h │ ├── ghost_int_c.h │ ├── ghost_int_max.h │ ├── ghost_int_min.h │ └── ghost_int_width.h │ ├── int16_t │ ├── ghost_int16_c.h │ ├── ghost_int16_max.h │ ├── ghost_int16_min.h │ ├── ghost_int16_t.h │ └── ghost_int16_width.h │ ├── int32_t │ ├── ghost_int32_c.h │ ├── ghost_int32_max.h │ ├── ghost_int32_min.h │ ├── ghost_int32_t.h │ └── ghost_int32_width.h │ ├── int64_t │ ├── ghost_int64_c.h │ ├── ghost_int64_max.h │ ├── ghost_int64_min.h │ ├── ghost_int64_t.h │ └── ghost_int64_width.h │ ├── int8_t │ ├── ghost_int8_c.h │ ├── ghost_int8_max.h │ ├── ghost_int8_min.h │ ├── ghost_int8_t.h │ └── ghost_int8_width.h │ ├── int_least16_t │ ├── ghost_int_least16_c.h │ ├── ghost_int_least16_max.h │ ├── ghost_int_least16_min.h │ ├── ghost_int_least16_t.h │ └── ghost_int_least16_width.h │ ├── int_least32_t │ ├── ghost_int_least32_c.h │ ├── ghost_int_least32_max.h │ ├── ghost_int_least32_min.h │ ├── ghost_int_least32_t.h │ └── ghost_int_least32_width.h │ ├── int_least64_t │ ├── ghost_int_least64_c.h │ ├── ghost_int_least64_max.h │ ├── ghost_int_least64_min.h │ ├── ghost_int_least64_t.h │ └── ghost_int_least64_width.h │ ├── int_least8_t │ ├── ghost_int_least8_c.h │ ├── ghost_int_least8_max.h │ ├── ghost_int_least8_min.h │ ├── ghost_int_least8_t.h │ └── ghost_int_least8_width.h │ ├── intptr_t │ ├── ghost_intptr_c.h │ ├── ghost_intptr_max.h │ ├── ghost_intptr_min.h │ ├── ghost_intptr_t.h │ └── ghost_intptr_width.h │ ├── ldouble │ ├── ghost_ldouble.h │ ├── ghost_ldouble_c.h │ └── ghost_ldouble_width.h │ ├── llong │ ├── ghost_llong.h │ ├── ghost_llong_c.h │ ├── ghost_llong_max.h │ ├── ghost_llong_min.h │ └── ghost_llong_width.h │ ├── long │ ├── ghost_long.h │ ├── ghost_long_c.h │ ├── ghost_long_max.h │ ├── ghost_long_min.h │ └── ghost_long_width.h │ ├── ptrdiff_t │ ├── ghost_ptrdiff_c.h │ ├── ghost_ptrdiff_max.h │ ├── ghost_ptrdiff_min.h │ ├── ghost_ptrdiff_t.h │ └── ghost_ptrdiff_width.h │ ├── schar │ ├── ghost_schar.h │ ├── ghost_schar_c.h │ ├── ghost_schar_max.h │ ├── ghost_schar_min.h │ └── ghost_schar_width.h │ ├── short │ ├── ghost_short.h │ ├── ghost_short_c.h │ ├── ghost_short_max.h │ ├── ghost_short_min.h │ └── ghost_short_width.h │ ├── size_t │ ├── ghost_size_c.h │ ├── ghost_size_max.h │ ├── ghost_size_t.h │ └── ghost_size_width.h │ ├── ssize_t │ ├── ghost_ssize_c.h │ ├── ghost_ssize_max.h │ ├── ghost_ssize_min.h │ ├── ghost_ssize_t.h │ └── ghost_ssize_width.h │ ├── uchar │ ├── ghost_uchar.h │ ├── ghost_uchar_c.h │ ├── ghost_uchar_max.h │ └── ghost_uchar_width.h │ ├── uint │ ├── ghost_uint.h │ ├── ghost_uint_c.h │ ├── ghost_uint_max.h │ └── ghost_uint_width.h │ ├── uint16_t │ ├── ghost_uint16_c.h │ ├── ghost_uint16_max.h │ ├── ghost_uint16_t.h │ └── ghost_uint16_width.h │ ├── uint32_t │ ├── ghost_uint32_c.h │ ├── ghost_uint32_max.h │ ├── ghost_uint32_t.h │ └── ghost_uint32_width.h │ ├── uint64_t │ ├── ghost_uint64_c.h │ ├── ghost_uint64_max.h │ ├── ghost_uint64_t.h │ └── ghost_uint64_width.h │ ├── uint8_t │ ├── ghost_uint8_c.h │ ├── ghost_uint8_max.h │ ├── ghost_uint8_t.h │ └── ghost_uint8_width.h │ ├── uint_least16_t │ ├── ghost_uint_least16_c.h │ ├── ghost_uint_least16_max.h │ ├── ghost_uint_least16_t.h │ └── ghost_uint_least16_width.h │ ├── uint_least32_t │ ├── ghost_uint_least32_c.h │ ├── ghost_uint_least32_max.h │ ├── ghost_uint_least32_t.h │ └── ghost_uint_least32_width.h │ ├── uint_least64_t │ ├── ghost_uint_least64_c.h │ ├── ghost_uint_least64_max.h │ ├── ghost_uint_least64_t.h │ └── ghost_uint_least64_width.h │ ├── uint_least8_t │ ├── ghost_uint_least8_c.h │ ├── ghost_uint_least8_max.h │ ├── ghost_uint_least8_t.h │ └── ghost_uint_least8_width.h │ ├── uintptr_t │ ├── ghost_uintptr_c.h │ ├── ghost_uintptr_max.h │ ├── ghost_uintptr_t.h │ └── ghost_uintptr_width.h │ ├── ullong │ ├── ghost_ullong.h │ ├── ghost_ullong_c.h │ ├── ghost_ullong_max.h │ └── ghost_ullong_width.h │ ├── ulong │ ├── ghost_ulong.h │ ├── ghost_ulong_c.h │ ├── ghost_ulong_max.h │ └── ghost_ulong_width.h │ └── ushort │ ├── ghost_ushort.h │ ├── ghost_ushort_c.h │ ├── ghost_ushort_max.h │ └── ghost_ushort_width.h ├── test ├── README.md ├── clean.bat ├── clean.sh ├── compile-time.sh ├── fetch-dependencies.sh ├── input │ ├── run.bat │ ├── run.sh │ └── test_ghost_input.c ├── megatest.sh ├── test-musl.sh ├── unit-vs2012.bat ├── unit-vs2013.bat ├── unit.bat ├── unit.sh └── unit │ ├── README.md │ ├── ci-unix.sh │ ├── ci-windows.bat │ ├── configure.py │ ├── experimental │ └── crypto │ │ └── test_ghost_sysrandom.c │ ├── generate-unit-test-registrations.sh │ ├── remote-unix.sh │ ├── remote-windows.sh │ └── src │ ├── algorithm │ ├── fnv1a │ │ ├── test_ghost_fnv1a_cstr_u32.c │ │ ├── test_ghost_fnv1a_cstr_u64.c │ │ ├── test_ghost_fnv1a_cstr_z.c │ │ ├── test_ghost_fnv1a_u32.c │ │ ├── test_ghost_fnv1a_u64.c │ │ └── test_ghost_fnv1a_z.c │ ├── knuth_hash │ │ ├── test_ghost_knuth_hash_u16.c │ │ ├── test_ghost_knuth_hash_u32.c │ │ ├── test_ghost_knuth_hash_u64.c │ │ └── test_ghost_knuth_hash_z.c │ └── qsort │ │ ├── test_ghost_bsd_qsort_r.c │ │ ├── test_ghost_bsd_qsort_r_internal.c │ │ ├── test_ghost_c11_qsort_s.c │ │ ├── test_ghost_c11_qsort_s_internal.c │ │ ├── test_ghost_gnu_qsort_r.c │ │ ├── test_ghost_gnu_qsort_r_internal.c │ │ ├── test_ghost_qsort.c │ │ ├── test_ghost_qsort.t.h │ │ ├── test_ghost_qsort_internal.c │ │ ├── test_ghost_win_qsort_s.c │ │ └── test_ghost_win_qsort_s_internal.c │ ├── core │ ├── test_ghost_config.c │ ├── test_ghost_has.c │ └── test_ghost_version.c │ ├── debug │ ├── test_ghost_abort.c │ ├── test_ghost_assert.c │ ├── test_ghost_assert_fail.c │ ├── test_ghost_backtrace.c │ ├── test_ghost_check.c │ ├── test_ghost_debug.c │ ├── test_ghost_debugbreak.c │ ├── test_ghost_ensure.c │ ├── test_ghost_fatal.c │ ├── test_ghost_pretty_function.c │ └── test_ghost_pretty_function_opt.c │ ├── detect │ ├── test_ghost_cproc.c │ ├── test_ghost_gcc.c │ ├── test_ghost_glibc.c │ ├── test_ghost_musl.c │ ├── test_ghost_musl_version.c │ ├── test_ghost_unix.c │ ├── test_ghost_x86_32.c │ └── test_ghost_x86_64.c │ ├── error │ ├── test_ghost_errno.c │ ├── test_ghost_errno_is.c │ ├── test_ghost_errno_load.c │ ├── test_ghost_errno_store.c │ ├── test_ghost_errno_t.c │ ├── test_ghost_perror.c │ ├── test_ghost_rsize_t.c │ ├── test_ghost_strerror.c │ ├── test_ghost_strerror_r.c │ └── test_ghost_strerror_s.c │ ├── format │ ├── test_ghost_asprintf.c │ ├── test_ghost_format_i16.c │ ├── test_ghost_format_i32.c │ ├── test_ghost_format_i64.c │ ├── test_ghost_format_i8.c │ ├── test_ghost_format_ip.c │ ├── test_ghost_format_pd.c │ ├── test_ghost_format_z.c │ ├── test_ghost_snprintf.c │ ├── test_ghost_sscanf.c │ ├── test_ghost_vasprintf.c │ ├── test_ghost_vsnprintf.c │ └── test_ghost_vsscanf.c │ ├── header │ ├── c │ │ ├── test_ghost_complex_h.c │ │ ├── test_ghost_errno_h.c │ │ ├── test_ghost_inttypes_h.c │ │ ├── test_ghost_limits_h.c │ │ ├── test_ghost_math_h.c │ │ ├── test_ghost_signal_h.c │ │ ├── test_ghost_stdarg_h.c │ │ ├── test_ghost_stdbool_h.c │ │ ├── test_ghost_stdckdint_h.c │ │ ├── test_ghost_stddef_h.c │ │ ├── test_ghost_stdint_h.c │ │ ├── test_ghost_stdio_h.c │ │ ├── test_ghost_stdlib_h.c │ │ ├── test_ghost_string_h.c │ │ ├── test_ghost_threads_h.c │ │ ├── test_ghost_time_h.c │ │ └── test_ghost_uchar_h.c │ ├── cxx │ │ ├── test_ghost_cxx_bit_h.c │ │ ├── test_ghost_cxx_complex_h.c │ │ ├── test_ghost_cxx_limits_h.c │ │ ├── test_ghost_cxx_type_traits_h.c │ │ └── test_ghost_cxx_version_h.c │ ├── linux │ │ └── test_ghost_features_h.c │ ├── posix │ │ ├── test_ghost_pthread_h.c │ │ ├── test_ghost_strings_h.c │ │ ├── test_ghost_sys_mman_h.c │ │ ├── test_ghost_sys_types_h.c │ │ ├── test_ghost_termios_h.c │ │ └── test_ghost_unistd_h.c │ └── windows │ │ ├── test_ghost_gdiplus_h.c │ │ └── test_ghost_windows_h.c │ ├── io │ ├── test_ghost_close.c │ ├── test_ghost_close_nointr.c │ ├── test_ghost_fileno.c │ ├── test_ghost_flockfile.c │ ├── test_ghost_ftrylockfile.c │ ├── test_ghost_funlockfile.c │ ├── test_ghost_is_input_echo.c │ ├── test_ghost_is_input_echo_ex.c │ ├── test_ghost_isatty.c │ ├── test_ghost_set_input_echo.c │ └── test_ghost_set_input_echo_ex.c │ ├── language │ ├── test_ghost_alignas.c │ ├── test_ghost_alignat.c │ ├── test_ghost_alignof.c │ ├── test_ghost_always_inline.c │ ├── test_ghost_always_inline_opt.c │ ├── test_ghost_always_inline_stmt.c │ ├── test_ghost_array_count.c │ ├── test_ghost_asm_label.c │ ├── test_ghost_assume.c │ ├── test_ghost_auto.c │ ├── test_ghost_auto_cast.c │ ├── test_ghost_bit_cast.c │ ├── test_ghost_bless.c │ ├── test_ghost_cast.c │ ├── test_ghost_cold.c │ ├── test_ghost_complex.c │ ├── test_ghost_compound_literal.c │ ├── test_ghost_const_cast.c │ ├── test_ghost_container_of.c │ ├── test_ghost_cplusplus.c │ ├── test_ghost_cxx_exceptions.c │ ├── test_ghost_deprecated.c │ ├── test_ghost_deprecated_reason.c │ ├── test_ghost_discard.c │ ├── test_ghost_discard.t.h │ ├── test_ghost_discard_force.c │ ├── test_ghost_dllexport.c │ ├── test_ghost_dllimport.c │ ├── test_ghost_emit_always_inline.c │ ├── test_ghost_emit_inline.c │ ├── test_ghost_expect.c │ ├── test_ghost_expect_false.c │ ├── test_ghost_expect_true.c │ ├── test_ghost_extern_c.c │ ├── test_ghost_extern_c_push_pop.c │ ├── test_ghost_fallthrough.c │ ├── test_ghost_generic.c │ ├── test_ghost_header_always_inline.c │ ├── test_ghost_header_function.c │ ├── test_ghost_header_inline.c │ ├── test_ghost_header_noinline.c │ ├── test_ghost_hidden.c │ ├── test_ghost_hidden_push_pop.c │ ├── test_ghost_hosted.c │ ├── test_ghost_hot.c │ ├── test_ghost_inline.c │ ├── test_ghost_inline_opt.c │ ├── test_ghost_is_aligned.c │ ├── test_ghost_max_align.c │ ├── test_ghost_may_alias.c │ ├── test_ghost_maybe_unused.c │ ├── test_ghost_nodiscard.c │ ├── test_ghost_nodiscard_reason.c │ ├── test_ghost_noemit_always_inline.c │ ├── test_ghost_noemit_inline.c │ ├── test_ghost_noinline.c │ ├── test_ghost_noreturn.c │ ├── test_ghost_noreturn_opt.c │ ├── test_ghost_null.c │ ├── test_ghost_offsetof.c │ ├── test_ghost_optimize_for_size.c │ ├── test_ghost_optimize_for_size_opt.c │ ├── test_ghost_reinterpret_cast.c │ ├── test_ghost_remove_quals.c │ ├── test_ghost_restrict.c │ ├── test_ghost_selectany_var.c │ ├── test_ghost_static_assert.c │ ├── test_ghost_static_assert_expr.c │ ├── test_ghost_static_cast.c │ ├── test_ghost_static_init.c │ ├── test_ghost_stdc_version.c │ ├── test_ghost_struct_hack.c │ ├── test_ghost_struct_hack_access.c │ ├── test_ghost_struct_hack_sizeof.c │ ├── test_ghost_thread_local.c │ ├── test_ghost_typeof.c │ ├── test_ghost_unreachable.c │ ├── test_ghost_va_copy.c │ ├── test_ghost_weak.c │ ├── test_ghost_weak_2.c │ └── test_ghost_zero_init.c │ ├── main.c │ ├── malloc │ ├── test_ghost_aligned_free.c │ ├── test_ghost_aligned_malloc.c │ ├── test_ghost_alloc.c │ ├── test_ghost_alloc_array.c │ ├── test_ghost_alloc_array_zero.c │ ├── test_ghost_alloc_zero.c │ ├── test_ghost_alloca.c │ ├── test_ghost_calloc.c │ ├── test_ghost_calloc.t.h │ ├── test_ghost_calloc_0any.c │ ├── test_ghost_calloc_0null.c │ ├── test_ghost_free.c │ ├── test_ghost_free_nonnull.c │ ├── test_ghost_malloc.c │ ├── test_ghost_malloc.t.h │ ├── test_ghost_malloc_0any.c │ ├── test_ghost_malloc_0null.c │ ├── test_ghost_malloc_good_size.c │ ├── test_ghost_malloc_size.c │ ├── test_ghost_malloc_system.c │ ├── test_ghost_memdup.c │ ├── test_ghost_realloc.c │ ├── test_ghost_realloc.t.h │ ├── test_ghost_realloc_0alloc.c │ ├── test_ghost_realloc_0any.c │ ├── test_ghost_realloc_0free.c │ ├── test_ghost_realloc_0null.c │ ├── test_ghost_strdup.c │ ├── test_ghost_strdupa.c │ ├── test_ghost_strndup.c │ └── test_ghost_strndupa.c │ ├── math │ ├── abs │ │ ├── test_ghost_abs_d.c │ │ └── test_ghost_abs_f.c │ ├── checked_add │ │ ├── test_ghost_checked_add_i32.c │ │ ├── test_ghost_checked_add_u32.c │ │ └── test_ghost_checked_add_z.c │ ├── checked_mul │ │ └── test_ghost_checked_mul_z.c │ ├── checked_sub │ │ └── test_ghost_checked_sub_z.c │ ├── clamp │ │ └── test_ghost_clamp_z.c │ ├── compare │ │ ├── test_ghost_compare_c.c │ │ ├── test_ghost_compare_c16.c │ │ ├── test_ghost_compare_c32.c │ │ ├── test_ghost_compare_c8.c │ │ ├── test_ghost_compare_d.c │ │ ├── test_ghost_compare_f.c │ │ ├── test_ghost_compare_f32.c │ │ ├── test_ghost_compare_f64.c │ │ ├── test_ghost_compare_h.c │ │ ├── test_ghost_compare_i.c │ │ ├── test_ghost_compare_i16.c │ │ ├── test_ghost_compare_i32.c │ │ ├── test_ghost_compare_i64.c │ │ ├── test_ghost_compare_i8.c │ │ ├── test_ghost_compare_ip.c │ │ ├── test_ghost_compare_l.c │ │ ├── test_ghost_compare_ld.c │ │ ├── test_ghost_compare_ll.c │ │ ├── test_ghost_compare_pd.c │ │ ├── test_ghost_compare_sc.c │ │ ├── test_ghost_compare_sz.c │ │ ├── test_ghost_compare_u.c │ │ ├── test_ghost_compare_u16.c │ │ ├── test_ghost_compare_u32.c │ │ ├── test_ghost_compare_u64.c │ │ ├── test_ghost_compare_u8.c │ │ ├── test_ghost_compare_uc.c │ │ ├── test_ghost_compare_uh.c │ │ ├── test_ghost_compare_ul.c │ │ ├── test_ghost_compare_ull.c │ │ ├── test_ghost_compare_up.c │ │ └── test_ghost_compare_z.c │ ├── fast_invsqrt │ │ └── test_ghost_fast_invsqrt_f.c │ ├── ffs │ │ ├── test_ghost_ffs_u.c │ │ ├── test_ghost_ffs_u16.c │ │ ├── test_ghost_ffs_u32.c │ │ ├── test_ghost_ffs_u64.c │ │ └── test_ghost_ffs_u8.c │ ├── is_pow2 │ │ └── test_ghost_is_pow2_z.c │ ├── max │ │ ├── test_ghost_max_c.c │ │ ├── test_ghost_max_c16.c │ │ ├── test_ghost_max_c32.c │ │ ├── test_ghost_max_c8.c │ │ ├── test_ghost_max_d.c │ │ ├── test_ghost_max_f.c │ │ ├── test_ghost_max_f32.c │ │ ├── test_ghost_max_f64.c │ │ ├── test_ghost_max_h.c │ │ ├── test_ghost_max_i.c │ │ ├── test_ghost_max_i16.c │ │ ├── test_ghost_max_i32.c │ │ ├── test_ghost_max_i64.c │ │ ├── test_ghost_max_i8.c │ │ ├── test_ghost_max_il16.c │ │ ├── test_ghost_max_il32.c │ │ ├── test_ghost_max_il64.c │ │ ├── test_ghost_max_il8.c │ │ ├── test_ghost_max_ip.c │ │ ├── test_ghost_max_l.c │ │ ├── test_ghost_max_ld.c │ │ ├── test_ghost_max_ll.c │ │ ├── test_ghost_max_pd.c │ │ ├── test_ghost_max_sc.c │ │ ├── test_ghost_max_sz.c │ │ ├── test_ghost_max_u.c │ │ ├── test_ghost_max_u16.c │ │ ├── test_ghost_max_u32.c │ │ ├── test_ghost_max_u64.c │ │ ├── test_ghost_max_u8.c │ │ ├── test_ghost_max_uc.c │ │ ├── test_ghost_max_uh.c │ │ ├── test_ghost_max_ul.c │ │ ├── test_ghost_max_ul16.c │ │ ├── test_ghost_max_ul32.c │ │ ├── test_ghost_max_ul64.c │ │ ├── test_ghost_max_ul8.c │ │ ├── test_ghost_max_ull.c │ │ ├── test_ghost_max_up.c │ │ └── test_ghost_max_z.c │ ├── min │ │ └── test_ghost_min_z.c │ ├── popcount │ │ ├── test_ghost_popcount_u32.c │ │ └── test_ghost_popcount_u64.c │ ├── rotl │ │ ├── test_ghost_rotl_u16.c │ │ ├── test_ghost_rotl_u32.c │ │ ├── test_ghost_rotl_u64.c │ │ └── test_ghost_rotl_u8.c │ ├── rotr │ │ └── test_ghost_rotr_u64.c │ ├── sqrt │ │ ├── test_ghost_sqrt_d.c │ │ └── test_ghost_sqrt_f.c │ ├── test_ghost_checked_mul.c │ ├── test_ghost_compare.c │ ├── test_ghost_max.c │ └── test_ghost_max_all.c │ ├── preprocessor │ ├── test_ghost_blank.c │ ├── test_ghost_bool_pp.c │ ├── test_ghost_concat.c │ ├── test_ghost_contains_comma.c │ ├── test_ghost_count_args.c │ ├── test_ghost_counter.c │ ├── test_ghost_cparser_pp.c │ ├── test_ghost_defer.c │ ├── test_ghost_expand.c │ ├── test_ghost_first.c │ ├── test_ghost_has_builtin.c │ ├── test_ghost_has_include.c │ ├── test_ghost_if_else.c │ ├── test_ghost_if_else_block.c │ ├── test_ghost_insert_comma.c │ ├── test_ghost_is_1.c │ ├── test_ghost_is_blank.c │ ├── test_ghost_is_parens.c │ ├── test_ghost_msvc_traditional.c │ ├── test_ghost_not.c │ ├── test_ghost_nothing.c │ ├── test_ghost_omit_va_args.c │ ├── test_ghost_omit_vararg.c │ ├── test_ghost_pp_va_args.c │ ├── test_ghost_rest.c │ └── test_ghost_stringify.c │ ├── serialization │ ├── bswap │ │ ├── test_ghost_bswap_u16.c │ │ ├── test_ghost_bswap_u32.c │ │ └── test_ghost_bswap_u64.c │ ├── hswap │ │ ├── test_ghost_betoh_u16.c │ │ ├── test_ghost_betoh_u32.c │ │ ├── test_ghost_betoh_u64.c │ │ ├── test_ghost_htobe_u16.c │ │ ├── test_ghost_htobe_u32.c │ │ ├── test_ghost_htobe_u64.c │ │ ├── test_ghost_htole_u16.c │ │ ├── test_ghost_htole_u32.c │ │ ├── test_ghost_htole_u64.c │ │ ├── test_ghost_letoh_u16.c │ │ ├── test_ghost_letoh_u32.c │ │ └── test_ghost_letoh_u64.c │ ├── load │ │ ├── test_ghost_load_be_f32.c │ │ ├── test_ghost_load_be_f64.c │ │ ├── test_ghost_load_be_i16.c │ │ ├── test_ghost_load_be_i32.c │ │ ├── test_ghost_load_be_i64.c │ │ ├── test_ghost_load_be_u16.c │ │ ├── test_ghost_load_be_u32.c │ │ ├── test_ghost_load_be_u64.c │ │ ├── test_ghost_load_he_f32.c │ │ ├── test_ghost_load_he_f64.c │ │ ├── test_ghost_load_he_i16.c │ │ ├── test_ghost_load_he_i32.c │ │ ├── test_ghost_load_he_i64.c │ │ ├── test_ghost_load_he_u16.c │ │ ├── test_ghost_load_he_u32.c │ │ ├── test_ghost_load_he_u64.c │ │ ├── test_ghost_load_i8.c │ │ ├── test_ghost_load_le_f32.c │ │ ├── test_ghost_load_le_f64.c │ │ ├── test_ghost_load_le_i16.c │ │ ├── test_ghost_load_le_i32.c │ │ ├── test_ghost_load_le_i64.c │ │ ├── test_ghost_load_le_u16.c │ │ ├── test_ghost_load_le_u32.c │ │ ├── test_ghost_load_le_u64.c │ │ └── test_ghost_load_u8.c │ └── store │ │ ├── test_ghost_store_be_f32.c │ │ ├── test_ghost_store_be_f64.c │ │ ├── test_ghost_store_be_i16.c │ │ ├── test_ghost_store_be_i32.c │ │ ├── test_ghost_store_be_i64.c │ │ ├── test_ghost_store_be_u16.c │ │ ├── test_ghost_store_be_u32.c │ │ ├── test_ghost_store_be_u64.c │ │ ├── test_ghost_store_he_i16.c │ │ ├── test_ghost_store_he_i32.c │ │ ├── test_ghost_store_he_i64.c │ │ ├── test_ghost_store_he_u16.c │ │ ├── test_ghost_store_he_u32.c │ │ ├── test_ghost_store_he_u64.c │ │ ├── test_ghost_store_i8.c │ │ ├── test_ghost_store_le_i16.c │ │ ├── test_ghost_store_le_i32.c │ │ ├── test_ghost_store_le_i64.c │ │ ├── test_ghost_store_le_u16.c │ │ ├── test_ghost_store_le_u32.c │ │ ├── test_ghost_store_le_u64.c │ │ └── test_ghost_store_u8.c │ ├── silence │ ├── test_ghost_silence_align_padding.c │ ├── test_ghost_silence_cast_truncates_constant.c │ ├── test_ghost_silence_constant_comparison.c │ ├── test_ghost_silence_constant_overflow.c │ ├── test_ghost_silence_cxx_compat.c │ ├── test_ghost_silence_deprecated.c │ ├── test_ghost_silence_insufficient_macro_args.c │ ├── test_ghost_silence_long_long.c │ ├── test_ghost_silence_missing_declarations.c │ ├── test_ghost_silence_missing_function_declarations.c │ ├── test_ghost_silence_missing_variable_declarations.c │ ├── test_ghost_silence_not_inlined.c │ ├── test_ghost_silence_pedantic.c │ ├── test_ghost_silence_push_pop.c │ ├── test_ghost_silence_push_pop_opt.c │ ├── test_ghost_silence_stringop_truncation.c │ ├── test_ghost_silence_unreachable.c │ ├── test_ghost_silence_unused_function.c │ ├── test_ghost_silence_unused_parameter.c │ └── test_ghost_silence_unused_result.c │ ├── string │ ├── test_ghost_bcmp.c │ ├── test_ghost_bcopy.c │ ├── test_ghost_bzero.c │ ├── test_ghost_index.c │ ├── test_ghost_memccpy.c │ ├── test_ghost_memchr.c │ ├── test_ghost_memcmp.c │ ├── test_ghost_memcpy.c │ ├── test_ghost_memlcmp.c │ ├── test_ghost_memmem.c │ ├── test_ghost_memmove.c │ ├── test_ghost_mempcpy.c │ ├── test_ghost_memrchr.c │ ├── test_ghost_memset.c │ ├── test_ghost_rindex.c │ ├── test_ghost_stpcpy.c │ ├── test_ghost_stpncpy.c │ ├── test_ghost_strcat.c │ ├── test_ghost_strchr.c │ ├── test_ghost_strchrnul.c │ ├── test_ghost_strcmp.c │ ├── test_ghost_strcpy.c │ ├── test_ghost_strcspn.c │ ├── test_ghost_strlcat.c │ ├── test_ghost_strlcpy.c │ ├── test_ghost_strlen.c │ ├── test_ghost_strncat.c │ ├── test_ghost_strncmp.c │ ├── test_ghost_strncpy.c │ ├── test_ghost_strnlen.c │ ├── test_ghost_strnlen_s.c │ ├── test_ghost_strnstr.c │ ├── test_ghost_strpbrk.c │ ├── test_ghost_strrchr.c │ ├── test_ghost_strsep.c │ ├── test_ghost_strset.c │ ├── test_ghost_strspn.c │ ├── test_ghost_strstr.c │ ├── test_ghost_strtok.c │ └── test_ghost_strtok_r.c │ ├── system │ └── map_anon │ │ ├── test_ghost_map_anon.c │ │ └── test_ghost_unmap_anon.c │ ├── test_common.h │ ├── test_config.h │ ├── test_ghost_common.c │ ├── test_ghost_core.c │ ├── test_ghost_debug_all.c │ ├── test_ghost_format_all.c │ ├── test_ghost_header_common.c │ ├── test_ghost_language_all.c │ ├── test_ghost_malloc_all.c │ ├── test_ghost_malloc_common.c │ ├── test_ghost_math_all.c │ ├── test_ghost_math_common.c │ ├── test_ghost_preprocessor_all.c │ ├── test_ghost_serialization_all.c │ ├── test_ghost_silence_all.c │ ├── test_ghost_string_all.c │ ├── test_ghost_thread_all.c │ ├── test_ghost_thread_common.c │ ├── test_ghost_type_all.c │ ├── test_ghost_type_common.c │ ├── thread │ ├── condition │ │ ├── test_ghost_condition_broadcast.c │ │ ├── test_ghost_condition_destroy.c │ │ ├── test_ghost_condition_init.c │ │ ├── test_ghost_condition_signal.c │ │ ├── test_ghost_condition_t.c │ │ └── test_ghost_condition_wait.c │ ├── ithread │ │ ├── test_ghost_ithread_create.c │ │ ├── test_ghost_ithread_detach.c │ │ ├── test_ghost_ithread_exit.c │ │ ├── test_ghost_ithread_id.c │ │ ├── test_ghost_ithread_is_current.c │ │ ├── test_ghost_ithread_join.c │ │ └── test_ghost_ithread_t.c │ ├── mutex │ │ ├── test_ghost_mutex_config.c │ │ ├── test_ghost_mutex_destroy.c │ │ ├── test_ghost_mutex_init.c │ │ ├── test_ghost_mutex_init_recursive.c │ │ ├── test_ghost_mutex_init_s.c │ │ ├── test_ghost_mutex_lock.c │ │ ├── test_ghost_mutex_t.c │ │ ├── test_ghost_mutex_trylock.c │ │ └── test_ghost_mutex_unlock.c │ ├── once │ │ ├── test_ghost_once_fn.c │ │ ├── test_ghost_once_init_fn.c │ │ ├── test_ghost_once_init_s.c │ │ └── test_ghost_once_t.c │ ├── test_ghost_condition.c │ ├── test_ghost_ithread.c │ ├── test_ghost_mutex.c │ ├── test_ghost_once.c │ ├── test_ghost_thread_config.c │ ├── test_ghost_thread_id.c │ ├── test_ghost_thread_options.c │ ├── test_ghost_thread_yield.c │ ├── test_ghost_tss.c │ ├── test_ghost_vpthread.c │ ├── test_ghost_vthread.c │ ├── thread_id │ │ ├── test_ghost_thread_id_compare.c │ │ ├── test_ghost_thread_id_current.c │ │ ├── test_ghost_thread_id_equal.c │ │ ├── test_ghost_thread_id_hash.c │ │ ├── test_ghost_thread_id_is_current.c │ │ └── test_ghost_thread_id_t.c │ ├── thread_options │ │ └── test_ghost_thread_options_t.c │ ├── tss │ │ ├── test_ghost_tss_config.c │ │ ├── test_ghost_tss_destroy.c │ │ ├── test_ghost_tss_get.c │ │ ├── test_ghost_tss_init.c │ │ ├── test_ghost_tss_init_dtor.c │ │ ├── test_ghost_tss_set.c │ │ └── test_ghost_tss_t.c │ ├── vpthread │ │ ├── test_ghost_vpthread_create.c │ │ ├── test_ghost_vpthread_detach.c │ │ ├── test_ghost_vpthread_exit.c │ │ ├── test_ghost_vpthread_id.c │ │ ├── test_ghost_vpthread_is_current.c │ │ ├── test_ghost_vpthread_join.c │ │ └── test_ghost_vpthread_t.c │ └── vthread │ │ ├── test_ghost_vthread_create.c │ │ ├── test_ghost_vthread_detach.c │ │ ├── test_ghost_vthread_exit.c │ │ ├── test_ghost_vthread_id.c │ │ ├── test_ghost_vthread_is_current.c │ │ ├── test_ghost_vthread_join.c │ │ └── test_ghost_vthread_t.c │ └── type │ ├── bool │ ├── test_ghost_bool.c │ ├── test_ghost_bool_width.c │ ├── test_ghost_false.c │ └── test_ghost_true.c │ ├── char │ ├── test_ghost_char.c │ ├── test_ghost_char_c.c │ ├── test_ghost_char_is_signed.c │ ├── test_ghost_char_max.c │ ├── test_ghost_char_min.c │ └── test_ghost_char_width.c │ ├── char16_t │ ├── test_ghost_char16_c.c │ ├── test_ghost_char16_is_distinct.c │ ├── test_ghost_char16_s.c │ ├── test_ghost_char16_t.c │ └── test_ghost_char16_width.c │ ├── char32_t │ ├── test_ghost_char32_c.c │ ├── test_ghost_char32_is_distinct.c │ ├── test_ghost_char32_s.c │ ├── test_ghost_char32_t.c │ └── test_ghost_char32_width.c │ ├── char8_t │ ├── test_ghost_char8_c.c │ ├── test_ghost_char8_is_distinct.c │ ├── test_ghost_char8_is_signed.c │ ├── test_ghost_char8_s.c │ ├── test_ghost_char8_t.c │ └── test_ghost_char8_width.c │ ├── double │ ├── test_ghost_double.c │ ├── test_ghost_double_c.c │ └── test_ghost_double_width.c │ ├── float │ ├── test_ghost_float.c │ ├── test_ghost_float_c.c │ └── test_ghost_float_width.c │ ├── float32_t │ ├── test_ghost_float32_c.c │ ├── test_ghost_float32_t.c │ └── test_ghost_float32_width.c │ ├── float64_t │ ├── test_ghost_float64_c.c │ ├── test_ghost_float64_t.c │ └── test_ghost_float64_width.c │ ├── int │ ├── test_ghost_int.c │ ├── test_ghost_int_c.c │ ├── test_ghost_int_max.c │ ├── test_ghost_int_min.c │ └── test_ghost_int_width.c │ ├── int16_t │ ├── test_ghost_int16_c.c │ ├── test_ghost_int16_max.c │ ├── test_ghost_int16_min.c │ ├── test_ghost_int16_t.c │ └── test_ghost_int16_width.c │ ├── int32_t │ ├── test_ghost_int32_c.c │ ├── test_ghost_int32_max.c │ ├── test_ghost_int32_min.c │ ├── test_ghost_int32_t.c │ └── test_ghost_int32_width.c │ ├── int64_t │ ├── test_ghost_int64_c.c │ ├── test_ghost_int64_max.c │ ├── test_ghost_int64_min.c │ ├── test_ghost_int64_t.c │ └── test_ghost_int64_width.c │ ├── int8_t │ ├── test_ghost_int8_c.c │ ├── test_ghost_int8_max.c │ ├── test_ghost_int8_min.c │ ├── test_ghost_int8_t.c │ └── test_ghost_int8_width.c │ ├── int_least16_t │ ├── test_ghost_int_least16_c.c │ ├── test_ghost_int_least16_max.c │ ├── test_ghost_int_least16_min.c │ ├── test_ghost_int_least16_t.c │ └── test_ghost_int_least16_width.c │ ├── int_least32_t │ ├── test_ghost_int_least32_c.c │ ├── test_ghost_int_least32_max.c │ ├── test_ghost_int_least32_min.c │ ├── test_ghost_int_least32_t.c │ └── test_ghost_int_least32_width.c │ ├── int_least64_t │ ├── test_ghost_int_least64_c.c │ ├── test_ghost_int_least64_max.c │ ├── test_ghost_int_least64_min.c │ ├── test_ghost_int_least64_t.c │ └── test_ghost_int_least64_width.c │ ├── int_least8_t │ ├── test_ghost_int_least8_c.c │ ├── test_ghost_int_least8_max.c │ ├── test_ghost_int_least8_min.c │ ├── test_ghost_int_least8_t.c │ └── test_ghost_int_least8_width.c │ ├── intptr_t │ ├── test_ghost_intptr_c.c │ ├── test_ghost_intptr_max.c │ ├── test_ghost_intptr_min.c │ ├── test_ghost_intptr_t.c │ └── test_ghost_intptr_width.c │ ├── ldouble │ ├── test_ghost_ldouble.c │ ├── test_ghost_ldouble_c.c │ └── test_ghost_ldouble_width.c │ ├── llong │ ├── test_ghost_llong.c │ ├── test_ghost_llong_c.c │ ├── test_ghost_llong_max.c │ ├── test_ghost_llong_min.c │ └── test_ghost_llong_width.c │ ├── long │ ├── test_ghost_long.c │ ├── test_ghost_long_c.c │ ├── test_ghost_long_max.c │ ├── test_ghost_long_min.c │ └── test_ghost_long_width.c │ ├── ptrdiff_t │ ├── test_ghost_ptrdiff_c.c │ ├── test_ghost_ptrdiff_max.c │ ├── test_ghost_ptrdiff_min.c │ ├── test_ghost_ptrdiff_t.c │ └── test_ghost_ptrdiff_width.c │ ├── schar │ ├── test_ghost_schar.c │ ├── test_ghost_schar_c.c │ ├── test_ghost_schar_max.c │ ├── test_ghost_schar_min.c │ └── test_ghost_schar_width.c │ ├── short │ ├── test_ghost_short.c │ ├── test_ghost_short_c.c │ ├── test_ghost_short_max.c │ ├── test_ghost_short_min.c │ └── test_ghost_short_width.c │ ├── size_t │ ├── test_ghost_size_c.c │ ├── test_ghost_size_max.c │ ├── test_ghost_size_t.c │ └── test_ghost_size_width.c │ ├── ssize_t │ ├── test_ghost_ssize_c.c │ ├── test_ghost_ssize_max.c │ ├── test_ghost_ssize_min.c │ ├── test_ghost_ssize_t.c │ └── test_ghost_ssize_width.c │ ├── test_ghost_bool_all.c │ ├── test_ghost_char16_all.c │ ├── test_ghost_char32_all.c │ ├── test_ghost_char8_all.c │ ├── test_ghost_char_all.c │ ├── test_ghost_double_all.c │ ├── test_ghost_float128_all.c │ ├── test_ghost_float16_all.c │ ├── test_ghost_float32_all.c │ ├── test_ghost_float64_all.c │ ├── test_ghost_float_all.c │ ├── test_ghost_int16_all.c │ ├── test_ghost_int32_all.c │ ├── test_ghost_int64_all.c │ ├── test_ghost_int8_all.c │ ├── test_ghost_int_all.c │ ├── test_ghost_int_least16_all.c │ ├── test_ghost_int_least32_all.c │ ├── test_ghost_int_least64_all.c │ ├── test_ghost_int_least8_all.c │ ├── test_ghost_intptr_all.c │ ├── test_ghost_ldouble_all.c │ ├── test_ghost_llong_all.c │ ├── test_ghost_long_all.c │ ├── test_ghost_ptrdiff_all.c │ ├── test_ghost_schar_all.c │ ├── test_ghost_short_all.c │ ├── test_ghost_size_all.c │ ├── test_ghost_ssize_all.c │ ├── test_ghost_uchar_all.c │ ├── test_ghost_uint16_all.c │ ├── test_ghost_uint32_all.c │ ├── test_ghost_uint64_all.c │ ├── test_ghost_uint8_all.c │ ├── test_ghost_uint_all.c │ ├── test_ghost_uint_least16_all.c │ ├── test_ghost_uint_least32_all.c │ ├── test_ghost_uint_least64_all.c │ ├── test_ghost_uint_least8_all.c │ ├── test_ghost_uintptr_all.c │ ├── test_ghost_ullong_all.c │ ├── test_ghost_ulong_all.c │ ├── test_ghost_ushort_all.c │ ├── test_ghost_wchar_all.c │ ├── uchar │ ├── test_ghost_uchar.c │ ├── test_ghost_uchar_c.c │ ├── test_ghost_uchar_max.c │ └── test_ghost_uchar_width.c │ ├── uint │ ├── test_ghost_uint.c │ ├── test_ghost_uint_c.c │ ├── test_ghost_uint_max.c │ └── test_ghost_uint_width.c │ ├── uint16_t │ ├── test_ghost_uint16_c.c │ ├── test_ghost_uint16_max.c │ ├── test_ghost_uint16_t.c │ └── test_ghost_uint16_width.c │ ├── uint32_t │ ├── test_ghost_uint32_c.c │ ├── test_ghost_uint32_max.c │ ├── test_ghost_uint32_t.c │ └── test_ghost_uint32_width.c │ ├── uint64_t │ ├── test_ghost_uint64_c.c │ ├── test_ghost_uint64_max.c │ ├── test_ghost_uint64_t.c │ └── test_ghost_uint64_width.c │ ├── uint8_t │ ├── test_ghost_uint8_c.c │ ├── test_ghost_uint8_max.c │ ├── test_ghost_uint8_t.c │ └── test_ghost_uint8_width.c │ ├── uint_least16_t │ ├── test_ghost_uint_least16_c.c │ ├── test_ghost_uint_least16_max.c │ ├── test_ghost_uint_least16_t.c │ └── test_ghost_uint_least16_width.c │ ├── uint_least32_t │ ├── test_ghost_uint_least32_c.c │ ├── test_ghost_uint_least32_max.c │ ├── test_ghost_uint_least32_t.c │ └── test_ghost_uint_least32_width.c │ ├── uint_least64_t │ ├── test_ghost_uint_least64_c.c │ ├── test_ghost_uint_least64_max.c │ ├── test_ghost_uint_least64_t.c │ └── test_ghost_uint_least64_width.c │ ├── uint_least8_t │ ├── test_ghost_uint_least8_c.c │ ├── test_ghost_uint_least8_max.c │ ├── test_ghost_uint_least8_t.c │ └── test_ghost_uint_least8_width.c │ ├── uintptr_t │ ├── test_ghost_uintptr_c.c │ ├── test_ghost_uintptr_max.c │ ├── test_ghost_uintptr_t.c │ └── test_ghost_uintptr_width.c │ ├── ullong │ ├── test_ghost_ullong.c │ ├── test_ghost_ullong_c.c │ ├── test_ghost_ullong_max.c │ └── test_ghost_ullong_width.c │ ├── ulong │ ├── test_ghost_ulong.c │ ├── test_ghost_ulong_c.c │ ├── test_ghost_ulong_max.c │ └── test_ghost_ulong_width.c │ └── ushort │ ├── test_ghost_ushort.c │ ├── test_ghost_ushort_c.c │ ├── test_ghost_ushort_max.c │ └── test_ghost_ushort_width.c └── tools ├── amalgamate.py └── impl ├── check-header-guards.py ├── copy-types.sh ├── find-mismatched-open-close.sh ├── generate-math.sh └── make-tests.sh /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | **WARNING**: Ghost is released under a public-domain-equivalent license 2 | (MIT-0.) By contributing code to Ghost, you certify that you are releasing your 3 | contribution under the MIT-0 license and that you have the authority to do so. 4 | 5 | Do not copy code from Stack Overflow, Wikipedia, or any other source that is not 6 | public domain. 7 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /test/.build/ 2 | /test/input/test_ghost_input 3 | /test/input/test_ghost_input.exe 4 | /test/input/test_ghost_input.obj 5 | /test/unit/mirror 6 | .ninja_deps 7 | .ninja_log 8 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT No Attribution 2 | 3 | Copyright (c) 2022-2023 Fraser Heavy Software 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to 7 | deal in the Software without restriction, including without limitation the 8 | rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 9 | sell copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so. 11 | 12 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 13 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 14 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 15 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 16 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 17 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 18 | IN THE SOFTWARE. 19 | -------------------------------------------------------------------------------- /experimental/ghost/crypto/README.md: -------------------------------------------------------------------------------- 1 | This contains Ghost's wrappers for platform security and cryptography features. 2 | 3 | There isn't much here so far, and what is here is experimental. 4 | -------------------------------------------------------------------------------- /include/ghost/algorithm/README.md: -------------------------------------------------------------------------------- 1 | This contains useful non-cryptographic algorithms like hashing, sorting, random number generation, etc. 2 | 3 | Some of these wrap standard C or POSIX functions like `qsort()`. Others are pure C like the FNV-1a hash algorithms. 4 | 5 | This needs to be expanded a lot. At the very least we need: 6 | 7 | - The POSIX algorithms in ``, in particular `bsearch()`, `lsearch()` 8 | - The `hsearch()`, `twalk()` and `insque()` algorithms also need to be wrapped and implemented but they will probably go in `container/legacy/` 9 | - Random number genereration, e.g. xoshiro, with helpers for uniform ranges, floats, etc. 10 | - Modern hash algorithms, e.g. MurmurHash and some of its many derivatives (implemented in C and with a public-domain-equivalent license of course) 11 | - CRC algorithms, in particular CRC-32 and Adler-32 12 | -------------------------------------------------------------------------------- /include/ghost/debug/ghost_backtrace.h: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT No Attribution 3 | * 4 | * Copyright (c) 2022 Fraser Heavy Software 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to 8 | * deal in the Software without restriction, including without limitation the 9 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 10 | * sell copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | * IN THE SOFTWARE. 20 | */ 21 | 22 | #ifndef GHOST_BACKTRACE_H_INCLUDED 23 | #define GHOST_BACKTRACE_H_INCLUDED 24 | 25 | #include "ghost/ghost_core.h" 26 | 27 | /*TODO*/ 28 | #define ghost_has_ghost_backtrace 0 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /include/ghost/error/ghost_perror.h: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT No Attribution 3 | * 4 | * Copyright (c) 2022 Fraser Heavy Software 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to 8 | * deal in the Software without restriction, including without limitation the 9 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 10 | * sell copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | * IN THE SOFTWARE. 20 | */ 21 | 22 | #ifndef GHOST_PERROR_H_INCLUDED 23 | #define GHOST_PERROR_H_INCLUDED 24 | 25 | #include "ghost/ghost_core.h" 26 | 27 | /* TODO */ 28 | #define ghost_has_ghost_perror 0 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /include/ghost/format/README.md: -------------------------------------------------------------------------------- 1 | This folder wraps anything to do with `printf()` and `scanf()` format strings. It provides e.g.: 2 | 3 | - The standard `` identifiers, e.g. `PRIu32`, are wrapped as e.g. `GHOST_PRIu32` in `ghost_format_32.h` and other files; 4 | - Extensions such as `GHOST_PRIuZ` are provided to print `size_t` in `ghost_format_z.h` other files; 5 | - Wrappers for functions like `asprintf()` in their respective files. 6 | 7 | Note that some of these functions are considered "allocator functions". They depend on the value of `GHOST_MALLOC_SYSTEM` and may be synthesized if `ghost_malloc` and friends are overridden. 8 | 9 | ### Future Work 10 | 11 | Newlib has a huge number of [`printf()` extensions described here](https://www.intel.com/content/www/us/en/docs/programmable/683282/current/definition-of-asnprintf.html). Eventually it would be nice to wrap many of these, or at least the popular ones. Most libcs, even other libcs for Linux, do not implement `asnprintf()`, `fiprintf()` and many others, but some of these functions like `asnprintf()` are implemented by other libraries like Gnulib. 12 | -------------------------------------------------------------------------------- /include/ghost/ghost_silence_all.h: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT No Attribution 3 | * 4 | * Copyright (c) 2022 Fraser Heavy Software 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to 8 | * deal in the Software without restriction, including without limitation the 9 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 10 | * sell copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | * IN THE SOFTWARE. 20 | */ 21 | 22 | #ifndef GHOST_SILENCE_ALL_H_INCLUDED 23 | #define GHOST_SILENCE_ALL_H_INCLUDED 24 | 25 | #include "ghost/ghost_core.h" 26 | 27 | /*TODO */ 28 | #include "ghost/silence/ghost_silence_push_pop.h" 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /include/ghost/impl/README.md: -------------------------------------------------------------------------------- 1 | ## Internal Implementation Details 2 | 3 | `ghost/impl/` contains internal **impl**ementation details of Ghost. 4 | 5 | Never directly `#include` any file in this folder. 6 | 7 | Never use or define any symbol prefixed with `ghost_impl_`, `GHOST_IMPL_` or `GhostImpl`. 8 | 9 | Anything here may change at any time. 10 | -------------------------------------------------------------------------------- /include/ghost/impl/binding/README.md: -------------------------------------------------------------------------------- 1 | This folder contains bindings for non-platform third-party libraries. 2 | 3 | Note that bindings to (L)GPL libraries are not in the main Ghost repository. These exist as a separate ghost-gpl overlay. 4 | -------------------------------------------------------------------------------- /include/ghost/impl/header/ghost_impl_headers.h: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT No Attribution 3 | * 4 | * Copyright (c) 2022 Fraser Heavy Software 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to 8 | * deal in the Software without restriction, including without limitation the 9 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 10 | * sell copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | * IN THE SOFTWARE. 20 | */ 21 | 22 | #ifndef GHOST_IMPL_HEADERS_H_INCLUDED 23 | #define GHOST_IMPL_HEADERS_H_INCLUDED 24 | 25 | /* 26 | * This file contains global platform-specific workarounds involving header 27 | * files. 28 | */ 29 | 30 | #include "ghost/impl/header/ghost_impl_cosmopolitan.h" 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /include/ghost/io/README.md: -------------------------------------------------------------------------------- 1 | ### Features intentionally not implemented 2 | 3 | Ghost does not implement the `_unlocked` I/O functions. Only `getc_unlocked()`, 4 | `getchar_unlocked()`, `putc_unlocked()` and `putchar_unlocked()` are specified 5 | by POSIX; others are platform-specific extensions. These are rarely supported 6 | and not terribly useful. 7 | 8 | Modern locks are fast and unlikely to be a bottleneck in your application. If 9 | you do need these functions, you must be doing highly platform-specific 10 | optimizations so you should just use the real functions directly. 11 | 12 | (Ghost provides `flockfile()` on most platforms. If you have a thread that has 13 | exclusive access to a file you could try just keeping it locked throughout to 14 | avoid most of the overhead of locking and unlocking.) 15 | -------------------------------------------------------------------------------- /include/ghost/malloc/ghost_aligned_free.h: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT No Attribution 3 | * 4 | * Copyright (c) 2022 Fraser Heavy Software 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to 8 | * deal in the Software without restriction, including without limitation the 9 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 10 | * sell copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | * IN THE SOFTWARE. 20 | */ 21 | 22 | #ifndef GHOST_ALIGNED_FREE_H_INCLUDED 23 | #define GHOST_ALIGNED_FREE_H_INCLUDED 24 | 25 | /* ghost_aligned_malloc() and ghost_aligned_free() are both defined in 26 | * ghost_aligned_malloc.h. */ 27 | #include "ghost/malloc/ghost_aligned_malloc.h" 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /include/ghost/math/ffs/README.md: -------------------------------------------------------------------------------- 1 | ## Find First Set 2 | 3 | portability notes: 4 | 5 | Compilers: 6 | 7 | - GCC and Clang has builtins for `ffs()`, `ffsl()` and `ffsll()`, but only uses them automatically under non-strict `-std=gnu*`; 8 | - GCC also has `__builtin_ctz()` which could be used to implement ffs; 9 | - MSVC has for `_BitScanForward`; 10 | - Intel has `_bit_scan_forward`; 11 | - NVidia has `__ffs`; 12 | - GHC has `countTrailingZeros`. 13 | 14 | Platforms: 15 | 16 | - glibc declares `ffs()` in ``, and `ffsl()` and `ffsll()` in ``, but only under various conditions (`_DEFAULT_SOURCE` and others); 17 | - musl declares all three of `ffs()`, `ffsl()` and `ffsll()` in ``, but only under various conditions (`_DEFAULT_SOURCE` and others); 18 | - FreeBSD has all three of `ffs()`, `ffsl()` and `ffsll()` in ``, but only under various conditions (`__XSI_VISIBLE`, `__BSD_VISIBLE`) 19 | 20 | For the above reasons we never bother to use the ffs() function as declared in the headers. 21 | -------------------------------------------------------------------------------- /include/ghost/math/ffs/ghost_ffs_u8.h: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT No Attribution 3 | * 4 | * Copyright (c) 2022 Fraser Heavy Software 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to 8 | * deal in the Software without restriction, including without limitation the 9 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 10 | * sell copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | * IN THE SOFTWARE. 20 | */ 21 | 22 | #ifndef GHOST_FFS_U8_H_INCLUDED 23 | #define GHOST_FFS_U8_H_INCLUDED 24 | 25 | #include "ghost/ghost_core.h" 26 | 27 | /*TODO */ 28 | #define ghost_has_ghost_ffs_u8 0 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /include/ghost/math/ghost_checked_mul.h: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT No Attribution 3 | * 4 | * Copyright (c) 2022 Fraser Heavy Software 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to 8 | * deal in the Software without restriction, including without limitation the 9 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 10 | * sell copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | * IN THE SOFTWARE. 20 | */ 21 | 22 | #ifndef GHOST_CHECKED_MUL_H_INCLUDED 23 | #define GHOST_CHECKED_MUL_H_INCLUDED 24 | 25 | #include "ghost/ghost_core.h" 26 | 27 | /*TODO*/ 28 | #define ghost_has_ghost_checked_mul 0 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /include/ghost/math/rotr/ghost_rotr_u64.h: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT No Attribution 3 | * 4 | * Copyright (c) 2022 Fraser Heavy Software 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to 8 | * deal in the Software without restriction, including without limitation the 9 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 10 | * sell copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | * IN THE SOFTWARE. 20 | */ 21 | 22 | #ifndef GHOST_ROTR_U64_H_INCLUDED 23 | #define GHOST_ROTR_U64_H_INCLUDED 24 | 25 | #include "ghost/ghost_core.h" 26 | 27 | /* TODO: https://github.com/llvm/llvm-project/issues/42654 */ 28 | #define ghost_has_ghost_rotr_u64 0 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /include/ghost/serialization/ghost_bswap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT No Attribution 3 | * 4 | * Copyright (c) 2022 Fraser Heavy Software 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to 8 | * deal in the Software without restriction, including without limitation the 9 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 10 | * sell copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | * IN THE SOFTWARE. 20 | */ 21 | 22 | #ifndef GHOST_BSWAP_H_INCLUDED 23 | #define GHOST_BSWAP_H_INCLUDED 24 | 25 | #include "ghost/ghost_core.h" 26 | 27 | /* TODO */ 28 | #define ghost_has_ghost_bswap 0 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /include/ghost/serialization/ghost_ntoh.h: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT No Attribution 3 | * 4 | * Copyright (c) 2022 Fraser Heavy Software 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to 8 | * deal in the Software without restriction, including without limitation the 9 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 10 | * sell copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | * IN THE SOFTWARE. 20 | */ 21 | 22 | #ifndef GHOST_NTOH_H_INCLUDED 23 | #define GHOST_NTOH_H_INCLUDED 24 | 25 | /* TODO */ 26 | #define ghost_has_ghost_ntoh 0 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /include/ghost/serialization/load/ghost_load_he.h: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT No Attribution 3 | * 4 | * Copyright (c) 2022 Fraser Heavy Software 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to 8 | * deal in the Software without restriction, including without limitation the 9 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 10 | * sell copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | * IN THE SOFTWARE. 20 | */ 21 | 22 | #ifndef GHOST_LOAD_HE_H_INCLUDED 23 | #define GHOST_LOAD_HE_H_INCLUDED 24 | 25 | #include "ghost/ghost_core.h" 26 | /*TODO*/ 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /include/ghost/serialization/load/ghost_load_le.h: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT No Attribution 3 | * 4 | * Copyright (c) 2022 Fraser Heavy Software 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to 8 | * deal in the Software without restriction, including without limitation the 9 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 10 | * sell copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | * IN THE SOFTWARE. 20 | */ 21 | 22 | #ifndef GHOST_LOAD_LE_H_INCLUDED 23 | #define GHOST_LOAD_LE_H_INCLUDED 24 | /*TODO*/ 25 | #endif 26 | -------------------------------------------------------------------------------- /include/ghost/serialization/ntoh/TODO: -------------------------------------------------------------------------------- 1 | TODO 2 | -------------------------------------------------------------------------------- /include/ghost/string/README.md: -------------------------------------------------------------------------------- 1 | # String 2 | 3 | This folder implements string and memory manipulation functions typically found in ``, `` and similar headers. 4 | 5 | Some functions in `` and `` are elsewhere in Ghost. For example `strdup()` is with the allocator functions and `ffs()` is with the math functions. 6 | 7 | This also doesn't contain string formatting functions (which are typically in ``.) Functions like `printf()` and `scanf()` are in `ghost/format/` along with format specifiers and everything else related to string formatting. 8 | 9 | 10 | ## Unimplemented functions 11 | 12 | The following functions are not implemented: 13 | 14 | - `strcasecmp()`, `strcasecmp_l()`, `strcasestr()`, `strncasecmp()`, `strncasecmp_l()` 15 | 16 | Case-insensitive string functions are not yet implemented in Ghost. It's not trivial to do locale-specific things in a platform-independent way. If these were to be implemented they may end up in a top-level `locale/` folder to abstract out `locale_t` and all locale-related functions. Wide string functions are also not yet implemented for similar reasons. 17 | 18 | - glibc `strfry()`, `memfrob()`. 19 | 20 | [glibc maintainers consider `strfry()` to be a joke](https://sourceware.org/bugzilla/show_bug.cgi?id=4403) and `memfrob()` obviously is as well. Don't use these functions. 21 | -------------------------------------------------------------------------------- /include/ghost/thread/thread_options/ghost_thread_options_t.h: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT No Attribution 3 | * 4 | * Copyright (c) 2022 Fraser Heavy Software 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to 8 | * deal in the Software without restriction, including without limitation the 9 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 10 | * sell copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | * IN THE SOFTWARE. 20 | */ 21 | 22 | #ifndef GHOST_THREAD_OPTIONS_T_H_INCLUDED 23 | #define GHOST_THREAD_OPTIONS_T_H_INCLUDED 24 | /* TODO move options struct to here, not functions */ 25 | #include "ghost/thread/ghost_thread_options.h" 26 | #endif 27 | -------------------------------------------------------------------------------- /include/ghost/type/double/ghost_double.h: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT No Attribution 3 | * 4 | * Copyright (c) 2022 Fraser Heavy Software 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to 8 | * deal in the Software without restriction, including without limitation the 9 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 10 | * sell copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | * IN THE SOFTWARE. 20 | */ 21 | 22 | #ifndef GHOST_DOUBLE_H_INCLUDED 23 | #define GHOST_DOUBLE_H_INCLUDED 24 | 25 | #include "ghost/ghost_core.h" 26 | 27 | #if GHOST_DOCUMENTATION 28 | #endif 29 | 30 | /*TODO*/ 31 | #include "ghost/type/ghost_double_all.h" 32 | 33 | #endif 34 | 35 | -------------------------------------------------------------------------------- /include/ghost/type/double/ghost_double_c.h: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT No Attribution 3 | * 4 | * Copyright (c) 2022 Fraser Heavy Software 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to 8 | * deal in the Software without restriction, including without limitation the 9 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 10 | * sell copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | * IN THE SOFTWARE. 20 | */ 21 | 22 | #ifndef GHOST_DOUBLE_C_H_INCLUDED 23 | #define GHOST_DOUBLE_C_H_INCLUDED 24 | 25 | #include "ghost/ghost_core.h" 26 | 27 | #if GHOST_DOCUMENTATION 28 | #endif 29 | 30 | /*TODO*/ 31 | #include "ghost/type/ghost_double_all.h" 32 | #define ghost_has_GHOST_DOUBLE_C 0 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /include/ghost/type/double/ghost_double_width.h: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT No Attribution 3 | * 4 | * Copyright (c) 2022 Fraser Heavy Software 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to 8 | * deal in the Software without restriction, including without limitation the 9 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 10 | * sell copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | * IN THE SOFTWARE. 20 | */ 21 | 22 | #ifndef GHOST_DOUBLE_WIDTH_H_INCLUDED 23 | #define GHOST_DOUBLE_WIDTH_H_INCLUDED 24 | 25 | #include "ghost/ghost_core.h" 26 | 27 | #if GHOST_DOCUMENTATION 28 | #endif 29 | 30 | /*TODO*/ 31 | #include "ghost/type/ghost_double_all.h" 32 | #define ghost_has_GHOST_DOUBLE_WIDTH 0 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /include/ghost/type/float/ghost_float.h: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT No Attribution 3 | * 4 | * Copyright (c) 2022 Fraser Heavy Software 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to 8 | * deal in the Software without restriction, including without limitation the 9 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 10 | * sell copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | * IN THE SOFTWARE. 20 | */ 21 | 22 | #ifndef GHOST_FLOAT_H_INCLUDED 23 | #define GHOST_FLOAT_H_INCLUDED 24 | 25 | #include "ghost/ghost_core.h" 26 | 27 | #if GHOST_DOCUMENTATION 28 | #endif 29 | 30 | /*TODO*/ 31 | #include "ghost/type/ghost_float_all.h" 32 | 33 | #endif 34 | 35 | -------------------------------------------------------------------------------- /include/ghost/type/float/ghost_float_c.h: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT No Attribution 3 | * 4 | * Copyright (c) 2022 Fraser Heavy Software 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to 8 | * deal in the Software without restriction, including without limitation the 9 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 10 | * sell copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | * IN THE SOFTWARE. 20 | */ 21 | 22 | #ifndef GHOST_FLOAT_C_H_INCLUDED 23 | #define GHOST_FLOAT_C_H_INCLUDED 24 | 25 | #include "ghost/ghost_core.h" 26 | 27 | #if GHOST_DOCUMENTATION 28 | #endif 29 | 30 | /*TODO*/ 31 | #include "ghost/type/ghost_float_all.h" 32 | #define ghost_has_GHOST_FLOAT_C 0 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /include/ghost/type/float/ghost_float_width.h: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT No Attribution 3 | * 4 | * Copyright (c) 2022 Fraser Heavy Software 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to 8 | * deal in the Software without restriction, including without limitation the 9 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 10 | * sell copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | * IN THE SOFTWARE. 20 | */ 21 | 22 | #ifndef GHOST_FLOAT_WIDTH_H_INCLUDED 23 | #define GHOST_FLOAT_WIDTH_H_INCLUDED 24 | 25 | #include "ghost/ghost_core.h" 26 | 27 | #if GHOST_DOCUMENTATION 28 | #endif 29 | 30 | /*TODO*/ 31 | #include "ghost/type/ghost_float_all.h" 32 | #define ghost_has_GHOST_FLOAT_WIDTH 0 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /include/ghost/type/float32_t/ghost_float32_c.h: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT No Attribution 3 | * 4 | * Copyright (c) 2022 Fraser Heavy Software 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to 8 | * deal in the Software without restriction, including without limitation the 9 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 10 | * sell copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | * IN THE SOFTWARE. 20 | */ 21 | 22 | #ifndef GHOST_FLOAT32_C_H_INCLUDED 23 | #define GHOST_FLOAT32_C_H_INCLUDED 24 | 25 | #include "ghost/ghost_core.h" 26 | 27 | #if GHOST_DOCUMENTATION 28 | #endif 29 | 30 | /*TODO*/ 31 | #include "ghost/type/ghost_float32_all.h" 32 | #define ghost_has_GHOST_FLOAT32_C 0 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /include/ghost/type/float32_t/ghost_float32_t.h: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT No Attribution 3 | * 4 | * Copyright (c) 2022 Fraser Heavy Software 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to 8 | * deal in the Software without restriction, including without limitation the 9 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 10 | * sell copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | * IN THE SOFTWARE. 20 | */ 21 | 22 | #ifndef GHOST_FLOAT32_T_H_INCLUDED 23 | #define GHOST_FLOAT32_T_H_INCLUDED 24 | 25 | #include "ghost/ghost_core.h" 26 | 27 | #if GHOST_DOCUMENTATION 28 | #endif 29 | 30 | /*TODO*/ 31 | #include "ghost/type/ghost_float32_all.h" 32 | 33 | #endif 34 | 35 | -------------------------------------------------------------------------------- /include/ghost/type/float64_t/ghost_float64_c.h: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT No Attribution 3 | * 4 | * Copyright (c) 2022 Fraser Heavy Software 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to 8 | * deal in the Software without restriction, including without limitation the 9 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 10 | * sell copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | * IN THE SOFTWARE. 20 | */ 21 | 22 | #ifndef GHOST_FLOAT64_C_H_INCLUDED 23 | #define GHOST_FLOAT64_C_H_INCLUDED 24 | 25 | #include "ghost/ghost_core.h" 26 | 27 | #if GHOST_DOCUMENTATION 28 | #endif 29 | 30 | /*TODO*/ 31 | #include "ghost/type/ghost_float64_all.h" 32 | #define ghost_has_GHOST_FLOAT64_C 0 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /include/ghost/type/float64_t/ghost_float64_t.h: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT No Attribution 3 | * 4 | * Copyright (c) 2022 Fraser Heavy Software 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to 8 | * deal in the Software without restriction, including without limitation the 9 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 10 | * sell copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | * IN THE SOFTWARE. 20 | */ 21 | 22 | #ifndef GHOST_FLOAT64_T_H_INCLUDED 23 | #define GHOST_FLOAT64_T_H_INCLUDED 24 | 25 | #include "ghost/ghost_core.h" 26 | 27 | #if GHOST_DOCUMENTATION 28 | #endif 29 | 30 | /*TODO*/ 31 | #include "ghost/type/ghost_float64_all.h" 32 | 33 | #endif 34 | 35 | -------------------------------------------------------------------------------- /include/ghost/type/ghost_double_all.h: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT No Attribution 3 | * 4 | * Copyright (c) 2022 Fraser Heavy Software 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to 8 | * deal in the Software without restriction, including without limitation the 9 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 10 | * sell copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | * IN THE SOFTWARE. 20 | */ 21 | 22 | #ifndef GHOST_DOUBLE_ALL_H_INCLUDED 23 | #define GHOST_DOUBLE_ALL_H_INCLUDED 24 | 25 | #include "ghost/ghost_core.h" 26 | 27 | #if GHOST_DOCUMENTATION 28 | /** 29 | */ 30 | #endif 31 | 32 | /* TODO */ 33 | #define ghost_has_ghost_double 1 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /include/ghost/type/ghost_float128_all.h: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT No Attribution 3 | * 4 | * Copyright (c) 2022 Fraser Heavy Software 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to 8 | * deal in the Software without restriction, including without limitation the 9 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 10 | * sell copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | * IN THE SOFTWARE. 20 | */ 21 | 22 | #ifndef GHOST_FLOAT128_ALL_H_INCLUDED 23 | #define GHOST_FLOAT128_ALL_H_INCLUDED 24 | 25 | #include "ghost/ghost_core.h" 26 | 27 | /* TODO */ 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /include/ghost/type/ghost_float16_all.h: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT No Attribution 3 | * 4 | * Copyright (c) 2022 Fraser Heavy Software 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to 8 | * deal in the Software without restriction, including without limitation the 9 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 10 | * sell copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | * IN THE SOFTWARE. 20 | */ 21 | 22 | #ifndef GHOST_FLOAT16_ALL_H_INCLUDED 23 | #define GHOST_FLOAT16_ALL_H_INCLUDED 24 | 25 | #include "ghost/ghost_core.h" 26 | 27 | /* TODO */ 28 | /* GCC supports _Float16 on aarch64 by default and on x86 with iff SSE2 is enabled */ 29 | /* Apple silicon with Clang has __fp16 */ 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /include/ghost/type/ghost_float_all.h: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT No Attribution 3 | * 4 | * Copyright (c) 2022 Fraser Heavy Software 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to 8 | * deal in the Software without restriction, including without limitation the 9 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 10 | * sell copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | * IN THE SOFTWARE. 20 | */ 21 | 22 | #ifndef GHOST_FLOAT_ALL_H_INCLUDED 23 | #define GHOST_FLOAT_ALL_H_INCLUDED 24 | 25 | #include "ghost/ghost_core.h" 26 | /* TODO */ 27 | #define ghost_has_ghost_float 1 28 | #endif 29 | -------------------------------------------------------------------------------- /include/ghost/type/ghost_wchar_all.h: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT No Attribution 3 | * 4 | * Copyright (c) 2022 Fraser Heavy Software 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to 8 | * deal in the Software without restriction, including without limitation the 9 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 10 | * sell copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | * IN THE SOFTWARE. 20 | */ 21 | 22 | #ifndef GHOST_WCHAR_ALL_H_INCLUDED 23 | #define GHOST_WCHAR_ALL_H_INCLUDED 24 | 25 | #include "ghost/ghost_core.h" 26 | 27 | /*TODO*/ 28 | 29 | /* TODO on Windows use __wchar_t 30 | * https://devblogs.microsoft.com/oldnewthing/20161201-00/?p=94836 */ 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /include/ghost/type/ldouble/ghost_ldouble.h: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT No Attribution 3 | * 4 | * Copyright (c) 2022 Fraser Heavy Software 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to 8 | * deal in the Software without restriction, including without limitation the 9 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 10 | * sell copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | * IN THE SOFTWARE. 20 | */ 21 | 22 | #ifndef GHOST_LDOUBLE_H_INCLUDED 23 | #define GHOST_LDOUBLE_H_INCLUDED 24 | 25 | #include "ghost/ghost_core.h" 26 | 27 | #if GHOST_DOCUMENTATION 28 | #endif 29 | 30 | /*TODO*/ 31 | #include "ghost/type/ghost_ldouble_all.h" 32 | 33 | #endif 34 | 35 | -------------------------------------------------------------------------------- /include/ghost/type/ldouble/ghost_ldouble_c.h: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT No Attribution 3 | * 4 | * Copyright (c) 2022 Fraser Heavy Software 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to 8 | * deal in the Software without restriction, including without limitation the 9 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 10 | * sell copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | * IN THE SOFTWARE. 20 | */ 21 | 22 | #ifndef GHOST_LDOUBLE_C_H_INCLUDED 23 | #define GHOST_LDOUBLE_C_H_INCLUDED 24 | 25 | #include "ghost/ghost_core.h" 26 | 27 | #if GHOST_DOCUMENTATION 28 | #endif 29 | 30 | /*TODO*/ 31 | #include "ghost/type/ghost_ldouble_all.h" 32 | #define ghost_has_GHOST_LDOUBLE_C 0 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /include/ghost/type/ptrdiff_t/ghost_ptrdiff_c.h: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT No Attribution 3 | * 4 | * Copyright (c) 2022 Fraser Heavy Software 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to 8 | * deal in the Software without restriction, including without limitation the 9 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 10 | * sell copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | * IN THE SOFTWARE. 20 | */ 21 | 22 | #ifndef GHOST_PTRDIFF_C_H_INCLUDED 23 | #define GHOST_PTRDIFF_C_H_INCLUDED 24 | 25 | #include "ghost/ghost_core.h" 26 | 27 | #if GHOST_DOCUMENTATION 28 | #endif 29 | 30 | /*TODO*/ 31 | #include "ghost/type/ghost_ptrdiff_all.h" 32 | 33 | #endif 34 | 35 | -------------------------------------------------------------------------------- /include/ghost/type/ptrdiff_t/ghost_ptrdiff_max.h: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT No Attribution 3 | * 4 | * Copyright (c) 2022 Fraser Heavy Software 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to 8 | * deal in the Software without restriction, including without limitation the 9 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 10 | * sell copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | * IN THE SOFTWARE. 20 | */ 21 | 22 | #ifndef GHOST_PTRDIFF_MAX_H_INCLUDED 23 | #define GHOST_PTRDIFF_MAX_H_INCLUDED 24 | 25 | #include "ghost/ghost_core.h" 26 | 27 | #if GHOST_DOCUMENTATION 28 | #endif 29 | 30 | /*TODO*/ 31 | #include "ghost/type/ghost_ptrdiff_all.h" 32 | 33 | #endif 34 | 35 | -------------------------------------------------------------------------------- /include/ghost/type/ptrdiff_t/ghost_ptrdiff_min.h: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT No Attribution 3 | * 4 | * Copyright (c) 2022 Fraser Heavy Software 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to 8 | * deal in the Software without restriction, including without limitation the 9 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 10 | * sell copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | * IN THE SOFTWARE. 20 | */ 21 | 22 | #ifndef GHOST_PTRDIFF_MIN_H_INCLUDED 23 | #define GHOST_PTRDIFF_MIN_H_INCLUDED 24 | 25 | #include "ghost/ghost_core.h" 26 | 27 | #if GHOST_DOCUMENTATION 28 | #endif 29 | 30 | /*TODO*/ 31 | #include "ghost/type/ghost_ptrdiff_all.h" 32 | 33 | #endif 34 | 35 | -------------------------------------------------------------------------------- /include/ghost/type/ptrdiff_t/ghost_ptrdiff_t.h: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT No Attribution 3 | * 4 | * Copyright (c) 2022 Fraser Heavy Software 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to 8 | * deal in the Software without restriction, including without limitation the 9 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 10 | * sell copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | * IN THE SOFTWARE. 20 | */ 21 | 22 | #ifndef GHOST_PTRDIFF_T_H_INCLUDED 23 | #define GHOST_PTRDIFF_T_H_INCLUDED 24 | 25 | #include "ghost/ghost_core.h" 26 | 27 | #if GHOST_DOCUMENTATION 28 | #endif 29 | 30 | /*TODO*/ 31 | #include "ghost/type/ghost_ptrdiff_all.h" 32 | 33 | #endif 34 | 35 | -------------------------------------------------------------------------------- /include/ghost/type/ptrdiff_t/ghost_ptrdiff_width.h: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT No Attribution 3 | * 4 | * Copyright (c) 2022 Fraser Heavy Software 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to 8 | * deal in the Software without restriction, including without limitation the 9 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 10 | * sell copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | * IN THE SOFTWARE. 20 | */ 21 | 22 | #ifndef GHOST_PTRDIFF_WIDTH_H_INCLUDED 23 | #define GHOST_PTRDIFF_WIDTH_H_INCLUDED 24 | 25 | #include "ghost/ghost_core.h" 26 | 27 | #if GHOST_DOCUMENTATION 28 | #endif 29 | 30 | /*TODO*/ 31 | #include "ghost/type/ghost_ptrdiff_all.h" 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /include/ghost/type/schar/ghost_schar.h: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT No Attribution 3 | * 4 | * Copyright (c) 2022 Fraser Heavy Software 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to 8 | * deal in the Software without restriction, including without limitation the 9 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 10 | * sell copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | * IN THE SOFTWARE. 20 | */ 21 | 22 | #ifndef GHOST_SCHAR_H_INCLUDED 23 | #define GHOST_SCHAR_H_INCLUDED 24 | 25 | #include "ghost/ghost_core.h" 26 | 27 | #if GHOST_DOCUMENTATION 28 | #endif 29 | 30 | /*TODO*/ 31 | #include "ghost/type/ghost_schar_all.h" 32 | 33 | #endif 34 | 35 | -------------------------------------------------------------------------------- /include/ghost/type/schar/ghost_schar_c.h: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT No Attribution 3 | * 4 | * Copyright (c) 2022 Fraser Heavy Software 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to 8 | * deal in the Software without restriction, including without limitation the 9 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 10 | * sell copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | * IN THE SOFTWARE. 20 | */ 21 | 22 | #ifndef GHOST_SCHAR_C_H_INCLUDED 23 | #define GHOST_SCHAR_C_H_INCLUDED 24 | 25 | #include "ghost/ghost_core.h" 26 | 27 | #if GHOST_DOCUMENTATION 28 | #endif 29 | 30 | /*TODO*/ 31 | #include "ghost/type/ghost_schar_all.h" 32 | 33 | #endif 34 | 35 | -------------------------------------------------------------------------------- /include/ghost/type/schar/ghost_schar_max.h: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT No Attribution 3 | * 4 | * Copyright (c) 2022 Fraser Heavy Software 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to 8 | * deal in the Software without restriction, including without limitation the 9 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 10 | * sell copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | * IN THE SOFTWARE. 20 | */ 21 | 22 | #ifndef GHOST_SCHAR_MAX_H_INCLUDED 23 | #define GHOST_SCHAR_MAX_H_INCLUDED 24 | 25 | #include "ghost/ghost_core.h" 26 | 27 | #if GHOST_DOCUMENTATION 28 | #endif 29 | 30 | /*TODO*/ 31 | #include "ghost/type/ghost_schar_all.h" 32 | 33 | #endif 34 | 35 | -------------------------------------------------------------------------------- /include/ghost/type/schar/ghost_schar_min.h: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT No Attribution 3 | * 4 | * Copyright (c) 2022 Fraser Heavy Software 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to 8 | * deal in the Software without restriction, including without limitation the 9 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 10 | * sell copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | * IN THE SOFTWARE. 20 | */ 21 | 22 | #ifndef GHOST_SCHAR_MIN_H_INCLUDED 23 | #define GHOST_SCHAR_MIN_H_INCLUDED 24 | 25 | #include "ghost/ghost_core.h" 26 | 27 | #if GHOST_DOCUMENTATION 28 | #endif 29 | 30 | /*TODO*/ 31 | #include "ghost/type/ghost_schar_all.h" 32 | 33 | #endif 34 | 35 | -------------------------------------------------------------------------------- /include/ghost/type/schar/ghost_schar_width.h: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT No Attribution 3 | * 4 | * Copyright (c) 2022 Fraser Heavy Software 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to 8 | * deal in the Software without restriction, including without limitation the 9 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 10 | * sell copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | * IN THE SOFTWARE. 20 | */ 21 | 22 | #ifndef GHOST_SCHAR_WIDTH_H_INCLUDED 23 | #define GHOST_SCHAR_WIDTH_H_INCLUDED 24 | 25 | #include "ghost/ghost_core.h" 26 | 27 | #if GHOST_DOCUMENTATION 28 | #endif 29 | 30 | /*TODO*/ 31 | #include "ghost/type/ghost_schar_all.h" 32 | 33 | #endif 34 | 35 | -------------------------------------------------------------------------------- /include/ghost/type/uchar/ghost_uchar.h: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT No Attribution 3 | * 4 | * Copyright (c) 2022 Fraser Heavy Software 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to 8 | * deal in the Software without restriction, including without limitation the 9 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 10 | * sell copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | * IN THE SOFTWARE. 20 | */ 21 | 22 | #ifndef GHOST_UCHAR_H_INCLUDED 23 | #define GHOST_UCHAR_H_INCLUDED 24 | 25 | #include "ghost/ghost_core.h" 26 | 27 | #if GHOST_DOCUMENTATION 28 | #endif 29 | 30 | /*TODO*/ 31 | #include "ghost/type/ghost_uchar_all.h" 32 | 33 | #endif 34 | 35 | -------------------------------------------------------------------------------- /include/ghost/type/uchar/ghost_uchar_c.h: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT No Attribution 3 | * 4 | * Copyright (c) 2022 Fraser Heavy Software 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to 8 | * deal in the Software without restriction, including without limitation the 9 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 10 | * sell copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | * IN THE SOFTWARE. 20 | */ 21 | 22 | #ifndef GHOST_UCHAR_C_H_INCLUDED 23 | #define GHOST_UCHAR_C_H_INCLUDED 24 | 25 | #include "ghost/ghost_core.h" 26 | 27 | #if GHOST_DOCUMENTATION 28 | #endif 29 | 30 | /*TODO*/ 31 | #include "ghost/type/ghost_uchar_all.h" 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /include/ghost/type/uchar/ghost_uchar_max.h: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT No Attribution 3 | * 4 | * Copyright (c) 2022 Fraser Heavy Software 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to 8 | * deal in the Software without restriction, including without limitation the 9 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 10 | * sell copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | * IN THE SOFTWARE. 20 | */ 21 | 22 | #ifndef GHOST_UCHAR_MAX_H_INCLUDED 23 | #define GHOST_UCHAR_MAX_H_INCLUDED 24 | 25 | #include "ghost/ghost_core.h" 26 | 27 | #if GHOST_DOCUMENTATION 28 | #endif 29 | 30 | /*TODO*/ 31 | #include "ghost/type/ghost_uchar_all.h" 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /include/ghost/type/uchar/ghost_uchar_width.h: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT No Attribution 3 | * 4 | * Copyright (c) 2022 Fraser Heavy Software 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to 8 | * deal in the Software without restriction, including without limitation the 9 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 10 | * sell copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | * IN THE SOFTWARE. 20 | */ 21 | 22 | #ifndef GHOST_UCHAR_WIDTH_H_INCLUDED 23 | #define GHOST_UCHAR_WIDTH_H_INCLUDED 24 | 25 | #include "ghost/ghost_core.h" 26 | 27 | #if GHOST_DOCUMENTATION 28 | #endif 29 | 30 | /*TODO*/ 31 | #include "ghost/type/ghost_uchar_all.h" 32 | 33 | #endif 34 | 35 | -------------------------------------------------------------------------------- /include/ghost/type/uintptr_t/ghost_uintptr_c.h: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT No Attribution 3 | * 4 | * Copyright (c) 2022 Fraser Heavy Software 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to 8 | * deal in the Software without restriction, including without limitation the 9 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 10 | * sell copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | * IN THE SOFTWARE. 20 | */ 21 | 22 | #ifndef GHOST_UINTPTR_C_H_INCLUDED 23 | #define GHOST_UINTPTR_C_H_INCLUDED 24 | 25 | #include "ghost/ghost_core.h" 26 | 27 | #if GHOST_DOCUMENTATION 28 | #endif 29 | 30 | /*TODO*/ 31 | #include "ghost/type/uintptr_t/ghost_uintptr_t.h" 32 | 33 | #endif 34 | 35 | -------------------------------------------------------------------------------- /include/ghost/type/uintptr_t/ghost_uintptr_max.h: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT No Attribution 3 | * 4 | * Copyright (c) 2022 Fraser Heavy Software 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to 8 | * deal in the Software without restriction, including without limitation the 9 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 10 | * sell copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | * IN THE SOFTWARE. 20 | */ 21 | 22 | #ifndef GHOST_UINTPTR_MAX_H_INCLUDED 23 | #define GHOST_UINTPTR_MAX_H_INCLUDED 24 | 25 | #include "ghost/ghost_core.h" 26 | 27 | #if GHOST_DOCUMENTATION 28 | #endif 29 | 30 | /*TODO*/ 31 | #include "ghost/type/uintptr_t/ghost_uintptr_t.h" 32 | 33 | #endif 34 | 35 | -------------------------------------------------------------------------------- /include/ghost/type/uintptr_t/ghost_uintptr_t.h: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT No Attribution 3 | * 4 | * Copyright (c) 2022 Fraser Heavy Software 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to 8 | * deal in the Software without restriction, including without limitation the 9 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 10 | * sell copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | * IN THE SOFTWARE. 20 | */ 21 | 22 | #ifndef GHOST_UINTPTR_T_H_INCLUDED 23 | #define GHOST_UINTPTR_T_H_INCLUDED 24 | 25 | #include "ghost/ghost_core.h" 26 | 27 | #if GHOST_DOCUMENTATION 28 | #endif 29 | 30 | /*TODO*/ 31 | #include "ghost/type/ghost_uintptr_all.h" 32 | 33 | #endif 34 | 35 | -------------------------------------------------------------------------------- /include/ghost/type/uintptr_t/ghost_uintptr_width.h: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT No Attribution 3 | * 4 | * Copyright (c) 2022 Fraser Heavy Software 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to 8 | * deal in the Software without restriction, including without limitation the 9 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 10 | * sell copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | * IN THE SOFTWARE. 20 | */ 21 | 22 | #ifndef GHOST_UINTPTR_WIDTH_H_INCLUDED 23 | #define GHOST_UINTPTR_WIDTH_H_INCLUDED 24 | 25 | #include "ghost/ghost_core.h" 26 | 27 | #if GHOST_DOCUMENTATION 28 | #endif 29 | 30 | /*TODO*/ 31 | #include "ghost/type/uintptr_t/ghost_uintptr_t.h" 32 | 33 | #endif 34 | 35 | -------------------------------------------------------------------------------- /test/README.md: -------------------------------------------------------------------------------- 1 | This is the Ghost test suite. 2 | 3 | This is only useful for testing Ghost. You do not need to build or run any Ghost tests to use Ghost. 4 | 5 | The [`unit/`](unit/) folder includes code for Ghost's unit tests. There are other scripts here as well for testing different parts of Ghost. 6 | -------------------------------------------------------------------------------- /test/clean.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # MIT No Attribution 4 | # 5 | # Copyright (c) 2022 Fraser Heavy Software 6 | # 7 | # Permission is hereby granted, free of charge, to any person obtaining a copy 8 | # of this software and associated documentation files (the "Software"), to 9 | # deal in the Software without restriction, including without limitation the 10 | # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 11 | # sell copies of the Software, and to permit persons to whom the Software is 12 | # furnished to do so. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 19 | # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 20 | # IN THE SOFTWARE. 21 | 22 | cd "$(dirname "$0")/.." 23 | rm -rf test/unit/.build 24 | rm -rf test/.build 25 | rm -f .ninja_deps 26 | rm -f .ninja_log 27 | -------------------------------------------------------------------------------- /test/fetch-dependencies.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | cd "$(dirname "$0")"/.. 4 | mkdir -p test/.build 5 | cd test/.build 6 | mkdir -p ~/.cache/downloads 7 | 8 | # Fetch mirror 9 | # TODO 10 | 11 | # Fetch cosmopolitan libc 12 | cosmopolitan="$HOME/.cache/downloads/cosmopolitan-amalgamation-2.1.1.zip" 13 | if ! [ -e $cosmopolitan ]; then 14 | curl -L -o "$cosmopolitan" \ 15 | "https://github.com/jart/cosmopolitan/releases/download/2.1.1/cosmopolitan-amalgamation-2.1.1.zip" 16 | fi 17 | expected_hash=b36781c7cd6763402c085f29e31ab53f5df4c066dbdde83c808dea978757115a 18 | actual_hash=$(sha256sum "$cosmopolitan"|cut -d\ -f1) 19 | if [ "$expected_hash" != "$actual_hash" ]; then 20 | echo "ERROR: Hash mismatch! $cosmopolitan" 21 | echo " Expected: $expected_hash" 22 | echo " Actual: $actual_hash" 23 | exit 1 24 | fi 25 | rm -rf cosmopolitan 26 | mkdir -p cosmopolitan 27 | cd cosmopolitan 28 | unzip "$cosmopolitan" 29 | sed -i '/#define IFNAMSIZ 16/d' cosmopolitan.h # fix redefined symbol error 30 | cd .. 31 | 32 | echo "Done." 33 | -------------------------------------------------------------------------------- /test/input/run.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | setlocal enabledelayedexpansion 3 | cd %~dp0 4 | 5 | for /f "usebackq tokens=*" %%i in (`"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -latest -find **\vcvarsall.bat`) do (SET "vcvarsall=%%i") 6 | where cl 1>NUL 2>NUL 7 | if %errorlevel% neq 0 call "%vcvarsall%" amd64 8 | if %errorlevel% neq 0 exit /b %errorlevel% 9 | 10 | cl /W4 /WX /I../../include /Fetest_ghost_input.exe *.c 11 | if %errorlevel% neq 0 exit /b %errorlevel% 12 | 13 | test_ghost_input 14 | if %errorlevel% neq 0 exit /b %errorlevel% 15 | -------------------------------------------------------------------------------- /test/input/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | cd "$(dirname "$0")" 4 | CC=${CC:-cc} 5 | $CC -I../../include -Wall -Wextra -Wpedantic *.c -o test_ghost_input 6 | ./test_ghost_input 7 | -------------------------------------------------------------------------------- /test/unit.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # MIT No Attribution 4 | # 5 | # Copyright (c) 2022 Fraser Heavy Software 6 | # 7 | # Permission is hereby granted, free of charge, to any person obtaining a copy 8 | # of this software and associated documentation files (the "Software"), to 9 | # deal in the Software without restriction, including without limitation the 10 | # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 11 | # sell copies of the Software, and to permit persons to whom the Software is 12 | # furnished to do so. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 19 | # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 20 | # IN THE SOFTWARE. 21 | 22 | # Builds and runs the unit test suite. 23 | # Set CC before calling this to use a different compiler. 24 | # Pass a configuration to run or pass "all" to run all configurations. 25 | 26 | set -e 27 | cd "$(dirname $0)/.." 28 | test/unit/configure.py 29 | ninja -f test/.build/unit/build.ninja $@ 30 | -------------------------------------------------------------------------------- /test/unit/ci-unix.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # This script is run by the continuous integration server to build and run the 4 | # Pottery unit test suite on UNIX systems. 5 | 6 | set -e 7 | cd "$(dirname $0)/../.." 8 | 9 | [ -z "$CI" ] && export CI=1 10 | 11 | # The CI uses a variant with CC=scan-build in order to scan the project. 12 | if [ "$CC" = "scan-build" ]; then 13 | exec test/scan-build.sh 14 | fi 15 | 16 | # Run the "more" variant of unit tests 17 | test/unit.sh more 18 | 19 | # Also build and run all examples standalone to make sure they work 20 | test/examples.sh 21 | -------------------------------------------------------------------------------- /test/unit/ci-windows.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | REM This script is run by the continuous integration server to build and run 4 | REM the Pottery unit test suite with MSVC on Windows. 5 | 6 | REM Run the "more" variant of unit tests 7 | call test\unit.bat more 8 | -------------------------------------------------------------------------------- /test/unit/generate-unit-test-registrations.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # This pulls all of the unit test registration functions out of the object 4 | # files and generates a source file that calls them. This is used to 5 | # auto-register unit tests when compiling under TinyCC or any other compiler 6 | # that doesn't support static constructor functions. 7 | # 8 | # You don't need to call this directly. It's called by the unit test Ninja file 9 | # after building all other object files. See test/tools/configure.py for where 10 | # it generates a call to this script. 11 | 12 | set -e 13 | echo "Generating unit test registrations..." 14 | 15 | OUT=$1 16 | shift 17 | OBJS=$@ 18 | 19 | LIST=$OUT.list 20 | rm -f $LIST $OUT 21 | 22 | for f in $OBJS; do 23 | objdump -t $f|grep -o '\' >> $LIST || true 24 | done 25 | 26 | cat >>$OUT <> $OUT 34 | 35 | cat >>$OUT <> $OUT 43 | 44 | cat >>$OUT < $A 7 | grep -lr GHOST_IMPL_CXX_FUNCTION_CLOSE include/ | sort > $B 8 | diff $A $B 9 | 10 | echo GHOST_IMPL_FUNCTION_OPEN 11 | grep -lr GHOST_IMPL_FUNCTION_OPEN include/ | sort > $A 12 | grep -lr GHOST_IMPL_FUNCTION_CLOSE include/ | sort > $B 13 | diff $A $B 14 | 15 | echo GHOST_EXTERN_C_PUSH 16 | grep -lr GHOST_EXTERN_C_PUSH include/ | sort > $A 17 | grep -lr GHOST_EXTERN_C_POP include/ | sort > $B 18 | diff $A $B 19 | 20 | rm $A $B 21 | --------------------------------------------------------------------------------