0f3ca3eaf5792df01b7c600a5428d2d0b2809fcd max Fri Sep 20 13:18:01 2024 -0700 Revert "more features to hubtools: search in both parent and subdirs, better docs" This reverts commit 05e67c59a20a5d00b810a981aef3b00c5bef82e1. diff --git src/lib/psGfx.c src/lib/psGfx.c index 2d89f58..062ffb6 100644 --- src/lib/psGfx.c +++ src/lib/psGfx.c @@ -499,52 +499,30 @@ psXyOut(ps, x4, y4); fprintf(f, "curveto\n"); fprintf(f, "stroke\n"); } void psSetDash(struct psGfx *ps, boolean on) /* Set dashed line mode on or off. If set on, show two points marked, with one point of space */ { FILE *f = ps->f; if (on) fprintf(f, "[2 1] 0 setdash\n"); else fprintf(f, "[] 0 setdash\n"); } -char * convertPdfToSvg(char *pdfFile) -/* Convert PDF to SVG in same directory as PDF and return new filename */ -{ -char *svgFile=NULL; -svgFile = cloneString(pdfFile); -chopSuffix(svgFile); -svgFile = addSuffix(svgFile, ".svg"); - -struct pipeline *pl = NULL; -char *pipeCmd[] = { "pdftocairo", "-svg", pdfFile, svgFile, NULL } ; -pl = pipelineOpen1(pipeCmd, pipelineWrite, "/dev/null", NULL, 0); - -int sysVal = 0; -sysVal = pipelineWait(pl); -if(sysVal != 0) - { - freez(&svgFile); - return NULL; - } -return svgFile; -} - char * convertEpsToPdf(char *epsFile) /* Convert EPS to PDF and return filename, or NULL if failure. */ { char *pdfTmpName = NULL, *pdfName=NULL; int sysVal = 0; struct lineFile *lf = NULL; char *line; int lineSize=0; float width=0, height=0; pdfTmpName = cloneString(epsFile); /* Get the dimensions of bounding box. */ lf = lineFileOpen(epsFile, TRUE); while(lineFileNext(lf, &line, &lineSize)) {