diff -crN gimp-1.0.0.orig/app/about_dialog.c gimp-1.0.0/app/about_dialog.c
*** gimp-1.0.0.orig/app/about_dialog.c	Sat May 30 15:31:54 1998
--- gimp-1.0.0/app/about_dialog.c	Fri Sep 11 22:41:08 1998
***************
*** 24,29 ****
--- 24,33 ----
  
  #include "config.h"
  
+ #ifdef __EMX__
+ extern const char *__XOS2RedirRoot(const char *);
+ #endif
+ 
  #define ANIMATION_STEPS 16
  #define ANIMATION_SIZE 2
  
***************
*** 281,287 ****
--- 285,295 ----
    if (logo_pixmap)
      return TRUE;
  
+ #ifndef __EMX__
    sprintf (buf, "%s/gimp_logo.ppm", DATADIR);
+ #else
+   sprintf (buf, "%s/gimp_logo.ppm", __XOS2RedirRoot(DATADIR));
+ #endif
  
    fp = fopen (buf, "rb");
    if (!fp)
diff -crN gimp-1.0.0.orig/app/app_procs.c gimp-1.0.0/app/app_procs.c
*** gimp-1.0.0.orig/app/app_procs.c	Sat May 30 15:31:56 1998
--- gimp-1.0.0/app/app_procs.c	Fri Jul 10 14:49:54 1998
***************
*** 59,64 ****
--- 59,68 ----
  
  #include "config.h"
  
+ #ifdef __EMX__
+ extern const char *__XOS2RedirRoot(const char *);
+ #endif
+ 
  #define LOGO_WIDTH_MIN 350
  #define LOGO_HEIGHT_MIN 110 
  #define NAME "The GIMP"
***************
*** 149,155 ****
--- 153,163 ----
    if (logo_pixmap)
      return TRUE;
  
+ #ifndef __EMX__
    sprintf (buf, "%s/gimp_splash.ppm", DATADIR);
+ #else
+   sprintf (buf, "%s/gimp_splash.ppm", __XOS2RedirRoot(DATADIR));
+ #endif
  
    fp = fopen (buf, "r");
    if (!fp)
***************
*** 184,190 ****
--- 192,202 ----
    if (logo_pixmap)
      return TRUE;
  
+ #ifndef __EMX__
    sprintf (buf, "%s/gimp_splash.ppm", DATADIR);
+ #else
+   sprintf (buf, "%s/gimp_splash.ppm", __XOS2RedirRoot(DATADIR));
+ #endif
  
    fp = fopen (buf, "r");
    if (!fp)
diff -crN gimp-1.0.0.orig/app/datafiles.c gimp-1.0.0/app/datafiles.c
*** gimp-1.0.0.orig/app/datafiles.c	Thu May 28 17:03:04 1998
--- gimp-1.0.0/app/datafiles.c	Sat Jul 11 14:52:18 1998
***************
*** 70,76 ****
--- 70,80 ----
  
    next_token = local_path;
  
+ #ifndef __EMX__
    token = xstrsep(&next_token, ":");
+ #else
+   token = xstrsep(&next_token, ";");
+ #endif
  
    while (token)
      {
***************
*** 126,132 ****
--- 130,140 ----
  
        g_free(path);
  
+ #ifndef __EMX__
        token = xstrsep(&next_token, ":");
+ #else
+       token = xstrsep(&next_token, ";");
+ #endif
      } /* while */
  
    g_free(local_path);
diff -crN gimp-1.0.0.orig/app/general.c gimp-1.0.0/app/general.c
*** gimp-1.0.0.orig/app/general.c	Mon Apr 13 13:38:30 1998
--- gimp-1.0.0/app/general.c	Sat Jul 11 14:52:48 1998
***************
*** 50,56 ****
--- 50,60 ----
    int err;
  
    local_path = g_strdup (search_path);
+ #ifndef __EMX__
    token = strtok (local_path, ":");
+ #else
+   token = strtok (local_path, ";");
+ #endif
  
    while (token)
      {
***************
*** 67,73 ****
--- 71,81 ----
  	  break;
  	}
  
+ #ifndef __EMX__
        token = strtok (NULL, ":");
+ #else
+       token = strtok (NULL, ";");
+ #endif
      }
  
    g_free (local_path);
diff -crN gimp-1.0.0.orig/app/gimp2.def gimp-1.0.0/app/gimp2.def
*** gimp-1.0.0.orig/app/gimp2.def	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/app/gimp2.def	Sun Sep 13 03:29:24 1998
***************
*** 0 ****
--- 1,3 ----
+ NAME WINDOWCOMPAT
+ DESCRIPTION 'GIMP/2 for XFree86/OS2 v1.0.0'
+ STACKSIZE 1048576
diff -crN gimp-1.0.0.orig/app/gimprc.c gimp-1.0.0/app/gimprc.c
*** gimp-1.0.0.orig/app/gimprc.c	Sat May 30 15:32:06 1998
--- gimp-1.0.0/app/gimprc.c	Sat Jul 11 19:23:16 1998
***************
*** 33,38 ****
--- 33,42 ----
  #include "plug_in.h"
  #include "gimage.h"
  
+ #ifdef __EMX__
+ extern const char *__XOS2RedirRoot(const char *);
+ #endif
+ 
  #define ERROR  0
  #define DONE   1
  #define OK     2
***************
*** 158,163 ****
--- 162,170 ----
  static void gimprc_set_token (char *token, char *value);
  static Argument * gimprc_query (Argument *args);
  static void add_gimp_directory_token (char *gimp_dir);
+ #ifdef __EMX__
+ static void add_x11root_token (char *x11root);
+ #endif
  static char* open_backup_file (char *filename, FILE **fp_new, FILE **fp_old);
  
  static ParseInfo parse_info;
***************
*** 243,249 ****
--- 250,260 ----
  
    if (NULL != env_gimp_dir)
      {
+ #ifndef __EMX__
        if ('/' == env_gimp_dir[0])
+ #else
+       if (_fnisabs(env_gimp_dir))
+ #endif
  	  strncpy (gimp_dir, env_gimp_dir, MAX_GIMPDIR_LEN);
        else
  	{
***************
*** 293,300 ****
--- 304,318 ----
  
    gimp_dir = gimp_directory ();
    add_gimp_directory_token (gimp_dir);
+ #ifdef __EMX__
+   add_x11root_token(getenv("X11ROOT"));
+ #endif
  
+ #ifndef __EMX__
    sprintf (libfilename, "%s/gimprc", DATADIR);
+ #else
+   sprintf (libfilename, "%s/gimprc", __XOS2RedirRoot(DATADIR));
+ #endif
    app_init_update_status("Resource configuration", libfilename, -1);
    parse_gimprc_file (libfilename);
  
***************
*** 313,319 ****
--- 331,341 ----
    int status;
    char rfilename[512];
  
+ #ifndef __EMX__
    if (filename[0] != '/')
+ #else
+   if (_fnisrel(filename))
+ #endif
      {
        if (!home_dir)
  	home_dir = g_strdup (getenv ("HOME"));
***************
*** 1745,1750 ****
--- 1767,1797 ----
    unknown_tokens = g_list_append (unknown_tokens, ut);
  }
  
+ #ifdef __EMX__
+ static void
+ add_x11root_token (char *x11root)
+ {
+   UnknownToken *ut;
+ 
+   if (x11root == NULL)
+     return;
+   /*
+     The token holds data from a static buffer which is initialized
+     once.  There should be no need to change an already-existing
+     value.
+   */
+   if (NULL != gimprc_find_token ("x11root"))
+     return;
+ 
+   ut = g_new (UnknownToken, 1);
+   ut->token = g_strdup ("x11root");
+   ut->value = g_strdup (x11root);
+ 
+   /* Similarly, transforming the path should be silly. */
+   unknown_tokens = g_list_append (unknown_tokens, ut);
+ }
+ #endif
+ 
  /* Try to:
  
     1. Open gimprc for reading.
***************
*** 1778,1783 ****
--- 1825,1839 ----
  
    oldfilename = g_malloc (strlen (filename) + 5);
    sprintf (oldfilename, "%s.old", filename);
+ #ifdef __EMX__
+   {
+     struct stat buf;
+ 
+     if (stat (oldfilename, &buf) == 0)	/* if .old exists, remove it */
+       remove(oldfilename);
+     fclose(*fp_old);	/* before rename(), close it */
+   }
+ #endif
    if (rename (filename, oldfilename) < 0)
      {
        g_free (oldfilename);
***************
*** 1787,1792 ****
--- 1843,1859 ----
          return "Can't rename gimprc to gimprc.old; gimprc.old is a directory";
        return "Can't rename gimprc to gimprc.old, reason unknown";
      }
+ #ifdef __EMX__
+   /* reopen */
+   if ((*fp_old = fopen (oldfilename, "rt")) == NULL)
+     {
+       if (errno == EACCES)
+         return "Can't open gimprc; permission problems";
+       if (errno == ENOENT)
+         return "Can't open gimprc; file does not exist";
+       return "Can't open gimprc, reason unknown";
+     }
+ #endif
  
    if ((*fp_new = fopen (filename, "wt")) == NULL)
      {
diff -crN gimp-1.0.0.orig/app/gradient.c gimp-1.0.0/app/gradient.c
*** gimp-1.0.0.orig/app/gradient.c	Thu May 28 17:03:18 1998
--- gimp-1.0.0/app/gradient.c	Fri Jul 10 19:48:36 1998
***************
*** 5837,5843 ****
--- 5837,5847 ----
  	home        = getenv("HOME");
  	local_path  = g_strdup(path_str);
  	first_token = local_path;
+ #ifndef __EMX__
  	token       = xstrsep(&first_token, ":");
+ #else
+ 	token       = xstrsep(&first_token, ";");
+ #endif
  	filename    = NULL;
  
  	if (token) {
diff -crN gimp-1.0.0.orig/app/Imakefile gimp-1.0.0/app/Imakefile
*** gimp-1.0.0.orig/app/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/app/Imakefile	Thu Jul 30 00:30:46 1998
***************
*** 0 ****
--- 1,286 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../gimp.cf"
+ 
+ #if BuildOMFEXE
+ ADD_DEFS = -Zomf
+ LOCAL_LDFLAGS = -Zomf
+ PROG_DEF = gimp2.def
+ #else
+ ADD_DEFS =
+ LOCAL_LDFLAGS = 
+ PROG_DEF =
+ #endif
+ 
+ DEFINES = \
+ 	-DHAVE_CONFIG_H \
+ 	-DLIBDIR=\""$(GIMPPLUGINSDIR)"\" \
+ 	-DDATADIR=\""$(GIMPDATADIR)"\" \
+ 	-DGIMPDIR=\"".gimp"\" $(ADD_DEFS)
+ 
+ INCLUDES = -I.. -I.
+ 
+ #ifdef OS2Architecture
+ LOCAL_LIBRARIES = -L../libgimp -lgimp -lgtk -lgdk -lglib -lXext -lX11 -lshm
+ #else
+ LOCAL_LIBRARIES = -L../libgimp -lgimp -lgtk -lgdk -lglib -lXext -lX11
+ #endif
+ 
+ SRCS = \
+ 	about_dialog.c		\
+ 	actionarea.c		\
+ 	airbrush.c		\
+ 	app_procs.c		\
+ 	asupsample.c		\
+ 	batch.c			\
+ 	bezier_select.c		\
+ 	blend.c			\
+ 	boundary.c		\
+ 	brightness_contrast.c	\
+ 	brush_select.c		\
+ 	brushes.c		\
+ 	bucket_fill.c		\
+ 	buildmenu.c		\
+ 	by_color_select.c	\
+ 	channel.c		\
+ 	channel_cmds.c		\
+ 	channels_dialog.c	\
+ 	channel_ops.c		\
+ 	clone.c			\
+ 	color_area.c		\
+ 	color_balance.c		\
+ 	color_panel.c		\
+ 	color_picker.c		\
+ 	color_select.c		\
+ 	color_transfer.c	\
+ 	colormaps.c		\
+ 	commands.c		\
+ 	convert.c		\
+ 	convolve.c		\
+ 	crop.c			\
+ 	cursorutil.c		\
+ 	curves.c		\
+ 	datafiles.c		\
+ 	desaturate.c		\
+ 	disp_callbacks.c	\
+ 	draw_core.c		\
+ 	drawable.c		\
+ 	drawable_cmds.c		\
+ 	edit_cmds.c		\
+ 	edit_selection.c	\
+ 	ellipse_select.c	\
+ 	eraser.c		\
+ 	errors.c		\
+ 	equalize.c		\
+ 	fileops.c		\
+ 	flip_tool.c		\
+ 	floating_sel.c		\
+ 	floating_sel_cmds.c	\
+ 	frac.c			\
+ 	free_select.c		\
+ 	fuzzy_select.c		\
+ 	gdisplay.c		\
+ 	gdisplay_cmds.c		\
+ 	gdisplay_ops.c		\
+ 	general.c		\
+ 	gimage.c		\
+ 	gimage_cmds.c		\
+ 	gimage_mask.c		\
+ 	gimage_mask_cmds.c	\
+ 	gimprc.c		\
+ 	global_edit.c		\
+ 	gradient.c		\
+ 	gximage.c		\
+ 	histogram.c		\
+ 	histogram_tool.c	\
+ 	hue_saturation.c	\
+ 	image_map.c		\
+ 	image_render.c		\
+ 	indexed_palette.c	\
+ 	info_dialog.c		\
+ 	info_window.c		\
+ 	install.c		\
+ 	interface.c		\
+ 	internal_procs.c	\
+ 	invert.c		\
+ 	iscissors.c		\
+ 	layer.c			\
+ 	layer_cmds.c		\
+ 	layer_select.c		\
+ 	layers_dialog.c		\
+ 	levels.c		\
+ 	magnify.c		\
+ 	main.c			\
+ 	menus.c			\
+ 	move.c			\
+ 	ops_buttons.c		\
+ 	palette.c		\
+ 	paint_core.c		\
+ 	paint_funcs.c		\
+ 	paintbrush.c		\
+ 	pattern_select.c	\
+ 	patterns.c		\
+ 	pencil.c		\
+ 	perspective_tool.c	\
+ 	pixel_region.c		\
+ 	plug_in.c		\
+ 	posterize.c		\
+ 	procedural_db.c		\
+ 	rect_select.c		\
+ 	regex.c			\
+ 	resize.c		\
+ 	rotate_tool.c		\
+ 	scale.c			\
+ 	scale_tool.c		\
+ 	scroll.c		\
+ 	selection.c		\
+ 	shear_tool.c		\
+ 	temp_buf.c		\
+ 	text_tool.c		\
+ 	threshold.c		\
+ 	tile.c			\
+ 	tile_cache.c		\
+ 	tile_manager.c		\
+ 	tile_swap.c		\
+ 	tips_dialog.c		\
+ 	tools.c			\
+ 	transform_core.c	\
+ 	transform_tool.c	\
+ 	undo.c			\
+ 	undo_cmds.c		\
+ 	xcf.c
+ 
+ OBJS = \
+ 	about_dialog.o		\
+ 	actionarea.o		\
+ 	airbrush.o		\
+ 	app_procs.o		\
+ 	asupsample.o		\
+ 	batch.o			\
+ 	bezier_select.o		\
+ 	blend.o			\
+ 	boundary.o		\
+ 	brightness_contrast.o	\
+ 	brush_select.o		\
+ 	brushes.o		\
+ 	bucket_fill.o		\
+ 	buildmenu.o		\
+ 	by_color_select.o	\
+ 	channel.o		\
+ 	channel_cmds.o		\
+ 	channels_dialog.o	\
+ 	channel_ops.o		\
+ 	clone.o			\
+ 	color_area.o		\
+ 	color_balance.o		\
+ 	color_panel.o		\
+ 	color_picker.o		\
+ 	color_select.o		\
+ 	color_transfer.o	\
+ 	colormaps.o		\
+ 	commands.o		\
+ 	convert.o		\
+ 	convolve.o		\
+ 	crop.o			\
+ 	cursorutil.o		\
+ 	curves.o		\
+ 	datafiles.o		\
+ 	desaturate.o		\
+ 	disp_callbacks.o	\
+ 	draw_core.o		\
+ 	drawable.o		\
+ 	drawable_cmds.o		\
+ 	edit_cmds.o		\
+ 	edit_selection.o	\
+ 	ellipse_select.o	\
+ 	eraser.o		\
+ 	errors.o		\
+ 	equalize.o		\
+ 	fileops.o		\
+ 	flip_tool.o		\
+ 	floating_sel.o		\
+ 	floating_sel_cmds.o	\
+ 	frac.o			\
+ 	free_select.o		\
+ 	fuzzy_select.o		\
+ 	gdisplay.o		\
+ 	gdisplay_cmds.o		\
+ 	gdisplay_ops.o		\
+ 	general.o		\
+ 	gimage.o		\
+ 	gimage_cmds.o		\
+ 	gimage_mask.o		\
+ 	gimage_mask_cmds.o	\
+ 	gimprc.o		\
+ 	global_edit.o		\
+ 	gradient.o		\
+ 	gximage.o		\
+ 	histogram.o		\
+ 	histogram_tool.o	\
+ 	hue_saturation.o	\
+ 	image_map.o		\
+ 	image_render.o		\
+ 	indexed_palette.o	\
+ 	info_dialog.o		\
+ 	info_window.o		\
+ 	install.o		\
+ 	interface.o		\
+ 	internal_procs.o	\
+ 	invert.o		\
+ 	iscissors.o		\
+ 	layer.o			\
+ 	layer_cmds.o		\
+ 	layer_select.o		\
+ 	layers_dialog.o		\
+ 	levels.o		\
+ 	magnify.o		\
+ 	main.o			\
+ 	menus.o			\
+ 	move.o			\
+ 	ops_buttons.o		\
+ 	palette.o		\
+ 	paint_core.o		\
+ 	paint_funcs.o		\
+ 	paintbrush.o		\
+ 	pattern_select.o	\
+ 	patterns.o		\
+ 	pencil.o		\
+ 	perspective_tool.o	\
+ 	pixel_region.o		\
+ 	plug_in.o		\
+ 	posterize.o		\
+ 	procedural_db.o		\
+ 	rect_select.o		\
+ 	regex.o			\
+ 	resize.o		\
+ 	rotate_tool.o		\
+ 	scale.o			\
+ 	scale_tool.o		\
+ 	scroll.o		\
+ 	selection.o		\
+ 	shear_tool.o		\
+ 	temp_buf.o		\
+ 	text_tool.o		\
+ 	threshold.o		\
+ 	tile.o			\
+ 	tile_cache.o		\
+ 	tile_manager.o		\
+ 	tile_swap.o		\
+ 	tips_dialog.o		\
+ 	tools.o			\
+ 	transform_core.o	\
+ 	transform_tool.o	\
+ 	undo.o			\
+ 	undo_cmds.o		\
+ 	xcf.o			\
+ 	$(PROG_DEF)
+ 
+ ComplexProgramTarget(gimp)
+ 
+ #if defined(OS2Architecture) && !BuildOMFEXE
+ all::
+ 	emxbind -a gimp.exe -h255
+ #endif
diff -crN gimp-1.0.0.orig/app/install.c gimp-1.0.0/app/install.c
*** gimp-1.0.0.orig/app/install.c	Sat May 30 15:32:10 1998
--- gimp-1.0.0/app/install.c	Sun Sep 13 02:15:56 1998
***************
*** 27,32 ****
--- 27,36 ----
  #include "gimprc.h"
  
  
+ #ifdef __EMX__
+ extern const char *__XOS2RedirRoot(const char *);
+ #endif
+ 
  static void install_run (InstallCallback);
  static void install_help (InstallCallback);
  static void help_install_callback (GtkWidget *, gpointer);
***************
*** 415,421 ****
--- 419,429 ----
    gtk_text_insert (GTK_TEXT (text), font_strong, NULL, NULL, "User Installation Log\n\n", -1);
  
    /*  Generate output  */
+ #ifndef __EMX__
    sprintf (buffer, "%s/user_install", DATADIR);
+ #else
+   sprintf (buffer, "%s/user_install.cmd", __XOS2RedirRoot(DATADIR));
+ #endif
    if ((err = stat (buffer, &stat_buf)) != 0)
      {
        gtk_text_insert (GTK_TEXT (text), font, NULL, NULL, buffer, -1);
***************
*** 433,440 ****
--- 441,458 ----
  
    if (executable == TRUE)
      {
+ #ifndef __EMX__
        sprintf (buffer, "%s/user_install %s %s", DATADIR, DATADIR,
  	       gimp_directory ());
+ #else
+       char *s = buffer;
+       sprintf (buffer, "%s/user_install.cmd %s %s", __XOS2RedirRoot(DATADIR),
+ 	       __XOS2RedirRoot(DATADIR), gimp_directory ());
+       while (*s)
+ 	{
+ 	  if (*s == '/') *s = '\\'; s++;
+ 	}
+ #endif
        if ((pfp = popen (buffer, "r")) != NULL)
  	{
  	  while (fgets (buffer, 2048, pfp))
diff -crN gimp-1.0.0.orig/app/palette.c gimp-1.0.0/app/palette.c
*** gimp-1.0.0.orig/app/palette.c	Thu May 28 17:03:30 1998
--- gimp-1.0.0/app/palette.c	Sat Sep 12 21:27:38 1998
***************
*** 971,977 ****
--- 971,981 ----
  	  home = getenv("HOME");
  	  local_path = g_strdup (palette_path);
  	  first_token = local_path;
+ #ifndef __EMX__
  	  token = xstrsep(&first_token, ":");
+ #else
+ 	  token = xstrsep(&first_token, ";");
+ #endif
  
  	  if (token)
  	    {
***************
*** 1005,1011 ****
--- 1009,1018 ----
        palette_entries_list = palette_entries_insert_list (palette_entries_list, entries);
  
        gtk_option_menu_remove_menu (GTK_OPTION_MENU (palette->option_menu));
+ #if 0
+ /* XXX unknown bug??? */
        gtk_widget_destroy (palette->menu);
+ #endif
        palette_create_palette_menu (palette, entries);
      }
  }
***************
*** 1034,1040 ****
--- 1041,1050 ----
  	}
  
        gtk_option_menu_remove_menu (GTK_OPTION_MENU (palette->option_menu));
+ #if 0
+ /* XXX unknown bug??? */
        gtk_widget_destroy (palette->menu);
+ #endif
  
        entries = palette->entries;
        if (entries && entries->filename)
diff -crN gimp-1.0.0.orig/app/plug_in.c gimp-1.0.0/app/plug_in.c
*** gimp-1.0.0.orig/app/plug_in.c	Sat May 30 15:32:16 1998
--- gimp-1.0.0/app/plug_in.c	Sat Jul 11 15:20:54 1998
***************
*** 30,35 ****
--- 30,39 ----
  #include <sys/stat.h>
  #include <time.h>
  #include <unistd.h>
+ #ifdef __EMX__
+ #include <fcntl.h>
+ #include <process.h>
+ #endif
  
  #include "libgimp/gimpprotocol.h"
  #include "libgimp/gimpwire.h"
***************
*** 265,271 ****
--- 269,279 ----
    /* read the pluginrc file for cached data */
    if (pluginrc_path)
      {
+ #ifndef __EMX__
        if (*pluginrc_path == '/')
+ #else
+       if (_fnisabs(pluginrc_path))
+ #endif
          strcpy(filename, pluginrc_path);
        else
          sprintf(filename, "%s/%s", gimp_directory(), pluginrc_path);
***************
*** 676,682 ****
--- 684,694 ----
    PlugIn *plug_in;
    char *path;
  
+ #ifndef __EMX__
    if (name[0] != '/')
+ #else
+   if (_fnisrel(name))
+ #endif
      {
        path = search_in_path (plug_in_path, name);
        if (!path)
***************
*** 769,774 ****
--- 781,791 ----
        plug_in->my_write = my_write[1];
        plug_in->his_read = my_write[0];
        plug_in->his_write = my_read[1];
+ #ifdef __EMX__
+       setmode(plug_in->my_read, O_BINARY);
+       setmode(plug_in->my_write, O_BINARY);
+       /* set binary for plug_in->his_read/write is in gimp_main()/libgimp */
+ #endif
  
        /* Remember the file descriptors for the pipes.
         */
***************
*** 794,799 ****
--- 811,817 ----
         *  so that we can later use it to kill the filter if
         *  necessary.
         */
+ #ifndef __EMX__
        plug_in->pid = fork ();
  
        if (plug_in->pid == 0)
***************
*** 808,813 ****
--- 826,842 ----
            _exit (1);
  	}
        else if (plug_in->pid == -1)
+ #else
+       {
+ 	int flag;
+ 	flag = fcntl(plug_in->my_read, F_GETFD);
+ 	fcntl(plug_in->my_read, F_SETFD, flag | FD_CLOEXEC);
+ 	flag = fcntl(plug_in->my_write, F_GETFD);
+ 	fcntl(plug_in->my_write, F_SETFD, flag | FD_CLOEXEC);
+       }
+       plug_in->pid = spawnvp (P_NOWAIT, plug_in->args[0], plug_in->args);
+       if (plug_in->pid == -1)
+ #endif
  	{
            g_message ("unable to run plug-in: %s\n", plug_in->args[0]);
            plug_in_destroy (plug_in);
diff -crN gimp-1.0.0.orig/app/tile_swap.c gimp-1.0.0/app/tile_swap.c
*** gimp-1.0.0.orig/app/tile_swap.c	Sat May 30 15:32:20 1998
--- gimp-1.0.0/app/tile_swap.c	Sun Jul 12 02:45:14 1998
***************
*** 116,121 ****
--- 116,129 ----
  	  tile_swap_print_gaps (def_swap_file);
  	}
  
+ #ifdef __EMX__
+       /* should close before unlink */
+       if (swap_file->fd > 0)
+ 	{
+ 	  close (swap_file->fd);
+ 	  swap_file->fd = -1;
+ 	}
+ #endif
        unlink (swap_file->filename);
      }
  }
diff -crN gimp-1.0.0.orig/app/tips_dialog.c gimp-1.0.0/app/tips_dialog.c
*** gimp-1.0.0.orig/app/tips_dialog.c	Mon Apr 13 19:05:40 1998
--- gimp-1.0.0/app/tips_dialog.c	Thu Jul  9 16:21:14 1998
***************
*** 8,13 ****
--- 8,17 ----
  #include "interface.h"
  #include "wilber.h"
  
+ #ifdef __EMX__
+ extern const char *__XOS2RedirRoot(const char *);
+ #endif
+ 
  #define TIPS_FILE_NAME "gimp_tips.txt"
  
  static int  tips_dialog_hide (GtkWidget *widget, gpointer data);
***************
*** 41,47 ****
--- 45,55 ----
    if (tips_count == 0)
      {
        temp = g_malloc (512);
+ #ifndef __EMX__
        sprintf ((char *)temp, "%s/%s", DATADIR, TIPS_FILE_NAME);
+ #else
+       sprintf ((char *)temp, "%s/%s", __XOS2RedirRoot(DATADIR), TIPS_FILE_NAME);
+ #endif
        read_tips_file ((char *)temp);
        g_free (temp);
      }
diff -crN gimp-1.0.0.orig/config.h gimp-1.0.0/config.h
*** gimp-1.0.0.orig/config.h	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/config.h	Thu Jul  9 16:19:54 1998
***************
*** 0 ****
--- 1,89 ----
+ /* config.h.  Generated automatically by configure.  */
+ /* config.h.in.  Generated automatically from configure.in by autoheader.  */
+ 
+ /* Define if using alloca.c.  */
+ /* #undef C_ALLOCA */
+ 
+ /* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
+    This function is required for alloca.c support on those systems.  */
+ /* #undef CRAY_STACKSEG_END */
+ 
+ /* Define if you have alloca, as a function or macro.  */
+ #define HAVE_ALLOCA 1
+ 
+ /* Define if you have <alloca.h> and it should be used (not on Ultrix).  */
+ #define HAVE_ALLOCA_H 1
+ 
+ /* Define if you don't have vprintf but do have _doprnt.  */
+ /* #undef HAVE_DOPRNT */
+ 
+ /* Define if you have <sys/wait.h> that is POSIX.1 compatible.  */
+ #define HAVE_SYS_WAIT_H 1
+ 
+ /* Define if you have <unistd.h>.  */
+ #define HAVE_UNISTD_H 1
+ 
+ /* Define if you have the vprintf function.  */
+ #define HAVE_VPRINTF 1
+ 
+ /* Define to `int' if <sys/types.h> doesn't define.  */
+ /* #undef pid_t */
+ 
+ /* Define as the return type of signal handlers (int or void).  */
+ #define RETSIGTYPE void
+ 
+ /* If using the C implementation of alloca, define if you know the
+    direction of stack growth for your system; otherwise it will be
+    automatically deduced at run-time.
+  STACK_DIRECTION > 0 => grows toward higher addresses
+  STACK_DIRECTION < 0 => grows toward lower addresses
+  STACK_DIRECTION = 0 => direction of growth unknown
+  */
+ /* #undef STACK_DIRECTION */
+ 
+ /* Define if you have the ANSI C header files.  */
+ #define STDC_HEADERS 1
+ 
+ /* Define if you can safely include both <sys/time.h> and <time.h>.  */
+ #define TIME_WITH_SYS_TIME 1
+ 
+ #define GIMP_MAJOR_VERSION 1
+ #define GIMP_MINOR_VERSION 0
+ #define GIMP_MICRO_VERSION 0
+ #define GIMP_VERSION "1.0.0"
+ 
+ #define HAVE_DIRENT_H 1
+ /* #undef HAVE_DOPRNT */
+ #define HAVE_IPC_H 1
+ /* #undef HAVE_NDIR_H */
+ #define HAVE_SHM_H 1
+ /* #undef HAVE_SYS_DIR_H */
+ /* #undef HAVE_SYS_NDIR_H */
+ /* #undef HAVE_SYS_SELECT_H */
+ #define HAVE_SYS_TIME_H 1
+ #define HAVE_UNISTD_H 1
+ #define HAVE_VPRINTF 1
+ /* #undef HAVE_XSHM_H */
+ 
+ /* #undef IPC_RMID_DEFERRED_RELEASE */
+ 
+ /* #undef NO_DIFFTIME */
+ /* #undef NO_FD_SET */
+ 
+ #define RAND_FUNC random
+ #define SRAND_FUNC srandom
+ 
+ /* #undef PACKAGE */
+ /* #undef VERSION */
+ 
+ /* Define if you have the <dirent.h> header file.  */
+ #define HAVE_DIRENT_H 1
+ 
+ /* Define if you have the <ndir.h> header file.  */
+ /* #undef HAVE_NDIR_H */
+ 
+ /* Define if you have the <sys/dir.h> header file.  */
+ /* #undef HAVE_SYS_DIR_H */
+ 
+ /* Define if you have the <sys/ndir.h> header file.  */
+ /* #undef HAVE_SYS_NDIR_H */
diff -crN gimp-1.0.0.orig/data/brushes/Imakefile gimp-1.0.0/data/brushes/Imakefile
*** gimp-1.0.0.orig/data/brushes/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/data/brushes/Imakefile	Thu Jul  9 23:15:50 1998
***************
*** 0 ****
--- 1,51 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../../gimp.cf"
+ 
+ brush_DATA	=\
+ 	10x10square.gbr	\
+ 	10x10squareBlur.gbr	\
+ 	11circle.gbr	\
+ 	11fcircle.gbr	\
+ 	13circle.gbr	\
+ 	13fcircle.gbr	\
+ 	15circle.gbr	\
+ 	15fcircle.gbr	\
+ 	17circle.gbr	\
+ 	17fcircle.gbr	\
+ 	19circle.gbr	\
+ 	19fcircle.gbr	\
+ 	1circle.gbr	\
+ 	20x20square.gbr	\
+ 	20x20squareBlur.gbr	\
+ 	3circle.gbr		\
+ 	3fcircle.gbr		\
+ 	5circle.gbr		\
+ 	5fcircle.gbr		\
+ 	5x5square.gbr		\
+ 	5x5squareBlur.gbr	\
+ 	7circle.gbr		\
+ 	7fcircle.gbr		\
+ 	9circle.gbr		\
+ 	9fcircle.gbr		\
+ 	DStar11.gbr		\
+ 	DStar17.gbr		\
+ 	DStar25.gbr		\
+ 	callig1.gbr		\
+ 	callig2.gbr		\
+ 	callig3.gbr		\
+ 	callig4.gbr		\
+ 	confetti.gbr		\
+ 	dunes.gbr		\
+ 	galaxy.gbr		\
+ 	galaxy_big.gbr		\
+ 	galaxy_small.gbr	\
+ 	pixel.gbr		\
+ 	thegimp.gbr		\
+ 	xcf.gbr
+ 
+ InstallMultiple($(brush_DATA),$(GIMPDATADIR)/brushes)
+ 
diff -crN gimp-1.0.0.orig/data/gradients/Imakefile gimp-1.0.0/data/gradients/Imakefile
*** gimp-1.0.0.orig/data/gradients/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/data/gradients/Imakefile	Thu Jul  9 23:22:34 1998
***************
*** 0 ****
--- 1,93 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../../gimp.cf"
+ 
+ gradient_DATA1	=\
+     Abstract_1 \
+     Abstract_2 \
+     Abstract_3 \
+     Aneurism \
+     Blinds \
+     Blue_Green	\
+     Browns \
+     Brushed_Aluminium \
+     Burning_Paper \
+     Burning_Transparency \
+     CD \
+     CD_Half \
+     Caribbean_Blues \
+     Coffee \
+     Cold_Steel \
+     Cold_Steel_2 \
+     Crown_molding \
+     Dark_1 \
+     Deep_Sea \
+     Default \
+     Flare_Glow_Angular_1 \
+     Flare_Glow_Radial_1 \
+     Flare_Glow_Radial_2 \
+     Flare_Glow_Radial_3	\
+     Flare_Glow_Radial_4	\
+     Flare_Radial_101 \
+     Flare_Radial_102 \
+     Flare_Radial_103 \
+     Flare_Rays_Radial_1 \
+     Flare_Rays_Radial_2 \
+     Flare_Rays_Size_1 \
+     Flare_Sizefac_101 \
+     Four_bars \
+     French_flag \
+     French_flag_smooth \
+     Full_saturation_spectrum_CCW \
+     Full_saturation_spectrum_CW \
+     German_flag \
+     German_flag_smooth \
+     Golden \
+     Greens \
+     Horizon_1 \
+     Horizon_2 \
+     Incandescent \
+     Land_1 \
+     Land_and_Sea
+ 
+ gradient_DATA2	=\
+     Metallic_Something	\
+     Mexican_flag \
+     Mexican_flag_smooth \
+     Nauseating_Headache \
+     Neon_Cyan \
+     Neon_Green \
+     Neon_Yellow \
+     Pastels	\
+     Pastel_Rainbow \
+     Purples \
+     Radial_Eyeball_Blue \
+     Radial_Eyeball_Brown \
+     Radial_Eyeball_Green \
+     Radial_Glow_1 \
+     Radial_Rainbow_Hoop \
+     Romanian_flag \
+     Romanian_flag_smooth \
+     Rounded_edge \
+     Shadows_1 \
+     Shadows_2	\
+     Shadows_3	\
+     Skyline \
+     Skyline_polluted \
+     Square_Wood_Frame \
+     Sunrise	\
+     Three_bars_sin \
+     Tropical_Colors \
+     Tube_Red \
+     Wood_1 \
+     Wood_2	\
+     Yellow_Contrast	\
+     Yellow_Orange
+ 
+ /* since $(DATA) is too long, we split it */
+ InstallMultiple($(gradient_DATA1),$(GIMPDATADIR)/gradients)
+ InstallMultiple($(gradient_DATA2),$(GIMPDATADIR)/gradients)
+ 
diff -crN gimp-1.0.0.orig/data/Imakefile gimp-1.0.0/data/Imakefile
*** gimp-1.0.0.orig/data/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/data/Imakefile	Thu Jul  9 23:13:46 1998
***************
*** 0 ****
--- 1,13 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #define IHaveSubdirs
+ #define PassCDebugFlags
+ 
+ SUBDIRS = brushes gradients palettes patterns
+ 
+ MakeSubdirs($(SUBDIRS))
+ DependSubdirs($(SUBDIRS))
+ 
diff -crN gimp-1.0.0.orig/data/palettes/Imakefile gimp-1.0.0/data/palettes/Imakefile
*** gimp-1.0.0.orig/data/palettes/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/data/palettes/Imakefile	Thu Jul  9 23:19:16 1998
***************
*** 0 ****
--- 1,47 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../../gimp.cf"
+ 
+ palette_DATA	=\
+ 	Blues 		\
+ 	Bears		\
+ 	Bgold		\
+ 	Borders		\
+ 	Browns_And_Yellows	\
+ 	Caramel		\
+ 	China		\
+ 	Coldfire	\
+ 	Cool_Colors	\
+ 	Cranes		\
+ 	Dark_pastels	\
+ 	Default		\
+ 	Ega		\
+ 	Firecode	\
+ 	Gold		\
+ 	Grayblue	\
+ 	Grays		\
+ 	GrayViolet	\
+ 	Greens		\
+ 	Hilite		\
+ 	Kahki		\
+ 	Lights		\
+ 	Muted		\
+ 	Named_Colors	\
+ 	News3		\
+ 	Op2		\
+ 	Paintjet	\
+ 	Pastels		\
+ 	Plasma		\
+ 	Reds		\
+ 	Reds_And_Purples	\
+ 	Royal		\
+ 	Topographic	\
+ 	Volcano		\
+ 	Warm_Colors	\
+ 	Web		
+ 
+ InstallMultiple($(palette_DATA),$(GIMPDATADIR)/palettes)
+ 
diff -crN gimp-1.0.0.orig/data/patterns/Imakefile gimp-1.0.0/data/patterns/Imakefile
*** gimp-1.0.0.orig/data/patterns/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/data/patterns/Imakefile	Thu Jul  9 23:20:18 1998
***************
*** 0 ****
--- 1,67 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../../gimp.cf"
+ 
+ pattern_DATA	=\
+     3dgreen.pat \
+     Craters.pat \
+     Moonfoot.pat \
+     amethyst.pat \
+     bark.pat \
+     blue.pat \
+     bluegrid.pat \
+     bluesquares.pat \
+     blueweb.pat \
+     brick.pat \
+     burlap.pat \
+     burlwood.pat \
+     choc_swirl.pat \
+     corkboard.pat \
+     cracked.pat    \
+     crinklepaper.pat \
+     electric.pat \
+     fibers.pat	\
+     granite1.pat \
+     ground1.pat \
+     ice.pat \
+     java.pat \
+     leather.pat \
+     leaves.pat \
+     leopard.pat \
+     lightning.pat \
+     marble1.pat \
+     marble2.pat \
+     marble3.pat \
+     nops.pat \
+     paper.pat \
+     parque1.pat \
+     parque2.pat \
+     parque3.pat \
+     pastel.pat \
+     pine.pat \
+     pink_marble.pat \
+     pool.pat \
+     qube1.pat \
+     rain.pat \
+     recessed.pat \
+     redcube.pat \
+     rock.pat \
+     sky.pat \
+     slate.pat \
+     sm_squares.pat \
+     starfield.pat \
+     stone33.pat   \
+     terra.pat \
+     walnut.pat \
+     warning.pat \
+     wood1.pat \
+     wood2.pat \
+     wood3.pat \
+     wood4.pat \
+     wood5.pat 
+ 
+ InstallMultiple($(pattern_DATA),$(GIMPDATADIR)/patterns)
+ 
diff -crN gimp-1.0.0.orig/gimp.cf gimp-1.0.0/gimp.cf
*** gimp-1.0.0.orig/gimp.cf	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/gimp.cf	Sat Sep 12 21:38:02 1998
***************
*** 0 ****
--- 1,13 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #define BuildOMFEXE 1	/* reduce EXE size */
+ 
+ GIMPDIR = $(LIBDIR)/gimp
+ 
+ GIMPPLUGINSDIR = $(GIMPDIR)/plug-ins
+ 
+ GIMPDATADIR = $(GIMPDIR)/data
+ 
diff -crN gimp-1.0.0.orig/gimprc.os2 gimp-1.0.0/gimprc.os2
*** gimp-1.0.0.orig/gimprc.os2	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/gimprc.os2	Wed Sep  9 03:13:58 1998
***************
*** 0 ****
--- 1,212 ----
+ # This is the system-wide gimprc file.  Any change made in this file
+ # will affect all users of this system, provided that they are not
+ # overriding the default values in their personal gimprc file.
+ #
+ # Lines that start with a '#' are comments.
+ # Blank lines are ignored.
+ 
+ # The variable gimp_dir is set to either the interned value
+ # .gimp or the environment variable GIMP_DIRECTORY.  If
+ # the path in GIMP_DIRECTORY is relative, it is considered
+ # relative to your home directory.
+ 
+ # XFree86/OS2:
+ # The variable x11root is set to the environment variable X11ROOT.
+ 
+ (prefix "${x11root}/XFree86")
+ (exec_prefix "${prefix}")
+ (gimp_data_dir "${prefix}/lib/X11/gimp/data")
+ (gimp_plugin_dir "${exec_prefix}/lib/X11/gimp")
+ 
+ # Set the temporary storage directory...files will appear here
+ # during the course of running the gimp.  Most files will disappear
+ # when the gimp exits, but some files are likely to remain,
+ # such as working palette files, so it is best if this directory
+ # not be one that is shared by other users or is cleared on machine
+ # reboot such as /tmp.
+ (temp-path "${gimp_dir}/tmp")
+ 
+ # Set the swap file location. The gimp uses a tile based memory
+ # allocation scheme. The swap file is used to quickly and easily
+ # swap files out to disk and back in. Be aware that the swap file
+ # can easily get very large if the gimp is used with large images.
+ # Also, things can get horribly slow if the swap file is created on 
+ # a directory that is mounted over NFS.  For these reasons, it may 
+ # be desirable to put your swap file in "/tmp".
+ (swap-path "${gimp_dir}")
+ 
+ # Set the brush search path...this path will be searched for valid
+ #  brushes at startup.
+ (brush-path "${gimp_dir}/brushes;${gimp_data_dir}/brushes")
+ 
+ # Specify a default brush. If none is specified it defaults to the
+ #  "1circle.gbr" brush which is just a single pixel sized brush.
+ #  The brush is searched for in the brush path.
+ (default-brush "19fcircle.gbr")
+ 
+ # Set the pattern search path...this path will be searched for valid
+ #  patterns at startup.
+ (pattern-path "${gimp_dir}/patterns;${gimp_data_dir}/patterns")
+ 
+ # Specify a default pattern.
+ #  The pattern is searched for in the specified pattern paths.
+ (default-pattern "wood2.pat")
+ 
+ # Set the palette search path...this path will be searched for valid
+ #  palettes at startup.
+ (palette-path "${gimp_dir}/palettes")
+ 
+ # Specify a default palette.
+ #  The pattern is searched for in the specified pattern paths.
+ (default-palette "Default")
+ 
+ # Set the gradient search path...this path will be searched for valid
+ #  gradients at startup.
+ (gradient-path "${gimp_dir}/gradients;${gimp_data_dir}/gradients")
+ 
+ # Specify a default gradient.
+ #  The gradient is searched for in the specified gradient paths.
+ (default-gradient "German_flag_smooth")
+ 
+ # Set the plug-in search path...this path will be searched for
+ #  plug-ins when the plug-in is run.
+ (plug-in-path "${gimp_dir}/plug-ins;${gimp_dir}/plug-ins/script-fu;${gimp_plugin_dir}/plug-ins")
+ 
+ # Set the path for the script-fu plug-in.  This value is ignored by
+ #  the GIMP if the script-fu plug-in is never run.
+ (script-fu-path "${gimp_dir}/scripts;${gimp_data_dir}/scripts")
+ 
+ 
+ # The tile cache is used to make sure the gimp doesn't thrash
+ # tiles between memory and disk. Setting this value higher will
+ # cause the gimp to use less swap space, but will also cause
+ # the gimp to use more memory. Conversely, a smaller cache size
+ # causes the gimp to use more swap space and less memory.
+ # Note: the gimp will still run even if `tile-cache-size' is
+ # set to 0. The actual size can contain a suffix of 'm', 'M',
+ # 'k', 'K', 'b' or 'B', which makes the gimp interpret the
+ # size as being specified in megabytes, kilobytes and bytes
+ # respectively. If no suffix is specified the size defaults to
+ # being specified in kilobytes.
+ (tile-cache-size 10m)
+ 
+ # Speed of marching ants in the selection outline
+ #  this value is in milliseconds
+ #  (less time indicates faster marching)
+ (marching-ants-speed 300)
+ 
+ # Set the number of operations kept on the undo stack
+ (undo-levels 5)
+ 
+ # Set the color-cube resource for dithering on 8-bit displays
+ #  The 4 values stand for Shades of red, green, blue and grays
+ #  Multiplying the # of shades of each primary color yields
+ #  the total number of colors that will be allocated from the
+ #  gimp colormap.  This number should not exceed 256.  Most of the
+ #  colors remaining after the allocation of the colorcube
+ #  will be left to the system palette in an effort to reduce
+ #  colormap "flashing".
+ (color-cube 6 6 4 24)
+ 
+ # Install a GIMP colormap by default -- only for 8-bit displays
+ # (install-colormap)
+ 
+ # Specify that marching ants for selected regions will be drawn
+ #  with colormap cycling as oposed to redrawing with different stipple masks
+ #  this color cycling option works only with 8-bit displays
+ # (colormap-cycling)
+ 
+ # Tools such as fuzzy-select and bucket fill find regions based on a
+ #  seed-fill algorithm.  The seed fill starts at the intially selected
+ #  pixel and progresses in all directions until the difference of pixel
+ #  intensity from the original is greater than a specified threshold
+ #  ==> This value represents the default threshold
+ (default-threshold 15)
+ 
+ # There is always a tradeoff between memory usage and speed.  In most
+ #  cases, the GIMP opts for speed over memory.  However, if memory is
+ #  a big issue, set stingy-memory-use
+ # (stingy-memory-use)
+ 
+ # When zooming into and out of images, this option enables the
+ #  automatic resizing of windows
+ # (allow-resize-windows)
+ 
+ # Context-dependent cursors are cool.  They are enabled by default.
+ #  However, they require overhead that you may want to do without.
+ #  Uncomment this line to disable them.
+ # (no-cursor-updating)
+ 
+ # Layer preview sizes:
+ #  none:    no previews in layers dialog/layer selector
+ #  small:   32x32
+ #  medium:  64x64
+ #  large:   128x128
+ #  #:       #x#
+ (preview-size small)
+ 
+ # Tooltips
+ #  Comment this out to disable the tooltips in the toolbox
+ # (dont-show-tool-tips)
+ 
+ # Controlling ruler visibility
+ #  The default behavior is for rulers to be ON
+ #  This can also be toggled with the View->Show Rulers command or shift+control+r
+ # (dont-show-rulers)
+ 
+ # Ruler units
+ #  The units of rulers can be one of: (pixels inches centimeters)
+ #  The default is pixels
+ (ruler-units pixels)
+ 
+ # Disable auto saving
+ #  Auto saving is not yet implemented! Nothing will be auto-saved, no matter
+ #  how you set this here.  
+ #  Just uncomment the line below...
+ # (dont-auto-save)
+ 
+ # Disable confirmation before closing an image without saving
+ #  Just uncomment the next line
+ # (dont-confirm-on-close)
+ 
+ # Setting the level of interpolation
+ #  Uncommenting this line will enable cubic interpolation.
+ #  By default, GIMP uses linear interpolation, which is faster, but has poorer quality
+ # (cubic-interpolation)
+ 
+ # Set the gamma correction values for the display
+ #  1.0 corresponds to no gamma correction.  For most displays,
+ #  gamma correction should be set to between 2.0 and 2.6
+ #  Run the utility "gamma_correct" to determine appropriate values
+ #  for your display.
+ #
+ # One important item to keep in mind:  Many images that you might
+ #  get from outside sources will in all likelihood already be
+ #  gamma-corrected.  In these cases, the image will look washed-out
+ #  if the gimp has gamma-correction turned on.  If you are going
+ #  to work with images of this sort, turn gamma correction off
+ #  by removing this line, or setting the values to 1.0.
+ #  gamma-correction 1.0
+ #  gamma-correction 2.0
+ #                 ___
+ (gamma-correction 1.0)
+ 
+ # Set the manner in which transparency is displayed in images
+ #  Transparency type can be one of:
+ #    0: Light Checks
+ #    1: Mid-Tone Checks
+ #    2: Dark Checks
+ #    3: White Only
+ #    4: Gray Only
+ #    5: Black Only
+ #  Check size can be one of:
+ #    0: Small
+ #    1: Medium
+ #    2: Large
+ (transparency-type 1)
+ (transparency-size 2)
+ 
+ # gfig pattern directory
+ (gfig-path "${gimp_dir}/gfig;${gimp_data_dir}/gfig")
+ 
+ # [end of file]
diff -crN gimp-1.0.0.orig/gimprc_user.os2 gimp-1.0.0/gimprc_user.os2
*** gimp-1.0.0.orig/gimprc_user.os2	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/gimprc_user.os2	Sat Jul 11 16:18:12 1998
***************
*** 0 ****
--- 1,17 ----
+ # This is your personal gimprc file.  Any variable defined in this file
+ # takes precedence over the value defined in the system-wide gimprc:
+ # ${x11root}/XFree86/lib/X11/gimp/data/gimprc
+ # Take a look at that file if you want to see some of the options that
+ # can be set here.
+ 
+ # Most values can be set automatically within the GIMP, if you press
+ # the "save" button after changing some options in the Preferences
+ # dialog box.  You can also edit this file by hand, and the GIMP will
+ # always try to do the right thing when saving new options after you
+ # have edited this file.
+ 
+ (show-tips yes)
+ 
+ # Install a GIMP colormap by default -- only for 8-bit displays
+ # (install-colormap)
+ 
diff -crN gimp-1.0.0.orig/Imakefile gimp-1.0.0/Imakefile
*** gimp-1.0.0.orig/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/Imakefile	Sat Jul 11 16:17:04 1998
***************
*** 0 ****
--- 1,29 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "gimp.cf"
+ 
+ #define IHaveSubdirs
+ #define PassCDebugFlags
+ 
+ SUBDIRS = libgimp plug-ins app data
+ 
+ MakeSubdirs($(SUBDIRS))
+ DependSubdirs($(SUBDIRS))
+ 
+ gimpdata_DATA = gtkrc gimp_logo.ppm gimp_splash.ppm \
+ 		gimp_tips.txt ps-menurc gtkrc.forest2
+ 
+ #ifndef OS2Architecture
+ gimpdata_SCRIPTS = user_install
+ #else
+ gimpdata_SCRIPTS = user_install.cmd
+ #endif
+ 
+ InstallNamedProg($(gimpdata_SCRIPTS),$(gimpdata_SCRIPTS),$(GIMPDATADIR))
+ InstallNamedNonExec(gimprc.os2,gimprc,$(GIMPDATADIR))
+ InstallNamedNonExec(gimprc_user.os2,gimprc_user,$(GIMPDATADIR))
+ InstallMultiple($(gimpdata_DATA),$(GIMPDATADIR))
+ 
diff -crN gimp-1.0.0.orig/libgimp/gimp.c gimp-1.0.0/libgimp/gimp.c
*** gimp-1.0.0.orig/libgimp/gimp.c	Thu May 28 17:03:46 1998
--- gimp-1.0.0/libgimp/gimp.c	Fri Jul 10 19:16:32 1998
***************
*** 30,35 ****
--- 30,38 ----
  #include <sys/time.h>
  #include <sys/param.h>
  #include <unistd.h>
+ #ifdef __EMX__
+ #include <fcntl.h>
+ #endif
  
  #ifdef HAVE_SYS_SELECT_H
  #include <sys/select.h>
***************
*** 71,77 ****
--- 74,88 ----
  
  static GHashTable *temp_proc_ht = NULL;
  
+ #ifndef __EMX__
  extern GPlugInInfo PLUG_IN_INFO;
+ #else
+ static GPlugInInfo PLUG_IN_INFO;
+ void set_gimp_PLUG_IN_INFO(const GPlugInInfo *p)
+ {
+   PLUG_IN_INFO = *p;
+ }
+ #endif
  
  
  int
***************
*** 97,102 ****
--- 108,117 ----
  
    _readfd = atoi (argv[2]);
    _writefd = atoi (argv[3]);
+ #ifdef __EMX__
+   setmode(_readfd, O_BINARY);
+   setmode(_writefd, O_BINARY);
+ #endif
  
    gp_init ();
    wire_set_writer (gimp_write);
diff -crN gimp-1.0.0.orig/libgimp/gimp.h gimp-1.0.0/libgimp/gimp.h
*** gimp-1.0.0.orig/libgimp/gimp.h	Thu May 28 17:03:46 1998
--- gimp-1.0.0/libgimp/gimp.h	Fri Jul 10 19:12:20 1998
***************
*** 161,167 ****
--- 161,171 ----
  };
  
  
+ #ifndef __EMX__
  #define MAIN() int main (int argc, char *argv[]) { return gimp_main (argc, argv); }
+ #else
+ #define MAIN() int main (int argc, char *argv[]) { set_gimp_PLUG_IN_INFO(&PLUG_IN_INFO); return gimp_main (argc, argv); }
+ #endif
  
  
  /* The main procedure that should be called with the
diff -crN gimp-1.0.0.orig/libgimp/gimpos2.def gimp-1.0.0/libgimp/gimpos2.def
*** gimp-1.0.0.orig/libgimp/gimpos2.def	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/libgimp/gimpos2.def	Wed Aug  5 00:02:44 1998
***************
*** 0 ****
--- 1,253 ----
+ LIBRARY gimp
+ DESCRIPTION "gimp.dll for XFree86/OS2 version 1.0.0"
+ CODE PRELOAD
+ DATA MULTIPLE NONSHARED
+ STACKSIZE 65536
+ EXPORTS
+ 
+ ; From gimp.obj
+   "set_gimp_PLUG_IN_INFO" @1
+   "gimp_main" @2
+   "gimp_quit" @3
+   "gimp_set_data" @4
+   "gimp_run_procedure" @5
+   "gimp_destroy_params" @6
+   "gimp_get_data" @7
+   "gimp_progress_init" @8
+   "gimp_progress_update" @9
+   "gimp_message" @10
+   "gimp_query_database" @11
+   "gimp_query_procedure" @12
+   "gimp_query_images" @13
+   "gimp_install_procedure" @14
+   "gimp_install_temp_proc" @15
+   "gimp_uninstall_temp_proc" @16
+   "gimp_register_magic_load_handler" @17
+   "gimp_register_load_handler" @18
+   "gimp_register_save_handler" @19
+   "gimp_run_procedure2" @20
+   "gimp_gamma" @21
+   "gimp_install_cmap" @22
+   "gimp_use_xshm" @23
+   "gimp_color_cube" @24
+   "gimp_gtkrc" @25
+   "gimp_extension_process" @26
+   "gimp_extension_ack" @27
+   "_readfd" @28
+   "_writefd" @29
+   "_shm_ID" @30
+   "_shm_addr" @31
+ 
+ ; From gimpchannel.obj
+   "gimp_channel_new" @32
+   "gimp_channel_copy" @33
+   "gimp_channel_delete" @34
+   "gimp_channel_width" @35
+   "gimp_channel_height" @36
+   "gimp_channel_get_image_id" @37
+   "gimp_channel_get_layer_id" @38
+   "gimp_channel_get_color" @39
+   "gimp_channel_get_name" @40
+   "gimp_channel_get_opacity" @41
+   "gimp_channel_get_visible" @42
+   "gimp_channel_set_color" @43
+   "gimp_channel_set_name" @44
+   "gimp_channel_set_opacity" @45
+   "gimp_channel_set_visible" @46
+   "gimp_channel_get_show_masked" @47
+   "gimp_channel_set_show_masked" @48
+ 
+ ; From gimpdisplay.obj
+   "gimp_display_new" @49
+   "gimp_display_delete" @50
+   "gimp_displays_flush" @51
+ 
+ ; From gimpdrawable.obj
+   "gimp_drawable_get" @52
+   "gimp_drawable_width" @53
+   "gimp_drawable_height" @54
+   "gimp_drawable_bpp" @55
+   "gimp_drawable_detach" @56
+   "gimp_drawable_flush" @57
+   "gimp_drawable_delete" @58
+   "gimp_drawable_layer" @59
+   "gimp_drawable_update" @60
+   "gimp_drawable_merge_shadow" @61
+   "gimp_drawable_image_id" @62
+   "gimp_drawable_name" @63
+   "gimp_drawable_type" @64
+   "gimp_drawable_visible" @65
+   "gimp_drawable_channel" @66
+   "gimp_drawable_color" @67
+   "gimp_drawable_gray" @68
+   "gimp_drawable_has_alpha" @69
+   "gimp_drawable_indexed" @70
+   "gimp_drawable_layer_mask" @71
+   "gimp_drawable_mask_bounds" @72
+   "gimp_drawable_offsets" @73
+   "gimp_drawable_fill" @74
+   "gimp_drawable_set_name" @75
+   "gimp_drawable_set_visible" @76
+   "gimp_drawable_get_tile" @77
+   "gimp_drawable_get_tile2" @78
+ 
+ ; From gimpgradient.obj
+   "gimp_gradients_get_list" @79
+   "gimp_gradients_get_active" @80
+   "gimp_gradients_set_active" @81
+   "gimp_gradients_sample_uniform" @82
+   "gimp_gradients_sample_custom" @83
+ 
+ ; From gimpimage.obj
+   "gimp_image_new" @84
+   "gimp_image_delete" @85
+   "gimp_image_width" @86
+   "gimp_image_height" @87
+   "gimp_image_base_type" @88
+   "gimp_image_floating_selection" @89
+   "gimp_image_add_channel" @90
+   "gimp_image_add_layer" @91
+   "gimp_image_add_layer_mask" @92
+   "gimp_image_disable_undo" @93
+   "gimp_image_enable_undo" @94
+   "gimp_image_clean_all" @95
+   "gimp_image_flatten" @96
+   "gimp_image_lower_channel" @97
+   "gimp_image_lower_layer" @98
+   "gimp_image_merge_visible_layers" @99
+   "gimp_image_pick_correlate_layer" @100
+   "gimp_image_raise_channel" @101
+   "gimp_image_raise_layer" @102
+   "gimp_image_remove_channel" @103
+   "gimp_image_remove_layer" @104
+   "gimp_image_remove_layer_mask" @105
+   "gimp_image_resize" @106
+   "gimp_image_get_active_channel" @107
+   "gimp_image_get_active_layer" @108
+   "gimp_image_get_channels" @109
+   "gimp_image_get_cmap" @110
+   "gimp_image_get_component_active" @111
+   "gimp_image_get_component_visible" @112
+   "gimp_image_get_filename" @113
+   "gimp_image_get_layers" @114
+   "gimp_image_get_selection" @115
+   "gimp_image_set_active_channel" @116
+   "gimp_image_set_active_layer" @117
+   "gimp_image_set_cmap" @118
+   "gimp_image_set_component_active" @119
+   "gimp_image_set_component_visible" @120
+   "gimp_image_set_filename" @121
+ 
+ ; From gimplayer.obj
+   "gimp_layer_new" @122
+   "gimp_layer_copy" @123
+   "gimp_layer_delete" @124
+   "gimp_layer_width" @125
+   "gimp_layer_height" @126
+   "gimp_layer_bpp" @127
+   "gimp_layer_type" @128
+   "gimp_layer_add_alpha" @129
+   "gimp_layer_create_mask" @130
+   "gimp_layer_resize" @131
+   "gimp_layer_scale" @132
+   "gimp_layer_translate" @133
+   "gimp_layer_is_floating_selection" @134
+   "gimp_layer_get_image_id" @135
+   "gimp_layer_get_mask_id" @136
+   "gimp_layer_get_apply_mask" @137
+   "gimp_layer_get_edit_mask" @138
+   "gimp_layer_get_mode" @139
+   "gimp_layer_get_name" @140
+   "gimp_layer_get_opacity" @141
+   "gimp_layer_get_preserve_transparency" @142
+   "gimp_layer_get_show_mask" @143
+   "gimp_layer_get_visible" @144
+   "gimp_layer_set_apply_mask" @145
+   "gimp_layer_set_edit_mask" @146
+   "gimp_layer_set_mode" @147
+   "gimp_layer_set_name" @148
+   "gimp_layer_set_offsets" @149
+   "gimp_layer_set_opacity" @150
+   "gimp_layer_set_preserve_transparency" @151
+   "gimp_layer_set_show_mask" @152
+   "gimp_layer_set_visible" @153
+ 
+ ; From gimpmenu.obj
+   "gimp_image_menu_new" @154
+   "gimp_layer_menu_new" @155
+   "gimp_channel_menu_new" @156
+   "gimp_drawable_menu_new" @157
+ 
+ ; From gimppalette.obj
+   "gimp_palette_get_background" @158
+   "gimp_palette_get_foreground" @159
+   "gimp_palette_set_background" @160
+   "gimp_palette_set_foreground" @161
+   "gimp_palette_set_default_colors" @162
+   "gimp_palette_swap_colors" @163
+ 
+ ; From gimppixelrgn.obj
+   "gimp_pixel_rgn_init" @164
+   "gimp_pixel_rgn_resize" @165
+   "gimp_pixel_rgn_get_pixel" @166
+   "gimp_pixel_rgn_get_row" @167
+   "gimp_pixel_rgn_get_col" @168
+   "gimp_pixel_rgn_get_rect" @169
+   "gimp_pixel_rgn_set_pixel" @170
+   "gimp_pixel_rgn_set_row" @171
+   "gimp_pixel_rgn_set_col" @172
+   "gimp_pixel_rgn_set_rect" @173
+   "gimp_pixel_rgns_register" @174
+   "gimp_pixel_rgns_process" @175
+ 
+ ; From gimpprotocol.obj
+   "gp_init" @176
+   "gp_quit_write" @177
+   "gp_config_write" @178
+   "gp_tile_req_write" @179
+   "gp_tile_ack_write" @180
+   "gp_tile_data_write" @181
+   "gp_proc_run_write" @182
+   "gp_proc_return_write" @183
+   "gp_temp_proc_run_write" @184
+   "gp_temp_proc_return_write" @185
+   "gp_proc_install_write" @186
+   "gp_proc_uninstall_write" @187
+   "gp_extension_ack_write" @188
+   "_gp_params_destroy" @189
+ 
+ ; From gimptile.obj
+   "gimp_tile_ref" @190
+   "gimp_tile_ref_zero" @191
+   "gimp_tile_unref" @192
+   "gimp_tile_flush" @193
+   "gimp_tile_cache_size" @194
+   "gimp_tile_cache_ntiles" @195
+   "gimp_tile_width" @196
+   "gimp_tile_height" @197
+   "_gimp_tile_width" @198
+   "_gimp_tile_height" @199
+ 
+ ; From gimpwire.obj
+   "wire_register" @200
+   "wire_set_reader" @201
+   "wire_set_writer" @202
+   "wire_set_flusher" @203
+   "wire_read" @204
+   "wire_write" @205
+   "wire_flush" @206
+   "wire_error" @207
+   "wire_clear_error" @208
+   "wire_read_msg" @209
+   "wire_read_int32" @210
+   "wire_write_msg" @211
+   "wire_write_int32" @212
+   "wire_destroy" @213
+   "wire_read_int8" @214
+   "wire_read_int16" @215
+   "wire_read_double" @216
+   "wire_read_string" @217
+   "wire_write_int8" @218
+   "wire_write_int16" @219
+   "wire_write_double" @220
+   "wire_write_string" @221
diff -crN gimp-1.0.0.orig/libgimp/gimpos2.rsp gimp-1.0.0/libgimp/gimpos2.rsp
*** gimp-1.0.0.orig/libgimp/gimpos2.rsp	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/libgimp/gimpos2.rsp	Thu Jul  9 15:11:16 1998
***************
*** 0 ****
--- 1,6 ----
+ gimp.obj            gimpchannel.obj     gimpdisplay.obj     gimpdrawable.obj+
+ gimpgradient.obj    gimpimage.obj       gimplayer.obj       gimpmenu.obj+
+ gimppalette.obj     gimppixelrgn.obj    gimpprotocol.obj    gimptile.obj+
+ gimpwire.obj /NOL /NOD /BAT
+ gimp.dll
+ 
diff -crN gimp-1.0.0.orig/libgimp/Imakefile gimp-1.0.0/libgimp/Imakefile
*** gimp-1.0.0.orig/libgimp/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/libgimp/Imakefile	Sat Sep 12 23:25:56 1998
***************
*** 0 ****
--- 1,46 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #define DoNormalLib (!HasSharedLibraries || ForceNormalLib)
+ #define DoSharedLib HasSharedLibraries
+ #define LibName gimp
+ #define IncSubdir libgimp
+ 
+ #ifdef OS2Architecture
+ REQUIREDLIBS = $(X11ROOT)\\XFree86\\lib\\ gtk gdk glib Xext X11 shm
+ #endif
+ 
+ DEFINES = -DHAVE_CONFIG_H
+ 
+ INCLUDES = -I.. -I.
+ 
+ HEADERS = gimp.h gimpenums.h gimpmenu.h gimpui.h
+ 
+ OBJS1 =	gimpprotocol.o	\
+ 	gimpwire.o
+ 
+ OBJS2 =	gimp.o          \
+ 	gimpchannel.o   \
+ 	gimpdisplay.o   \
+ 	gimpdrawable.o  \
+ 	gimpgradient.o  \
+ 	gimpimage.o     \
+ 	gimplayer.o     \
+ 	gimppalette.o   \
+ 	gimppixelrgn.o  \
+ 	gimpprotocol.o  \
+ 	gimptile.o      \
+ 	gimpwire.o
+ 
+ OBJS3 = gimpmenu.o
+ 
+ OBJS = $(OBJS1) $(OBJS2) $(OBJS3)
+ 
+ #include <Library.tmpl>
+ 
+ #ifdef OS2Architecture
+ clean::
+ 	rm -rf exports
+ #endif
diff -crN gimp-1.0.0.orig/plug-ins/aa/Imakefile gimp-1.0.0/plug-ins/aa/Imakefile
*** gimp-1.0.0.orig/plug-ins/aa/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/aa/Imakefile	Sat Jul 11 15:52:48 1998
***************
*** 0 ****
--- 1,11 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ ADD_LIBS = -laa
+ 
+ SimpleProgramTarget(aa)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/AlienMap/Imakefile gimp-1.0.0/plug-ins/AlienMap/Imakefile
*** gimp-1.0.0.orig/plug-ins/AlienMap/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/AlienMap/Imakefile	Thu Jul  9 17:06:02 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(AlienMap)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/align_layers/Imakefile gimp-1.0.0/plug-ins/align_layers/Imakefile
*** gimp-1.0.0.orig/plug-ins/align_layers/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/align_layers/Imakefile	Thu Jul  9 17:07:02 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(align_layers)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/animationplay/Imakefile gimp-1.0.0/plug-ins/animationplay/Imakefile
*** gimp-1.0.0.orig/plug-ins/animationplay/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/animationplay/Imakefile	Thu Jul  9 16:58:56 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(animationplay)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/animoptimize/Imakefile gimp-1.0.0/plug-ins/animoptimize/Imakefile
*** gimp-1.0.0.orig/plug-ins/animoptimize/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/animoptimize/Imakefile	Thu Jul  9 17:07:24 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(animoptimize)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/apply_lens/Imakefile gimp-1.0.0/plug-ins/apply_lens/Imakefile
*** gimp-1.0.0.orig/plug-ins/apply_lens/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/apply_lens/Imakefile	Thu Jul  9 17:07:52 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(apply_lens)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/autocrop/Imakefile gimp-1.0.0/plug-ins/autocrop/Imakefile
*** gimp-1.0.0.orig/plug-ins/autocrop/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/autocrop/Imakefile	Thu Jul  9 17:08:48 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(autocrop)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/autostretch_hsv/Imakefile gimp-1.0.0/plug-ins/autostretch_hsv/Imakefile
*** gimp-1.0.0.orig/plug-ins/autostretch_hsv/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/autostretch_hsv/Imakefile	Thu Jul  9 17:09:26 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(autostretch_hsv)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/blinds/Imakefile gimp-1.0.0/plug-ins/blinds/Imakefile
*** gimp-1.0.0.orig/plug-ins/blinds/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/blinds/Imakefile	Thu Jul  9 17:09:58 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(blinds)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/blur/Imakefile gimp-1.0.0/plug-ins/blur/Imakefile
*** gimp-1.0.0.orig/plug-ins/blur/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/blur/Imakefile	Sat Jul 11 15:53:34 1998
***************
*** 0 ****
--- 1,11 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ ADD_LIBS = -L../gpc -lgpc
+ 
+ SimpleProgramTarget(blur)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/bmp/Imakefile gimp-1.0.0/plug-ins/bmp/Imakefile
*** gimp-1.0.0.orig/plug-ins/bmp/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/bmp/Imakefile	Thu Jul  9 18:42:34 1998
***************
*** 0 ****
--- 1,13 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SRCS = bmp.c bmpread.c bmpwrite.c
+ 
+ OBJS = bmp.o bmpread.o bmpwrite.o
+ 
+ ComplexProgramTarget(bmp)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/bumpmap/Imakefile gimp-1.0.0/plug-ins/bumpmap/Imakefile
*** gimp-1.0.0.orig/plug-ins/bumpmap/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/bumpmap/Imakefile	Thu Jul  9 18:44:46 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(bumpmap)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/bz2/bz2.c gimp-1.0.0/plug-ins/bz2/bz2.c
*** gimp-1.0.0.orig/plug-ins/bz2/bz2.c	Sat May 30 15:32:26 1998
--- gimp-1.0.0/plug-ins/bz2/bz2.c	Fri Jul 17 01:48:52 1998
***************
*** 42,47 ****
--- 42,51 ----
  #include <errno.h>
  #include "gtk/gtk.h"
  #include "libgimp/gimp.h"
+ #ifdef __EMX__
+ #include <fcntl.h>
+ #include <process.h>
+ #endif
  
  
  static void   query      (void);
***************
*** 242,247 ****
--- 246,252 ----
  /*     return -1; */
  /*   } */
  
+ #ifndef __EMX__
    /* fork off a bzip2 process */
    if ((pid = fork()) < 0)
      {
***************
*** 266,271 ****
--- 271,316 ----
        _exit(127);
      }
    else
+ #else /* __EMX__ */
+   if (!(f = fopen(filename,"w"))){
+     g_message("bz2: fopen failed: %s\n", g_strerror(errno));
+     return -1;
+   }
+   {
+     int tfd, flag;
+     /* save fileno(stdout) */
+     tfd = dup(fileno(stdout));
+     if (tfd < 0)
+       {
+ 	g_message("bz2: dup failed: %s\n", g_strerror(errno));
+ 	return -1;
+       }
+     /* make stdout for this process be the output file */
+     if (dup2(fileno(f),fileno(stdout)) == -1)
+       {
+ 	g_message ("bz2: dup2 failed: %s\n", g_strerror(errno));
+ 	close(tfd);
+ 	return -1;
+       }
+     flag = fcntl(tfd, F_GETFD);
+     fcntl(tfd, F_SETFD, flag | FD_CLOEXEC);
+     pid = spawnlp (P_NOWAIT, "bzip2", "bzip2", "-cf", tmpname, NULL);
+     fclose(f);
+     /* restore fileno(stdout) */
+     if (dup2(tfd,fileno(stdout)) == -1)
+       {
+ 	g_message ("bz2: dup2 failed: %s\n", g_strerror(errno));
+ 	close(tfd);
+ 	return -1;
+       }
+     close(tfd);
+     if (pid == -1)
+       {
+ 	g_message ("bz2: spawn failed: %s\n", g_strerror(errno));
+ 	return -1;
+       }
+   }
+ #endif
      {
        waitpid (pid, &status, 0);
  
***************
*** 302,307 ****
--- 347,353 ----
  
    tmpname = params[1].data.d_string;
  
+ #ifndef __EMX__
    /* fork off a g(un)zip and wait for it */
    if ((pid = fork()) < 0)
      {
***************
*** 326,331 ****
--- 372,418 ----
        _exit(127);
      }
    else  /* parent process */
+ #else /* __EMX__ */
+   {
+     FILE *f;
+     int tfd, flag;
+     if (!(f = fopen(tmpname,"w"))){
+       g_message("bz2: fopen failed: %s\n", g_strerror(errno));
+       return -1;
+     }
+     /* save fileno(stdout) */
+     tfd = dup(fileno(stdout));
+     if (tfd < 0)
+       {
+ 	g_message("bz2: dup failed: %s\n", g_strerror(errno));
+ 	return -1;
+       }
+     /* make stdout for this process be the output file */
+     if (dup2(fileno(f),fileno(stdout)) == -1)
+       {
+ 	g_message ("bz2: dup2 failed: %s\n", g_strerror(errno));
+ 	close(tfd);
+ 	return -1;
+       }
+     flag = fcntl(tfd, F_GETFD);
+     fcntl(tfd, F_SETFD, flag | FD_CLOEXEC);
+     pid = spawnlp (P_NOWAIT, "bzip2", "bzip2", "-cfd", filename, NULL);
+     fclose(f);
+     /* restore fileno(stdout) */
+     if (dup2(tfd,fileno(stdout)) == -1)
+       {
+ 	g_message ("bz2: dup2 failed: %s\n", g_strerror(errno));
+ 	close(tfd);
+ 	return -1;
+       }
+     close(tfd);
+     if (pid == -1)
+       {
+ 	g_message ("bz2: spawn failed: %s\n", g_strerror(errno));
+ 	return -1;
+       }
+   }
+ #endif
      {
        waitpid (pid, &status, 0);
  
diff -crN gimp-1.0.0.orig/plug-ins/bz2/Imakefile gimp-1.0.0/plug-ins/bz2/Imakefile
*** gimp-1.0.0.orig/plug-ins/bz2/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/bz2/Imakefile	Thu Jul  9 18:46:30 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(bz2)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/c_astretch/Imakefile gimp-1.0.0/plug-ins/c_astretch/Imakefile
*** gimp-1.0.0.orig/plug-ins/c_astretch/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/c_astretch/Imakefile	Thu Jul  9 18:48:02 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(c_astretch)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/CEL/CEL.c gimp-1.0.0/plug-ins/CEL/CEL.c
*** gimp-1.0.0.orig/plug-ins/CEL/CEL.c	Wed Jun  3 07:34:58 1998
--- gimp-1.0.0/plug-ins/CEL/CEL.c	Sat Jul 11 10:41:14 1998
***************
*** 55,63 ****
--- 55,67 ----
  
  /* Let GIMP library handle initialisation (and inquisitive users) */
  
+ #if 0
  int main(int argc, char *argv[]) {
    return gimp_main(argc, argv);
  }
+ #else
+ MAIN()
+ #endif
  
  /* GIMP queries plug-in for parameters etc. */
  
diff -crN gimp-1.0.0.orig/plug-ins/CEL/Imakefile gimp-1.0.0/plug-ins/CEL/Imakefile
*** gimp-1.0.0.orig/plug-ins/CEL/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/CEL/Imakefile	Thu Jul  9 18:48:42 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(CEL)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/checkerboard/Imakefile gimp-1.0.0/plug-ins/checkerboard/Imakefile
*** gimp-1.0.0.orig/plug-ins/checkerboard/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/checkerboard/Imakefile	Thu Jul  9 18:49:48 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(checkerboard)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/CML_explorer/Imakefile gimp-1.0.0/plug-ins/CML_explorer/Imakefile
*** gimp-1.0.0.orig/plug-ins/CML_explorer/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/CML_explorer/Imakefile	Thu Jul  9 18:40:24 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(CML_explorer)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/colorify/Imakefile gimp-1.0.0/plug-ins/colorify/Imakefile
*** gimp-1.0.0.orig/plug-ins/colorify/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/colorify/Imakefile	Thu Jul  9 18:50:56 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(colorify)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/compose/Imakefile gimp-1.0.0/plug-ins/compose/Imakefile
*** gimp-1.0.0.orig/plug-ins/compose/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/compose/Imakefile	Thu Jul  9 18:53:04 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(compose)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/convmatrix/Imakefile gimp-1.0.0/plug-ins/convmatrix/Imakefile
*** gimp-1.0.0.orig/plug-ins/convmatrix/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/convmatrix/Imakefile	Thu Jul  9 18:54:06 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(convmatrix)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/cubism/Imakefile gimp-1.0.0/plug-ins/cubism/Imakefile
*** gimp-1.0.0.orig/plug-ins/cubism/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/cubism/Imakefile	Thu Jul  9 18:55:12 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(cubism)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/dbbrowser/Imakefile gimp-1.0.0/plug-ins/dbbrowser/Imakefile
*** gimp-1.0.0.orig/plug-ins/dbbrowser/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/dbbrowser/Imakefile	Thu Jul  9 18:07:36 1998
***************
*** 0 ****
--- 1,13 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SRCS = dbbrowser.c dbbrowser_utils.c
+ 
+ OBJS = dbbrowser.o dbbrowser_utils.o
+ 
+ ComplexProgramTarget(dbbrowser)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/decompose/Imakefile gimp-1.0.0/plug-ins/decompose/Imakefile
*** gimp-1.0.0.orig/plug-ins/decompose/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/decompose/Imakefile	Thu Jul  9 18:55:58 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(decompose)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/deinterlace/Imakefile gimp-1.0.0/plug-ins/deinterlace/Imakefile
*** gimp-1.0.0.orig/plug-ins/deinterlace/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/deinterlace/Imakefile	Sat Jul 11 15:54:26 1998
***************
*** 0 ****
--- 1,11 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ ADD_LIBS = -L../megawidget -lmegawidget
+ 
+ SimpleProgramTarget(deinterlace)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/depthmerge/Imakefile gimp-1.0.0/plug-ins/depthmerge/Imakefile
*** gimp-1.0.0.orig/plug-ins/depthmerge/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/depthmerge/Imakefile	Thu Jul  9 18:58:10 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(depthmerge)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/despeckle/despeckle.c gimp-1.0.0/plug-ins/despeckle/despeckle.c
*** gimp-1.0.0.orig/plug-ins/despeckle/despeckle.c	Tue Apr 28 11:50:16 1998
--- gimp-1.0.0/plug-ins/despeckle/despeckle.c	Sat Jul 11 10:42:46 1998
***************
*** 237,248 ****
--- 237,252 ----
   * 'main()' - Main entry - just call gimp_main()...
   */
  
+ #if 0
  int
  main(int  argc,		/* I - Number of command-line args */
       char *argv[])	/* I - Command-line args */
  {
    return (gimp_main(argc, argv));
  }
+ #else
+ MAIN()
+ #endif
  
  
  /*
diff -crN gimp-1.0.0.orig/plug-ins/despeckle/Imakefile gimp-1.0.0/plug-ins/despeckle/Imakefile
*** gimp-1.0.0.orig/plug-ins/despeckle/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/despeckle/Imakefile	Thu Jul  9 19:02:54 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(despeckle)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/destripe/destripe.c gimp-1.0.0/plug-ins/destripe/destripe.c
*** gimp-1.0.0.orig/plug-ins/destripe/destripe.c	Mon Apr 13 13:41:42 1998
--- gimp-1.0.0/plug-ins/destripe/destripe.c	Sat Jul 11 10:44:04 1998
***************
*** 120,131 ****
--- 120,135 ----
   * 'main()' - Main entry - just call gimp_main()...
   */
  
+ #if 0
  int
  main(int  argc,		/* I - Number of command-line args */
       char *argv[])	/* I - Command-line args */
  {
    return (gimp_main(argc, argv));
  }
+ #else
+ MAIN()
+ #endif
  
  
  /*
diff -crN gimp-1.0.0.orig/plug-ins/destripe/Imakefile gimp-1.0.0/plug-ins/destripe/Imakefile
*** gimp-1.0.0.orig/plug-ins/destripe/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/destripe/Imakefile	Thu Jul  9 19:03:42 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(destripe)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/diffraction/Imakefile gimp-1.0.0/plug-ins/diffraction/Imakefile
*** gimp-1.0.0.orig/plug-ins/diffraction/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/diffraction/Imakefile	Thu Jul  9 19:04:24 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(diffraction)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/displace/Imakefile gimp-1.0.0/plug-ins/displace/Imakefile
*** gimp-1.0.0.orig/plug-ins/displace/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/displace/Imakefile	Thu Jul  9 19:05:06 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(displace)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/edge/Imakefile gimp-1.0.0/plug-ins/edge/Imakefile
*** gimp-1.0.0.orig/plug-ins/edge/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/edge/Imakefile	Thu Jul  9 19:05:54 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(edge)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/emboss/Imakefile gimp-1.0.0/plug-ins/emboss/Imakefile
*** gimp-1.0.0.orig/plug-ins/emboss/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/emboss/Imakefile	Sat Jul 11 15:55:14 1998
***************
*** 0 ****
--- 1,11 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ ADD_LIBS = -L../megawidget -lmegawidget
+ 
+ SimpleProgramTarget(emboss)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/engrave/Imakefile gimp-1.0.0/plug-ins/engrave/Imakefile
*** gimp-1.0.0.orig/plug-ins/engrave/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/engrave/Imakefile	Thu Jul  9 19:07:58 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(engrave)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/exchange/Imakefile gimp-1.0.0/plug-ins/exchange/Imakefile
*** gimp-1.0.0.orig/plug-ins/exchange/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/exchange/Imakefile	Thu Jul  9 19:08:44 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(exchange)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/faxg3/Imakefile gimp-1.0.0/plug-ins/faxg3/Imakefile
*** gimp-1.0.0.orig/plug-ins/faxg3/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/faxg3/Imakefile	Thu Jul  9 19:12:14 1998
***************
*** 0 ****
--- 1,12 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SRCS = faxg3.c g3.c run_tbl.c
+ OBJS = faxg3.o g3.o run_tbl.o
+ 
+ ComplexProgramTarget(faxg3)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/film/Imakefile gimp-1.0.0/plug-ins/film/Imakefile
*** gimp-1.0.0.orig/plug-ins/film/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/film/Imakefile	Thu Jul  9 19:10:38 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(film)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/fits/Imakefile gimp-1.0.0/plug-ins/fits/Imakefile
*** gimp-1.0.0.orig/plug-ins/fits/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/fits/Imakefile	Thu Jul  9 19:11:50 1998
***************
*** 0 ****
--- 1,12 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SRCS = fits.c fitsrw.c
+ OBJS = fits.o fitsrw.o
+ 
+ ComplexProgramTarget(fits)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/flame/Imakefile gimp-1.0.0/plug-ins/flame/Imakefile
*** gimp-1.0.0.orig/plug-ins/flame/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/flame/Imakefile	Sat Jul 11 15:56:12 1998
***************
*** 0 ****
--- 1,14 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ ADD_LIBS = -L../megawidget -lmegawidget
+ 
+ SRCS = cmap.c flame.c libifs.c rect.c
+ OBJS = cmap.o flame.o libifs.o rect.o
+ 
+ ComplexProgramTarget(flame)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/flarefx/Imakefile gimp-1.0.0/plug-ins/flarefx/Imakefile
*** gimp-1.0.0.orig/plug-ins/flarefx/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/flarefx/Imakefile	Thu Jul  9 19:16:00 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(flarefx)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/fractaltrace/Imakefile gimp-1.0.0/plug-ins/fractaltrace/Imakefile
*** gimp-1.0.0.orig/plug-ins/fractaltrace/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/fractaltrace/Imakefile	Thu Jul  9 19:16:48 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(fractaltrace)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/gauss_iir/Imakefile gimp-1.0.0/plug-ins/gauss_iir/Imakefile
*** gimp-1.0.0.orig/plug-ins/gauss_iir/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/gauss_iir/Imakefile	Thu Jul  9 19:43:46 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(gauss_iir)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/gauss_rle/Imakefile gimp-1.0.0/plug-ins/gauss_rle/Imakefile
*** gimp-1.0.0.orig/plug-ins/gauss_rle/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/gauss_rle/Imakefile	Thu Jul  9 19:44:32 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(gauss_rle)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/gbr/Imakefile gimp-1.0.0/plug-ins/gbr/Imakefile
*** gimp-1.0.0.orig/plug-ins/gbr/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/gbr/Imakefile	Thu Jul  9 19:45:12 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(gbr)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/gee/Imakefile gimp-1.0.0/plug-ins/gee/Imakefile
*** gimp-1.0.0.orig/plug-ins/gee/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/gee/Imakefile	Thu Jul  9 19:45:52 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(gee)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/gfig/gfig-examples/Imakefile gimp-1.0.0/plug-ins/gfig/gfig-examples/Imakefile
*** gimp-1.0.0.orig/plug-ins/gfig/gfig-examples/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/gfig/gfig-examples/Imakefile	Thu Jul  9 20:18:24 1998
***************
*** 0 ****
--- 1,21 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../../../gimp.cf"
+ 
+ gfigdata_DATA = \
+         A_star                  \
+         curves                  \
+         polys                   \
+         ring                    \
+         ring+star               \
+         simily                  \
+         spirals_and_stars       \
+         sprial                  \
+         star2                   \
+         stars
+ 
+ InstallMultiple($(gfigdata_DATA),$(GIMPDATADIR)/gfig)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/gfig/gfig.c gimp-1.0.0/plug-ins/gfig/gfig.c
*** gimp-1.0.0.orig/plug-ins/gfig/gfig.c	Fri Apr 24 10:18:40 1998
--- gimp-1.0.0/plug-ins/gfig/gfig.c	Sat Jul 11 14:29:14 1998
***************
*** 839,851 ****
--- 839,859 ----
  
    /* Search through all directories in the  path */
  
+ #ifndef __EMX__
    token = strtok (path_string, ":");
+ #else
+   token = strtok (path_string, ";");
+ #endif
  
    while (token)
      {
        if (*token == '\0')
  	{
+ #ifndef __EMX__
  	  token = strtok (NULL, ":");
+ #else
+ 	  token = strtok (NULL, ";");
+ #endif
  	  continue;
  	}
  
***************
*** 880,886 ****
--- 888,898 ----
  	  create_warn_dialog(buf);
  	  g_free (path);
  	}
+ #ifndef __EMX__
        token = strtok (NULL, ":");
+ #else
+       token = strtok (NULL, ";");
+ #endif
      }
    g_free (path_string);
  }
diff -crN gimp-1.0.0.orig/plug-ins/gfig/Imakefile gimp-1.0.0/plug-ins/gfig/Imakefile
*** gimp-1.0.0.orig/plug-ins/gfig/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/gfig/Imakefile	Thu Jul  9 20:16:28 1998
***************
*** 0 ****
--- 1,15 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(gfig)
+ 
+ #define IHaveSubdirs
+ #define PassCDebugFlags
+ 
+ SUBDIRS = gfig-examples
+ 
+ MakeSubdirs($(SUBDIRS))
diff -crN gimp-1.0.0.orig/plug-ins/gfli/Imakefile gimp-1.0.0/plug-ins/gfli/Imakefile
*** gimp-1.0.0.orig/plug-ins/gfli/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/gfli/Imakefile	Thu Jul  9 20:21:00 1998
***************
*** 0 ****
--- 1,12 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SRCS = fli.c gfli.c
+ OBJS = fli.o gfli.o
+ 
+ ComplexProgramTarget(gfli)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/gicon/Imakefile gimp-1.0.0/plug-ins/gicon/Imakefile
*** gimp-1.0.0.orig/plug-ins/gicon/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/gicon/Imakefile	Thu Jul  9 20:21:52 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(gicon)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/gif/Imakefile gimp-1.0.0/plug-ins/gif/Imakefile
*** gimp-1.0.0.orig/plug-ins/gif/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/gif/Imakefile	Thu Jul  9 20:23:02 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(gif)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/glasstile/Imakefile gimp-1.0.0/plug-ins/glasstile/Imakefile
*** gimp-1.0.0.orig/plug-ins/glasstile/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/glasstile/Imakefile	Thu Jul  9 20:23:56 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(glasstile)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/gpc/gpcos2.def gimp-1.0.0/plug-ins/gpc/gpcos2.def
*** gimp-1.0.0.orig/plug-ins/gpc/gpcos2.def	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/gpc/gpcos2.def	Sun Jul 26 01:16:40 1998
***************
*** 0 ****
--- 1,16 ----
+ LIBRARY gpc
+ DESCRIPTION "GIMP/2 gpc.dll for XFree86/OS2 version 1.0.0"
+ CODE PRELOAD
+ DATA MULTIPLE NONSHARED
+ STACKSIZE 32768
+ EXPORTS
+ 	gpc_close_callback @ 1
+ 	gpc_cancel_callback @ 2
+ 	gpc_scale_update @ 3
+ 	gpc_text_update @ 4
+ 	gpc_setup_tooltips @ 5
+ 	gpc_set_tooltip @ 6
+ 	gpc_add_action_button @ 7
+ 	gpc_add_radio_button @ 8
+ 	gpc_add_label @ 9
+ 	gpc_add_hscale @ 10
diff -crN gimp-1.0.0.orig/plug-ins/gpc/gpcos2.rsp gimp-1.0.0/plug-ins/gpc/gpcos2.rsp
*** gimp-1.0.0.orig/plug-ins/gpc/gpcos2.rsp	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/gpc/gpcos2.rsp	Thu Jul  9 17:26:30 1998
***************
*** 0 ****
--- 1,3 ----
+ gpc.obj /NOL /NOD /BAT
+ gpc.dll
+ 
diff -crN gimp-1.0.0.orig/plug-ins/gpc/Imakefile gimp-1.0.0/plug-ins/gpc/Imakefile
*** gimp-1.0.0.orig/plug-ins/gpc/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/gpc/Imakefile	Thu Aug 13 14:55:48 1998
***************
*** 0 ****
--- 1,30 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #define DoNormalLib (!HasSharedLibraries || ForceNormalLib)
+ #define DoSharedLib HasSharedLibraries
+ #define LibName gpc
+ #define IncSubdir plug-ins/gpc
+ 
+ #ifdef OS2Architecture
+ REQUIREDLIBS = $(X11ROOT)\\XFree86\\lib\\ gtk gdk glib Xext X11 shm
+ #endif
+ 
+ DEFINES = -DHAVE_CONFIG_H
+ 
+ INCLUDES = -I../.. -I.
+ 
+ HEADERS = gpc.h
+ 
+ OBJS =	gpc.o
+ 
+ #include <Library.tmpl>
+ 
+ InstallManPage(gpc,$(LIBMANDIR))
+ 
+ #ifdef OS2Architecture
+ clean::
+ 	rm -rf exports
+ #endif
diff -crN gimp-1.0.0.orig/plug-ins/gqbist/Imakefile gimp-1.0.0/plug-ins/gqbist/Imakefile
*** gimp-1.0.0.orig/plug-ins/gqbist/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/gqbist/Imakefile	Thu Jul  9 20:24:50 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(gqbist)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/gradmap/Imakefile gimp-1.0.0/plug-ins/gradmap/Imakefile
*** gimp-1.0.0.orig/plug-ins/gradmap/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/gradmap/Imakefile	Thu Jul  9 20:27:16 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(gradmap)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/grid/Imakefile gimp-1.0.0/plug-ins/grid/Imakefile
*** gimp-1.0.0.orig/plug-ins/grid/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/grid/Imakefile	Thu Jul  9 20:27:46 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(grid)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/gtm/Imakefile gimp-1.0.0/plug-ins/gtm/Imakefile
*** gimp-1.0.0.orig/plug-ins/gtm/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/gtm/Imakefile	Thu Jul  9 20:28:16 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(gtm)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/gz/gz.c gimp-1.0.0/plug-ins/gz/gz.c
*** gimp-1.0.0.orig/plug-ins/gz/gz.c	Sat May 30 15:32:28 1998
--- gimp-1.0.0/plug-ins/gz/gz.c	Sat Jul 11 15:31:34 1998
***************
*** 67,72 ****
--- 67,76 ----
  #include <errno.h>
  #include "gtk/gtk.h"
  #include "libgimp/gimp.h"
+ #ifdef __EMX__
+ #include <fcntl.h>
+ #include <process.h>
+ #endif
  
  /* Author 1: Josh MacDonald (url.c) */
  /* Author 2: Daniel Risacher (gz.c) */
***************
*** 278,283 ****
--- 282,288 ----
  /*     return -1; */
  /*   } */
  
+ #ifndef __EMX__
    /* fork off a gzip process */
    if ((pid = fork()) < 0)
      {
***************
*** 302,307 ****
--- 307,352 ----
        _exit(127);
      }
    else
+ #else /* __EMX__ */
+   if (!(f = fopen(filename,"w"))){
+     g_message("gz: fopen failed: %s\n", g_strerror(errno));
+     return -1;
+   }
+   {
+     int tfd, flag;
+     /* save fileno(stdout) */
+     tfd = dup(fileno(stdout));
+     if (tfd < 0)
+       {
+         g_message("gz: dup failed: %s\n", g_strerror(errno));
+         return -1;
+       }
+     /* make stdout for this process be the output file */
+     if (dup2(fileno(f),fileno(stdout)) == -1)
+       {
+         g_message ("gz: dup2 failed: %s\n", g_strerror(errno));
+ 	close(tfd);
+         return -1;
+       }
+     flag = fcntl(tfd, F_GETFD);
+     fcntl(tfd, F_SETFD, flag | FD_CLOEXEC);
+     pid = spawnlp (P_NOWAIT, "gzip", "gzip", "-cf", tmpname, NULL);
+     fclose(f);
+     /* restore fileno(stdout) */
+     if (dup2(tfd,fileno(stdout)) == -1)
+       {
+         g_message ("gz: dup2 failed: %s\n", g_strerror(errno));
+ 	close(tfd);
+         return -1;
+       }
+     close(tfd);
+     if (pid == -1)
+       {
+         g_message ("gz: spawn failed: %s\n", g_strerror(errno));
+         return -1;
+       }
+   }
+ #endif
      {
        waitpid (pid, &status, 0);
  
***************
*** 341,346 ****
--- 386,392 ----
  
    tmpname = params[1].data.d_string;
  
+ #ifndef __EMX__
    /* fork off a g(un)zip and wait for it */
    if ((pid = fork()) < 0)
      {
***************
*** 365,370 ****
--- 411,457 ----
        _exit(127);
      }
    else  /* parent process */
+ #else /* __EMX__ */
+   {
+     FILE *f;
+     int tfd, flag;
+     if (!(f = fopen(tmpname,"w"))){
+       g_message("gz: fopen failed: %s\n", g_strerror(errno));
+       return -1;
+     }
+     /* save fileno(stdout) */
+     tfd = dup(fileno(stdout));
+     if (tfd < 0)
+       {
+         g_message("gz: dup failed: %s\n", g_strerror(errno));
+         return -1;
+       }
+     /* make stdout for this process be the output file */
+     if (dup2(fileno(f),fileno(stdout)) == -1)
+       {
+         g_message ("gz: dup2 failed: %s\n", g_strerror(errno));
+ 	close(tfd);
+         return -1;
+       }
+     flag = fcntl(tfd, F_GETFD);
+     fcntl(tfd, F_SETFD, flag | FD_CLOEXEC);
+     pid = spawnlp (P_NOWAIT, "gzip", "gzip", "-cfd", filename, NULL);
+     fclose(f);
+     /* restore fileno(stdout) */
+     if (dup2(tfd,fileno(stdout)) == -1)
+       {
+         g_message ("gz: dup2 failed: %s\n", g_strerror(errno));
+ 	close(tfd);
+         return -1;
+       }
+     close(tfd);
+     if (pid == -1)
+       {
+         g_message ("gz: spawn failed: %s\n", g_strerror(errno));
+         return -1;
+       }
+   }
+ #endif
      {
        waitpid (pid, &status, 0);
  
diff -crN gimp-1.0.0.orig/plug-ins/gz/Imakefile gimp-1.0.0/plug-ins/gz/Imakefile
*** gimp-1.0.0.orig/plug-ins/gz/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/gz/Imakefile	Thu Jul  9 20:28:46 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(gz)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/header/Imakefile gimp-1.0.0/plug-ins/header/Imakefile
*** gimp-1.0.0.orig/plug-ins/header/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/header/Imakefile	Thu Jul  9 20:30:04 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(header)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/hot/Imakefile gimp-1.0.0/plug-ins/hot/Imakefile
*** gimp-1.0.0.orig/plug-ins/hot/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/hot/Imakefile	Sat Jul 11 15:57:36 1998
***************
*** 0 ****
--- 1,11 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ ADD_LIBS = -L../megawidget -lmegawidget
+ 
+ SimpleProgramTarget(hot)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/hrz/hrz.c gimp-1.0.0/plug-ins/hrz/hrz.c
*** gimp-1.0.0.orig/plug-ins/hrz/hrz.c	Mon Apr 13 13:42:20 1998
--- gimp-1.0.0/plug-ins/hrz/hrz.c	Mon Jul 13 18:29:46 1998
***************
*** 43,49 ****
--- 43,51 ----
  #include <string.h>
  #include <math.h>
  #include <unistd.h>
+ #ifndef __EMX__
  #include <sys/mman.h>
+ #endif
  #include "gtk/gtk.h"
  #include "libgimp/gimp.h"
  
***************
*** 292,303 ****
--- 294,319 ----
        fprintf(stderr, "hrz filter: file is not HRZ type\n");
        return -1;
      }
+ #ifndef __EMX__
    mapped = mmap(NULL, 256*240*3, PROT_READ, MAP_PRIVATE, filedes, 0);
    if(mapped == (void *)(-1))
      {
        fprintf(stderr, "hrz filter: could not map file\n");
        return -1;
      }
+ #else
+   mapped = g_malloc(256*240*3);
+   if(mapped == NULL)
+     {
+       fprintf(stderr, "hrz filter: could not allocate memory\n");
+       return -1;
+     }
+   if (read(filedes, mapped, 256*240*3) != 256*240*3)
+     {
+       fprintf(stderr, "hrz filter: file read error\n");
+       return -1;
+     }
+ #endif
    close (filedes);  /* not needed anymore, data is memory mapped */
  
    /* Create new image of proper size; associate filename */
***************
*** 315,322 ****
--- 331,342 ----
  
    do_hrz_load(mapped, &pixel_rgn);
  
+ #ifndef __EMX__
    /* close the file */
    munmap(mapped, 256*240*3);
+ #else
+   g_free(mapped);
+ #endif
  
    /* Tell the GIMP to display the image.
     */
diff -crN gimp-1.0.0.orig/plug-ins/hrz/Imakefile gimp-1.0.0/plug-ins/hrz/Imakefile
*** gimp-1.0.0.orig/plug-ins/hrz/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/hrz/Imakefile	Mon Jul 13 18:23:34 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(hrz)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/ifscompose/Imakefile gimp-1.0.0/plug-ins/ifscompose/Imakefile
*** gimp-1.0.0.orig/plug-ins/ifscompose/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/ifscompose/Imakefile	Thu Jul  9 20:44:10 1998
***************
*** 0 ****
--- 1,12 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SRCS = ifscompose.c ifscompose_utils.c
+ OBJS = ifscompose.o ifscompose_utils.o
+ 
+ ComplexProgramTarget(ifscompose)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/illusion/Imakefile gimp-1.0.0/plug-ins/illusion/Imakefile
*** gimp-1.0.0.orig/plug-ins/illusion/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/illusion/Imakefile	Thu Jul  9 20:45:04 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(illusion)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/Imakefile gimp-1.0.0/plug-ins/Imakefile
*** gimp-1.0.0.orig/plug-ins/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/Imakefile	Mon Jul 13 18:35:52 1998
***************
*** 0 ****
--- 1,140 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #define IHaveSubdirs
+ #define PassCDebugFlags
+ 
+ SUBDIRS = 			\
+ 	libgck			\
+ 	megawidget		\
+ 	gpc			\
+ 	MapObject		\
+ 	AlienMap		\
+ 	dbbrowser		\
+ 	script-fu		\
+ 	struc			\
+ 	webbrowser		\
+ 	aa			\
+ 	tiff			\
+ 	jpeg			\
+ 	png			\
+ 	mpeg			\
+ 	xd			\
+ 	xpm			\
+ 	CML_explorer		\
+ 	align_layers		\
+ 	animoptimize		\
+ 	apply_lens		\
+ 	autocrop		\
+ 	animationplay		\
+ 	autostretch_hsv		\
+ 	blinds			\
+ 	blur			\
+ 	bmp			\
+ 	bumpmap			\
+ 	bz2			\
+ 	c_astretch		\
+ 	CEL			\
+ 	checkerboard		\
+ 	colorify		\
+ 	compose			\
+ 	convmatrix		\
+ 	cubism			\
+ 	decompose		\
+ 	deinterlace		\
+ 	depthmerge		\
+ 	despeckle		\
+ 	destripe		\
+ 	diffraction		\
+ 	displace		\
+ 	edge			\
+ 	emboss			\
+ 	engrave			\
+ 	exchange		\
+ 	faxg3			\
+ 	film			\
+ 	fits			\
+ 	flame			\
+ 	flarefx			\
+ 	fractaltrace		\
+ 	gauss_iir		\
+ 	gauss_rle		\
+ 	gbr			\
+ 	gee			\
+ 	gfig			\
+ 	gfli			\
+ 	gicon			\
+ 	gif			\
+ 	glasstile		\
+ 	gqbist			\
+ 	gradmap			\
+ 	grid			\
+ 	gtm			\
+ 	gz			\
+ 	header			\
+ 	hot			\
+ 	hrz			\
+ 	ifscompose		\
+ 	illusion		\
+ 	iwarp			\
+ 	laplace			\
+ 	mail			\
+ 	max_rgb			\
+ 	maze			\
+ 	mblur			\
+ 	mosaic			\
+ 	nlfilt			\
+ 	noisify			\
+ 	normalize		\
+ 	nova			\
+ 	oilify			\
+ 	pagecurl		\
+ 	palette			\
+ 	papertile		\
+ 	pat			\
+ 	pcx			\
+ 	pix			\
+ 	pixelize		\
+ 	plasma			\
+ 	pnm			\
+ 	polar			\
+ 	print			\
+ 	ps			\
+ 	psd			\
+ 	randomize		\
+ 	ripple			\
+ 	rotate			\
+ 	rotators		\
+ 	scatter_hsv		\
+ 	screenshot		\
+ 	semiflatten		\
+ 	sgi			\
+ 	sharpen			\
+ 	shift			\
+ 	sinus			\
+ 	smooth_palette		\
+ 	snoise			\
+ 	snp			\
+ 	sobel			\
+ 	sparkle			\
+ 	spread			\
+ 	sunras			\
+ 	tga			\
+ 	threshold_alpha		\
+ 	tile			\
+ 	tileit			\
+ 	tiler			\
+ 	url			\
+ 	video			\
+ 	vinvert			\
+ 	vpropagate		\
+ 	waves			\
+ 	whirlpinch		\
+ 	xwd			\
+ 	zealouscrop
+ 
+ MakeSubdirs($(SUBDIRS))
+ DependSubdirs($(SUBDIRS))
+ 
diff -crN gimp-1.0.0.orig/plug-ins/iwarp/Imakefile gimp-1.0.0/plug-ins/iwarp/Imakefile
*** gimp-1.0.0.orig/plug-ins/iwarp/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/iwarp/Imakefile	Thu Jul  9 20:45:44 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(iwarp)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/jpeg/Imakefile gimp-1.0.0/plug-ins/jpeg/Imakefile
*** gimp-1.0.0.orig/plug-ins/jpeg/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/jpeg/Imakefile	Sat Jul 11 15:58:22 1998
***************
*** 0 ****
--- 1,11 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ ADD_LIBS = -ljpeg
+ 
+ SimpleProgramTarget(jpeg)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/laplace/Imakefile gimp-1.0.0/plug-ins/laplace/Imakefile
*** gimp-1.0.0.orig/plug-ins/laplace/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/laplace/Imakefile	Thu Jul  9 20:46:52 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(laplace)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/libgck/gck/gckos2.def gimp-1.0.0/plug-ins/libgck/gck/gckos2.def
*** gimp-1.0.0.orig/plug-ins/libgck/gck/gckos2.def	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/libgck/gck/gckos2.def	Sun Jul 26 01:17:58 1998
***************
*** 0 ****
--- 1,169 ----
+ LIBRARY gck
+ DESCRIPTION "GIMP/2 gck.dll for XFree86/OS2 version 1.0.0"
+ CODE PRELOAD
+ DATA MULTIPLE NONSHARED
+ STACKSIZE 32768
+ EXPORTS
+ 
+ ; From gckcolor.obj
+   "gck_rgb_white" @1
+   "gck_rgb_black" @2
+   "gck_rgb_zero" @3
+   "gck_rgb_full" @4
+   "gck_allocate_color_cube" @5
+   "gck_create_8bit_rgb" @6
+   "gck_visualinfo_new" @7
+   "gck_visualinfo_destroy" @8
+   "gck_visualinfo_get_dither" @9
+   "gck_visualinfo_set_dither" @10
+   "gck_gc_set_foreground" @11
+   "gck_rgb_to_gdkcolor" @12
+   "gck_gc_set_background" @13
+   "gck_rgb_to_color8" @14
+   "gck_rgb_to_image8_fs_dither" @15
+   "gck_rgb_to_image8" @16
+   "gck_rgb_to_color16" @17
+   "gck_rgb_to_image16_fs_dither" @18
+   "gck_rgb_to_image16" @19
+   "gck_rgb_to_color24" @20
+   "gck_rgb_to_image24" @21
+   "gck_rgb_to_color32" @22
+   "gck_rgb_to_image32" @23
+   "gck_rgb_to_gdkimage" @24
+   "gck_bilinear" @25
+   "gck_bilinear_8" @26
+   "gck_bilinear_16" @27
+   "gck_bilinear_32" @28
+   "gck_bilinear_rgb" @29
+   "gck_bilinear_rgba" @30
+   "gck_rgb_add" @31
+   "gck_rgb_sub" @32
+   "gck_rgb_mul" @33
+   "gck_rgb_dist" @34
+   "gck_rgb_max" @35
+   "gck_rgb_min" @36
+   "gck_rgb_clamp" @37
+   "gck_rgb_set" @38
+   "gck_rgb_gamma" @39
+   "gck_rgba_add" @40
+   "gck_rgba_sub" @41
+   "gck_rgba_mul" @42
+   "gck_rgba_dist" @43
+   "gck_rgba_max" @44
+   "gck_rgba_min" @45
+   "gck_rgba_clamp" @46
+   "gck_rgba_set" @47
+   "gck_rgba_gamma" @48
+   "gck_rgb_to_hsv" @49
+   "gck_hsv_to_rgb" @50
+   "gck_rgb_to_hsl" @51
+   "_gck_value" @52
+   "gck_hsl_to_rgb" @53
+   "gck_rgb_to_hwb" @54
+   "gck_hwb_to_rgb" @55
+   "gck_render_sub_pixel" @56
+   "gck_adaptive_supersample_area" @57
+   "gck_named_colors" @58
+ 
+ ; From gcklistbox.obj
+   "gck_listbox_disable_signals" @59
+   "gck_listbox_enable_signals" @60
+   "gck_listbox_get" @61
+   "gck_listbox_prepend_item" @62
+   "gck_listbox_insert_item" @63
+   "gck_listbox_prepend_items" @64
+   "gck_listbox_append_item" @65
+   "gck_listbox_append_items" @66
+   "gck_listbox_insert_items" @67
+   "gck_listbox_get_current_selection" @68
+   "gck_listbox_set_current_selection" @69
+   "gck_listbox_item_find_by_position" @70
+   "gck_listbox_item_find_by_label" @71
+   "gck_listbox_item_find_by_user_data" @72
+   "gck_listbox_delete_item_by_position" @73
+   "gck_listbox_unselect_all" @74
+   "gck_listbox_delete_item_by_label" @75
+   "gck_listbox_delete_items_by_label" @76
+   "gck_listbox_delete_item_by_user_data" @77
+   "gck_listbox_delete_items_by_user_data" @78
+   "gck_listbox_clear_items" @79
+   "gck_listbox_select_item_by_position" @80
+   "gck_listbox_select_item_by_label" @81
+   "gck_listbox_select_item_by_user_data" @82
+   "gck_listbox_unselect_item_by_position" @83
+   "gck_listbox_unselect_item_by_label" @84
+   "gck_listbox_unselect_item_by_user_data" @85
+   "gck_listbox_select_all" @86
+   "_gck_listbox_signalhandler" @87
+   "_gck_listbox_eventhandler" @88
+   "gck_listbox_new" @89
+   "gck_listbox_destroy" @90
+ 
+ ; From gckmath.obj
+   "gck_deg_to_rad" @91
+   "gck_rad_to_deg" @92
+   "gck_mat_to_deg" @93
+   "gck_clip_line" @94
+ 
+ ; From gckui.obj
+   "gck_cursor_set" @95
+   "gck_auto_show" @96
+   "gck_application_window_new" @97
+   "gck_application_window_destroy" @98
+   "gck_dialog_window_new" @99
+   "gck_vbox_new" @100
+   "gck_hbox_new" @101
+   "gck_frame_new" @102
+   "gck_pushbutton_new" @103
+   "gck_dialog_window_destroy" @104
+   "gck_vseparator_new" @105
+   "gck_hseparator_new" @106
+   "gck_label_new" @107
+   "gck_label_aligned_new" @108
+   "gck_drawing_area_new" @109
+   "gck_pixmap_new" @110
+   "gck_hscale_new" @111
+   "gck_vscale_new" @112
+   "gck_entryfield_text_new" @113
+   "gck_entryfield_new" @114
+   "gck_pushbutton_pixmap_new" @115
+   "gck_togglebutton_pixmap_new" @116
+   "gck_checkbutton_new" @117
+   "gck_radiobutton_new" @118
+   "gck_radiobutton_pixmap_new" @119
+   "gck_option_menu_new" @120
+   "gck_menu_bar_new" @121
+   "gck_menu_new" @122
+   "gck_image_menu_new" @123
+   "_GckAutoShowFlag" @124
+ 
+ ; From gckvector.obj
+   "gck_vector2_zero" @125
+   "gck_vector2_unit_x" @126
+   "gck_vector2_unit_y" @127
+   "gck_vector3_zero" @128
+   "gck_vector3_unit_x" @129
+   "gck_vector3_unit_y" @130
+   "gck_vector3_unit_z" @131
+   "gck_vector2_inner_product" @132
+   "gck_vector2_cross_product" @133
+   "gck_vector2_length" @134
+   "gck_vector2_normalize" @135
+   "gck_vector2_mul" @136
+   "gck_vector2_sub" @137
+   "gck_vector2_set" @138
+   "gck_vector2_add" @139
+   "gck_vector2_neg" @140
+   "gck_vector2_rotate" @141
+   "gck_vector3_inner_product" @142
+   "gck_vector3_cross_product" @143
+   "gck_vector3_length" @144
+   "gck_vector3_normalize" @145
+   "gck_vector3_mul" @146
+   "gck_vector3_sub" @147
+   "gck_vector3_set" @148
+   "gck_vector3_add" @149
+   "gck_vector3_neg" @150
+   "gck_vector3_rotate" @151
+   "gck_2d_to_3d" @152
+   "gck_3d_to_2d" @153
diff -crN gimp-1.0.0.orig/plug-ins/libgck/gck/gckos2.rsp gimp-1.0.0/plug-ins/libgck/gck/gckos2.rsp
*** gimp-1.0.0.orig/plug-ins/libgck/gck/gckos2.rsp	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/libgck/gck/gckos2.rsp	Thu Jul  9 17:48:06 1998
***************
*** 0 ****
--- 1,4 ----
+ gckcolor.obj gcklistbox.obj gckmath.obj gckui.obj gckvector.obj+
+ /NOL /NOD /BAT
+ gck.dll
+ 
diff -crN gimp-1.0.0.orig/plug-ins/libgck/gck/Imakefile gimp-1.0.0/plug-ins/libgck/gck/Imakefile
*** gimp-1.0.0.orig/plug-ins/libgck/gck/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/libgck/gck/Imakefile	Thu Aug 13 14:56:12 1998
***************
*** 0 ****
--- 1,40 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #define DoNormalLib (!HasSharedLibraries || ForceNormalLib)
+ #define DoSharedLib HasSharedLibraries
+ #define LibName gck
+ #define IncSubdir gck
+ 
+ #ifdef OS2Architecture
+ REQUIREDLIBS = $(X11ROOT)\\XFree86\\lib\\ gtk gdk glib Xext X11 shm
+ #endif
+ 
+ DEFINES = -DHAVE_CONFIG_H
+ 
+ INCLUDES = -I../../.. -I.. -I.
+ 
+ HEADERS =    gck.h           \
+              gckcolor.h      \
+              gckcommon.h     \
+              gckimage.h      \
+              gcklistbox.h    \
+              gckmath.h       \
+              gcktypes.h      \
+              gckui.h         \
+              gckvector.h
+ 
+ OBJS =	gckcolor.o      \
+         gcklistbox.o    \
+         gckmath.o       \
+         gckui.o         \
+         gckvector.o
+ 
+ #include <Library.tmpl>
+ 
+ #ifdef OS2Architecture
+ clean::
+ 	rm -rf exports
+ #endif
diff -crN gimp-1.0.0.orig/plug-ins/libgck/Imakefile gimp-1.0.0/plug-ins/libgck/Imakefile
*** gimp-1.0.0.orig/plug-ins/libgck/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/libgck/Imakefile	Thu Jul  9 17:39:04 1998
***************
*** 0 ****
--- 1,13 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #define IHaveSubdirs
+ #define PassCDebugFlags
+ 
+ SUBDIRS = gck
+ 
+ MakeSubdirs($(SUBDIRS))
+ DependSubdirs($(SUBDIRS))
+ 
diff -crN gimp-1.0.0.orig/plug-ins/mail/Imakefile gimp-1.0.0/plug-ins/mail/Imakefile
*** gimp-1.0.0.orig/plug-ins/mail/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/mail/Imakefile	Sat Jul 11 15:49:48 1998
***************
*** 0 ****
--- 1,11 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ ADD_DEFS = -DMAILER=\""sendmail"\"
+ 
+ SimpleProgramTarget(mail)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/mail/mail.c gimp-1.0.0/plug-ins/mail/mail.c
*** gimp-1.0.0.orig/plug-ins/mail/mail.c	Sun May 31 14:49:12 1998
--- gimp-1.0.0/plug-ins/mail/mail.c	Sat Sep 12 22:35:40 1998
***************
*** 109,114 ****
--- 109,118 ----
  #include <errno.h>
  #include "gtk/gtk.h"
  #include "libgimp/gimp.h"
+ #ifdef __EMX__
+ #include <fcntl.h>
+ #include <process.h>
+ #endif
  
  
  static void query (void);
***************
*** 307,313 ****
--- 311,321 ----
    strcat (mailcmdline, mail_info.receipt);
  
    /* create a pipe to sendmail */
+ #ifndef __EMX__
    mailpipe = popen (mailcmdline, "w");
+ #else
+   mailpipe = popen (mailcmdline, "wb");
+ #endif
    create_headers (mailpipe);
    
    /* This is necessary to make the comments and headers work correctly. Not real sure why */
***************
*** 332,337 ****
--- 340,346 ----
      }
  
    if( mail_info.encapsulation == ENCAPSULATION_UUENCODE ) {
+ #ifndef __EMX__
        /* fork off a uuencode process */
        if ((pid = fork ()) < 0)
  	  {
***************
*** 355,360 ****
--- 364,401 ----
  	      _exit (127);
  	  }
        else
+ #else /* __EMX__ */
+       int tfd, flag;
+       /* save fileno(stdout) */
+       tfd = dup (fileno (stdout));
+       if (tfd == -1)
+ 	{
+ 	  g_message ("mail: dup failed: %s\n", g_strerror (errno));
+ 	  return -1;
+ 	}
+       if (dup2 (fileno (mailpipe), fileno (stdout)) == -1)
+ 	{
+ 	  g_message ("mail: dup2 failed: %s\n", g_strerror (errno));
+ 	  close(tfd);
+ 	  return -1;
+ 	}
+       flag = fcntl(tfd, F_GETFD);
+       fcntl(tfd, F_SETFD, flag | FD_CLOEXEC);
+       pid = spawnlp (P_NOWAIT, UUENCODE, UUENCODE, tmpname, filename, NULL);
+       /* restore fileno(stdout) */
+       if (dup2 (tfd, fileno (stdout)) == -1)
+ 	{
+ 	  g_message ("mail: dup2 failed: %s\n", g_strerror (errno));
+ 	  close(tfd);
+ 	  return -1;
+ 	}
+       close(tfd);
+       if (pid == -1)
+ 	{
+ 	  g_message ("mail: spawn failed: %s\n", g_strerror (errno));
+ 	  return -1;
+ 	}
+ #endif
  	  {
  	      waitpid (pid, &status, 0);
  	      
diff -crN gimp-1.0.0.orig/plug-ins/MapObject/Imakefile gimp-1.0.0/plug-ins/MapObject/Imakefile
*** gimp-1.0.0.orig/plug-ins/MapObject/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/MapObject/Imakefile	Tue Jul 28 14:12:08 1998
***************
*** 0 ****
--- 1,30 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ ADD_INCS = -I../libgck
+ ADD_LIBS = -L../libgck/gck -lgck
+ 
+ SRCS = \
+ 	arcball.c \
+ 	mapobject_apply.c \
+ 	mapobject_image.c \
+ 	mapobject_main.c \
+ 	mapobject_preview.c \
+ 	mapobject_shade.c \
+ 	mapobject_ui.c
+ 
+ OBJS = \
+ 	arcball.o \
+ 	mapobject_apply.o \
+ 	mapobject_image.o \
+ 	mapobject_main.o \
+ 	mapobject_preview.o \
+ 	mapobject_shade.o \
+ 	mapobject_ui.o
+ 
+ ComplexProgramTarget(MapObject)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/MapObject/mapobject_main.c gimp-1.0.0/plug-ins/MapObject/mapobject_main.c
*** gimp-1.0.0.orig/plug-ins/MapObject/mapobject_main.c	Mon Apr 13 13:41:14 1998
--- gimp-1.0.0/plug-ins/MapObject/mapobject_main.c	Thu Jul  9 23:10:04 1998
***************
*** 78,85 ****
    mapvals.material.highlight = 27.0;
  }
  
- MAIN()
- 
  static void query(void)
  {
  
--- 78,83 ----
***************
*** 281,284 ****
--- 279,284 ----
    gtk_main();
    gdk_flush();
  }
+ 
+ MAIN()
  
diff -crN gimp-1.0.0.orig/plug-ins/max_rgb/Imakefile gimp-1.0.0/plug-ins/max_rgb/Imakefile
*** gimp-1.0.0.orig/plug-ins/max_rgb/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/max_rgb/Imakefile	Thu Jul  9 20:50:22 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(max_rgb)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/maze/Imakefile gimp-1.0.0/plug-ins/maze/Imakefile
*** gimp-1.0.0.orig/plug-ins/maze/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/maze/Imakefile	Thu Jul  9 20:52:18 1998
***************
*** 0 ****
--- 1,12 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SRCS = maze.c maze_face.c algorithms.c handy.c
+ OBJS = maze.o maze_face.o algorithms.o handy.o
+ 
+ ComplexProgramTarget(maze)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/mblur/Imakefile gimp-1.0.0/plug-ins/mblur/Imakefile
*** gimp-1.0.0.orig/plug-ins/mblur/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/mblur/Imakefile	Thu Jul  9 20:53:08 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(mblur)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/megawidget/Imakefile gimp-1.0.0/plug-ins/megawidget/Imakefile
*** gimp-1.0.0.orig/plug-ins/megawidget/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/megawidget/Imakefile	Thu Aug 13 14:55:16 1998
***************
*** 0 ****
--- 1,33 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #define DoNormalLib (!HasSharedLibraries || ForceNormalLib)
+ #define DoSharedLib HasSharedLibraries
+ #define LibName megawidget
+ #define IncSubdir plug-ins/megawidget
+ 
+ #ifdef OS2Architecture
+ REQUIREDLIBS = ..\\..\\libgimp\\ gimp $(X11ROOT)\\XFree86\\lib\\ gtk gdk glib Xext X11 shm
+ #endif
+ 
+ DEFINES = -DHAVE_CONFIG_H
+ 
+ INCLUDES = -I../.. -I.
+ 
+ HEADERS = megawidget.h
+ 
+ OBJS =	megawidget.o
+ 
+ #include <Library.tmpl>
+ 
+ #ifdef OS2Architecture
+ /* os2 does not allow dll filename length > 8.3 */
+ install::
+ 	mv $(X11ROOT)/XFree86/lib/megawidget.dll $(X11ROOT)/XFree86/lib/megawidg.dll
+ 
+ clean::
+ 	rm -rf exports
+ #endif
+ 
diff -crN gimp-1.0.0.orig/plug-ins/megawidget/megawidgetos2.def gimp-1.0.0/plug-ins/megawidget/megawidgetos2.def
*** gimp-1.0.0.orig/plug-ins/megawidget/megawidgetos2.def	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/megawidget/megawidgetos2.def	Sun Jul 26 01:02:38 1998
***************
*** 0 ****
--- 1,21 ----
+ LIBRARY megawidg
+ DESCRIPTION "GIMP/2 megawidg.dll for XFree86/OS2 version 1.0.0"
+ CODE PRELOAD
+ DATA MULTIPLE NONSHARED
+ STACKSIZE 32768
+ EXPORTS
+ ; From megawidget.obj
+   "mw_app_new" @1
+   "mw_fscale_entry_new" @2
+   "mw_iscale_entry_new" @3
+   "mw_radio_group_new" @4
+   "mw_radio_new" @5
+   "mw_radio_result" @6
+   "mw_value_radio_group_new" @7
+   "mw_toggle_button_new" @8
+   "mw_color_select_button_create" @9
+   "mw_ientry_new" @10
+   "mw_fentry_new" @11
+   "mw_preview_build_virgin" @12
+   "mw_preview_build" @13
+   "mw_preview_new" @14
diff -crN gimp-1.0.0.orig/plug-ins/megawidget/megawidgetos2.rsp gimp-1.0.0/plug-ins/megawidget/megawidgetos2.rsp
*** gimp-1.0.0.orig/plug-ins/megawidget/megawidgetos2.rsp	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/megawidget/megawidgetos2.rsp	Thu Jul  9 17:57:06 1998
***************
*** 0 ****
--- 1,3 ----
+ megawidget.obj /NOL /NOD /BAT
+ megawidget.dll
+ 
diff -crN gimp-1.0.0.orig/plug-ins/mosaic/Imakefile gimp-1.0.0/plug-ins/mosaic/Imakefile
*** gimp-1.0.0.orig/plug-ins/mosaic/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/mosaic/Imakefile	Thu Jul  9 20:54:36 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(mosaic)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/mpeg/Imakefile gimp-1.0.0/plug-ins/mpeg/Imakefile
*** gimp-1.0.0.orig/plug-ins/mpeg/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/mpeg/Imakefile	Sat Jul 11 16:00:32 1998
***************
*** 0 ****
--- 1,11 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ ADD_LIBS = -lmpeg
+ 
+ SimpleProgramTarget(mpeg)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/nlfilt/Imakefile gimp-1.0.0/plug-ins/nlfilt/Imakefile
*** gimp-1.0.0.orig/plug-ins/nlfilt/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/nlfilt/Imakefile	Sat Jul 11 16:01:16 1998
***************
*** 0 ****
--- 1,11 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ ADD_LIBS = -L../megawidget -lmegawidget
+ 
+ SimpleProgramTarget(nlfilt)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/noisify/Imakefile gimp-1.0.0/plug-ins/noisify/Imakefile
*** gimp-1.0.0.orig/plug-ins/noisify/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/noisify/Imakefile	Thu Jul  9 20:57:06 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(noisify)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/normalize/Imakefile gimp-1.0.0/plug-ins/normalize/Imakefile
*** gimp-1.0.0.orig/plug-ins/normalize/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/normalize/Imakefile	Thu Jul  9 20:57:38 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(normalize)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/nova/Imakefile gimp-1.0.0/plug-ins/nova/Imakefile
*** gimp-1.0.0.orig/plug-ins/nova/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/nova/Imakefile	Thu Jul  9 20:59:32 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(nova)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/oilify/Imakefile gimp-1.0.0/plug-ins/oilify/Imakefile
*** gimp-1.0.0.orig/plug-ins/oilify/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/oilify/Imakefile	Thu Jul  9 21:00:10 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(oilify)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/pagecurl/Imakefile gimp-1.0.0/plug-ins/pagecurl/Imakefile
*** gimp-1.0.0.orig/plug-ins/pagecurl/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/pagecurl/Imakefile	Thu Jul  9 21:00:46 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(pagecurl)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/palette/Imakefile gimp-1.0.0/plug-ins/palette/Imakefile
*** gimp-1.0.0.orig/plug-ins/palette/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/palette/Imakefile	Thu Jul  9 21:01:20 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(palette)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/papertile/Imakefile gimp-1.0.0/plug-ins/papertile/Imakefile
*** gimp-1.0.0.orig/plug-ins/papertile/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/papertile/Imakefile	Thu Jul  9 21:01:56 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(papertile)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/pat/Imakefile gimp-1.0.0/plug-ins/pat/Imakefile
*** gimp-1.0.0.orig/plug-ins/pat/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/pat/Imakefile	Thu Jul  9 21:02:30 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(pat)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/pcx/Imakefile gimp-1.0.0/plug-ins/pcx/Imakefile
*** gimp-1.0.0.orig/plug-ins/pcx/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/pcx/Imakefile	Thu Jul  9 21:03:04 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(pcx)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/pix/Imakefile gimp-1.0.0/plug-ins/pix/Imakefile
*** gimp-1.0.0.orig/plug-ins/pix/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/pix/Imakefile	Thu Jul  9 21:03:46 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(pix)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/pixelize/Imakefile gimp-1.0.0/plug-ins/pixelize/Imakefile
*** gimp-1.0.0.orig/plug-ins/pixelize/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/pixelize/Imakefile	Thu Jul  9 21:04:16 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(pixelize)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/plasma/Imakefile gimp-1.0.0/plug-ins/plasma/Imakefile
*** gimp-1.0.0.orig/plug-ins/plasma/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/plasma/Imakefile	Thu Jul  9 21:04:50 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(plasma)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/plug-ins.def gimp-1.0.0/plug-ins/plug-ins.def
*** gimp-1.0.0.orig/plug-ins/plug-ins.def	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/plug-ins.def	Wed Aug  5 00:05:48 1998
***************
*** 0 ****
--- 1,2 ----
+ NAME WINDOWCOMPAT
+ STACKSIZE 524288
diff -crN gimp-1.0.0.orig/plug-ins/plug-ins.tmpl gimp-1.0.0/plug-ins/plug-ins.tmpl
*** gimp-1.0.0.orig/plug-ins/plug-ins.tmpl	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/plug-ins.tmpl	Thu Jul 30 00:30:22 1998
***************
*** 0 ****
--- 1,24 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../gimp.cf"
+ 
+ INCLUDES = -I../.. -I. $(ADD_INCS)
+ 
+ #if BuildOMFEXE
+ DEFINES = -DHAVE_CONFIG_H -Zomf $(ADD_DEFS)
+ LOCAL_LDFLAGS = -Zomf ../plug-ins.def
+ #else
+ DEFINES = -DHAVE_CONFIG_H $(ADD_DEFS)
+ #endif
+ 
+ #ifdef OS2Architecture
+ LOCAL_LIBRARIES = $(ADD_LIBS) -L../../libgimp -lgimp -lgtk -lgdk -lglib -lXext -lX11 -lshm -lm
+ #else
+ LOCAL_LIBRARIES = $(ADD_LIBS) -L../../libgimp -lgimp -lgtk -lgdk -lglib -lXext -lX11 -lm
+ #endif
+ 
+ BINDIR = $(GIMPPLUGINSDIR)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/png/Imakefile gimp-1.0.0/plug-ins/png/Imakefile
*** gimp-1.0.0.orig/plug-ins/png/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/png/Imakefile	Sat Jul 11 16:02:06 1998
***************
*** 0 ****
--- 1,11 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ ADD_LIBS = -lpng
+ 
+ SimpleProgramTarget(png)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/png/png.c gimp-1.0.0/plug-ins/png/png.c
*** gimp-1.0.0.orig/plug-ins/png/png.c	Sun May 31 14:49:16 1998
--- gimp-1.0.0/plug-ins/png/png.c	Sat Jul 11 10:45:02 1998
***************
*** 205,216 ****
--- 205,220 ----
   * 'main()' - Main entry - just call gimp_main()...
   */
  
+ #if 0
  int
  main(int  argc,		/* I - Number of command-line args */
       char *argv[])	/* I - Command-line args */
  {
    return (gimp_main(argc, argv));
  }
+ #else
+ MAIN()
+ #endif
  
  
  /*
diff -crN gimp-1.0.0.orig/plug-ins/pnm/Imakefile gimp-1.0.0/plug-ins/pnm/Imakefile
*** gimp-1.0.0.orig/plug-ins/pnm/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/pnm/Imakefile	Thu Jul  9 21:05:22 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(pnm)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/polar/Imakefile gimp-1.0.0/plug-ins/polar/Imakefile
*** gimp-1.0.0.orig/plug-ins/polar/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/polar/Imakefile	Thu Jul  9 21:06:30 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(polar)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/print/Imakefile gimp-1.0.0/plug-ins/print/Imakefile
*** gimp-1.0.0.orig/plug-ins/print/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/print/Imakefile	Sat Jul 11 15:50:50 1998
***************
*** 0 ****
--- 1,14 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ ADD_DEFS = -Dstrcasecmp=stricmp -Dstrncasecmp=strnicmp
+ 
+ SRCS = print-escp2.c print-pcl.c print-ps.c print-util.c print.c
+ OBJS = print-escp2.o print-pcl.o print-ps.o print-util.o print.o
+ 
+ ComplexProgramTarget(print)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/print/print-ps.c gimp-1.0.0/plug-ins/print/print-ps.c
*** gimp-1.0.0.orig/plug-ins/print/print-ps.c	Sun May 17 15:16:46 1998
--- gimp-1.0.0/plug-ins/print/print-ps.c	Sun Sep 13 23:34:20 1998
***************
*** 512,517 ****
--- 512,520 ----
    printf("left = %d, top = %d\n", left, top);
  #endif /* DEBUG */
  
+ #ifdef __EMX__
+   _fsetmode(prn, "t");
+ #endif
    fputs("%!PS-Adobe-3.0\n", prn);
    fputs("%%Creator: " PLUG_IN_NAME " plug-in V" PLUG_IN_VERSION " for GIMP.\n", prn);
    fprintf(prn, "%%%%CreationDate: %s", ctime(&curtime));
diff -crN gimp-1.0.0.orig/plug-ins/print/print.c gimp-1.0.0/plug-ins/print/print.c
*** gimp-1.0.0.orig/plug-ins/print/print.c	Sun May 17 15:16:50 1998
--- gimp-1.0.0/plug-ins/print/print.c	Sun Sep 13 23:33:58 1998
***************
*** 134,139 ****
--- 134,144 ----
  #include "print.h"
  #include <math.h>
  #include <signal.h>
+ #ifdef __EMX__
+ #define INCL_DOSDEVICES
+ #define INCL_DOSERRORS
+ #include <os2.h>
+ #endif
  
  
  /*
***************
*** 369,380 ****
--- 374,389 ----
   * 'main()' - Main entry - just call gimp_main()...
   */
  
+ #if 0
  int
  main(int  argc,		/* I - Number of command-line args */
       char *argv[])	/* I - Command-line args */
  {
    return (gimp_main(argc, argv));
  }
+ #else
+ MAIN()
+ #endif
  
  
  /*
***************
*** 423,428 ****
--- 432,451 ----
  }
  
  
+ #ifdef __EMX__
+ static char *
+ get_tmp_filename()
+ {
+   char *tmp_path, filename[80];
+ 
+   tmp_path = getenv("TMP");
+   if (tmp_path == NULL)
+     tmp_path = "";
+ 
+   sprintf(filename, "gimp_print_tmp.%d", getpid());
+   return g_strconcat(tmp_path, "\\", filename, NULL);
+ }
+ #endif
  /*
   * 'run()' - Run the plug-in...
   */
***************
*** 447,452 ****
--- 470,478 ----
    guchar	*cmap;		/* Colormap (indexed images only) */
    int		ncolors;	/* Number of colors in colormap */
    GParam	*values;	/* Return values */
+ #ifdef __EMX__
+   char		*tmpfile;	/* temp filename */
+ #endif
  
  
   /*
***************
*** 585,591 ****
--- 611,622 ----
      */
  
      if (plist_current > 0)
+ #ifndef __EMX__
        prn = popen(vars.output_to, "w");
+ #else
+       /* OS/2 PRINT command doesn't support print from stdin, use temp file */
+       prn = (tmpfile = get_tmp_filename()) ? fopen(tmpfile, "w") : NULL;
+ #endif
      else
        prn = fopen(vars.output_to, "w");
  
***************
*** 637,643 ****
--- 668,687 ----
                          vars.left, vars.top, 1, prn, drawable, lut, cmap);
  
        if (plist_current > 0)
+ #ifndef __EMX__
          pclose(prn);
+ #else
+ 	{ /* PRINT temp file */
+ 	  char *s;
+           fclose(prn);
+ 	  s = g_strconcat(vars.output_to, tmpfile, NULL);
+ 	  if (system(s) != 0)
+ 	    values[0].data.d_status = STATUS_EXECUTION_ERROR;
+ 	  g_free(s);
+ 	  remove(tmpfile);
+ 	  g_free(tmpfile);
+ 	}
+ #endif
        else
          fclose(prn);
      }
***************
*** 1956,1962 ****
--- 2000,2010 ----
    else
      sprintf(line, "%s/.gimp/printrc", getenv("HOME"));
  
+ #ifndef __EMX__
    if ((fp = fopen(line, "r")) != NULL)
+ #else
+   if ((fp = fopen(line, "rt")) != NULL)
+ #endif
    {
     /*
      * File exists - read the contents and update the printer list...
***************
*** 2076,2082 ****
--- 2124,2134 ----
    else
      sprintf(filename, "%s/.gimp/printrc", getenv("HOME"));
  
+ #ifndef __EMX__
    if ((fp = fopen(filename, "w")) != NULL)
+ #else
+   if ((fp = fopen(filename, "wt")) != NULL)
+ #endif
    {
     /*
      * Write the contents of the printer list...
***************
*** 2119,2124 ****
--- 2171,2179 ----
  	line[129],
  	name[17],
  	defname[17];
+ #ifdef __EMX__
+   BYTE  pnum;
+ #endif
  
  
    defname[0] = '\0';
***************
*** 2170,2175 ****
--- 2225,2244 ----
      pclose(pfile);
    };
  #endif /* LPSTAT_COMMAND */
+ 
+ #ifdef __EMX__
+   if (DosDevConfig(&pnum, DEVINFO_PRINTER) == NO_ERROR)
+     {
+       for (i = 1; i <= pnum; i++)
+ 	{
+ 	  sprintf(plist[plist_count].name, "LPT%d:", i);
+ 	  sprintf(plist[plist_count].command, "PRINT /D:LPT%d /B ", i);
+           strcpy(plist[plist_count].driver, "ps2");
+           plist[plist_count].output_type = OUTPUT_COLOR;
+           plist_count ++;
+ 	}
+     }
+ #endif
  
    if (plist_count > 2)
      qsort(plist + 1, plist_count - 1, sizeof(plist_t),
diff -crN gimp-1.0.0.orig/plug-ins/ps/Imakefile gimp-1.0.0/plug-ins/ps/Imakefile
*** gimp-1.0.0.orig/plug-ins/ps/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/ps/Imakefile	Thu Jul  9 21:24:46 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(ps)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/ps/ps.c gimp-1.0.0/plug-ins/ps/ps.c
*** gimp-1.0.0.orig/plug-ins/ps/ps.c	Sat May 30 15:32:32 1998
--- gimp-1.0.0/plug-ins/ps/ps.c	Sun Sep 13 08:06:18 1998
***************
*** 971,977 ****
--- 971,981 ----
   /* ghostscript with a real outputfile. When ghostscript has finished,  */
   /* open the outputfile and return its filepointer. But be sure         */
   /* to close and remove the file within ps_close().                     */
+ #ifndef __EMX__
   fd_popen = popen (cmd, "r");
+ #else
+  fd_popen = popen (cmd, "rt");
+ #endif
   g_free (cmd);
  
   return (fd_popen);
***************
*** 1008,1013 ****
--- 1012,1020 ----
   for (;;)
   {
     if (thrd == EOF) return (-1);
+ #ifdef __EMX__
+    if (thrd == '\r') thrd = getc (ifp);
+ #endif
     if ((thrd == '\n') && (frst == 'P') && (scnd >= '1') && (scnd <= '6'))
       break;
     frst = scnd;
diff -crN gimp-1.0.0.orig/plug-ins/psd/Imakefile gimp-1.0.0/plug-ins/psd/Imakefile
*** gimp-1.0.0.orig/plug-ins/psd/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/psd/Imakefile	Thu Jul  9 21:25:30 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(psd)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/randomize/Imakefile gimp-1.0.0/plug-ins/randomize/Imakefile
*** gimp-1.0.0.orig/plug-ins/randomize/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/randomize/Imakefile	Sat Jul 11 16:03:02 1998
***************
*** 0 ****
--- 1,11 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ ADD_LIBS = -L../gpc -lgpc
+ 
+ SimpleProgramTarget(randomize)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/ripple/Imakefile gimp-1.0.0/plug-ins/ripple/Imakefile
*** gimp-1.0.0.orig/plug-ins/ripple/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/ripple/Imakefile	Thu Jul  9 21:39:44 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(ripple)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/rotate/Imakefile gimp-1.0.0/plug-ins/rotate/Imakefile
*** gimp-1.0.0.orig/plug-ins/rotate/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/rotate/Imakefile	Thu Jul  9 21:40:20 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(rotate)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/rotators/Imakefile gimp-1.0.0/plug-ins/rotators/Imakefile
*** gimp-1.0.0.orig/plug-ins/rotators/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/rotators/Imakefile	Thu Jul  9 21:40:50 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(rotators)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/scatter_hsv/Imakefile gimp-1.0.0/plug-ins/scatter_hsv/Imakefile
*** gimp-1.0.0.orig/plug-ins/scatter_hsv/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/scatter_hsv/Imakefile	Thu Jul  9 21:41:20 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(scatter_hsv)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/screenshot/Imakefile gimp-1.0.0/plug-ins/screenshot/Imakefile
*** gimp-1.0.0.orig/plug-ins/screenshot/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/screenshot/Imakefile	Thu Jul  9 21:41:56 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(screenshot)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/screenshot/screenshot.c gimp-1.0.0/plug-ins/screenshot/screenshot.c
*** gimp-1.0.0.orig/plug-ins/screenshot/screenshot.c	Fri May 29 01:09:16 1998
--- gimp-1.0.0/plug-ins/screenshot/screenshot.c	Sat Jul 11 10:18:46 1998
***************
*** 46,51 ****
--- 46,54 ----
  #include <unistd.h>
  #include "gtk/gtk.h"
  #include "libgimp/gimp.h"
+ #ifdef __EMX__
+ #include <process.h>
+ #endif
  
  /* Defines */
  #define PLUG_IN_NAME        "extension_screenshot"
***************
*** 270,275 ****
--- 273,279 ----
      }
    xwdargv[i] = NULL;
    
+ #ifndef __EMX__
    /* fork off a xwd process */
    if ((pid = fork ()) < 0)
      {
***************
*** 284,289 ****
--- 288,301 ----
        return;
      }
    else
+ #else /* __EMX__ */
+   pid = spawnvp (P_NOWAIT, XWD, xwdargv);
+   if (pid == -1)
+     {
+       g_message ("screenshot: spawn failed: %s\n", g_strerror (errno));
+       return;
+     }
+ #endif
      {
        waitpid (pid, &status, 0);
  	      
diff -crN gimp-1.0.0.orig/plug-ins/script-fu/Imakefile gimp-1.0.0/plug-ins/script-fu/Imakefile
*** gimp-1.0.0.orig/plug-ins/script-fu/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/script-fu/Imakefile	Sat Jul 11 16:03:54 1998
***************
*** 0 ****
--- 1,42 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ ADD_LIBS = ../dbbrowser/dbbrowser_utils.o
+ 
+ SRCS = \
+         interp_md5.c            \
+         interp_regex.c          \
+         interp_slib.c           \
+         interp_sliba.c          \
+         interp_trace.c          \
+         script-fu.c             \
+         script-fu-console.c     \
+         script-fu-scripts.c     \
+         script-fu-server.c      \
+         regex.c
+ 
+ OBJS = \
+         interp_md5.o            \
+         interp_regex.o          \
+         interp_slib.o           \
+         interp_sliba.o          \
+         interp_trace.o          \
+         script-fu.o             \
+         script-fu-console.o     \
+         script-fu-scripts.o     \
+         script-fu-server.o      \
+         regex.o
+ 
+ ComplexProgramTarget(script-fu)
+ 
+ #define IHaveSubdirs
+ #define PassCDebugFlags
+ 
+ SUBDIRS = scripts
+ 
+ MakeSubdirs($(SUBDIRS))
+ 
diff -crN gimp-1.0.0.orig/plug-ins/script-fu/script-fu-console.c gimp-1.0.0/plug-ins/script-fu/script-fu-console.c
*** gimp-1.0.0.orig/plug-ins/script-fu/script-fu-console.c	Thu May 28 17:03:54 1998
--- gimp-1.0.0/plug-ins/script-fu/script-fu-console.c	Sun Sep 13 08:18:38 1998
***************
*** 531,537 ****
--- 531,541 ----
  	{
  	  gimp_message ("Unable to open SIOD output pipe");
  	}
+ #ifndef __EMX__
        else if ((siod_output = fdopen (siod_output_pipe [1], "w")) == NULL)
+ #else
+       else if ((siod_output = fdopen (siod_output_pipe [1], "wt")) == NULL)
+ #endif
  	{
  	  gimp_message ("Unable to open a stream on the SIOD output pipe");
  	  siod_output = stdout;
diff -crN gimp-1.0.0.orig/plug-ins/script-fu/script-fu-scripts.c gimp-1.0.0/plug-ins/script-fu/script-fu-scripts.c
*** gimp-1.0.0.orig/plug-ins/script-fu/script-fu-scripts.c	Thu May 28 17:03:56 1998
--- gimp-1.0.0/plug-ins/script-fu/script-fu-scripts.c	Sat Jul 11 14:24:26 1998
***************
*** 196,202 ****
--- 196,206 ----
  
        next_token = local_path;
  
+ #ifndef __EMX__
        token = strtok (next_token, ":");
+ #else
+       token = strtok (next_token, ";");
+ #endif
  
        while (token)
  	{
***************
*** 257,263 ****
--- 261,271 ----
  
  	  g_free (path);
  
+ #ifndef __EMX__
  	  token = strtok (NULL, ":");
+ #else
+ 	  token = strtok (NULL, ";");
+ #endif
  	} /* while */
  
        g_free(local_path);
diff -crN gimp-1.0.0.orig/plug-ins/script-fu/scripts/Imakefile gimp-1.0.0/plug-ins/script-fu/scripts/Imakefile
*** gimp-1.0.0.orig/plug-ins/script-fu/scripts/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/script-fu/scripts/Imakefile	Thu Jul  9 18:26:02 1998
***************
*** 0 ****
--- 1,111 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../../../gimp.cf"
+ 
+ DATA1 = \
+ 	3d-outline.scm				\
+ 	3dTruchet.scm				\
+ 	add-bevel.scm				\
+ 	addborder.scm				\
+ 	alien-glow-arrow.scm			\
+ 	alien-glow-bar.scm			\
+ 	alien-glow-bullet.scm			\
+ 	alien-glow-button.scm			\
+ 	alien-glow-logo.scm			\
+ 	asc2img.scm				\
+ 	basic1-logo.scm				\
+ 	basic2-logo.scm				\
+ 	beavis.jpg				\
+ 	beveled-button.scm			\
+ 	beveled-pattern-arrow.scm		\
+ 	beveled-pattern-bullet.scm		\
+ 	beveled-pattern-button.scm		\
+ 	beveled-pattern-heading.scm		\
+ 	beveled-pattern-hrule.scm		\
+ 	blend-anim.scm				\
+ 	blended-logo.scm			\
+ 	bovinated-logo.scm			\
+ 	camo.scm				\
+ 	carve-it.scm				\
+ 	carved-logo.scm				\
+ 	chalk.scm				\
+ 	chip-away.scm				\
+ 	chrome-it.scm				\
+ 	chrome-logo.scm				\
+ 	circuit.scm				\
+ 	clothify.scm				\
+ 	coffee.scm				\
+ 	color-cycling.scm			\
+ 	comic-logo.scm				\
+ 	coolmetal-logo.scm			\
+ 	copy-visible.scm			\
+ 	crystal-logo.scm
+ 
+ DATA2 = \
+ 	distress_selection.scm			\
+ 	drop-shadow.scm				\
+ 	egg.scm					\
+ 	erase-rows.scm				\
+ 	fade-outline.scm			\
+ 	flatland.scm				\
+ 	font-map.scm				\
+ 	frosty-logo.scm				\
+ 	fuzzyborder.scm				\
+ 	gimp-headers.scm			\
+ 	gimp-labels.scm				\
+ 	glossy.scm				\
+ 	glowing-logo.scm			\
+ 	gradient-bevel-logo.scm			\
+ 	gradient-example.scm			\
+ 	grid-system.scm				\
+ 	hsv-graph.scm				\
+ 	i26-gunya2.scm				\
+ 	image-structure.scm			\
+ 	land.scm				\
+ 	lava.scm				\
+ 	line-nova.scm				\
+ 	old_photo.scm				\
+ 	mkbrush.scm				\
+ 	neon-logo.scm				\
+ 	perspective-shadow.scm			\
+ 	predator.scm
+ 
+ DATA3 = \
+ 	rendermap.scm				\
+ 	ripply-anim.scm				\
+ 	round-corners.scm			\
+ 	select_to_brush.scm			\
+ 	select_to_image.scm			\
+ 	selection-round.scm			\
+ 	slide.scm				\
+ 	sota-chrome-logo.scm			\
+ 	sphere.scm				\
+ 	spinning_globe.scm			\
+ 	starburst-logo.scm			\
+ 	starscape-logo.scm			\
+ 	swirltile.scm				\
+ 	swirly-pattern.scm			\
+ 	t-o-p-logo.scm				\
+ 	text-circle.scm				\
+ 	texture.jpg				\
+ 	texture1.jpg				\
+ 	texture2.jpg				\
+ 	texture3.jpg				\
+ 	textured-logo.scm			\
+ 	title-header.scm			\
+ 	tileblur.scm				\
+ 	trochoid.scm				\
+ 	truchet.scm				\
+ 	unsharp-mask.scm			\
+ 	waves-anim.scm				\
+ 	weave.scm				\
+ 	xach-effect.scm
+ 
+ /* $(DATA1) + $(DATA2) + $(DATA3) is too long, so split it */
+ InstallMultiple($(DATA1),$(GIMPDATADIR)/scripts)
+ InstallMultiple($(DATA2),$(GIMPDATADIR)/scripts)
+ InstallMultiple($(DATA3),$(GIMPDATADIR)/scripts)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/semiflatten/Imakefile gimp-1.0.0/plug-ins/semiflatten/Imakefile
*** gimp-1.0.0.orig/plug-ins/semiflatten/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/semiflatten/Imakefile	Thu Jul  9 22:25:30 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(semiflatten)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/sgi/Imakefile gimp-1.0.0/plug-ins/sgi/Imakefile
*** gimp-1.0.0.orig/plug-ins/sgi/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/sgi/Imakefile	Thu Jul  9 22:26:46 1998
***************
*** 0 ****
--- 1,12 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SRCS = sgi.c sgilib.c
+ OBJS = sgi.o sgilib.o
+ 
+ ComplexProgramTarget(sgi)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/sgi/sgi.c gimp-1.0.0/plug-ins/sgi/sgi.c
*** gimp-1.0.0.orig/plug-ins/sgi/sgi.c	Fri Apr 24 10:18:44 1998
--- gimp-1.0.0/plug-ins/sgi/sgi.c	Sat Jul 11 10:46:02 1998
***************
*** 117,128 ****
--- 117,132 ----
   * 'main()' - Main entry - just call gimp_main()...
   */
  
+ #if 0
  int
  main(int  argc,		/* I - Number of command-line args */
       char *argv[])	/* I - Command-line args */
  {
    return (gimp_main(argc, argv));
  }
+ #else
+ MAIN()
+ #endif
  
  
  /*
diff -crN gimp-1.0.0.orig/plug-ins/sharpen/Imakefile gimp-1.0.0/plug-ins/sharpen/Imakefile
*** gimp-1.0.0.orig/plug-ins/sharpen/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/sharpen/Imakefile	Thu Jul  9 22:27:22 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(sharpen)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/sharpen/sharpen.c gimp-1.0.0/plug-ins/sharpen/sharpen.c
*** gimp-1.0.0.orig/plug-ins/sharpen/sharpen.c	Tue Apr 28 11:50:18 1998
--- gimp-1.0.0/plug-ins/sharpen/sharpen.c	Sat Jul 11 10:46:44 1998
***************
*** 219,230 ****
--- 219,234 ----
   * 'main()' - Main entry - just call gimp_main()...
   */
  
+ #if 0
  int
  main(int  argc,		/* I - Number of command-line args */
       char *argv[])	/* I - Command-line args */
  {
    return (gimp_main(argc, argv));
  }
+ #else
+ MAIN()
+ #endif
  
  
  /*
diff -crN gimp-1.0.0.orig/plug-ins/shift/Imakefile gimp-1.0.0/plug-ins/shift/Imakefile
*** gimp-1.0.0.orig/plug-ins/shift/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/shift/Imakefile	Thu Jul  9 22:27:56 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(shift)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/sinus/Imakefile gimp-1.0.0/plug-ins/sinus/Imakefile
*** gimp-1.0.0.orig/plug-ins/sinus/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/sinus/Imakefile	Sat Jul 11 16:06:42 1998
***************
*** 0 ****
--- 1,11 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ ADD_LIBS = -L../megawidget -lmegawidget
+ 
+ SimpleProgramTarget(sinus)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/smooth_palette/Imakefile gimp-1.0.0/plug-ins/smooth_palette/Imakefile
*** gimp-1.0.0.orig/plug-ins/smooth_palette/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/smooth_palette/Imakefile	Thu Jul  9 22:30:42 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(smooth_palette)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/snoise/Imakefile gimp-1.0.0/plug-ins/snoise/Imakefile
*** gimp-1.0.0.orig/plug-ins/snoise/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/snoise/Imakefile	Thu Jul  9 22:31:10 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(snoise)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/snp/Imakefile gimp-1.0.0/plug-ins/snp/Imakefile
*** gimp-1.0.0.orig/plug-ins/snp/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/snp/Imakefile	Thu Jul  9 22:31:40 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(snp)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/sobel/Imakefile gimp-1.0.0/plug-ins/sobel/Imakefile
*** gimp-1.0.0.orig/plug-ins/sobel/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/sobel/Imakefile	Thu Jul  9 22:32:10 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(sobel)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/sparkle/Imakefile gimp-1.0.0/plug-ins/sparkle/Imakefile
*** gimp-1.0.0.orig/plug-ins/sparkle/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/sparkle/Imakefile	Thu Jul  9 22:32:44 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(sparkle)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/spread/Imakefile gimp-1.0.0/plug-ins/spread/Imakefile
*** gimp-1.0.0.orig/plug-ins/spread/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/spread/Imakefile	Thu Jul  9 22:33:20 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(spread)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/struc/Imakefile gimp-1.0.0/plug-ins/struc/Imakefile
*** gimp-1.0.0.orig/plug-ins/struc/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/struc/Imakefile	Thu Jul  9 18:29:16 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(struc)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/sunras/Imakefile gimp-1.0.0/plug-ins/sunras/Imakefile
*** gimp-1.0.0.orig/plug-ins/sunras/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/sunras/Imakefile	Thu Jul  9 22:34:00 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(sunras)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/tga/Imakefile gimp-1.0.0/plug-ins/tga/Imakefile
*** gimp-1.0.0.orig/plug-ins/tga/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/tga/Imakefile	Thu Jul  9 22:34:36 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(tga)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/threshold_alpha/Imakefile gimp-1.0.0/plug-ins/threshold_alpha/Imakefile
*** gimp-1.0.0.orig/plug-ins/threshold_alpha/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/threshold_alpha/Imakefile	Thu Jul  9 22:35:14 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(threshold_alpha)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/tiff/Imakefile gimp-1.0.0/plug-ins/tiff/Imakefile
*** gimp-1.0.0.orig/plug-ins/tiff/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/tiff/Imakefile	Sat Jul 11 16:07:38 1998
***************
*** 0 ****
--- 1,11 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ ADD_LIBS = -ltiff
+ 
+ SimpleProgramTarget(tiff)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/tile/Imakefile gimp-1.0.0/plug-ins/tile/Imakefile
*** gimp-1.0.0.orig/plug-ins/tile/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/tile/Imakefile	Thu Jul  9 22:35:46 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(tile)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/tileit/Imakefile gimp-1.0.0/plug-ins/tileit/Imakefile
*** gimp-1.0.0.orig/plug-ins/tileit/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/tileit/Imakefile	Thu Jul  9 22:36:18 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(tileit)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/tiler/Imakefile gimp-1.0.0/plug-ins/tiler/Imakefile
*** gimp-1.0.0.orig/plug-ins/tiler/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/tiler/Imakefile	Thu Jul  9 22:37:02 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(tiler)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/url/Imakefile gimp-1.0.0/plug-ins/url/Imakefile
*** gimp-1.0.0.orig/plug-ins/url/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/url/Imakefile	Thu Jul  9 22:37:30 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(url)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/url/url.c gimp-1.0.0/plug-ins/url/url.c
*** gimp-1.0.0.orig/plug-ins/url/url.c	Sat May 30 15:32:36 1998
--- gimp-1.0.0/plug-ins/url/url.c	Sat Jul 11 10:20:56 1998
***************
*** 24,29 ****
--- 24,32 ----
  #include <errno.h>
  #include "gtk/gtk.h"
  #include "libgimp/gimp.h"
+ #ifdef __EMX__
+ #include <process.h>
+ #endif
  
  /* Author: Josh MacDonald. */
  
***************
*** 139,144 ****
--- 142,148 ----
  
    tmpname = params[1].data.d_string;
  
+ #ifndef __EMX__
    if ((pid = fork()) < 0)
      {
        g_message ("url: fork failed: %s\n", g_strerror(errno));
***************
*** 151,156 ****
--- 155,168 ----
        _exit(127);
      }
    else
+ #else /* __EMX__ */
+   pid = spawnlp (P_NOWAIT, "wget", "wget", filename, "-O", tmpname, NULL);
+   if (pid == -1)
+     {
+       g_message ("url: spawn failed: %s\n", g_strerror(errno));
+       return -1;
+     }
+ #endif
      {
        waitpid (pid, &status, 0);
  
diff -crN gimp-1.0.0.orig/plug-ins/video/Imakefile gimp-1.0.0/plug-ins/video/Imakefile
*** gimp-1.0.0.orig/plug-ins/video/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/video/Imakefile	Thu Jul  9 22:38:14 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(video)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/vinvert/Imakefile gimp-1.0.0/plug-ins/vinvert/Imakefile
*** gimp-1.0.0.orig/plug-ins/vinvert/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/vinvert/Imakefile	Thu Jul  9 22:38:56 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(vinvert)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/vpropagate/Imakefile gimp-1.0.0/plug-ins/vpropagate/Imakefile
*** gimp-1.0.0.orig/plug-ins/vpropagate/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/vpropagate/Imakefile	Thu Jul  9 22:39:18 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(vpropagate)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/waves/Imakefile gimp-1.0.0/plug-ins/waves/Imakefile
*** gimp-1.0.0.orig/plug-ins/waves/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/waves/Imakefile	Sat Jul 11 16:08:24 1998
***************
*** 0 ****
--- 1,11 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ ADD_LIBS = -L../megawidget -lmegawidget
+ 
+ SimpleProgramTarget(waves)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/webbrowser/Imakefile gimp-1.0.0/plug-ins/webbrowser/Imakefile
*** gimp-1.0.0.orig/plug-ins/webbrowser/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/webbrowser/Imakefile	Thu Jul 16 00:00:26 1998
***************
*** 0 ****
--- 1,12 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ ADD_LIBS = $(XMULIB)
+ 
+ SimpleProgramTarget(webbrowser)
+ InstallNonExecFile(web-browser.scm,$(GIMPDATADIR)/scripts)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/webbrowser/webbrowser.c gimp-1.0.0/plug-ins/webbrowser/webbrowser.c
*** gimp-1.0.0.orig/plug-ins/webbrowser/webbrowser.c	Mon Apr 13 13:44:06 1998
--- gimp-1.0.0/plug-ins/webbrowser/webbrowser.c	Sat Jul 11 10:24:16 1998
***************
*** 43,48 ****
--- 43,51 ----
  #include "gtk/gtk.h"
  #include "libgimp/gimp.h"
  
+ #ifdef __EMX__
+ #include <process.h>
+ #endif
  /* Browser program name -- start in case it's not already running */
  #define BROWSER_PROGNAME	"netscape"
  
***************
*** 192,197 ****
--- 195,201 ----
  static gint
  start_browser (char *prog, char *url)
  {
+ #ifndef __EMX__
      pid_t cpid;
  
      if ((cpid = fork()) == 0)
***************
*** 201,206 ****
--- 205,213 ----
      }
  
      return (cpid > 0);
+ #else
+     return (spawnlp(P_NOWAIT, prog, prog, url, NULL) != -1);
+ #endif
  }
  
  static gint
diff -crN gimp-1.0.0.orig/plug-ins/whirlpinch/Imakefile gimp-1.0.0/plug-ins/whirlpinch/Imakefile
*** gimp-1.0.0.orig/plug-ins/whirlpinch/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/whirlpinch/Imakefile	Thu Jul  9 22:40:58 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(whirlpinch)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/xd/Imakefile gimp-1.0.0/plug-ins/xd/Imakefile
*** gimp-1.0.0.orig/plug-ins/xd/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/xd/Imakefile	Sat Jul 11 16:10:00 1998
***************
*** 0 ****
--- 1,11 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ ADD_LIBS = -lxdelta -lgdbm
+ 
+ SimpleProgramTarget(xd)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/xd/xd.c gimp-1.0.0/plug-ins/xd/xd.c
*** gimp-1.0.0.orig/plug-ins/xd/xd.c	Sat May 30 15:32:36 1998
--- gimp-1.0.0/plug-ins/xd/xd.c	Sun Sep 13 15:38:26 1998
***************
*** 611,620 ****
--- 611,631 ----
  			      gint len)
  {
    gchar* foo = "/tmp/foo.xpm";
+ #ifdef __EMX__
+   GParam* params;
+   gint retvals;
+ #endif
    FILE* f;
  
    g_print ("gdk_pixmap_create_from_xpm: this proceedure is slow because Peter is a wuss.  it should be rewritten.");
  
+ #ifdef __EMX__
+   params = gimp_run_procedure ("gimp_temp_name",
+                                &retvals,
+                                PARAM_STRING, "xpm",
+                                PARAM_END);
+   foo = params[1].data.d_string;
+ #endif
    f = fopen (foo, "w");
  
    fwrite (segment, len, 1, f);
***************
*** 754,759 ****
--- 765,774 ----
      }
  
    /* Select the most recent version. */
+ #if 1
+ /* BUG? when xd->versions == 1 */
+   preview_selected_version = xd->versions - 1;
+ #endif
    gtk_list_select_item (GTK_LIST (plist), xd->versions - 1);
  
    gtk_main ();
diff -crN gimp-1.0.0.orig/plug-ins/xpm/Imakefile gimp-1.0.0/plug-ins/xpm/Imakefile
*** gimp-1.0.0.orig/plug-ins/xpm/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/xpm/Imakefile	Sat Jul 11 16:10:54 1998
***************
*** 0 ****
--- 1,11 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ ADD_LIBS = -lXpm
+ 
+ SimpleProgramTarget(xpm)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/xwd/Imakefile gimp-1.0.0/plug-ins/xwd/Imakefile
*** gimp-1.0.0.orig/plug-ins/xwd/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/xwd/Imakefile	Thu Jul  9 22:41:36 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(xwd)
+ 
diff -crN gimp-1.0.0.orig/plug-ins/zealouscrop/Imakefile gimp-1.0.0/plug-ins/zealouscrop/Imakefile
*** gimp-1.0.0.orig/plug-ins/zealouscrop/Imakefile	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/plug-ins/zealouscrop/Imakefile	Thu Jul  9 22:42:14 1998
***************
*** 0 ****
--- 1,9 ----
+ /*
+     Written for XFree86/OS2
+     Hung-Chi Chu <hcchu@r350.ee.ntu.edu.tw> 07/09/1998
+  */
+ 
+ #include "../plug-ins.tmpl"
+ 
+ SimpleProgramTarget(zealouscrop)
+ 
diff -crN gimp-1.0.0.orig/user_install.cmd gimp-1.0.0/user_install.cmd
*** gimp-1.0.0.orig/user_install.cmd	Thu Jan  1 00:00:00 1970
--- gimp-1.0.0/user_install.cmd	Sun Sep 13 01:31:48 1998
***************
*** 0 ****
--- 1,41 ----
+ @echo off
+ REM  Script to perform the default installation steps for the
+ REM   specified user home directory.
+ REM
+ REM  1) Create ~/.gimp if it doesn't exist
+ REM  2) Copy system gimprc file to ~/.gimp
+ REM  3) Create brushes, gradients, palettes, patterns, plug-ins subdirs
+ REM  4) Create the tmp subdirectory for disk-swapping undo buffers
+ REM  5) Copy the palette files in system palette directory
+ REM
+ 
+ echo "mkdir %2"
+ mkdir %2
+ 
+ echo "copy %1\gimprc_user %2\gimprc"
+ copy %1\gimprc_user %2\gimprc
+ 
+ echo "copy %1\gtkrc %2\gtkrc"
+ copy %1\gtkrc %2\gtkrc
+ 
+ echo "mkdir %2\brushes"
+ mkdir %2\brushes
+ echo "mkdir %2\gradients"
+ mkdir %2\gradients
+ echo "mkdir %2\palettes"
+ mkdir %2\palettes
+ echo "mkdir %2\patterns"
+ mkdir %2\patterns
+ echo "mkdir %2\plug-ins"
+ mkdir %2\plug-ins
+ echo "mkdir %2\gfig"
+ mkdir %2\gfig
+ echo "mkdir %2\tmp"
+ mkdir %2\tmp
+ echo "mkdir %2\scripts"
+ mkdir %2\scripts
+ echo "mkdir %2\gflares"
+ mkdir %2\gflares
+ 
+ echo "copy %1\palettes\*.* %2\palettes"
+ copy %1\palettes\*.* %2\palettes
