X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/69819af4834557e60c33bb378e29cf3d4e8269f8..f28cfc5260eb87df0f6f106c837b3e2de640a9bf:/sbr/fmt_compile.c?ds=inline diff --git a/sbr/fmt_compile.c b/sbr/fmt_compile.c index ce32414f..e8a80279 100644 --- a/sbr/fmt_compile.c +++ b/sbr/fmt_compile.c @@ -39,13 +39,15 @@ * */ -#include -#include -#include -#include -#include -#include -#include +#include "h/mh.h" +#include "getcpy.h" +#include "error.h" +#include "h/addrsbr.h" +#include "h/tws.h" +#include "h/fmt_scan.h" +#include "h/fmt_compile.h" +#include "h/mts.h" +#include "h/utils.h" #include "terminal.h" #ifdef HAVE_SYS_TIME_H @@ -488,13 +490,13 @@ do_spec(char *sp) { char *cp = sp; int c; - int ljust = 0; + bool ljust = false; int wid = 0; char fill = ' '; c = *cp++; if (c == '-') { - ljust++; + ljust = true; c = *cp++; } if (c == '0') { @@ -543,7 +545,7 @@ do_name(char *sp, int preprocess) char *cp = sp; int c; int i; - static int primed = 0; + static bool primed; while (isalnum(c = *cp++) || c == '-' || c == '_') ; @@ -573,7 +575,7 @@ do_name(char *sp, int preprocess) case FT_GETMYADDR: if (!primed) { ismymbox(NULL); - primed++; + primed = true; } /* FALLTHRU */ case FT_PARSEADDR: @@ -1044,13 +1046,15 @@ fmt_addcompentry(char *component) int fmt_addcomptext(char *component, char *text) { - int i, found = 0, bucket = CHASH(component); + int i; + bool found = false; + int bucket = CHASH(component); struct comp *cptr = wantcomp[bucket]; char *cp; while (cptr) { if (strcasecmp(component, FENDNULL(cptr->c_name)) == 0) { - found++; + found = true; if (! cptr->c_text) { cptr->c_text = getcpy(text); } else {