home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 22 gnu / 22-gnu.zip / gp36emx.zip / patch36 < prev   
Text File  |  1996-01-09  |  8KB  |  283 lines

  1. diff -bc gnuplot.old/command.c gnuplot/command.c
  2. *** gnuplot.old/command.c    Sun Dec  3 19:26:44 1995
  3. --- gnuplot/command.c    Tue Jan  9 00:00:28 1996
  4. ***************
  5. *** 181,186 ****
  6. --- 181,187 ----
  7.    /* emx has getcwd, chdir that can handle drive names */
  8.   #define getcwd _getcwd2
  9.   #define chdir  _chdir2
  10. + extern int OnOs2 ; /* flag for OS/2 specific features */
  11.   #endif /* OS2 */
  12.   
  13.   #if (defined(unix) || defined(OSK))
  14. ***************
  15. *** 521,527 ****
  16.       /* Hold until CR hit. */
  17.   #endif /* MTOS */
  18.   #endif /* ATARI */
  19. ! #endif /*OS2*/
  20.   #endif
  21.   #ifdef __ZTC__
  22.       if (stime > 0)
  23. --- 522,528 ----
  24.       /* Hold until CR hit. */
  25.   #endif /* MTOS */
  26.   #endif /* ATARI */
  27. ! #endif /* OS2 */
  28.   #endif
  29.   #ifdef __ZTC__
  30.       if (stime > 0)
  31. ***************
  32. *** 701,706 ****
  33. --- 702,708 ----
  34.       return(1);
  35.       } else if (!equals(c_token, ";")) { /* null statement */
  36.   #ifdef OS2
  37. +       if (OnOs2)  
  38.       {
  39.       if( token[c_token].is_token ) { 
  40.           char cmd[80] ;
  41. diff -bc gnuplot.old/makefile.os2 gnuplot/makefile.os2
  42. *** gnuplot.old/makefile.os2    Thu May 11 11:21:12 1995
  43. --- gnuplot/makefile.os2    Mon Jan  8 23:21:02 1996
  44. ***************
  45. *** 6,11 ****
  46. --- 6,14 ----
  47.   # usage: nmake  OR dmake -r  -B
  48.   # (file has blanks instead of real tabs, doesn't use dmake.ini)
  49.   # 
  50. + # Modified by David J. Liu (liudj0@minerva.cis.yale.edu)
  51. + # to be used for compiling a version works for both OS/2 and DOS.
  52. + #
  53.   
  54.   # where to place gnuplot.gih helpfile
  55.   HELPFILE = gnuplot.gih
  56. ***************
  57. *** 19,25 ****
  58.   OBJS =     bitmap.o command.o contour.o eval.o graphics.o graph3d.o util3d.o \
  59.       help.o internal.o misc.o parse.o plot.o plot2d.o plot3d.o readline.o specfun.o \
  60.       scanner.o set.o show.o standard.o term.o util.o version.o \
  61. !         binary.o interpol.o fit.o matrix.o datafile.o alloc.o hidden3d.o
  62.   
  63.   CSOURCE5 = term\aed.trm term\cgi.trm term/dumb.trm term/dxf.trm term\dxy.trm \
  64.       term\eepic.trm term\epson.trm term\fig.trm term\hp26.trm \
  65. --- 22,28 ----
  66.   OBJS =     bitmap.o command.o contour.o eval.o graphics.o graph3d.o util3d.o \
  67.       help.o internal.o misc.o parse.o plot.o plot2d.o plot3d.o readline.o specfun.o \
  68.       scanner.o set.o show.o standard.o term.o util.o version.o \
  69. !         binary.o interpol.o fit.o matrix.o datafile.o alloc.o hidden3d.o gstring.o
  70.   
  71.   CSOURCE5 = term\aed.trm term\cgi.trm term/dumb.trm term/dxf.trm term\dxy.trm \
  72.       term\eepic.trm term\epson.trm term\fig.trm term\hp26.trm \
  73. ***************
  74. *** 36,43 ****
  75.       gcc $(CFLAGS) -o $*.o $*.c
  76.   
  77.   gnuplot.exe: $(OBJS)
  78. !         gcc -o gnuplot.exe $(OBJS) -los2
  79.   
  80.   bitmap.o: bitmap.c bitmap.h plot.h
  81.   
  82. --- 39,46 ----
  83.       gcc $(CFLAGS) -o $*.o $*.c
  84.   
  85.   gnuplot.exe: $(OBJS)
  86. !     gcc -o gnuplot.exe *.o -lgraph -lvesa -los2 -s
  87. !     emxbind -a gnuplot.exe -acim -p
  88.   
  89.   bitmap.o: bitmap.c bitmap.h plot.h
  90.   
  91. ***************
  92. *** 52,57 ****
  93. --- 55,63 ----
  94.   graphics.o: graphics.c plot.h setshow.h
  95.   
  96.   graph3d.o: graph3d.c plot.h setshow.h
  97. + gstring.o: emx\gstring.c
  98. +     gcc -c -O2 -o gstring.o emx\\gstring.c
  99.   
  100.   fit.o: fit.c fit.h matrix.h plot.h
  101.   
  102. diff -bc gnuplot.old/plot.c gnuplot/plot.c
  103. *** gnuplot.old/plot.c    Thu Dec  7 16:41:08 1995
  104. --- gnuplot/plot.c    Tue Jan  9 22:12:34 1996
  105. ***************
  106. *** 189,194 ****
  107. --- 189,195 ----
  108.   #define INCL_REXXSAA
  109.   #include <os2.h>
  110.   #include <process.h>
  111. + int OnOs2 ; /* flag to be used with OS/2 only features */
  112.   ULONG RexxInterface( PRXSTRING, PUSHORT, PRXSTRING ) ;
  113.   int   ExecuteMacro( char* ) ;
  114.   #endif
  115. ***************
  116. *** 290,296 ****
  117. --- 291,302 ----
  118.   #endif
  119.   
  120.   #ifdef OS2
  121. +   OnOs2 = (strstr(getenv("COMSPEC"),"cmd.exe")!=NULL) ;
  122. +   if (OnOs2)
  123. +     {
  124. +      fprintf (stderr,"OS/2 specific features enabled.\n") ;
  125.        RexxRegisterSubcomExe( "GNUPLOT", (PFN) RexxInterface, NULL ) ;
  126. +     }
  127.   #endif
  128.   
  129.       setbuf(stderr,(char *)NULL);
  130. ***************
  131. *** 403,408 ****
  132. --- 409,415 ----
  133.       vms_reset();
  134.   #endif
  135.   #ifdef OS2
  136. +   if (OnOs2)
  137.        RexxDeregisterSubcom( "GNUPLOT", NULL ) ;
  138.   #endif
  139.   #if defined(ATARI) || defined(MTOS)
  140. diff -bc gnuplot.old/term.c gnuplot/term.c
  141. *** gnuplot.old/term.c    Sat Dec  2 17:04:40 1995
  142. --- gnuplot/term.c    Tue Jan  9 00:00:12 1996
  143. ***************
  144. *** 120,125 ****
  145. --- 120,129 ----
  146.   /* #undef TGIF */
  147.   #endif
  148.   
  149. + #ifdef OS2
  150. + extern int OnOs2 ;
  151. + #endif /* OS2 */
  152.   #if defined(MSDOS)||defined(ATARI)||defined(MTOS)||defined(OS2)||defined(_Windows)||defined(DOS386)
  153.   void reopen_binary();
  154.   #define REOPEN_BINARY
  155. ***************
  156. *** 530,536 ****
  157.   
  158.   #ifdef POSTSCRIPT    /* POSTSCRIPT type */
  159.   #include "term/post.trm"
  160. - #include "term/enhpost.trm"
  161.   #endif
  162.   
  163.   #ifdef GRASS              /* GRASS (geographic info system) monitor */
  164. --- 534,539 ----
  165. ***************
  166. *** 1856,1869 ****
  167.            term_name = "cgi";
  168.   #endif /*CGI */
  169.   
  170. - #if defined(MSDOS) && defined(__EMX__)
  171. - #ifdef EMXVESA
  172. -        term_name = "vesa";
  173. - #else
  174. -        term_name = "vgal";
  175. - #endif
  176. - #endif
  177.   #ifdef DJGPP
  178.           term_name = "svga";
  179.   #endif
  180. --- 1859,1864 ----
  181. ***************
  182. *** 1873,1881 ****
  183.   #endif
  184.   
  185.   #ifdef OS2
  186. !            term_name = "pm" ;
  187. !             /* EMX compiler has getcwd that can return drive */
  188. !            PM_init() ;
  189.   #endif /*OS2 */           
  190.   
  191.   /* set linux terminal only if LINUX_setup was successfull, if we are on X11
  192. --- 1868,1874 ----
  193.   #endif
  194.   
  195.   #ifdef OS2
  196. !        if (OnOs2) PM_init() ;
  197.   #endif /*OS2 */
  198.   
  199.   /* set linux terminal only if LINUX_setup was successfull, if we are on X11
  200. diff -bc gnuplot.old/term.h gnuplot/term.h
  201. *** gnuplot.old/term.h    Sun Dec  3 19:26:48 1995
  202. --- gnuplot/term.h    Mon Jan  8 23:19:14 1996
  203. ***************
  204. *** 72,82 ****
  205.   #endif
  206.   
  207.   #include "dumb.trm"    /* dumb terminal */
  208. - #include "x11.trm"     /* x windows */
  209.   #include "regis.trm"  /* regis graphics */
  210. ! #include "tek.trm"
  211.   #include "post.trm"    /* postscript */
  212.   #include "pbm.trm"     /* portable bit map */
  213.   /* #include "png.trm"  /* png - requires 3rd party library - see driver file */
  214.   
  215. --- 72,81 ----
  216.   #endif
  217.   
  218.   #include "dumb.trm"    /* dumb terminal */
  219.   #include "regis.trm"  /* regis graphics */
  220. ! #include "tek.trm" /* */
  221.   #include "post.trm"    /* postscript */
  222. ! #include "hpgl.trm"  /* HP-GL */
  223.   #include "pbm.trm"     /* portable bit map */
  224.   /* #include "png.trm"  /* png - requires 3rd party library - see driver file */
  225.   
  226. ***************
  227. *** 84,99 ****
  228.   #include "latex.trm"   /* latex and emtex */
  229.   #include "pslatex.trm" /* latex with picture in postscript */
  230.   
  231.   #ifdef LINUX
  232.   #include "linux.trm"   /* linux vga */
  233.   #endif
  234.   
  235. ! /* #include "metafont.trm" /* METAFONT */
  236. ! /* #include "fig.trm"    /* fig graphics */
  237.   /* #include "grass.trm"  /* geographical info system */
  238.   /* #include "tgif.trm"   /* GIF, via an external library */
  239.   
  240.   #ifdef OS2
  241.   #include "pm.trm"  /* presentation manager */
  242.   #endif
  243.   
  244. --- 83,104 ----
  245.   #include "latex.trm"   /* latex and emtex */
  246.   #include "pslatex.trm" /* latex with picture in postscript */
  247.   
  248. + #ifdef X11
  249. + #include "x11.trm"     /* x windows */
  250. + #endif
  251.   #ifdef LINUX
  252.   #include "linux.trm"   /* linux vga */
  253.   #endif
  254.   
  255. ! #include "metafont.trm" /* METAFONT */
  256. ! #include "fig.trm"    /* fig graphics */
  257.   /* #include "grass.trm"  /* geographical info system */
  258.   /* #include "tgif.trm"   /* GIF, via an external library */
  259.   
  260.   #ifdef OS2
  261. + #define DEFAULTTERM "emxvga" /* "pm" */
  262. + #include "emxvga.trm" /* works with DOS and OS/2 (windowed/full screen) */
  263.   #include "pm.trm"  /* presentation manager */
  264.   #endif
  265.   
  266. ***************
  267. *** 200,205 ****
  268. --- 205,212 ----
  269.   #endif /* MSDOS */
  270.   
  271.   #ifdef OS2
  272. + #define DEFAULTTERM "emxvga" /* "pm" */
  273. + /* #define EMXVGA        /* works with DOS and OS/2 (windowed/full screen) */
  274.   #define OS2PM
  275.   #endif /*OS2 */
  276.   
  277.