gen_c_library doc update

This commit is contained in:
Edward R. Gonzalez 2024-12-17 13:29:38 -05:00
parent ca7ff99a79
commit 3ab2673fd3
2 changed files with 94 additions and 2 deletions

View File

@ -54,11 +54,13 @@ A simple `<container>_DefinitionCounter` is used to know how many instantiations
## Macro Usage ## Macro Usage
For the most part macros are kept minimal with exception to `_Generic`... For the most part macros are kept minimal with exception to `_Generic`...
*(I will be explaining this thing for the rest of this seciton along with gencpp c library's usage of it)*
The `_Generic` macro plays a key role in reducing direct need of the user to wrangle with mangled definition identifiers of 'templated' containers or for type coercion to map distinct data types to a common code path. The `_Generic` macro plays a key role in reducing direct need of the user to wrangle with mangled definition identifiers of 'templated' containers or for type coercion to map distinct data types to a common code path.
Because of its lack of use in many C11 libraries.. and, of those that do; they usually end up obfuscate it with excessive preprocessor abuse; Effort was put into minimizing how much of these macros are handled by the preprocessor vs gencpp itself. Many C11 libraries don't use it.. and, of those that do. they usually end up obfuscate it with excessive preprocessor abuse; Effort was put into minimizing how much of these macros are handled by the preprocessor vs gencpp itself.
*(I will be explaining this thing for the rest of this seciton along with gencpp c library's usage of it)*
The usual presentation (done bare) is the following: The usual presentation (done bare) is the following:

90
scripts/uncrustify.cfg Normal file
View File

@ -0,0 +1,90 @@
# Basic indentation settings
indent_columns = 4
indent_with_tabs = 1
indent_case_brace = 0
indent_switch_case = 4
indent_col1_comment = true
indent_namespace = true
indent_class = true
indent_extern = true
# Alignment settings
align_assign_span = 1
align_assign_thresh = 0
align_enum_equ_span = 1
align_var_def_span = 1
align_var_def_thresh = 0
align_var_def_inline = true
align_right_cmt_span = 1
align_pp_define_span = 1
align_typedef_span = 1
align_typedef_gap = 0
# Spacing settings
sp_before_square = remove
sp_inside_square = remove
sp_after_comma = force
sp_before_comma = remove
sp_after_cast = remove
sp_inside_paren = remove
sp_inside_fparen = remove
sp_inside_sparen = remove
sp_before_sparen = force
sp_after_operator = remove
sp_after_operator_sym = remove
sp_after_ptr_star = remove
sp_before_ptr_star = force
sp_between_ptr_star = remove
# Code style settings
mod_full_brace_do = force
mod_full_brace_for = force
mod_full_brace_if = force
mod_full_brace_while = force
mod_paren_on_return = remove
mod_full_brace_nl = 1
mod_remove_extra_semicolon = true
# Line breaking
nl_after_brace_open = true
nl_after_brace_close = true
nl_after_return = true
nl_before_case = true
nl_fcall_brace = force
nl_enum_brace = force
nl_struct_brace = force
nl_union_brace = force
nl_if_brace = force
nl_brace_else = force
nl_elseif_brace = force
nl_else_brace = force
nl_else_if = remove
nl_while_brace = force
nl_do_brace = force
nl_for_brace = force
nl_max = 4
nl_after_func_proto = 2
nl_after_func_body = 2
# Template settings
sp_inside_angle = remove
sp_after_angle = force
sp_angle_paren = remove
sp_angle_word = force
# Other settings
cmt_indent_multi = true
cmt_c_group = false
cmt_cpp_group = false
indent_func_call_param = true
indent_func_def_param = true
indent_func_proto_param = true
indent_template_param = true
indent_relative_single_line_comments = true
# Preprocessor settings
pp_indent = remove
pp_space = remove
# Column limit
code_width = 160