X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/35ef9d158396dbf013a862dd8f830db64909826b..d247f1cf67f3e579ccddfa986c603dd91880cbe7:/sbr/fmt_compile.c diff --git a/sbr/fmt_compile.c b/sbr/fmt_compile.c index 389e16c4..ff0cf013 100644 --- a/sbr/fmt_compile.c +++ b/sbr/fmt_compile.c @@ -46,6 +46,7 @@ #include #include #include +#include "terminal.h" #ifdef HAVE_SYS_TIME_H # include @@ -279,11 +280,12 @@ static struct colormap colortable[] = { /* * Find a component in the hash table. */ -#define FINDCOMP(comp,name) \ - for (comp = wantcomp[CHASH(name)]; \ - comp && strcmp(comp->c_name,name); \ - comp = comp->c_next) \ - ; +#define FINDCOMP(comp,name) do { \ + for (comp = wantcomp[CHASH(name)]; \ + comp && strcmp(comp->c_name,name); \ + comp = comp->c_next) \ + ; \ + } while (0) /* Add new component to the hash table */ #define NEWCOMP(cm,name) do { \ @@ -354,7 +356,7 @@ lookup(char *name) t++; } - return (struct ftable *) 0; + return NULL; } @@ -572,7 +574,7 @@ do_name(char *sp, int preprocess) case FT_GETMYMBOX: case FT_GETMYADDR: if (!primed) { - ismymbox ((struct mailname *) 0); + ismymbox(NULL); primed++; } /* FALLTHRU */ @@ -732,7 +734,7 @@ do_func(char *sp) } case TF_NOW: - LV(t->f_type, time((time_t *) 0)); + LV(t->f_type, time(NULL)); break; case TF_EXPR_SV: