home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mega Top 1
/
os2_top1.zip
/
os2_top1
/
APPS
/
TEKST
/
GSPMSRC
/
SRC
/
PATCHES.OS2
< prev
next >
Wrap
Text File
|
1993-12-25
|
8KB
|
278 lines
Only in new: patches.os2
Only in new: makefile.emx
Only in new: makefile.bcc
Only in new: gssetdev.cmd
Only in new: gssetmod.cmd
Only in new: gsaddmod.cmd
Only in new: gp_os2.c
Only in new: gdevpm.c
Only in new: gconfig.h
Only in new: arch.h
Only in new: gsos2.c
Only in new: gsos2.h
Only in new: gsos2.def
Only in new: gsos2pm.c
Only in new: gsos2pm.def
Only in new: gsos2pm.ico
Only in new: gsos2pm.rc
diff -cb orig/genconf.c new/genconf.c
*** orig/genconf.c Thu May 20 13:50:38 1993
--- new/genconf.c Mon Dec 20 20:59:32 1993
***************
*** 16,23 ****
--- 16,26 ----
things, the copyright notice and this notice must be preserved on all
copies. */
+ /* Modified by J. Yang, 1993 */
+
/* genconf.c */
/* Generate configuration files for Ghostscript */
+
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h> /* for calloc */
***************
*** 121,127 ****
--- 124,138 ----
break;
case 'u':
sort_uniq(&conf.objs);
+ #ifdef __EMX__
+ write_list(out, &conf.objs, "%s\n");
+ #else
+ #ifdef __OS2__
+ write_list(out, &conf.objs, "%s+\n");
+ #else
write_list(out, &conf.objs, "%s \\\n");
+ #endif
+ #endif
write_list(out, &conf.libs, "-l%s \\\n");
break;
case 'w':
diff -cb orig/gs.c new/gs.c
*** orig/gs.c Mon May 24 09:17:30 1993
--- new/gs.c Sat Dec 25 11:49:08 1993
***************
*** 16,21 ****
--- 16,23 ----
things, the copyright notice and this notice must be preserved on all
copies. */
+ /* Modified by J. Yang, 1993 */
+
/* gs.c */
/* Driver program for Ghostscript */
/* Define PROGRAM_NAME before we include std.h */
***************
*** 108,116 ****
--- 110,128 ----
private int quiet;
private int batch;
+ #if (defined(__OS2__) || defined(__EMX__)) && !defined(STANDALONE)
+ gsmain(int argc, const char *argv[])
+ #else
main(int argc, const char *argv[])
+ #endif
{ int argi;
char cstr[128];
+ #ifdef __EMX__
+ _envargs(&argc, &argv, "GS_OPTS");
+ _response(&argc, &argv);
+ _wildcard(&argc, &argv);
+ _emxload_env("GS_LOAD");
+ #endif
get_real();
gs_init0(real_stdin, real_stdout, real_stderr, argc);
{ char *lib = getenv(GS_LIB);
diff -cb orig/gsmain.c new/gsmain.c
*** orig/gsmain.c Thu May 13 00:20:30 1993
--- new/gsmain.c Mon Dec 20 22:57:32 1993
***************
*** 16,21 ****
--- 16,23 ----
things, the copyright notice and this notice must be preserved on all
copies. */
+ /* Modified by J. Yang, 1993 */
+
/* gsmain.c */
/* Common support for Ghostscript front ends */
#include "memory_.h"
***************
*** 246,252 ****
--- 248,258 ----
void
gs_exit_with_code(int exit_status, int code)
{ gs_finit(exit_status, code);
+ #if defined(__OS2__) || defined(__EMX__)
+ _endthread();
+ #else
exit(exit_status);
+ #endif
}
void
gs_exit(int exit_status)
diff -cb orig/gxdraw.c new/gxdraw.c
*** orig/gxdraw.c Thu May 13 00:24:12 1993
--- new/gxdraw.c Mon Dec 20 21:00:26 1993
***************
*** 16,21 ****
--- 16,23 ----
things, the copyright notice and this notice must be preserved on all
copies. */
+ /* Modified by J. Yang, 1993 */
+
/* gxdraw.c */
/* Primitive drawing routines for Ghostscript imaging library */
#include "math_.h"
***************
*** 28,33 ****
--- 30,43 ----
#include "gzdevice.h" /* requires gsstate.h */
#include "gzcolor.h" /* requires gxdevice.h */
+ #ifdef __EMX__
+ #define __OS2__
+ #endif
+
+ #ifdef __OS2__
+ int pm_draw_line_called;
+ #endif
+
/* Fill a rectangle. */
int
gz_fill_rectangle(int x, int y, int w, int h, const gx_device_color *pdevc,
***************
*** 394,399 ****
--- 404,415 ----
int itox = fixed2int_var(itoxf);
int itoy = fixed2int_var(itoyf);
gx_device *dev;
+ #ifdef __OS2__
+ int ret;
+
+ pm_draw_line_called = 0;
+ #endif
+
return_if_interrupt();
if ( itoy == iy ) /* horizontal line */
{ return (ix <= itox ?
***************
*** 408,414 ****
--- 424,434 ----
);
}
if ( color_is_pure(pdevc) &&
+ #ifdef __OS2__
+ (dev = pgs->device->info, pm_draw_line_called = 1,
+ #else
(dev = pgs->device->info,
+ #endif
(*dev->procs->draw_line)(dev, ix, iy, itox, itoy,
pdevc->color1)) >= 0 )
return 0;
***************
*** 420,436 ****
--- 440,472 ----
{ if ( h < 0 )
fswap(ixf, itoxf), fswap(iyf, itoyf),
h = -h;
+ #ifdef __OS2__
+ ret = gz_fill_trapezoid_fixed(ixf - fixed_half, fixed_1, iyf,
+ itoxf - fixed_half, fixed_1, h,
+ 0, pdevc, pgs);
+ pm_draw_line_called = 0;
+ return (ret);
+ #else
return gz_fill_trapezoid_fixed(ixf - fixed_half, fixed_1, iyf,
itoxf - fixed_half, fixed_1, h,
0, pdevc, pgs);
+ #endif
}
else
{ if ( w < 0 )
fswap(ixf, itoxf), fswap(iyf, itoyf),
w = -w;
+ #ifdef __OS2__
+ ret = gz_fill_trapezoid_fixed(iyf - fixed_half, fixed_1, ixf,
+ itoyf - fixed_half, fixed_1, w,
+ 1, pdevc, pgs);
+ pm_draw_line_called = 0;
+ return (ret);
+ #else
return gz_fill_trapezoid_fixed(iyf - fixed_half, fixed_1, ixf,
itoyf - fixed_half, fixed_1, w,
1, pdevc, pgs);
+ #endif
}
#undef fswap
}
diff -cb orig/std.h new/std.h
*** orig/std.h Thu May 13 00:31:44 1993
--- new/std.h Sun Oct 24 22:35:06 1993
***************
*** 16,21 ****
--- 16,23 ----
things, the copyright notice and this notice must be preserved on all
copies. */
+ /* Modified by J. Yang, 1993 */
+
/* std.h */
/* Standard definitions for Aladdin Enterprises code */
***************
*** 65,71 ****
# define __SVR3 /* */
#endif
! #if defined(__STDC__) || defined(__MSDOS__) || defined(__convex__) || defined(VMS)
# if defined(M_UNIX) || defined(__GNUC__) || !defined(M_XENIX) /* SCO Xenix cc is broken */
# define __PROTOTYPES__ /* */
# endif
--- 67,73 ----
# define __SVR3 /* */
#endif
! #if defined(__OS2__) || defined(__STDC__) || defined(__MSDOS__) || defined(__convex__) || defined(VMS)
# if defined(M_UNIX) || defined(__GNUC__) || !defined(M_XENIX) /* SCO Xenix cc is broken */
# define __PROTOTYPES__ /* */
# endif
***************
*** 111,117 ****
/* far_data is used for static data that must get its own segment. */
/* This is supported in Borland C++, but none of the others. */
#undef far_data
! #ifdef __TURBOC__
# ifdef __BORLANDC__
# define far_data far
# else
--- 113,119 ----
/* far_data is used for static data that must get its own segment. */
/* This is supported in Borland C++, but none of the others. */
#undef far_data
! #if defined(__TURBOC__) && !defined(__OS2__)
# ifdef __BORLANDC__
# define far_data far
# else
***************
*** 204,210 ****
/* The type to be used for comparing pointers for order (<, >=, etc.). */
/* Turbo C large model doesn't compare pointers correctly */
/* if they have different segment parts. */
! #ifdef __TURBOC__
typedef unsigned long ptr_ord_t;
#else
typedef char *ptr_ord_t;
--- 206,212 ----
/* The type to be used for comparing pointers for order (<, >=, etc.). */
/* Turbo C large model doesn't compare pointers correctly */
/* if they have different segment parts. */
! #if defined(__TURBOC__) && !defined(__OS2__)
typedef unsigned long ptr_ord_t;
#else
typedef char *ptr_ord_t;