C Everything
This is a C repository containing a curated set of generic data structures and algorithm.
|
Contains Macros that are used for defining psuedo data template functions. More...
Go to the source code of this file.
Macros | |
#define | CMPR(T, NAME) |
Template Compare function for default data types. More... | |
#define | ASSGN(T, NAME) |
Template Assign memory function for default data types. More... | |
#define | SWAP(T, NAME) |
Template Swap function for default data types. More... | |
#define | FMT_SPF(T) |
#define | PRINT_GEN(T, NAME) |
Template print function for default data types. More... | |
#define | CMPR_IDX(T, NAME) |
Template function for comparing elemts at given indicies of an array for default data types. More... | |
#define | SWP_IDX(T, NAME) |
Template function for swaping elemts at given indicies of an array for default data types. More... | |
#define | COPY_IDX(T, NAME) |
Template function for copying element to a given index of an array for default data types. More... | |
#define | GET_IDX(T, NAME) |
Template function for getting element at a given index of an array for default data types. More... | |
#define | GET_IDX_CPY(T, NAME) |
Template function for getting element at a given index of an array for default data types. More... | |
Contains Macros that are used for defining psuedo data template functions.
Definition in file generic_def.h.
#define ASSGN | ( | T, | |
NAME | |||
) |
Template Assign memory function for default data types.
Definition at line 24 of file generic_def.h.
#define CMPR | ( | T, | |
NAME | |||
) |
Template Compare function for default data types.
Definition at line 11 of file generic_def.h.
#define CMPR_IDX | ( | T, | |
NAME | |||
) |
Template function for comparing elemts at given indicies of an array for default data types.
Definition at line 70 of file generic_def.h.
#define COPY_IDX | ( | T, | |
NAME | |||
) |
Template function for copying element to a given index of an array for default data types.
Definition at line 92 of file generic_def.h.
#define FMT_SPF | ( | T | ) |
Defines format specfier depending on type of data used for implementing generic print Note: Requires C11 compiler since it use _Generic
Definition at line 43 of file generic_def.h.
#define GET_IDX | ( | T, | |
NAME | |||
) |
Template function for getting element at a given index of an array for default data types.
Definition at line 99 of file generic_def.h.
#define GET_IDX_CPY | ( | T, | |
NAME | |||
) |
Template function for getting element at a given index of an array for default data types.
Definition at line 107 of file generic_def.h.
#define PRINT_GEN | ( | T, | |
NAME | |||
) |
Template print function for default data types.
Definition at line 63 of file generic_def.h.
#define SWAP | ( | T, | |
NAME | |||
) |
Template Swap function for default data types.
Definition at line 33 of file generic_def.h.
#define SWP_IDX | ( | T, | |
NAME | |||
) |
Template function for swaping elemts at given indicies of an array for default data types.
Definition at line 83 of file generic_def.h.
t_gen assign_char | ( | char | ) |
t_gen assign_float | ( | float | ) |
t_gen assign_int | ( | int | ) |
t_gen assign_string | ( | char * | x | ) |
Definition at line 43 of file generic_def.c.
Definition at line 13 of file generic_def.c.
Definition at line 26 of file generic_def.c.
Definition at line 88 of file generic_def.c.
Definition at line 74 of file generic_def.c.
Definition at line 68 of file generic_def.c.
void gen_swp_idx | ( | t_gen | x, |
int | idx1, | ||
int | idx2 | ||
) |
Definition at line 80 of file generic_def.c.
void print_char | ( | t_gen | ) |
void print_float | ( | t_gen | ) |
void print_gen | ( | t_gen | ) |
void print_int | ( | t_gen | ) |
void print_str | ( | t_gen | str | ) |
Definition at line 63 of file generic_def.c.
void swap_idx_char | ( | t_gen | , |
int | , | ||
int | |||
) |
void swap_idx_float | ( | t_gen | , |
int | , | ||
int | |||
) |
void swap_idx_int | ( | t_gen | , |
int | , | ||
int | |||
) |