Index: wvHtml.c =================================================================== RCS file: /cvsroot/wv/wvHtml.c,v retrieving revision 1.43 diff -u -r1.43 wvHtml.c --- wvHtml.c 2000/06/06 00:55:16 1.43 +++ wvHtml.c 2000/08/24 08:17:16 @@ -26,6 +26,8 @@ 0 on success */ +char *config=NULL; + int myelehandler(wvParseStruct *ps,wvTag tag, void *props, int dirty); int mydochandler(wvParseStruct *ps,wvTag tag); int myCharProc(wvParseStruct *ps,U16 eachchar,U8 chartype,U16 lid); @@ -174,7 +176,6 @@ { FILE *input; char *password=NULL; - char *config=NULL; char *dir=NULL; int ret; state_data myhandle; @@ -484,7 +485,30 @@ return(0); } +void wvStrangeNoGraphicData(char *config, int graphicstype) + { + wvError(("Strange No Graphic Data in the 0x01 graphic\n")); + if (strcmp(config, "wvLaTeX.xml") == 0) + printf("\n -- 0x%2x graphic: StrangeNoGraphicData -- \n", graphicstype); + else + printf("\"0x%2x
", graphicstype, + "StrangeNoGraphicData"); + return; + } + +void wvPrintGraphics(char *config, int graphicstype, int width, int height, + char* source) + { + if (strcmp(config, "wvLaTeX.xml") == 0) + printf("\n -- width %d, height %d graphic of type 0x%2x: file \"%s\" -- \n", + width, height, graphicstype, source); + else + printf("\"0x%2x
", + width, height, graphicstype, source); + return; + } + int mySpecCharProc(wvParseStruct *ps,U16 eachchar,CHP *achp) { static int message,state; @@ -552,14 +576,14 @@ { wvTrace(("Here\n")); name = wvHtmlGraphic(ps,&blip); - printf("\"0x01
",(int)wvTwipsToHPixels(picf.dxaGoal),(int)wvTwipsToVPixels(picf.dyaGoal),name); + wvPrintGraphics(config, 0x01, + (int)wvTwipsToHPixels(picf.dxaGoal), + (int)wvTwipsToVPixels(picf.dyaGoal), + name); wvFree(name); } else - { - wvError(("Strange No Graphic Data in the 0x01 graphic\n")); - printf("\"0x08
","StrangeNoGraphicData"); - } + wvStrangeNoGraphicData(config, 0x01); wvStream_goto(ps->data,p); return(0); } @@ -577,16 +601,14 @@ { wvTrace(("Here\n")); name = wvHtmlGraphic(ps,&blip); - printf("\"0x08
", - (int)wvTwipsToHPixels(fspa->xaRight-fspa->xaLeft),(int)wvTwipsToVPixels(fspa->yaBottom-fspa->yaTop), + wvPrintGraphics(config, 0x08, + (int)wvTwipsToHPixels(fspa->xaRight-fspa->xaLeft), + (int)wvTwipsToVPixels(fspa->yaBottom-fspa->yaTop), name); wvFree(name); } else - { - wvError(("Strange No Graphic Data in the 0x01 graphic\n")); - printf("\"0x08
","StrangeNoGraphicData"); - } + wvStrangeNoGraphicData(config, 0x08); } else {