From: Lukas Krickl Date: Sat, 11 Nov 2023 18:41:20 +0000 (+0100) Subject: Added some useful comments for macro expansion X-Git-Url: https://git.krickl.dev/?a=commitdiff_plain;h=e62b2bd8c575b355f35a7478c0ae70f05d122fde;p=ulas%2F.git Added some useful comments for macro expansion --- diff --git a/src/ulas.c b/src/ulas.c index a66ba52..cf1d2fc 100644 --- a/src/ulas.c +++ b/src/ulas.c @@ -296,6 +296,8 @@ char *ulas_preprocexpand(struct ulas_preproc *pp, const char *raw_line, size_t vallen = strlen(def->value); size_t valread = 0; + // the pointer to tocat will be the variable's value if any + // exists const char *tocat = NULL; size_t tocatlen = 0; @@ -306,6 +308,7 @@ char *ulas_preprocexpand(struct ulas_preproc *pp, const char *raw_line, tocat = NULL; char numbuf[128]; + // decide what tocat should be for (size_t mi = 0; mi < ULAS_MACROPARAMMAX; mi++) { const char *name = macro_argname[mi]; if (pp->macroparam[mi].buf[0] &&