X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Fscansbr.c;h=6a9278bbd539895d2f636d2c8a16abba032c45cc;hp=1b6a0ed9ec9ffdfe34929eb4bb09216c3bb2abc8;hb=fed3e593e1e99bacd6de13663103e3c1940a9957;hpb=5b62e382c2e894e124ac6640e28397946b775765 diff --git a/uip/scansbr.c b/uip/scansbr.c index 1b6a0ed..6a9278b 100644 --- a/uip/scansbr.c +++ b/uip/scansbr.c @@ -68,6 +68,11 @@ char *scanl = 0; /* text of most recent scanline */ int sc_width (void); /* from termsbr.c */ static int mh_fputs(char *, FILE *); +#ifdef MULTIBYTE_SUPPORT +#define SCAN_CHARWIDTH MB_CUR_MAX +#else +#define SCAN_CHARWIDTH 1 +#endif int scan (FILE *inb, int innum, int outnum, char *nfs, int width, int curflg, @@ -98,7 +103,7 @@ scan (FILE *inb, int innum, int outnum, char *nfs, int width, int curflg, width = MAXSCANL; } dat[3] = slwidth = width; - scanl = (char *) mh_xmalloc((size_t) MB_CUR_MAX * (slwidth + 2) ); + scanl = (char *) mh_xmalloc((size_t) SCAN_CHARWIDTH * (slwidth + 2) ); if (outnum) umask(~m_gmprot());