X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=sbr%2Ffmt_compile.c;h=ce35de919b5b31d2d579f13bece867c7010fb795;hb=8aeebaf757a1588ae2836965f5443ca7dc3a0257;hp=435740eca429d224694c5721b1326c8ecaff791c;hpb=5518634037521728ddcb11b8eb4c6dcd7f046f83;p=mmh diff --git a/sbr/fmt_compile.c b/sbr/fmt_compile.c index 435740e..ce35de9 100644 --- a/sbr/fmt_compile.c +++ b/sbr/fmt_compile.c @@ -43,6 +43,8 @@ #include #include #include +#include +#include #ifdef HAVE_SYS_TIME_H # include @@ -289,8 +291,8 @@ compile_error(char *str, char *cp) } advise(NULL, "\"%s\": format compile error - %s", - &usr_fstring[errpos-errctx], str); - adios(NULL, "%*s", errctx+1, "^"); + &usr_fstring[errpos-errctx], str); + adios(EX_SOFTWARE, NULL, "%*s", errctx+1, "^"); } /* @@ -302,7 +304,7 @@ int fmt_compile(char *fstring, struct format **fmt) { register char *cp; - int i; + size_t i; if (format_string) free(format_string); @@ -328,7 +330,7 @@ fmt_compile(char *fstring, struct format **fmt) next_fp = formatvec = (struct format *)calloc((size_t) i, sizeof(struct format)); if (next_fp == NULL) - adios(NULL, "unable to allocate format storage"); + adios(EX_OSERR, NULL, "unable to allocate format storage"); ncomp = 0; infunction = 0; @@ -409,9 +411,7 @@ do_spec(char *sp) { register char *cp = sp; register int c; -#ifndef lint register int ljust = 0; -#endif /* not lint */ register int wid = 0; register char fill = ' ';