X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=sbr%2Ffmt_compile.c;h=4c64b9c6aa405cd51a585864b5e40bb2676466c5;hb=ad3d5c36b428d68a3a2cad85168ec90bf25c8932;hp=339ac0a21b51fb54f936de173f087068e1dffe0d;hpb=1691e80890e5d8ba258c51c214a3e91880e1db2b;p=mmh diff --git a/sbr/fmt_compile.c b/sbr/fmt_compile.c index 339ac0a..4c64b9c 100644 --- a/sbr/fmt_compile.c +++ b/sbr/fmt_compile.c @@ -3,14 +3,29 @@ * fmt_compile.c -- "compile" format strings for fmt_scan * * $Id$ + * + * This code is Copyright (c) 2002, by the authors of nmh. See the + * COPYRIGHT file in the root directory of the nmh distribution for + * complete copyright information. */ #include #include -#include +#include #include #include +#ifdef TIME_WITH_SYS_TIME +# include +# include +#else +# ifdef TM_IN_SYS_TIME +# include +# else +# include +# endif +#endif + /* * hash table for deciding if a component is "interesting" */ @@ -259,6 +274,7 @@ fmt_compile(char *fstring, struct format **fmt) * normal processing. */ i = strlen(fstring)/2 + 1; + if (i==1) i++; next_fp = formatvec = (struct format *)calloc ((size_t) i, sizeof(struct format)); if (next_fp == NULL)