X-Git-Url: https://git.xonotic.org/?p=xonotic%2Fgmqcc.git;a=blobdiff_plain;f=ftepp.c;h=9d0fed9c0e931373779e638a66457c78a2b733bc;hp=320afc8182874580f98202f16d5aace610caf5b2;hb=160e7cf7eebd7fa173fb739aca00143097a3518b;hpb=0b0b6423bae15eae22685f9efc41d6efe70e8ae4 diff --git a/ftepp.c b/ftepp.c index 320afc8..9d0fed9 100644 --- a/ftepp.c +++ b/ftepp.c @@ -1,7 +1,7 @@ /* * Copyright (C) 2012, 2013 * Wolfgang Bumiller - * Dale Weiler + * Dale Weiler * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in @@ -76,7 +76,7 @@ typedef struct ftepp_s { /* * Implement the predef subsystem now. We can do this safely with the * help of lexer contexts. - */ + */ static uint32_t ftepp_predef_countval = 0; static uint32_t ftepp_predef_randval = 0; @@ -227,7 +227,7 @@ static pptoken *pptoken_make(ftepp_t *ftepp) return token; } -static void pptoken_delete(pptoken *self) +static GMQCC_INLINE void pptoken_delete(pptoken *self) { mem_d(self->value); mem_d(self); @@ -269,7 +269,7 @@ static ftepp_t* ftepp_new() return ftepp; } -static void ftepp_flush_do(ftepp_t *self) +static GMQCC_INLINE void ftepp_flush_do(ftepp_t *self) { vec_free(self->output_string); } @@ -282,13 +282,6 @@ static void ftepp_delete(ftepp_t *self) if (self->includename) vec_free(self->includename); - /* - for (i = 0; i < vec_size(self->macros); ++i) - ppmacro_delete(self->macros[i]); - - vec_free(self->macros); -*/ - util_htrem(self->macros, (void (*)(void*))&ppmacro_delete); vec_free(self->conditions); @@ -309,7 +302,7 @@ static void ftepp_out(ftepp_t *ftepp, const char *str, bool ignore_cond) } } -static void ftepp_update_output_condition(ftepp_t *ftepp) +static GMQCC_INLINE void ftepp_update_output_condition(ftepp_t *ftepp) { size_t i; ftepp->output_on = true; @@ -317,12 +310,12 @@ static void ftepp_update_output_condition(ftepp_t *ftepp) ftepp->output_on = ftepp->output_on && ftepp->conditions[i].on; } -static ppmacro* ftepp_macro_find(ftepp_t *ftepp, const char *name) +static GMQCC_INLINE ppmacro* ftepp_macro_find(ftepp_t *ftepp, const char *name) { return util_htget(ftepp->macros, name); } -static void ftepp_macro_delete(ftepp_t *ftepp, const char *name) +static GMQCC_INLINE void ftepp_macro_delete(ftepp_t *ftepp, const char *name) { util_htrm(ftepp->macros, name, NULL); }