#include <wordexp.h>
Include dependency graph for migrator.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
Functions | |
| int | migrate (char *, wordexp_t *) |
| Transmigrates one graphical kind for another more para-W3C (id est, dvi -> png). | |
| char | cache (char *, wordexp_t *) |
| Got cash? spare yourself the render time, baby. | |
Definition in file migrator.h.
|
||||||||||||
|
Got cash? spare yourself the render time, baby.
Definition at line 61 of file migrator.c. Referenced by math(). 00062 {
00063 char cret = 0;
00064 const char *pcglobbase = "%s*png";
00065 const char *pcerr = "migrator.c cache()";
00066 char *pcglob;
00067
00068 if ((pcglob = (char *) malloc(strlen(pcglobbase) + strlen(pcjob) + sizeof('\0'))) == NULL) {
00069 errno = ENOMEM;
00070 perror(pcerr);
00071 return cret;
00072 }
00073 sprintf(pcglob, pcglobbase, pcjob);
00074
00075 if (wordexp(pcglob, pw, 0) == 0 && strcmp(*(pw->we_wordv), pcglob) != 0) {
00076 cret = 1;
00077 }
00078
00079 free(pcglob);
00080 return cret;
00081 }
|
|
||||||||||||
|
Transmigrates one graphical kind for another more para-W3C (id est, dvi -> png).
Definition at line 29 of file migrator.c. References ALLOC, ERRDVIPNG, ERRDVIPNGOUTPUT, ERRDVIPNGWRITE, EVAL, and NONE. Referenced by math(). 00030 {
00031 int iret = ERROK;
00032 const char *pcbase = "dvipng -T tight -o %s%%d.png %s >&2";
00033 const char *pcerr = "migrator.c migrate()";
00034 const char *pcglobbase = "%s*png";
00035 char NONE(*pccommand), NONE(*pcglob), NONE(*pccache);
00036 FILE *pf;
00037
00038 ALLOC(pccommand, strlen(pcbase) + strlen(pcjob) + strlen(pcjob));
00039 sprintf(pccommand, pcbase, pcjob, pcjob);
00040
00041 EVAL((pf = popen(pccommand, "r")) == NULL, EIO, ERRDVIPNG);
00042 EVAL(pclose(pf) == -1, EINVAL, ERRDVIPNGWRITE);
00043
00044 ALLOC(pcglob, strlen(pcglobbase) + strlen(pcjob));
00045 sprintf(pcglob, pcglobbase, pcjob);
00046
00047 /* Test for results, neither that result is identical to the glob in file expansion's failure. */
00048 EVAL(wordexp(pcglob, pw, 0) != 0 || strcmp(*(pw->we_wordv), pcglob) == 0, EINVAL, ERRDVIPNGOUTPUT);
00049
00050 cleanup:
00051 free(pccommand);
00052 free(pcglob);
00053 free(pccache);
00054 return iret;
00055 }
|
1.3.9.1