YACDB
Yet Another C(rappy) Database
parser_mallocs_frees.h File Reference

Frees and mallocs helper for the structures in instruction.h. More...

#include <stdlib.h>
#include "instruction.h"
Include dependency graph for parser_mallocs_frees.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

charraycharray_init ()
 Initialize a charray. More...
 
void free_charray (charray *array)
 Free a charray. More...
 
InstrArrayinstrarray_init (int sz)
 Initialize an InstrArray. More...
 
void free_instrarray (InstrArray *instrarray)
 Free an InstrArray. More...
 
instrunknowninstr_init ()
 Initialize an instr of instrType unknownInstrType. More...
 
struct SelInstrselinstr_init ()
 Initialize a SelInstr. More...
 
void free_selinstr (struct SelInstr *selinstr)
 Free a SelInstr. More...
 
struct CrtInstrcrtinstr_init ()
 Initialize a CrtInstr. More...
 
void free_crtinstr (struct CrtInstr *crtinstr)
 Free a CrtInstr. More...
 
struct AddInstraddinstr_init ()
 Initialize an AddInstr. More...
 
void free_addinstr (struct AddInstr *addinstr)
 Free an AddInstr. More...
 
void free_instr (instr *instr)
 Free an instruction of any type. More...
 
struct conditioncondition_init ()
 Initialize a struct condition. More...
 
void free_condition (struct condition *cond)
 Free a struct condition. More...
 

Detailed Description

Frees and mallocs helper for the structures in instruction.h.

Author
Mateo

Function Documentation

◆ addinstr_init()

struct AddInstr * addinstr_init ( )

Initialize an AddInstr.

Returns
struct AddInstr*

◆ charray_init()

charray * charray_init ( )

Initialize a charray.

Returns
charray*

◆ condition_init()

struct condition * condition_init ( )

Initialize a struct condition.

Returns
struct condition*

◆ crtinstr_init()

struct CrtInstr * crtinstr_init ( )

Initialize a CrtInstr.

Returns
struct CrtInstr*

◆ free_addinstr()

void free_addinstr ( struct AddInstr addinstr)

Free an AddInstr.

Parameters
addinstrThe AddInstr to free

◆ free_charray()

void free_charray ( charray array)

Free a charray.

Parameters
arrayThe charray to free

◆ free_condition()

void free_condition ( struct condition cond)

Free a struct condition.

Parameters
condThe struct condition to free

◆ free_crtinstr()

void free_crtinstr ( struct CrtInstr crtinstr)

Free a CrtInstr.

Parameters
crtinstrThe CrtInstr to free

◆ free_instr()

void free_instr ( instr instr)

Free an instruction of any type.

Parameters
instrThe instr to free

◆ free_instrarray()

void free_instrarray ( InstrArray instrarray)

Free an InstrArray.

Parameters
instrarrayThe InstrArray to free

◆ free_selinstr()

void free_selinstr ( struct SelInstr selinstr)

Free a SelInstr.

Parameters
selinstrThe SelInstr to free

◆ instrarray_init()

InstrArray * instrarray_init ( int  sz)

Initialize an InstrArray.

Parameters
szThe number of instruction stored in this InstrArray
Returns
InstrArray*

◆ selinstr_init()

struct SelInstr * selinstr_init ( )

Initialize a SelInstr.

Returns
struct SelInstr*

◆ unknowninstr_init()

instr * unknowninstr_init ( )

Initialize an instr of instrType unknownInstrType.

Returns
instr*