home *** CD-ROM | disk | FTP | other *** search
/ Mega Top 1 / os2_top1.zip / os2_top1 / APPS / TEKST / GSPMSRC / SRC / PATCHES.OS2 < prev    next >
Text File  |  1993-12-25  |  8KB  |  278 lines

  1. Only in new: patches.os2
  2. Only in new: makefile.emx
  3. Only in new: makefile.bcc
  4. Only in new: gssetdev.cmd
  5. Only in new: gssetmod.cmd
  6. Only in new: gsaddmod.cmd
  7. Only in new: gp_os2.c
  8. Only in new: gdevpm.c
  9. Only in new: gconfig.h
  10. Only in new: arch.h
  11. Only in new: gsos2.c
  12. Only in new: gsos2.h
  13. Only in new: gsos2.def
  14. Only in new: gsos2pm.c
  15. Only in new: gsos2pm.def
  16. Only in new: gsos2pm.ico
  17. Only in new: gsos2pm.rc
  18. diff -cb orig/genconf.c new/genconf.c
  19. *** orig/genconf.c    Thu May 20 13:50:38 1993
  20. --- new/genconf.c    Mon Dec 20 20:59:32 1993
  21. ***************
  22. *** 16,23 ****
  23. --- 16,26 ----
  24.   things, the copyright notice and this notice must be preserved on all
  25.   copies.  */
  26.   
  27. + /* Modified by J. Yang, 1993 */
  28.   /* genconf.c */
  29.   /* Generate configuration files for Ghostscript */
  30.   #include <ctype.h>
  31.   #include <stdio.h>
  32.   #include <stdlib.h>             /* for calloc */
  33. ***************
  34. *** 121,127 ****
  35. --- 124,138 ----
  36.                           break;
  37.                   case 'u':
  38.                           sort_uniq(&conf.objs);
  39. + #ifdef __EMX__
  40. +                         write_list(out, &conf.objs, "%s\n");
  41. + #else
  42. + #ifdef __OS2__
  43. +                         write_list(out, &conf.objs, "%s+\n");
  44. + #else
  45.                           write_list(out, &conf.objs, "%s \\\n");
  46. + #endif
  47. + #endif
  48.                           write_list(out, &conf.libs, "-l%s \\\n");
  49.                           break;
  50.                   case 'w':
  51. diff -cb orig/gs.c new/gs.c
  52. *** orig/gs.c    Mon May 24 09:17:30 1993
  53. --- new/gs.c    Sat Dec 25 11:49:08 1993
  54. ***************
  55. *** 16,21 ****
  56. --- 16,23 ----
  57.   things, the copyright notice and this notice must be preserved on all
  58.   copies.  */
  59.   
  60. + /* Modified by J. Yang, 1993 */
  61.   /* gs.c */
  62.   /* Driver program for Ghostscript */
  63.   /* Define PROGRAM_NAME before we include std.h */
  64. ***************
  65. *** 108,116 ****
  66. --- 110,128 ----
  67.   private int quiet;
  68.   private int batch;
  69.   
  70. + #if (defined(__OS2__) || defined(__EMX__)) && !defined(STANDALONE)
  71. + gsmain(int argc, const char *argv[])
  72. + #else
  73.   main(int argc, const char *argv[])
  74. + #endif
  75.   {       int argi;
  76.           char cstr[128];
  77. + #ifdef __EMX__
  78. +     _envargs(&argc, &argv, "GS_OPTS");
  79. +     _response(&argc, &argv);
  80. +     _wildcard(&argc, &argv);
  81. +     _emxload_env("GS_LOAD");
  82. + #endif
  83.           get_real();
  84.           gs_init0(real_stdin, real_stdout, real_stderr, argc);
  85.              {    char *lib = getenv(GS_LIB);
  86. diff -cb orig/gsmain.c new/gsmain.c
  87. *** orig/gsmain.c    Thu May 13 00:20:30 1993
  88. --- new/gsmain.c    Mon Dec 20 22:57:32 1993
  89. ***************
  90. *** 16,21 ****
  91. --- 16,23 ----
  92.   things, the copyright notice and this notice must be preserved on all
  93.   copies.  */
  94.   
  95. + /* Modified by J. Yang, 1993 */
  96.   /* gsmain.c */
  97.   /* Common support for Ghostscript front ends */
  98.   #include "memory_.h"
  99. ***************
  100. *** 246,252 ****
  101. --- 248,258 ----
  102.   void
  103.   gs_exit_with_code(int exit_status, int code)
  104.   {    gs_finit(exit_status, code);
  105. + #if defined(__OS2__) || defined(__EMX__)
  106. +         _endthread();
  107. + #else
  108.           exit(exit_status);
  109. + #endif
  110.   }
  111.   void
  112.   gs_exit(int exit_status)
  113. diff -cb orig/gxdraw.c new/gxdraw.c
  114. *** orig/gxdraw.c    Thu May 13 00:24:12 1993
  115. --- new/gxdraw.c    Mon Dec 20 21:00:26 1993
  116. ***************
  117. *** 16,21 ****
  118. --- 16,23 ----
  119.   things, the copyright notice and this notice must be preserved on all
  120.   copies.  */
  121.   
  122. + /* Modified by J. Yang, 1993 */
  123.   /* gxdraw.c */
  124.   /* Primitive drawing routines for Ghostscript imaging library */
  125.   #include "math_.h"
  126. ***************
  127. *** 28,33 ****
  128. --- 30,43 ----
  129.   #include "gzdevice.h"                   /* requires gsstate.h */
  130.   #include "gzcolor.h"                    /* requires gxdevice.h */
  131.   
  132. + #ifdef __EMX__
  133. + #define __OS2__
  134. + #endif
  135. + #ifdef __OS2__
  136. + int pm_draw_line_called;
  137. + #endif
  138.   /* Fill a rectangle. */
  139.   int
  140.   gz_fill_rectangle(int x, int y, int w, int h, const gx_device_color *pdevc,
  141. ***************
  142. *** 394,399 ****
  143. --- 404,415 ----
  144.           int itox = fixed2int_var(itoxf);
  145.           int itoy = fixed2int_var(itoyf);
  146.           gx_device *dev;
  147. + #ifdef __OS2__
  148. +         int ret;
  149. +         pm_draw_line_called = 0;
  150. + #endif
  151.           return_if_interrupt();
  152.           if ( itoy == iy )               /* horizontal line */
  153.             { return (ix <= itox ?
  154. ***************
  155. *** 408,414 ****
  156. --- 424,434 ----
  157.                       );
  158.             }
  159.           if ( color_is_pure(pdevc) &&
  160. + #ifdef __OS2__
  161. +             (dev = pgs->device->info, pm_draw_line_called = 1,
  162. + #else
  163.               (dev = pgs->device->info,
  164. + #endif
  165.                (*dev->procs->draw_line)(dev, ix, iy, itox, itoy,
  166.                                         pdevc->color1)) >= 0 )
  167.             return 0;
  168. ***************
  169. *** 420,436 ****
  170. --- 440,472 ----
  171.               { if ( h < 0 )
  172.                   fswap(ixf, itoxf), fswap(iyf, itoyf),
  173.                   h = -h;
  174. + #ifdef __OS2__
  175. +               ret =  gz_fill_trapezoid_fixed(ixf - fixed_half, fixed_1, iyf,
  176. +                                              itoxf - fixed_half, fixed_1, h,
  177. +                                              0, pdevc, pgs);
  178. +               pm_draw_line_called = 0;
  179. +               return (ret);
  180. + #else
  181.                 return gz_fill_trapezoid_fixed(ixf - fixed_half, fixed_1, iyf,
  182.                                                itoxf - fixed_half, fixed_1, h,
  183.                                                0, pdevc, pgs);
  184. + #endif
  185.               }
  186.             else
  187.               { if ( w < 0 )
  188.                   fswap(ixf, itoxf), fswap(iyf, itoyf),
  189.                   w = -w;
  190. + #ifdef __OS2__
  191. +               ret =  gz_fill_trapezoid_fixed(iyf - fixed_half, fixed_1, ixf,
  192. +                                              itoyf - fixed_half, fixed_1, w,
  193. +                                              1, pdevc, pgs);
  194. +               pm_draw_line_called = 0;
  195. +               return (ret);
  196. + #else
  197.                 return gz_fill_trapezoid_fixed(iyf - fixed_half, fixed_1, ixf,
  198.                                                itoyf - fixed_half, fixed_1, w,
  199.                                                1, pdevc, pgs);
  200. + #endif
  201.               }
  202.   #undef fswap
  203.           }
  204. diff -cb orig/std.h new/std.h
  205. *** orig/std.h    Thu May 13 00:31:44 1993
  206. --- new/std.h    Sun Oct 24 22:35:06 1993
  207. ***************
  208. *** 16,21 ****
  209. --- 16,23 ----
  210.   things, the copyright notice and this notice must be preserved on all
  211.   copies.  */
  212.   
  213. + /* Modified by J. Yang, 1993 */
  214.   /* std.h */
  215.   /* Standard definitions for Aladdin Enterprises code */
  216.   
  217. ***************
  218. *** 65,71 ****
  219.   #  define __SVR3 /* */
  220.   #endif
  221.   
  222. ! #if defined(__STDC__) || defined(__MSDOS__) || defined(__convex__) || defined(VMS)
  223.   # if defined(M_UNIX) || defined(__GNUC__) || !defined(M_XENIX) /* SCO Xenix cc is broken */
  224.   #  define __PROTOTYPES__ /* */
  225.   # endif
  226. --- 67,73 ----
  227.   #  define __SVR3 /* */
  228.   #endif
  229.   
  230. ! #if defined(__OS2__) || defined(__STDC__) || defined(__MSDOS__) || defined(__convex__) || defined(VMS)
  231.   # if defined(M_UNIX) || defined(__GNUC__) || !defined(M_XENIX) /* SCO Xenix cc is broken */
  232.   #  define __PROTOTYPES__ /* */
  233.   # endif
  234. ***************
  235. *** 111,117 ****
  236.   /* far_data is used for static data that must get its own segment. */
  237.   /* This is supported in Borland C++, but none of the others. */
  238.   #undef far_data
  239. ! #ifdef __TURBOC__
  240.   #  ifdef __BORLANDC__
  241.   #    define far_data far
  242.   #  else
  243. --- 113,119 ----
  244.   /* far_data is used for static data that must get its own segment. */
  245.   /* This is supported in Borland C++, but none of the others. */
  246.   #undef far_data
  247. ! #if defined(__TURBOC__) && !defined(__OS2__) 
  248.   #  ifdef __BORLANDC__
  249.   #    define far_data far
  250.   #  else
  251. ***************
  252. *** 204,210 ****
  253.   /* The type to be used for comparing pointers for order (<, >=, etc.). */
  254.   /* Turbo C large model doesn't compare pointers correctly */
  255.   /* if they have different segment parts. */
  256. ! #ifdef __TURBOC__
  257.   typedef unsigned long ptr_ord_t;
  258.   #else
  259.   typedef char *ptr_ord_t;
  260. --- 206,212 ----
  261.   /* The type to be used for comparing pointers for order (<, >=, etc.). */
  262.   /* Turbo C large model doesn't compare pointers correctly */
  263.   /* if they have different segment parts. */
  264. ! #if defined(__TURBOC__) && !defined(__OS2__) 
  265.   typedef unsigned long ptr_ord_t;
  266.   #else
  267.   typedef char *ptr_ord_t;
  268.