/*----- Header files ------------------------------------------------------*/
#include <ctype.h>
-#include <stdio.h>
-#include <stdlib.h>
#include <string.h>
#include "alloc.h"
case PC: \
if (f & CDCF_IGNEQMID) break; \
if (f & CDCF_NOEQPAD) goto badch; \
- if (st == ST_MAIN && \
- !(f & CDCF_IGNZPAD) && (a & ((1 << nb) - 1))) \
+ if (st == ST_MAIN && !(f & CDCF_IGNZPAD) && \
+ ((nb && !(nb%wd)) || (a & ((1 << nb) - 1)))) \
return (CDCERR_INVZPAD); \
st = ST_PAD; \
if (!(f & CDCF_IGNEQPAD)) { \
} \
} \
} else { \
- if (st == ST_MAIN && \
- !(f & CDCF_IGNZPAD) && (a & ((1 << nb) - 1))) \
+ if (st == ST_MAIN && !(f & CDCF_IGNZPAD) && \
+ ((nb && !(nb%wd)) || (a & ((1 << nb) - 1)))) \
return (CDCERR_INVZPAD); \
if (!(f & (CDCF_IGNEQPAD | CDCF_IGNEQMID | CDCF_NOEQPAD)) && nb) \
return (CDCERR_INVEQPAD); \
static void ctxn##_destroy(codec *c) \
{ \
ctxn##_codec *bc = (ctxn##_codec *)c; \
- if (bc->ctx.indent) xfree((/*unconst*/ char *)bc->ctx.indent); \
+ if (bc->ctx.indent) xfree(UNCONST(char, bc->ctx.indent)); \
DESTROY(bc); \
} \
\