home *** CD-ROM | disk | FTP | other *** search
/ Photo CD Demo 1 / Demo.bin / gle / gle / wpgle.c < prev    next >
C/C++ Source or Header  |  1992-11-29  |  618b  |  33 lines

  1. #include <stdlib.h>
  2. #include <stdio.h>
  3. #include <ctype.h>
  4. #include <string.h>
  5. #include <alloc.h>
  6.  
  7. #define true (!false)
  8. #define false 0
  9. extern unsigned _stklen=2000;
  10. extern unsigned _heaplen=4000;
  11.  
  12. main(int argc, char **argv)
  13. {
  14.     char fname[80],*s;
  15.     char buff[80];
  16.     int i;
  17.     if (argc!=2) {
  18.         printf("Usage:  WPGLE myfile\n");
  19.         exit(1);
  20.     }
  21.     strcpy(fname,argv[1]);
  22.     s = strchr(fname,'.');
  23.     if (s!=NULL) *s = 0;
  24.     sprintf(buff,"psgle %s /eps",fname); doit(buff);
  25.     sprintf(buff,"dvigle %s ",fname); doit(buff);
  26.     sprintf(buff,"dviprint -dwp -out %s ",fname); doit(buff);
  27. }
  28. doit(char *s)
  29. {
  30.     printf("> %s \n",s);
  31.     system(s);
  32. }
  33.