*** 1.1	1996/03/22 23:30:17
--- xfig/e_align.c	1996/03/22 23:30:32
***************
*** 761,767 ****
      translate_spline(s, delta_x, delta_y);
      s->distrib = 1;
      break;
!   case O_TEXT:
      t = (F_text *) obj_ptr;
      translate_text(t, delta_x, delta_y);
      t->distrib = 1;
--- 761,767 ----
      translate_spline(s, delta_x, delta_y);
      s->distrib = 1;
      break;
!   case O_XTEXT:
      t = (F_text *) obj_ptr;
      translate_text(t, delta_x, delta_y);
      t->distrib = 1;
***************
*** 847,853 ****
  	  { obj_ptr = (char *)c; obj_type = O_COMPOUND; }
        for (t = cur_c->texts; t != NULL; t = t->next)
  	if (pos_text(t, &min_left, &min_width, 0))
! 	  { obj_ptr = (char *)t; obj_type = O_TEXT; }
      }
  
      /* Determine the new horizontal position of the object */
--- 847,853 ----
  	  { obj_ptr = (char *)c; obj_type = O_COMPOUND; }
        for (t = cur_c->texts; t != NULL; t = t->next)
  	if (pos_text(t, &min_left, &min_width, 0))
! 	  { obj_ptr = (char *)t; obj_type = O_XTEXT; }
      }
  
      /* Determine the new horizontal position of the object */
***************
*** 928,934 ****
  	  { obj_ptr = (char *)c; obj_type = O_COMPOUND; }
        for (t = cur_c->texts; t != NULL; t = t->next)
  	if (pos_text(t, &min_top, &min_height, 1))
! 	  { obj_ptr = (char *)t; obj_type = O_TEXT; }
      }
  
      /* Determine the new vertical position of the object */
--- 928,934 ----
  	  { obj_ptr = (char *)c; obj_type = O_COMPOUND; }
        for (t = cur_c->texts; t != NULL; t = t->next)
  	if (pos_text(t, &min_top, &min_height, 1))
! 	  { obj_ptr = (char *)t; obj_type = O_XTEXT; }
      }
  
      /* Determine the new vertical position of the object */
*** 1.1	1996/03/22 23:31:15
--- xfig/e_copy.c	1996/03/22 23:31:30
***************
*** 94,100 ****
  	new_l = copy_line(cur_l);
  	init_linedragging(new_l, px, py);
  	break;
!     case O_TEXT:
  	set_temp_cursor(null_cursor);
  	cur_t = (F_text *) p;
  	new_t = copy_text(cur_t);
--- 94,100 ----
  	new_l = copy_line(cur_l);
  	init_linedragging(new_l, px, py);
  	break;
!     case O_XTEXT:
  	set_temp_cursor(null_cursor);
  	cur_t = (F_text *) p;
  	new_t = copy_text(cur_t);
***************
*** 154,160 ****
  	cur_l = (F_line *) p;
  	write_line(fp, cur_l);
  	break;
!     case O_TEXT:
  	cur_t = (F_text *) p;
  	write_text(fp, cur_t);
  	break;
--- 154,160 ----
  	cur_l = (F_line *) p;
  	write_line(fp, cur_l);
  	break;
!     case O_XTEXT:
  	cur_t = (F_text *) p;
  	write_text(fp, cur_t);
  	break;
*** 1.1	1996/03/22 23:32:38
--- xfig/e_delete.c	1996/03/22 23:32:54
***************
*** 68,74 ****
  	delete_line(cur_l);
  	redisplay_line(cur_l);
  	break;
!     case O_TEXT:
  	cur_t = (F_text *) p;
  	delete_text(cur_t);
  	redisplay_text(cur_t);
--- 68,74 ----
  	delete_line(cur_l);
  	redisplay_line(cur_l);
  	break;
!     case O_XTEXT:
  	cur_t = (F_text *) p;
  	delete_text(cur_t);
  	redisplay_text(cur_t);
***************
*** 176,182 ****
  	delete_line(cur_l);
  	redisplay_line(cur_l);
  	break;
!     case O_TEXT:
  	cur_t = (F_text *) p;
  	write_text(fp, cur_t);
  	delete_text(cur_t);
--- 176,182 ----
  	delete_line(cur_l);
  	redisplay_line(cur_l);
  	break;
!     case O_XTEXT:
  	cur_t = (F_text *) p;
  	write_text(fp, cur_t);
  	delete_text(cur_t);
*** 1.1	1996/03/22 23:33:01
--- xfig/e_edit.c	1996/03/22 23:33:08
***************
*** 361,367 ****
      case O_POLYLINE:
  	make_window_line((F_line *) p);
  	break;
!     case O_TEXT:
  	make_window_text((F_text *) p);
  	break;
      case O_ELLIPSE:
--- 361,367 ----
      case O_POLYLINE:
  	make_window_line((F_line *) p);
  	break;
!     case O_XTEXT:
  	make_window_text((F_text *) p);
  	break;
      case O_ELLIPSE:
*** 1.1	1996/03/22 23:33:29
--- xfig/e_glue.c	1996/03/22 23:33:38
***************
*** 72,78 ****
          toggle_linehighlight(cur_l);
  	cur_l->tagged = 1 - cur_l->tagged;
          break;
!     case O_TEXT:
          cur_t = (F_text *) p;
          toggle_texthighlight(cur_t);
  	cur_t->tagged = 1 - cur_t->tagged;
--- 72,78 ----
          toggle_linehighlight(cur_l);
  	cur_l->tagged = 1 - cur_l->tagged;
          break;
!     case O_XTEXT:
          cur_t = (F_text *) p;
          toggle_texthighlight(cur_t);
  	cur_t->tagged = 1 - cur_t->tagged;
*** 1.1	1996/03/22 23:33:46
--- xfig/e_move.c	1996/03/22 23:33:56
***************
*** 95,101 ****
  	set_temp_cursor(null_cursor);
  	init_linedragging(cur_l, px, py);
  	break;
!     case O_TEXT:
  	set_temp_cursor(wait_cursor);
  	cur_t = (F_text *) p;
  	list_delete_text(&objects.texts, cur_t);
--- 95,101 ----
  	set_temp_cursor(null_cursor);
  	init_linedragging(cur_l, px, py);
  	break;
!     case O_XTEXT:
  	set_temp_cursor(wait_cursor);
  	cur_t = (F_text *) p;
  	list_delete_text(&objects.texts, cur_t);
*** 1.1	1996/03/22 23:34:10
--- xfig/e_rotate.c	1996/03/22 23:34:22
***************
*** 174,180 ****
  	cur_s = (F_spline *) p;
  	init_rotatespline(cur_s, px, py);
  	break;
!     case O_TEXT:
  	cur_t = (F_text *) p;
  	init_rotatetext(cur_t, px, py);
  	break;
--- 174,180 ----
  	cur_s = (F_spline *) p;
  	init_rotatespline(cur_s, px, py);
  	break;
!     case O_XTEXT:
  	cur_t = (F_text *) p;
  	init_rotatetext(cur_t, px, py);
  	break;
*** 1.1	1996/03/22 23:34:29
--- xfig/e_update.c	1996/03/22 23:34:46
***************
*** 121,127 ****
  	if (cur_l->type == T_ARC_BOX)
  	    up_part(cur_boxradius, cur_l->radius, I_BOXRADIUS);
  	break;
!     case O_TEXT:
  	cur_t = (F_text *) p;
  	up_part(cur_textjust, cur_t->type, I_TEXTJUST);
  	up_part(cur_pencolor, cur_t->color, I_PEN_COLOR);
--- 121,127 ----
  	if (cur_l->type == T_ARC_BOX)
  	    up_part(cur_boxradius, cur_l->radius, I_BOXRADIUS);
  	break;
!     case O_XTEXT:
  	cur_t = (F_text *) p;
  	up_part(cur_textjust, cur_t->type, I_TEXTJUST);
  	up_part(cur_pencolor, cur_t->color, I_PEN_COLOR);
***************
*** 216,222 ****
  	change_line(cur_l, new_l);
  	toggle_linemarker(new_l);
  	break;
!     case O_TEXT:
  	set_temp_cursor(wait_cursor);
  	cur_t = (F_text *) p;
  	toggle_textmarker(cur_t);
--- 216,222 ----
  	change_line(cur_l, new_l);
  	toggle_linemarker(new_l);
  	break;
!     case O_XTEXT:
  	set_temp_cursor(wait_cursor);
  	cur_t = (F_text *) p;
  	toggle_textmarker(cur_t);
*** 1.1	1996/03/22 23:25:39
--- xfig/fig.h	1996/03/22 23:57:08
***************
*** 20,25 ****
--- 20,26 ----
  /* For the X stuff, include only Xlib.h and Intrinsic.h here - 
     use figx.h for widget stuff */
  
+ #include <sys/types.h>
  #include <sys/stat.h>
  
  #if defined(__convex__) && defined(__STDC__)
***************
*** 39,48 ****
--- 40,54 ----
  #include <ctype.h>
  #include <errno.h>
  
+ #ifndef __EMX__
  extern int	errno;
  extern int	sys_nerr;
  extern char    *sys_errlist[];
  extern char    *mktemp();
+ #else
+ #define strcasecmp stricmp
+ #define strncasecmp strnicmp
+ #endif
  
  #include <math.h>	/* for sin(), cos() etc */
  
*** 1.1	1996/03/22 23:31:42
--- xfig/f_read.c	1996/03/22 23:57:10
***************
*** 368,374 ****
  		la = obj->arcs = a;
  	    num_object++;
  	    break;
! 	case O_TEXT:
  	    if ((t = read_textobject(fp)) == NULL)
  		return (num_object==0);	/* ok if any objects have been read */
  	    if (lt)
--- 368,374 ----
  		la = obj->arcs = a;
  	    num_object++;
  	    break;
! 	case O_XTEXT:
  	    if ((t = read_textobject(fp)) == NULL)
  		return (num_object==0);	/* ok if any objects have been read */
  	    if (lt)
***************
*** 569,575 ****
  	    else
  		la = com->arcs = a;
  	    break;
! 	case O_TEXT:
  	    if ((t = read_textobject(fp)) == NULL) {
  		free_text(&t);
  		return (NULL);
--- 569,575 ----
  	    else
  		la = com->arcs = a;
  	    break;
! 	case O_XTEXT:
  	    if ((t = read_textobject(fp)) == NULL) {
  		free_text(&t);
  		return (NULL);
*** 1.1	1996/03/22 23:30:43
--- xfig/f_readold.c	1996/03/22 23:31:00
***************
*** 109,115 ****
  		la = obj->arcs = a;
  	    num_object++;
  	    break;
! 	case O_TEXT:
  	    if ((t = read_1_3_textobject(fp)) == NULL)
  		return (-1);
  	    if (lt)
--- 109,115 ----
  		la = obj->arcs = a;
  	    num_object++;
  	    break;
! 	case O_XTEXT:
  	    if ((t = read_1_3_textobject(fp)) == NULL)
  		return (-1);
  	    if (lt)
***************
*** 251,257 ****
  	    else
  		la = com->arcs = a;
  	    break;
! 	case O_TEXT:
  	    if ((t = read_1_3_textobject(fp)) == NULL) {
  		free_text(&t);
  		return (NULL);
--- 251,257 ----
  	    else
  		la = com->arcs = a;
  	    break;
! 	case O_XTEXT:
  	    if ((t = read_1_3_textobject(fp)) == NULL) {
  		free_text(&t);
  		return (NULL);
*** 1.1	1996/03/22 23:29:49
--- xfig/f_save.c	1996/03/22 23:30:00
***************
*** 296,302 ****
      if (t->length == 0)
  	return;
      fprintf(fp, "%d %d %d %d %d %d %d %.7f %d %d %d %d %d ",
! 	    O_TEXT, t->type, t->color, t->depth, t->pen_style,
  	    t->font, t->size, t->angle,
  	    t->flags, t->ascent+t->descent, t->length,
  	    t->base_x, t->base_y);
--- 296,302 ----
      if (t->length == 0)
  	return;
      fprintf(fp, "%d %d %d %d %d %d %d %.7f %d %d %d %d %d ",
! 	    O_XTEXT, t->type, t->color, t->depth, t->pen_style,
  	    t->font, t->size, t->angle,
  	    t->flags, t->ascent+t->descent, t->length,
  	    t->base_x, t->base_y);
*** 1.1	1996/03/23 00:14:58
--- xfig/f_util.c	1996/03/23 00:22:44
***************
*** 85,91 ****
--- 85,95 ----
  	*cur_dir = '\0';
  	return (0);
      }
+ #ifndef __EMX__
      if (chdir(path) == -1) {
+ #else
+     if (_chdir2(path) == -1) {
+ #endif
  	put_msg("Can't go to directory %s, : %s", path, sys_errlist[errno]);
  	return (1);
      }
***************
*** 110,117 ****
--- 114,126 ----
      if (getcwd(direct, 1024) == NULL) {	/* get current working dir */
  	put_msg("Can't get current directory");
  #else
+ #if defined(__EMX__)
+     if (_getcwd2(direct,1024) == NULL) {
+ 	put_msg("Can't get current directory");
+ #else
      if (getwd(direct) == NULL) {/* get current working dir */
  	put_msg("%s", direct);	/* err msg is in directory */
+ #endif
  #endif
  	*direct = '\0';
  	return 0;
*** 1.1	1996/03/22 23:11:12
--- xfig/Imakefile	1996/03/23 00:38:16
***************
*** 42,55 ****
  XCOMM You need XPM version 3.4c or newer.  This is available from ftp.x.org
  XCOMM   in /contrib/libraries.
  
! XCOMM XPMDEFINES = -DUSE_XPM -DUSE_XPM_ICON
  
  XCOMM If you want to use the XPM library change the following for your paths
  XCOMM and uncomment them:
  
! XCOMM XPMLIBDIR = -L/usr/local/X11/lib
! XCOMM XPMINCDIR = -I/usr/local/X11/include/xpm
! XCOMM XPMLIB = $(XPMLIBDIR) -lXpm
  
  EXTRA_INCLUDES = $(XPMINCDIR)
  
--- 42,55 ----
  XCOMM You need XPM version 3.4c or newer.  This is available from ftp.x.org
  XCOMM   in /contrib/libraries.
  
! XPMDEFINES = -DUSE_XPM -DUSE_XPM_ICON
  
  XCOMM If you want to use the XPM library change the following for your paths
  XCOMM and uncomment them:
  
! XPMLIBDIR = -L/XFree86/lib
! XPMINCDIR = -I/XFree86/include/X11
! XPMLIB = $(XPMLIBDIR) -lXpm
  
  EXTRA_INCLUDES = $(XPMINCDIR)
  
***************
*** 81,87 ****
  
  XCOMM use (and change) the following if you want the multi-key data base file
  XCOMM somewhere other than the standard X11 library directory
! XCOMM XFIGLIBDIR =		/usr/local/lib/X11/xfig
  
  XCOMM use this if you want the multi-key data base file in the standard X11 tree
  XFIGLIBDIR =		$(LIBDIR)/xfig
--- 81,87 ----
  
  XCOMM use (and change) the following if you want the multi-key data base file
  XCOMM somewhere other than the standard X11 library directory
! XCOMM XFIGLIBDIR =		/XFree86/lib/X11/xfig
  
  XCOMM use this if you want the multi-key data base file in the standard X11 tree
  XFIGLIBDIR =		$(LIBDIR)/xfig
*** 1.1	1996/03/26 17:23:29
--- xfig/main.c	1996/03/26 17:28:28
***************
*** 262,270 ****
--- 262,279 ----
      /* we are not writing the figure to the bitmap */
      writing_bitmap = False;
  
+ #ifndef __EMX__
      /* get the TMPDIR environment variable for temporary files */
      if ((TMPDIR = getenv("XFIGTMPDIR"))==NULL)
  	TMPDIR = "/tmp";
+ #else
+     TMPDIR = getenv("XFIGTMPDIR");
+     if (!TMPDIR) TMPDIR = getenv("TMP");
+     if (!TMPDIR) TMPDIR = ".";
+     TMPDIR = strdup(TMPDIR);
+     for (i=0; i<strlen(TMPDIR); i++) 
+ 	if (TMPDIR[i]=='\\') TMPDIR[i]='/';
+ #endif
  
      (void) sprintf(tool_name, " XFIG %s patchlevel %s (Protocol %s)",
  		   FIG_VERSION, PATCHLEVEL, PROTOCOL_VERSION);
***************
*** 638,644 ****
--- 647,657 ----
      if (userhome != NULL && *strcpy(cut_buf_name, userhome) != '\0') {
  	strcat(cut_buf_name, "/.xfig");
      } else {
+ #ifndef __EMX__
  	sprintf(cut_buf_name, "%s%06d", "/tmp/xfig", getpid());
+ #else
+ 	sprintf(cut_buf_name, "%s/xfig%06d", TMPDIR, getpid());
+ #endif
      }
  
      if (filename == NULL)
*** 1.1	1996/03/22 23:26:45
--- xfig/object.h	1996/03/22 23:27:24
***************
*** 336,342 ****
  #define		O_ELLIPSE	1
  #define		O_POLYLINE	2
  #define		O_SPLINE	3
! #define		O_TEXT		4
  #define		O_ARC		5
  #define		O_COMPOUND	6
  #define		O_END_COMPOUND	-O_COMPOUND
--- 336,342 ----
  #define		O_ELLIPSE	1
  #define		O_POLYLINE	2
  #define		O_SPLINE	3
! #define		O_XTEXT		4
  #define		O_ARC		5
  #define		O_COMPOUND	6
  #define		O_END_COMPOUND	-O_COMPOUND
*** 1.1	1996/03/22 23:29:30
--- xfig/u_drag.c	1996/03/22 23:29:40
***************
*** 422,428 ****
  	clean_up();
  	set_lastposition(fix_x, fix_y);
  	set_newposition(x, y);
! 	set_action_object(F_MOVE, O_TEXT);
  	set_latesttext(new_t);
  	set_modifiedflag();
      }
--- 422,428 ----
  	clean_up();
  	set_lastposition(fix_x, fix_y);
  	set_newposition(x, y);
! 	set_action_object(F_MOVE, O_XTEXT);
  	set_latesttext(new_t);
  	set_modifiedflag();
      }
*** 1.1	1996/03/22 23:28:58
--- xfig/u_list.c	1996/03/22 23:29:14
***************
*** 282,288 ****
      list_delete_text(&objects.texts, old_t);
      clean_up();
      set_latesttext(old_t);
!     set_action_object(F_DELETE, O_TEXT);
      set_modifiedflag();
  }
  
--- 282,288 ----
      list_delete_text(&objects.texts, old_t);
      clean_up();
      set_latesttext(old_t);
!     set_action_object(F_DELETE, O_XTEXT);
      set_modifiedflag();
  }
  
***************
*** 348,354 ****
      list_add_text(&objects.texts, new_t);
      clean_up();
      set_latesttext(new_t);
!     set_action_object(F_ADD, O_TEXT);
      set_modifiedflag();
  }
  
--- 348,354 ----
      list_add_text(&objects.texts, new_t);
      clean_up();
      set_latesttext(new_t);
!     set_action_object(F_ADD, O_XTEXT);
      set_modifiedflag();
  }
  
***************
*** 423,429 ****
      clean_up();
      old_t->next = new_t;
      set_latesttext(old_t);
!     set_action_object(F_CHANGE, O_TEXT);
      set_modifiedflag();
  }
  
--- 423,429 ----
      clean_up();
      old_t->next = new_t;
      set_latesttext(old_t);
!     set_action_object(F_CHANGE, O_XTEXT);
      set_modifiedflag();
  }
  
*** 1.1	1996/04/03 18:12:38
--- xfig/u_print.c	1996/04/03 18:13:06
***************
*** 45,51 ****
--- 45,53 ----
      }
  
      for (cp = string, cp2 = buf; *cp; cp++) {
+ #ifndef __EMX__
  	*cp2++ = '\\';
+ #endif
  	*cp2++ = *cp;
      }
  
*** 1.1	1996/03/22 23:28:35
--- xfig/u_search.c	1996/03/22 23:28:50
***************
*** 309,315 ****
      case O_SPLINE:
  	toggle_splinehighlight(s);
  	break;
!     case O_TEXT:
  	toggle_texthighlight(t);
  	break;
      case O_ARC:
--- 309,315 ----
      case O_SPLINE:
  	toggle_splinehighlight(s);
  	break;
!     case O_XTEXT:
  	toggle_texthighlight(t);
  	break;
      case O_ARC:
***************
*** 376,382 ****
  	case O_SPLINE:
  	    found = next_spline_found(x, y, TOLERANCE, &px, &py, shift);
  	    break;
! 	case O_TEXT:
  	    found = next_text_found(x, y, TOLERANCE, &px, &py, shift);
  	    break;
  	case O_ARC:
--- 376,382 ----
  	case O_SPLINE:
  	    found = next_spline_found(x, y, TOLERANCE, &px, &py, shift);
  	    break;
! 	case O_XTEXT:
  	    found = next_text_found(x, y, TOLERANCE, &px, &py, shift);
  	    break;
  	case O_ARC:
***************
*** 400,409 ****
  	    s = NULL;
  	    break;
  	case O_SPLINE:
! 	    type = O_TEXT;
  	    t = NULL;
  	    break;
! 	case O_TEXT:
  	    type = O_ARC;
  	    a = NULL;
  	    break;
--- 400,409 ----
  	    s = NULL;
  	    break;
  	case O_SPLINE:
! 	    type = O_XTEXT;
  	    t = NULL;
  	    break;
! 	case O_XTEXT:
  	    type = O_ARC;
  	    a = NULL;
  	    break;
***************
*** 436,442 ****
  	case O_SPLINE:
  	    manipulate(s, type, x, y, px, py);
  	    break;
! 	case O_TEXT:
  	    manipulate(t, type, x, y, px, py);
  	    break;
  	case O_ARC:
--- 436,442 ----
  	case O_SPLINE:
  	    manipulate(s, type, x, y, px, py);
  	    break;
! 	case O_XTEXT:
  	    manipulate(t, type, x, y, px, py);
  	    break;
  	case O_ARC:
*** 1.1	1996/03/22 23:27:55
--- xfig/u_undo.c	1996/03/22 23:28:20
***************
*** 226,232 ****
  	change_ellipse(old_e, new_e);
  	redisplay_ellipses(new_e, old_e);
  	break;
!     case O_TEXT:
  	new_t = saved_objects.texts;
  	old_t = saved_objects.texts->next;
  	change_text(old_t, new_t);
--- 226,232 ----
  	change_ellipse(old_e, new_e);
  	redisplay_ellipses(new_e, old_e);
  	break;
!     case O_XTEXT:
  	new_t = saved_objects.texts;
  	old_t = saved_objects.texts->next;
  	change_text(old_t, new_t);
***************
*** 290,296 ****
  	list_delete_ellipse(&objects.ellipses, saved_objects.ellipses);
  	redisplay_ellipse(saved_objects.ellipses);
  	break;
!     case O_TEXT:
  	list_delete_text(&objects.texts, saved_objects.texts);
  	redisplay_text(saved_objects.texts);
  	break;
--- 290,296 ----
  	list_delete_ellipse(&objects.ellipses, saved_objects.ellipses);
  	redisplay_ellipse(saved_objects.ellipses);
  	break;
!     case O_XTEXT:
  	list_delete_text(&objects.texts, saved_objects.texts);
  	redisplay_text(saved_objects.texts);
  	break;
***************
*** 328,334 ****
  	list_add_ellipse(&objects.ellipses, saved_objects.ellipses);
  	redisplay_ellipse(saved_objects.ellipses);
  	break;
!     case O_TEXT:
  	list_add_text(&objects.texts, saved_objects.texts);
  	redisplay_text(saved_objects.texts);
  	break;
--- 328,334 ----
  	list_add_ellipse(&objects.ellipses, saved_objects.ellipses);
  	redisplay_ellipse(saved_objects.ellipses);
  	break;
!     case O_XTEXT:
  	list_add_text(&objects.texts, saved_objects.texts);
  	redisplay_text(saved_objects.texts);
  	break;
***************
*** 377,383 ****
  	redisplay_regions(xmin1, ymin1, xmax1, ymax1,
  			  xmin2, ymin2, xmax2, ymax2);
  	break;
!     case O_TEXT:
  	text_bound(saved_objects.texts, &xmin1, &ymin1, &xmax1, &ymax1,
  		&dum,&dum,&dum,&dum,&dum,&dum,&dum,&dum);
  	translate_text(saved_objects.texts, dx, dy);
--- 377,383 ----
  	redisplay_regions(xmin1, ymin1, xmax1, ymax1,
  			  xmin2, ymin2, xmax2, ymax2);
  	break;
!     case O_XTEXT:
  	text_bound(saved_objects.texts, &xmin1, &ymin1, &xmax1, &ymax1,
  		&dum,&dum,&dum,&dum,&dum,&dum,&dum,&dum);
  	translate_text(saved_objects.texts, dx, dy);
***************
*** 486,492 ****
  	    saved_objects.splines->next = NULL;
  	    free_spline(&saved_objects.splines);
  	    break;
! 	case O_TEXT:
  	    saved_objects.texts->next = NULL;
  	    free_text(&saved_objects.texts);
  	    break;
--- 486,492 ----
  	    saved_objects.splines->next = NULL;
  	    free_spline(&saved_objects.splines);
  	    break;
! 	case O_XTEXT:
  	    saved_objects.texts->next = NULL;
  	    free_text(&saved_objects.texts);
  	    break;
***************
*** 508,514 ****
  	case O_SPLINE:
  	    free_spline(&saved_objects.splines);
  	    break;
! 	case O_TEXT:
  	    free_text(&saved_objects.texts);
  	    break;
  	case O_ALL_OBJECT:
--- 508,514 ----
  	case O_SPLINE:
  	    free_spline(&saved_objects.splines);
  	    break;
! 	case O_XTEXT:
  	    free_text(&saved_objects.texts);
  	    break;
  	case O_ALL_OBJECT:
*** 1.1	1996/03/22 23:15:08
--- xfig/w_canvas.c	1996/03/22 23:40:02
***************
*** 485,495 ****
--- 485,504 ----
   */
  
       /* no / in name, make relative to XFIGLIBDIR */
+ #ifndef __EMX__
       if (strchr(appres.keyFile, '/') == NULL) {
  	 strcpy(line, XFIGLIBDIR);
  	 strcat(line, "/");
  	 strcat(line, appres.keyFile);
  	 }
+ #else
+      if (!(isalpha(appres.keyFile[0]) && appres.keyFile[1]==':') &&
+ 	 strncmp(appres.keyFile,"~/",2)) {
+ 	 strcpy(line, (char*)__XOS2RedirRoot(XFIGLIBDIR));
+ 	 strcat(line, "/");
+ 	 strcat(line, appres.keyFile);
+ 	 }
+ #endif
  
       /* expand the ~ to the user's home directory */
       else if (! strncmp(appres.keyFile, "~/", 2)) {
*** 1.1	1996/03/23 00:17:32
--- xfig/w_dir.c	1996/03/23 00:55:26
***************
*** 22,28 ****
   *	Digital Equipment Corporation
   *	treese@crl.dec.com
   *
!  *	$Source: /x11/xfig\xfig/RCS\w_dir.c,v $
   *
   *	    COPYRIGHT 1990
   *	  DIGITAL EQUIPMENT CORPORATION
--- 22,28 ----
   *	Digital Equipment Corporation
   *	treese@crl.dec.com
   *
!  *	$Source: /x11/xfig/xfig\RCS\w_dir.c,v $
   *
   *	    COPYRIGHT 1990
   *	  DIGITAL EQUIPMENT CORPORATION
***************
*** 513,521 ****
      char	   *p;
      char	    ndir[PATH_MAX], tmpdir[PATH_MAX];
  
-     
      strcpy(ndir, cur_dir);
      if (dir != NULL && dir[0] != '/') { /* relative path, prepend current dir */
  	if (dir[strlen(dir) - 1] == '/')
  	    dir[strlen(dir) - 1] = '\0';
  	if (!strcmp(dir, "..")) {	/* Parent directory. */
--- 513,524 ----
      char	   *p;
      char	    ndir[PATH_MAX], tmpdir[PATH_MAX];
  
      strcpy(ndir, cur_dir);
+ #ifndef __EMX__
      if (dir != NULL && dir[0] != '/') { /* relative path, prepend current dir */
+ #else
+     if (dir && !(isalpha(dir[0]) && dir[1]==':')) { /* does not start with "C:" */
+ #endif
  	if (dir[strlen(dir) - 1] == '/')
  	    dir[strlen(dir) - 1] = '\0';
  	if (!strcmp(dir, "..")) {	/* Parent directory. */
***************
*** 534,539 ****
--- 537,543 ----
      } else {
  	strcpy(ndir, dir);		/* abs path copy to ndir */
      }
+ 
      strcpy(tmpdir, cur_dir);		/* save cur_dir in case ndir is bad */
      strcpy(cur_dir, ndir);
      if (change_directory(cur_dir) != 0 ) {
