C Everything
This is a C repository containing a curated set of generic data structures and algorithm.
common.h File Reference

Top level include containg common headers. More...

#include "os.h"
#include "typedefs.h"
#include "logger.h"
#include "memory_manager.h"
#include "fault_manager.h"
#include "generic_def.h"

Go to the source code of this file.

Data Structures

struct  data_params
 data params struct defn More...
 

Typedefs

typedef struct data_params t_dparams
 data params struct defn More...
 

Functions

void init_data_params (t_dparams *, e_data_types)
 
Called to initalize data params for default data types Else for custom data types the data params structure is to be defined by user More...
 
void dummy_free (void *mem_addr, char *file, int line)
 
Dummy free function Else for custom data types the data params structure is to be defined by user More...
 

Detailed Description

Top level include containg common headers.

Definition in file common.h.

Typedef Documentation

◆ t_dparams

typedef struct data_params t_dparams

data params struct defn

data params struct to be passed to all data structures it holds functions pointers for operating on data depending on type of it

Function Documentation

◆ dummy_free()

void dummy_free ( void *  mem_addr,
char *  file,
int  line 
)


Dummy free function Else for custom data types the data params structure is to be defined by user

Parameters
mem_addr- mem to be free'd
Returns
- NA

Definition at line 75 of file common.c.

◆ init_data_params()

void init_data_params ( t_dparams prms,
e_data_types  data_type 
)


Called to initalize data params for default data types Else for custom data types the data params structure is to be defined by user

Parameters
prms- Pointer to param struct that will be filled for default data types
data_type- Type of default data .i.e, int, float, char, double...
Returns
- NA

Definition at line 15 of file common.c.