My Project
Loading...
Searching...
No Matches
macro.h File Reference

macros More...

Go to the source code of this file.

Data Structures

struct  MacroArg_
 
struct  Macro_
 

Macros

#define MACRO_DEFINED   _("macro already defined")
 

Typedefs

typedef struct MacroArg_MacroArg
 
typedef struct Macro_Macro
 

Functions

MacroArg new_macroarg (MemPool p, const m_str)
 
void clean_macroarg (const MacroArg)
 
void macro_del (const Hash)
 
Macro macro_add (const Hash, m_str)
 
bool macro_rem (const Hash, m_str)
 
Macro macro_has (const Hash, m_str)
 

Detailed Description

macros

Definition in file macro.h.

Macro Definition Documentation

◆ MACRO_DEFINED

#define MACRO_DEFINED   _("macro already defined")

Definition at line 7 of file macro.h.

Typedef Documentation

◆ Macro

typedef struct Macro_* Macro

Definition at line 9 of file macro.h.

◆ MacroArg

typedef struct MacroArg_* MacroArg

Definition at line 8 of file macro.h.

Function Documentation

◆ clean_macroarg()

void clean_macroarg ( const MacroArg a)

Definition at line 11 of file macro.c.

11 {
12 if (a->next) clean_macroarg(a->next);
13 text_release(&a->text);
14}
void clean_macroarg(const MacroArg a)
Definition macro.c:11
MacroArg next
Definition macro.h:14
GwText text
Definition macro.h:13

◆ macro_add()

Macro macro_add ( const Hash ,
m_str  )

◆ macro_del()

void macro_del ( const Hash )

◆ macro_has()

Macro macro_has ( const Hash ,
m_str  )

◆ macro_rem()

bool macro_rem ( const Hash ,
m_str  )

◆ new_macroarg()

MacroArg new_macroarg ( MemPool p,
const m_str name )

Definition at line 4 of file macro.c.

4 {
5 const MacroArg a = mp_calloc(p, MacroArg);
6 a->name = mstrdup(p, name);
7 text_init(&a->text, p);
8 return a;
9}
char * name
Definition macro.h:12