X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/13ae67e6d208deea2382c2901488d8a7f278ee23..f2d4f32f6dd5a586d0f160a34467cdc8b9151317:/sbr/fmt_compile.c diff --git a/sbr/fmt_compile.c b/sbr/fmt_compile.c index dbd86631..9cec16a6 100644 --- a/sbr/fmt_compile.c +++ b/sbr/fmt_compile.c @@ -160,6 +160,7 @@ static struct ftable functable[] = { { "decode", TF_EXPR, FT_LS_DECODE, 0, TFL_PUTS }, { "trim", TF_EXPR, FT_LS_TRIM, 0, 0 }, { "kilo", TF_EXPR, FT_LS_KILO, 0, TFL_PUTS }, + { "kibi", TF_EXPR, FT_LS_KIBI, 0, TFL_PUTS }, { "compval", TF_COMP, FT_LV_COMP, 0, TFL_PUTN }, { "compflag", TF_COMP, FT_LV_COMPFLAG, 0, TFL_PUTN }, { "num", TF_NUM, FT_LV_LIT, 0, TFL_PUTN }, @@ -283,7 +284,7 @@ static struct colormap colortable[] = { /* Add new component to the hash table */ #define NEWCOMP(cm,name) do { \ - cm = ((struct comp *) calloc(1, sizeof (struct comp)));\ + cm = ((struct comp *) mh_xcalloc (1, sizeof (struct comp)));\ cm->c_name = getcpy(name);\ cm->c_refcount++;\ ncomp++;\ @@ -405,7 +406,7 @@ fmt_compile(char *fstring, struct format **fmt, int reset_comptable) */ i = strlen(fstring)/2 + 1; if (i==1) i++; - next_fp = formatvec = (struct format *)calloc ((size_t) i, + next_fp = formatvec = (struct format *)mh_xcalloc ((size_t) i, sizeof(struct format)); if (next_fp == NULL) adios (NULL, "unable to allocate format storage"); @@ -562,7 +563,7 @@ do_name(char *sp, int preprocess) CERROR("component used as both date and address"); } cm->c_tws = (struct tws *) - calloc((size_t) 1, sizeof(*cm->c_tws)); + mh_xcalloc ((size_t) 1, sizeof(*cm->c_tws)); fp->f_type = preprocess; PUTCOMP(sp); cm->c_type |= CT_DATE;