[BACK]Return to fep+NetBSD-OpenXM.diff CVS log [TXT][DIR] Up to [local] / OpenXM_contrib2 / fep

File: [local] / OpenXM_contrib2 / fep / fep+NetBSD-OpenXM.diff (download)

Revision 1.2, Wed Sep 18 10:03:27 2002 UTC (21 years, 7 months ago) by noro
Branch: MAIN
CVS Tags: R_1_3_1-2, RELEASE_1_3_1_13b, RELEASE_1_2_3_12, RELEASE_1_2_3, RELEASE_1_2_2_KNOPPIX_b, RELEASE_1_2_2_KNOPPIX, RELEASE_1_2_2, KNOPPIX_2006, HEAD, DEB_REL_1_2_3-9
Changes since 1.1: +182 -124 lines

Patch for making fep on Solaris.

diff -cr fep.orig/Makefile fep/Makefile
*** fep.orig/Makefile	Wed Sep 18 18:48:24 2002
--- fep/Makefile	Tue Sep  3 09:41:43 2002
***************
*** 25,35 ****
  #DEBUG	= -O
  
  CFLAGS	+= $(DEBUG) $(CONFIG)
- .if exists(/usr/lib/libcompat.a)
- LDFLAGS = -ltermcap -lcompat
- .else
  LDFLAGS = -ltermcap
- .endif
  
  all: $(TARGET)
  
--- 25,31 ----
Only in fep: fep
Only in fep: fep+NetBSD-OpenXM.diff
diff -cr fep.orig/fep_alias.c fep/fep_alias.c
*** fep.orig/fep_alias.c	Wed Sep 18 18:48:25 2002
--- fep/fep_alias.c	Tue Sep  3 09:41:44 2002
***************
*** 3,9 ****
  #ifndef lint
  static char rcsid[]=
  "$Header: fep_alias.c,v 4.2 88/11/13 15:50:52 utashiro Exp $ (SRA)";
! #endif lint
  
  #include <stdio.h>
  #include <ctype.h>
--- 3,9 ----
  #ifndef lint
  static char rcsid[]=
  "$Header: fep_alias.c,v 4.2 88/11/13 15:50:52 utashiro Exp $ (SRA)";
! #endif /* lint */
  
  #include <stdio.h>
  #include <ctype.h>
Only in fep: fep_alias.o
diff -cr fep.orig/fep_com.c fep/fep_com.c
*** fep.orig/fep_com.c	Wed Sep 18 18:48:26 2002
--- fep/fep_com.c	Wed Sep 18 18:44:20 2002
***************
*** 3,15 ****
  #ifndef lint
  static char rcsid[]=
  "$Header: fep_com.c,v 4.9 91/05/29 14:30:43 utashiro Exp $ (SRA)";
! #endif lint
  
  #include <stdio.h>
  #include <sys/ioctl.h>
  #ifdef TERMIOS
  #include <termios.h>
! #ifdef __linux__
  #ifndef _POSIX_VDISABLE
  #define _POSIX_VDISABLE '\0'
  #endif
--- 3,15 ----
  #ifndef lint
  static char rcsid[]=
  "$Header: fep_com.c,v 4.9 91/05/29 14:30:43 utashiro Exp $ (SRA)";
! #endif /* lint */
  
  #include <stdio.h>
  #include <sys/ioctl.h>
  #ifdef TERMIOS
  #include <termios.h>
! #if defined(__linux__) || defined(__CYGWIN__)
  #ifndef _POSIX_VDISABLE
  #define _POSIX_VDISABLE '\0'
  #endif
***************
*** 22,27 ****
--- 22,30 ----
  #include <sys/file.h>
  #include <sys/stat.h>
  #include <sys/ioctl.h>
+ #if defined(sun)
+ #include <sys/fcntl.h>
+ #endif
  #include "fep_defs.h"
  #include "fep_glob.h"
  #include "fep_funcs.h"
Only in fep: fep_com.o
diff -cr fep.orig/fep_defs.h fep/fep_defs.h
*** fep.orig/fep_defs.h	Wed Sep 18 18:48:27 2002
--- fep/fep_defs.h	Tue Sep  3 09:41:44 2002
***************
*** 3,9 ****
  #ifndef lint
  # define FEP_DEFS \
      "$Header: /home/mmb/utashiro/src/fep/RCS/fep_defs.h,v 4.3 1989/01/06 10:07:29 utashiro Exp $ (SRA)"
! #endif lint
  
  #define	MAXCMDLEN		512	/* maximum command length */
  #define MAXARGS			64	/* maximum number of arguments */
--- 3,9 ----
  #ifndef lint
  # define FEP_DEFS \
      "$Header: /home/mmb/utashiro/src/fep/RCS/fep_defs.h,v 4.3 1989/01/06 10:07:29 utashiro Exp $ (SRA)"
! #endif /* lint */
  
  #define	MAXCMDLEN		512	/* maximum command length */
  #define MAXARGS			64	/* maximum number of arguments */
***************
*** 31,51 ****
  # define isctlchar(c)	(c && !iskanji(c) && (!(c&0140) || c=='\177'))
  # define iswordchar(c)	(c && (iskanji(c) || isalnum(c) || iscntrl(c)))
  # define isWordchar(c)	((c) && !isspace((c)))
! #else KANJI
  # define isctlchar(c)	(c && (!(c&0140) || c=='\177'))
  # define iswordchar(c)	(isalnum(c) || iscntrl(c))
  # define isWordchar(c)	((c) && !isspace((c)))
! #endif KANJI
  #define unctl(c)	(((c)=='\177') ? '?' : ((c) >= 040) ? (c) : (c)|0100)
  #define toctrl(c)	((c)&~0100)
  #define ctrl(c)		((c)&037)
  
  #define	INDIRECTED	(1<<(sizeof(char*)*8-1))
  			/* this is actually 0x80000000 on 32 bit machine,
  			that addresses kernel address space */
  #define isIndirect(f)	((u_int)(f)&(u_int)INDIRECTED)
  #define setIndirect(f)	(FUNC)((u_int)(f)|(u_int)INDIRECTED)
  #define	maskIndirect(f)	(FUNC *)((u_int)(f)&~(u_int)INDIRECTED)
  
  /*
   * Type of character
--- 31,58 ----
  # define isctlchar(c)	(c && !iskanji(c) && (!(c&0140) || c=='\177'))
  # define iswordchar(c)	(c && (iskanji(c) || isalnum(c) || iscntrl(c)))
  # define isWordchar(c)	((c) && !isspace((c)))
! #else /* KANJI */
  # define isctlchar(c)	(c && (!(c&0140) || c=='\177'))
  # define iswordchar(c)	(isalnum(c) || iscntrl(c))
  # define isWordchar(c)	((c) && !isspace((c)))
! #endif /* KANJI */
  #define unctl(c)	(((c)=='\177') ? '?' : ((c) >= 040) ? (c) : (c)|0100)
  #define toctrl(c)	((c)&~0100)
  #define ctrl(c)		((c)&037)
  
+ #if defined(__alpha)
+ #define INDIRECTED      (((u_long)1)<<63)
+ #define isIndirect(f)   ((u_long)(f)&(u_long)INDIRECTED)
+ #define setIndirect(f)  (FUNC)((u_long)(f)|(u_long)INDIRECTED)
+ #define maskIndirect(f) (FUNC *)((u_long)(f)&~(u_long)INDIRECTED)
+ #else
  #define	INDIRECTED	(1<<(sizeof(char*)*8-1))
  			/* this is actually 0x80000000 on 32 bit machine,
  			that addresses kernel address space */
  #define isIndirect(f)	((u_int)(f)&(u_int)INDIRECTED)
  #define setIndirect(f)	(FUNC)((u_int)(f)|(u_int)INDIRECTED)
  #define	maskIndirect(f)	(FUNC *)((u_int)(f)&~(u_int)INDIRECTED)
+ #endif
  
  /*
   * Type of character
***************
*** 53,69 ****
  #ifdef KANJI
  # define CHAR		unsigned char
  # define CHARMASK	0377
! #else KANJI
  # define CHAR		char
  # define CHARMASK	0177
! #endif KANJI
  
  /*
   * Only one machine I know alloca() works is vax.
   */
  #ifdef vax
  # define ALLOCA
! #endif vax
  
  /*
   * Typedef's
--- 60,76 ----
  #ifdef KANJI
  # define CHAR		unsigned char
  # define CHARMASK	0377
! #else /* KANJI */
  # define CHAR		char
  # define CHARMASK	0177
! #endif /* KANJI */
  
  /*
   * Only one machine I know alloca() works is vax.
   */
  #ifdef vax
  # define ALLOCA
! #endif /* vax */
  
  /*
   * Typedef's
diff -cr fep.orig/fep_edit.c fep/fep_edit.c
*** fep.orig/fep_edit.c	Wed Sep 18 18:48:28 2002
--- fep/fep_edit.c	Wed Sep 18 18:43:52 2002
***************
*** 3,9 ****
  #ifndef lint
  static char rcsid[]=
  "$Id: fep_edit.c,v 4.10 1995/01/20 08:15:55 utashiro Exp $ (SRA)";
! #endif lint
  
  #include <stdio.h>
  #include <sys/types.h>
--- 3,9 ----
  #ifndef lint
  static char rcsid[]=
  "$Id: fep_edit.c,v 4.10 1995/01/20 08:15:55 utashiro Exp $ (SRA)";
! #endif /* lint */
  
  #include <stdio.h>
  #include <sys/types.h>
***************
*** 11,17 ****
  #include <sys/ioctl.h>
  #ifdef TERMIOS
  #include <termios.h>
! #ifdef __linux__
  #ifndef _POSIX_VDISABLE
  #define _POSIX_VDISABLE '\0'
  #endif
--- 11,17 ----
  #include <sys/ioctl.h>
  #ifdef TERMIOS
  #include <termios.h>
! #if defined(__linux__) || defined(__CYGWIN__)
  #ifndef _POSIX_VDISABLE
  #define _POSIX_VDISABLE '\0'
  #endif
***************
*** 21,27 ****
--- 21,36 ----
  #endif
  #include <sys/time.h>
  #include <ctype.h>
+ #if defined(__CYGWIN__)
+ #include <sys/dirent.h>
+ #define direct dirent
+ #elif defined(sun)
+ #include <dirent.h>
+ #define direct dirent
+ #include <unistd.h>
+ #else
  #include <sys/dir.h>
+ #endif
  #include <sys/file.h>
  #include <setjmp.h>
  #include "fep_defs.h"
***************
*** 207,213 ****
--- 216,229 ----
      import (cft, initial_ttymode.c_cc[VSTART], ignore);
      import (cft, initial_ttymode.c_cc[VSTOP], ignore);
      */
+ #if 0
      import (cft, initial_ttymode.c_cc[VINTR], insert_and_flush);
+ #else
+ 	/* added by noro */
+     import (cft, initial_ttymode.c_cc[VINTR], send_int_sig);
+ 	/* XXX : this may not be necessary */
+     import (aft, initial_ttymode.c_cc[VINTR], send_int_sig);
+ #endif
      import (cft, initial_ttymode.c_cc[VQUIT], insert_and_flush);
      /* Now, EOF will be sent on empty line.
      import (cft, initial_ttymode.c_cc[VEOF], send_eof);
***************
*** 230,236 ****
--- 246,257 ----
      import (cft, tchars_buf.t_startc, ignore);
      import (cft, tchars_buf.t_stopc, ignore);
      */
+ #if 0
      import (cft, tchars_buf.t_intrc, insert_and_flush);
+ #else
+     import (cft, tchars_buf.t_intrc, send_int_sig);
+     import (aft, tchars_buf.t_intrc, send_int_sig);
+ #endif
      import (cft, tchars_buf.t_quitc, insert_and_flush);
      /* Now, EOF will be sent on empty line.
      import (cft, tchars_buf.t_eofc, send_eof);
***************
*** 461,467 ****
      register int i, nbyte = 1, currentNull;
  #ifdef KANJI
      CHAR byte2;
! #endif KANJI
  
      currentNull = strlen (CommandLine);
  
--- 482,488 ----
      register int i, nbyte = 1, currentNull;
  #ifdef KANJI
      CHAR byte2;
! #endif /* KANJI */
  
      currentNull = strlen (CommandLine);
  
***************
*** 480,486 ****
  	nbyte = 2;
      }
      else
! #endif KANJI
  	putChar (c);
      reverse_strcpy (
  	&CommandLine[CurrentPosition] + nbyte,
--- 501,507 ----
  	nbyte = 2;
      }
      else
! #endif /* KANJI */
  	putChar (c);
      reverse_strcpy (
  	&CommandLine[CurrentPosition] + nbyte,
***************
*** 492,498 ****
      if (nbyte > 1) {
  	CommandLine[CurrentPosition - 1] = byte2;
      }
! #endif KANJI
      printS (&CommandLine [CurrentPosition]);
  
      if (CommandLine[CurrentPosition] != '\0') {
--- 513,519 ----
      if (nbyte > 1) {
  	CommandLine[CurrentPosition - 1] = byte2;
      }
! #endif /* KANJI */
      printS (&CommandLine [CurrentPosition]);
  
      if (CommandLine[CurrentPosition] != '\0') {
***************
*** 596,602 ****
  #ifdef KANJI
  	    && !(CurrentPosition + 1 == position
  		    && iskanji (CommandLine[CurrentPosition]))
! #endif KANJI
  	)
  	    (void) forward_n_character (1);
  }
--- 617,623 ----
  #ifdef KANJI
  	    && !(CurrentPosition + 1 == position
  		    && iskanji (CommandLine[CurrentPosition]))
! #endif /* KANJI */
  	)
  	    (void) forward_n_character (1);
  }
***************
*** 620,629 ****
  #ifdef KANJI
  #define INC(i) if(iskanji(CommandLine[i])) i+=2; else i++;
  #define DEC(i) if(i>=2 && iskanji_in_string(CommandLine, i-2)) i-=2; else i--;
! #else KANJI
  #define INC(i) i++
  #define DEC(i) i--
! #endif KANJI
  
  /*
   * Move cursor to end of line
--- 641,650 ----
  #ifdef KANJI
  #define INC(i) if(iskanji(CommandLine[i])) i+=2; else i++;
  #define DEC(i) if(i>=2 && iskanji_in_string(CommandLine, i-2)) i-=2; else i--;
! #else /* KANJI */
  #define INC(i) i++
  #define DEC(i) i--
! #endif /* KANJI */
  
  /*
   * Move cursor to end of line
***************
*** 681,687 ****
  	    i--;
  	}
  	else
! #endif KANJI
  	putchar (BS);
  	i--;
      }
--- 702,708 ----
  	    i--;
  	}
  	else
! #endif /* KANJI */
  	putchar (BS);
  	i--;
      }
***************
*** 736,742 ****
  	    nchars++;
  	}
      }
! #else KANJI
      while (n--) {
  	i--, nchars++;
  	while (i > 0 && !iswordchar (CommandLine [i])) {
--- 757,763 ----
  	    nchars++;
  	}
      }
! #else /* KANJI */
      while (n--) {
  	i--, nchars++;
  	while (i > 0 && !iswordchar (CommandLine [i])) {
***************
*** 746,752 ****
  	    i--, nchars++;
  	}
      }
! #endif KANJI
      return (backward_n_character (nchars));
  }
  
--- 767,773 ----
  	    i--, nchars++;
  	}
      }
! #endif /* KANJI */
      return (backward_n_character (nchars));
  }
  
***************
*** 797,803 ****
  	    nchars++;
  	}
      }
! #else KANJI
      while (n--) {
  	i--, nchars++;
  	while (i > 0 && !isWordchar (CommandLine [i]))
--- 818,824 ----
  	    nchars++;
  	}
      }
! #else /* KANJI */
      while (n--) {
  	i--, nchars++;
  	while (i > 0 && !isWordchar (CommandLine [i]))
***************
*** 805,811 ****
  	while (i > 0 && isWordchar (CommandLine [i - 1]))
  	    i--, nchars++;
      }
! #endif KANJI
      return (backward_n_character (nchars));
  }
  
--- 826,832 ----
  	while (i > 0 && isWordchar (CommandLine [i - 1]))
  	    i--, nchars++;
      }
! #endif /* KANJI */
      return (backward_n_character (nchars));
  }
  
***************
*** 843,849 ****
  	(void) putchar (CommandLine[i++]);
      }
      else
! #endif KANJI
      if (isctlchar(CommandLine[i])) {
  	(void) putchar (unctl (CommandLine [i]));
  	i++;
--- 864,870 ----
  	(void) putchar (CommandLine[i++]);
      }
      else
! #endif /* KANJI */
      if (isctlchar(CommandLine[i])) {
  	(void) putchar (unctl (CommandLine [i]));
  	i++;
***************
*** 858,864 ****
  	    (void) putchar (CommandLine[i++]);
  	}
  	else
! #endif KANJI
  	putChar (CommandLine [i++]);
      }
  
--- 879,885 ----
  	    (void) putchar (CommandLine[i++]);
  	}
  	else
! #endif /* KANJI */
  	putChar (CommandLine [i++]);
      }
  
***************
*** 1039,1047 ****
  	    i -= 2, nbyte += 2;
  	else
  	    i -= 1, nbyte += 1;
! #else KANJI
      nbyte = n;
! #endif KANJI
  
      deleteArea = howlong (&CommandLine[CurrentPosition - nbyte], nbyte);
      restArea = howlong (&CommandLine[CurrentPosition], 0);
--- 1060,1068 ----
  	    i -= 2, nbyte += 2;
  	else
  	    i -= 1, nbyte += 1;
! #else /* KANJI */
      nbyte = n;
! #endif /* KANJI */
  
      deleteArea = howlong (&CommandLine[CurrentPosition - nbyte], nbyte);
      restArea = howlong (&CommandLine[CurrentPosition], 0);
***************
*** 1114,1120 ****
  	    nchars++;
  	}
      }
! #else KANJI
      while (n--) {
  	i--, nchars++;
  	while (i > 0 && !iswordchar (CommandLine [i]))
--- 1135,1141 ----
  	    nchars++;
  	}
      }
! #else /* KANJI */
      while (n--) {
  	i--, nchars++;
  	while (i > 0 && !iswordchar (CommandLine [i]))
***************
*** 1122,1128 ****
  	while (i > 0 && iswordchar (CommandLine [i - 1]))
  	    i--, nchars++;
      }
! #endif KANJI
  
      return (delete_previous_n_character (nchars));
  }
--- 1143,1149 ----
  	while (i > 0 && iswordchar (CommandLine [i - 1]))
  	    i--, nchars++;
      }
! #endif /* KANJI */
  
      return (delete_previous_n_character (nchars));
  }
***************
*** 1175,1181 ****
  	    nchars++;
  	}
      }
! #else KANJI
      while (n--) {
  	i--, nchars++;
  	while (i > 0 && !isWordchar (CommandLine [i]))
--- 1196,1202 ----
  	    nchars++;
  	}
      }
! #else /* KANJI */
      while (n--) {
  	i--, nchars++;
  	while (i > 0 && !isWordchar (CommandLine [i]))
***************
*** 1183,1189 ****
  	while (i > 0 && isWordchar (CommandLine [i - 1]))
  	    i--, nchars++;
      }
! #endif KANJI
  
      return (delete_previous_n_character (nchars));
  }
--- 1204,1210 ----
  	while (i > 0 && isWordchar (CommandLine [i - 1]))
  	    i--, nchars++;
      }
! #endif /* KANJI */
  
      return (delete_previous_n_character (nchars));
  }
***************
*** 1222,1230 ****
  	    else
  		cp++, nbyte++;
      }
! #else KANJI
      nbyte = n;
! #endif KANJI
  
      deleteArea = howlong (&CommandLine[CurrentPosition], nbyte);
      restArea = howlong (&CommandLine[CurrentPosition + nbyte], 0);
--- 1243,1251 ----
  	    else
  		cp++, nbyte++;
      }
! #else /* KANJI */
      nbyte = n;
! #endif /* KANJI */
  
      deleteArea = howlong (&CommandLine[CurrentPosition], nbyte);
      restArea = howlong (&CommandLine[CurrentPosition + nbyte], 0);
***************
*** 1781,1789 ****
  
  # ifdef ALLOCA
    	    fcp = (char *) alloca (strlen (dp->d_name) + 1);
! # else ALLOCA
    	    fcp = (char *) malloc (strlen (dp->d_name) + 1);
! # endif ALLOCA
  	    if (fcp == 0) {
  		fputs ("\r\n", stdout);
  		perror ("alloca:");
--- 1802,1810 ----
  
  # ifdef ALLOCA
    	    fcp = (char *) alloca (strlen (dp->d_name) + 1);
! # else /* ALLOCA */
    	    fcp = (char *) malloc (strlen (dp->d_name) + 1);
! # endif /* ALLOCA */
  	    if (fcp == 0) {
  		fputs ("\r\n", stdout);
  		perror ("alloca:");
***************
*** 1844,1850 ****
  # ifndef ALLOCA
      for (i = 0; fileList [i]; i++)
  	free (fileList [i]);
! # endif ALLOCA
  
      closedir(dirp);
      return (0);
--- 1865,1871 ----
  # ifndef ALLOCA
      for (i = 0; fileList [i]; i++)
  	free (fileList [i]);
! # endif /* ALLOCA */
  
      closedir(dirp);
      return (0);
***************
*** 1972,1980 ****
  	if (prefix (prefixstring, dp->d_name)) {
  # ifdef ALLOCA
    	    fcp = (char *) alloca (strlen (dp->d_name) + 1);
! # else ALLOCA
    	    fcp = (char *) malloc (strlen (dp->d_name) + 1);
! # endif ALLOCA
  	    if (fcp == 0) {
  		fputs ("\r\n", stdout);
  		perror ("alloca:");
--- 1993,2001 ----
  	if (prefix (prefixstring, dp->d_name)) {
  # ifdef ALLOCA
    	    fcp = (char *) alloca (strlen (dp->d_name) + 1);
! # else /* ALLOCA */
    	    fcp = (char *) malloc (strlen (dp->d_name) + 1);
! # endif /* ALLOCA */
  	    if (fcp == 0) {
  		fputs ("\r\n", stdout);
  		perror ("alloca:");
***************
*** 2018,2024 ****
  # ifndef ALLOCA
      for (i = 0; fileList [i]; i++)
  	free (fileList [i]);
! # endif ALLOCA
      return;
  }
  
--- 2039,2045 ----
  # ifndef ALLOCA
      for (i = 0; fileList [i]; i++)
  	free (fileList [i]);
! # endif /* ALLOCA */
      return;
  }
  
***************
*** 2065,2071 ****
  	fputs ("\n", stdout);
      }
  }
! #endif RINFO
  
  bind_key (ft, func, s, dfunc)
      FUNC ft[];		/* Function table */
--- 2086,2092 ----
  	fputs ("\n", stdout);
      }
  }
! #endif /* RINFO */
  
  bind_key (ft, func, s, dfunc)
      FUNC ft[];		/* Function table */
Only in fep: fep_edit.o
diff -cr fep.orig/fep_funcs.c fep/fep_funcs.c
*** fep.orig/fep_funcs.c	Wed Sep 18 18:48:28 2002
--- fep/fep_funcs.c	Tue Sep  3 09:41:44 2002
***************
*** 3,9 ****
  #ifndef lint
  static char rcsid[]=
  "$Header: fep_funcs.c,v 4.5 91/05/29 14:31:01 utashiro Exp $ (SRA)";
! #endif lint
  
  #include <stdio.h>
  #include "fep_defs.h"
--- 3,9 ----
  #ifndef lint
  static char rcsid[]=
  "$Header: fep_funcs.c,v 4.5 91/05/29 14:31:01 utashiro Exp $ (SRA)";
! #endif /* lint */
  
  #include <stdio.h>
  #include "fep_defs.h"
diff -cr fep.orig/fep_funcs.h fep/fep_funcs.h
*** fep.orig/fep_funcs.h	Wed Sep 18 18:48:29 2002
--- fep/fep_funcs.h	Wed Sep 18 18:39:29 2002
***************
*** 3,9 ****
  #ifndef lint
  # define FEP_FUNCS \
      "$Header: fep_funcs.h,v 4.5 91/05/29 14:31:03 utashiro Exp $ (SRA)"
! #endif lint
  
  /*
   * command line edit functions
--- 3,9 ----
  #ifndef lint
  # define FEP_FUNCS \
      "$Header: fep_funcs.h,v 4.5 91/05/29 14:31:03 utashiro Exp $ (SRA)"
! #endif /* lint */
  
  /*
   * command line edit functions
***************
*** 22,28 ****
--- 22,33 ----
  int	delete_previous_word();
  int	delete_previous_Word();
  int	delete_to_kill_buffer();
+ #if defined(__CYGWIN__) || defined(sun)
+ void	terminate(int);
+ #else
  void	terminate __P((int));
+ #endif
+ int send_int_sig();
  int	end_of_line();
  int	expand_file_name();
  int	forward_character();
Only in fep: fep_funcs.o
diff -cr fep.orig/fep_glob.h fep/fep_glob.h
*** fep.orig/fep_glob.h	Wed Sep 18 18:48:29 2002
--- fep/fep_glob.h	Tue Sep  3 09:41:44 2002
***************
*** 3,9 ****
  #ifndef lint
  # define FEP_GLOB \
      "$Header: fep_glob.h,v 4.1 88/08/28 14:36:41 utashiro Exp $ (SRA)"
! #endif lint
  
  extern FUNC	*curFuncTab;	/* function table */
  extern FUNC	*altFuncTab;	/* altanative function table */
--- 3,9 ----
  #ifndef lint
  # define FEP_GLOB \
      "$Header: fep_glob.h,v 4.1 88/08/28 14:36:41 utashiro Exp $ (SRA)"
! #endif /* lint */
  
  extern FUNC	*curFuncTab;	/* function table */
  extern FUNC	*altFuncTab;	/* altanative function table */
diff -cr fep.orig/fep_hist.c fep/fep_hist.c
*** fep.orig/fep_hist.c	Wed Sep 18 18:48:30 2002
--- fep/fep_hist.c	Tue Sep  3 09:41:44 2002
***************
*** 3,9 ****
  #ifndef lint
  static char rcsid[]=
  "$Header: fep_hist.c,v 4.3 88/11/25 20:45:25 utashiro Exp $ (SRA)";
! #endif lint
  
  #include <stdio.h>
  #include <stdlib.h>
--- 3,9 ----
  #ifndef lint
  static char rcsid[]=
  "$Header: fep_hist.c,v 4.3 88/11/25 20:45:25 utashiro Exp $ (SRA)";
! #endif /* lint */
  
  #include <stdio.h>
  #include <stdlib.h>
***************
*** 12,17 ****
--- 12,22 ----
  #include "fep_defs.h"
  #include "fep_glob.h"
  #include "fep_funcs.h"
+ 
+ #if defined(__FreeBSD__) || defined(__CYGWIN__)
+ #define re_comp regcomp
+ #define re_exec regexec
+ #endif
  
  char	**HistoryTable;
  int	TopOfHist;
Only in fep: fep_hist.o
diff -cr fep.orig/fep_main.c fep/fep_main.c
*** fep.orig/fep_main.c	Wed Sep 18 18:48:31 2002
--- fep/fep_main.c	Wed Sep 18 18:45:26 2002
***************
*** 3,18 ****
  #ifndef lint
  static char rcsid[]=
  "$Id: fep_main.c,v 4.11 1993/06/10 02:51:28 utashiro Exp $ (SRA)";
! #endif lint
  
  #include <stdio.h>
  #include <signal.h>
  #include <sys/types.h>
  #include <sys/stat.h>
  #include <sys/ioctl.h>
  #ifdef TERMIOS
  #include <termios.h>
! #ifdef __linux__
  #ifndef _POSIX_VDISABLE
  #define _POSIX_VDISABLE '\0'
  #endif
--- 3,22 ----
  #ifndef lint
  static char rcsid[]=
  "$Id: fep_main.c,v 4.11 1993/06/10 02:51:28 utashiro Exp $ (SRA)";
! #endif /* lint */
  
  #include <stdio.h>
  #include <signal.h>
  #include <sys/types.h>
  #include <sys/stat.h>
  #include <sys/ioctl.h>
+ #if defined(sun)
+ #include <sys/fcntl.h>
+ #include <sys/ttold.h>
+ #endif
  #ifdef TERMIOS
  #include <termios.h>
! #if defined(__linux__) || defined(__CYGWIN__)
  #ifndef _POSIX_VDISABLE
  #define _POSIX_VDISABLE '\0'
  #endif
***************
*** 39,45 ****
  #ifdef STAT
    static char fep_statrc[] = FEP_STAT;
  #endif
! #endif lint
  
  char	*myself;			/* the command name */
  char	*prompt = "";			/* prompt string */
--- 43,49 ----
  #ifdef STAT
    static char fep_statrc[] = FEP_STAT;
  #endif
! #endif /* lint */
  
  char	*myself;			/* the command name */
  char	*prompt = "";			/* prompt string */
***************
*** 57,63 ****
--- 61,71 ----
  int	debug = OFF;			/* debug switch */
  int	auto_tty_fix = ON;		/* fix tty mode automaticaly */
  FILE	*script_fp = NULL;		/* script file pointer */
+ #if defined(sun)
+ void	catchsig (int);		/* function take care SIGCHILD */
+ #else
  void	catchsig __P((int));		/* function take care SIGCHILD */
+ #endif
  
  #ifdef TERMIOS
  #define ttystruct termios
***************
*** 72,78 ****
--- 80,90 ----
  int	columns;			/* terminal coulumn size */
  char	*term_clear;			/* terminal clear code */
  
+ #if defined(sun)
+ void	(*sighup)(int), (*sigchld)(int), (*sigtstp)(int);
+ #else
  void	(*sighup) __P((int)), (*sigchld) __P((int)), (*sigtstp) __P((int));
+ #endif
  					/* function buffer for signal */
  
  #ifdef TIOCSETN
***************
*** 84,90 ****
  #ifdef KANJI
  struct	jtchars jtchars_buf;		/* kanji tty characters */
  int	kmode_buf;			/* kanji mode */
! #endif KANJI
  
  char	master_tty[16];			/* master tty name */
  char	slave_tty[16];			/* slave tty name */
--- 96,102 ----
  #ifdef KANJI
  struct	jtchars jtchars_buf;		/* kanji tty characters */
  int	kmode_buf;			/* kanji mode */
! #endif /* KANJI */
  
  char	master_tty[16];			/* master tty name */
  char	slave_tty[16];			/* slave tty name */
***************
*** 296,307 ****
--- 308,324 ----
  fix_signal ()
  {
  #ifdef SIGWINCH
+ #if defined(sun)
+     void sigwinch (int);
+ #else
      void sigwinch __P((int));
  #endif
+ #endif
  
      sighup = signal (SIGHUP, terminate);
      sigchld = signal (SIGCHLD, catchsig);
      sigtstp = signal (SIGTSTP, SIG_IGN);    
+     signal (SIGINT, (void(*)())send_int_sig);
  #ifdef SIGWINCH
      (void) signal(SIGWINCH, sigwinch);
  #endif
***************
*** 685,691 ****
--- 702,710 ----
       */
      t = open ("/dev/tty", 2);
      if (t >= 0) {
+ #ifndef __CYGWIN32__
  	ioctl (t, TIOCNOTTY, (char *) 0);
+ #endif
  	(void) close (t);
      }
  
***************
*** 818,823 ****
--- 837,849 ----
      exit (0);
  }
  
+ send_int_sig() {
+ #ifndef __CYGWIN__
+     kill(child_pid,SIGINT);
+ #endif
+ 	return 0;
+ }
+ 
  get_pty_master()
  {
      char    c;
***************
*** 850,856 ****
  	    }
  	}
      }
! 
      /*
       * Can't get master tty
       */
--- 876,882 ----
  	    }
  	}
      }
! #endif
      /*
       * Can't get master tty
       */
***************
*** 889,895 ****
  # if defined(TIOCKGETC) && defined(TIOCKSETC)
      ioctl (0, TIOCKGETC, (char *) &jtchars_buf);
  # endif
! #endif KANJI
  
      FD_ZERO(&stdinmask);
      FD_ZERO(&mastermask);
--- 915,921 ----
  # if defined(TIOCKGETC) && defined(TIOCKSETC)
      ioctl (0, TIOCKGETC, (char *) &jtchars_buf);
  # endif
! #endif /* KANJI */
  
      FD_ZERO(&stdinmask);
      FD_ZERO(&mastermask);
***************
*** 928,934 ****
  # if defined(TIOCKGETC) && defined(TIOCKSETC)
      ioctl (slave, TIOCKSETC, (char *) &jtchars_buf);
  # endif
! #endif KANJI
  
  #ifdef TIOCSWINSZ
      {
--- 954,960 ----
  # if defined(TIOCKGETC) && defined(TIOCKSETC)
      ioctl (slave, TIOCKSETC, (char *) &jtchars_buf);
  # endif
! #endif /* KANJI */
  
  #ifdef TIOCSWINSZ
      {
***************
*** 955,962 ****
--- 981,994 ----
  suspend()
  {
      long	pid;
+ #if defined(sun)
+     void	(*func) (int);
+ #else
      void	(*func) __P((int));
+ #endif
+ #ifndef __CYGWIN32__
      int		omask;
+ #endif
      extern int	errno;
  
      pid = getpid ();
***************
*** 965,971 ****
--- 997,1005 ----
      signal (SIGTSTP, SIG_DFL);
      recover_tty();
  #define	mask(s)	(1 << ((s)-1))
+ #if !defined(__CYGWIN32__) && !defined(sun)
      omask = sigsetmask (sigblock (0) & ~mask (SIGTSTP));
+ #endif
      kill (0, SIGTSTP);
  
      if (kill (child_pid, SIGCONT) < 0 && errno == ESRCH) {
***************
*** 976,982 ****
--- 1010,1018 ----
      kill (0, SIGCONT);
      signal (SIGCHLD, func);
      signal (SIGTSTP, SIG_IGN);
+ #if !defined(__CYGWIN32__) && !defined(sun)
      sigblock (mask (SIGTSTP));
+ #endif
      fix_tty ();
      if (look_var ("auto-repaint"))
  	fep_repaint(0);
Only in fep.orig: fep_main.c.rej
Only in fep: fep_main.o
diff -cr fep.orig/fep_set.c fep/fep_set.c
*** fep.orig/fep_set.c	Wed Sep 18 18:48:31 2002
--- fep/fep_set.c	Tue Sep  3 09:41:44 2002
***************
*** 3,9 ****
  #ifndef lint
  static char rcsid[]=
  "$Header: fep_set.c,v 4.3 91/05/29 14:31:08 utashiro Exp $ (SRA)";
! #endif lint
  
  #include <stdio.h>
  #include "fep_defs.h"
--- 3,9 ----
  #ifndef lint
  static char rcsid[]=
  "$Header: fep_set.c,v 4.3 91/05/29 14:31:08 utashiro Exp $ (SRA)";
! #endif /* lint */
  
  #include <stdio.h>
  #include "fep_defs.h"
***************
*** 67,76 ****
  #ifdef HASH
  #define HASHNUM	10
  VAR *var_htab[HASHNUM];
! #else HASH
  VAR var_top = {"top", "top", (char *)0, (VAR *)0};
  VAR *var_list = &var_top;
! #endif HASH
  
  /*
   * Functions
--- 67,76 ----
  #ifdef HASH
  #define HASHNUM	10
  VAR *var_htab[HASHNUM];
! #else /* HASH */
  VAR var_top = {"top", "top", (char *)0, (VAR *)0};
  VAR *var_list = &var_top;
! #endif /* HASH */
  
  /*
   * Functions
***************
*** 251,262 ****
  	for (; vp != (VAR *)0; vp = vp->v_next)
  	    printf ("%-16s %s\n", vp->v_name, vp->v_value);
      }
! #else HASH
      register VAR *vp;
  
      for (vp = var_list->v_next; vp; vp = vp->v_next)
  	printf ("%-16s %s\n", vp->v_name, vp->v_value);
! #endif HASH
  }
  
  #ifdef HASH
--- 251,262 ----
  	for (; vp != (VAR *)0; vp = vp->v_next)
  	    printf ("%-16s %s\n", vp->v_name, vp->v_value);
      }
! #else /* HASH */
      register VAR *vp;
  
      for (vp = var_list->v_next; vp; vp = vp->v_next)
  	printf ("%-16s %s\n", vp->v_name, vp->v_value);
! #endif /* HASH */
  }
  
  #ifdef HASH
***************
*** 273,279 ****
  
      return (sum % HASHNUM);
  }
! #endif HASH
  
  /*
   * Get pointer to VAR.
--- 273,279 ----
  
      return (sum % HASHNUM);
  }
! #endif /* HASH */
  
  /*
   * Get pointer to VAR.
***************
*** 288,294 ****
  {
  #ifdef HASH
      register i = getindex (name);
! #endif HASH
      VAR *vp, *last = (VAR *)0;
  
  #ifdef HASH
--- 288,294 ----
  {
  #ifdef HASH
      register i = getindex (name);
! #endif /* HASH */
      VAR *vp, *last = (VAR *)0;
  
  #ifdef HASH
***************
*** 296,302 ****
  	if (strcmp (name, vp->v_value) == 0)
  	    return (vp);
      }
! #else HASH
      for (vp = var_list->v_next, last = var_list; vp; last = vp, vp = vp->v_next) {
  	int r;
  
--- 296,302 ----
  	if (strcmp (name, vp->v_value) == 0)
  	    return (vp);
      }
! #else /* HASH */
      for (vp = var_list->v_next, last = var_list; vp; last = vp, vp = vp->v_next) {
  	int r;
  
***************
*** 309,315 ****
  	else if (r < 0)
  	    break;
      }
! #endif HASH
  
      if (alloc == 0)
  	return (0);
--- 309,315 ----
  	else if (r < 0)
  	    break;
      }
! #endif /* HASH */
  
      if (alloc == 0)
  	return (0);
***************
*** 327,335 ****
      else {
  	var_htab[i] = vp;
      }
! #else HASH
      vp->v_next = last->v_next;
      last->v_next = vp;
! #endif HASH
      return (vp);
  }
--- 327,335 ----
      else {
  	var_htab[i] = vp;
      }
! #else /* HASH */
      vp->v_next = last->v_next;
      last->v_next = vp;
! #endif /* HASH */
      return (vp);
  }
Only in fep: fep_set.o
diff -cr fep.orig/fep_stat.h fep/fep_stat.h
*** fep.orig/fep_stat.h	Wed Sep 18 18:48:31 2002
--- fep/fep_stat.h	Tue Sep  3 09:41:44 2002
***************
*** 3,9 ****
  #ifndef lint
  # define FEP_STAT \
      "$Header: fep_stat.h,v 4.0 88/08/05 20:21:58 utashiro Rel $ (SRA)"
! #endif lint
  
  extern long stat_obyte;
  extern long stat_ibyte;
--- 3,9 ----
  #ifndef lint
  # define FEP_STAT \
      "$Header: fep_stat.h,v 4.0 88/08/05 20:21:58 utashiro Rel $ (SRA)"
! #endif /* lint */
  
  extern long stat_obyte;
  extern long stat_ibyte;
diff -cr fep.orig/fep_util.c fep/fep_util.c
*** fep.orig/fep_util.c	Wed Sep 18 18:48:32 2002
--- fep/fep_util.c	Wed Sep 18 18:44:49 2002
***************
*** 3,16 ****
  #ifndef lint
  static char rcsid[]=
  "$Header: fep_util.c,v 4.1 88/08/28 18:57:41 utashiro Exp $ (SRA)";
! #endif lint
  
  #ifndef MKARGDEBUG
  
  #include <stdio.h>
  #include <pwd.h>
  #include <sys/types.h>
  #include <sys/dir.h>
  #include <ctype.h>
  #include "fep_defs.h"
  
--- 3,20 ----
  #ifndef lint
  static char rcsid[]=
  "$Header: fep_util.c,v 4.1 88/08/28 18:57:41 utashiro Exp $ (SRA)";
! #endif /* lint */
  
  #ifndef MKARGDEBUG
  
  #include <stdio.h>
  #include <pwd.h>
  #include <sys/types.h>
+ #if defined(__CYGWIN__) || defined(sun)
+ #include <dirent.h>
+ #else
  #include <sys/dir.h>
+ #endif
  #include <ctype.h>
  #include "fep_defs.h"
  
***************
*** 178,186 ****
  {
      return (d1 > d2 ? d1 : d2);
  }
! #endif max
  
! #else MKARGDEBUG
  
  #include <stdio.h>
  #include <ctype.h>
--- 182,190 ----
  {
      return (d1 > d2 ? d1 : d2);
  }
! #endif /* max */
  
! #else /* MKARGDEBUG */
  
  #include <stdio.h>
  #include <ctype.h>
***************
*** 198,204 ****
  	showArgs (s);
      }
  }
! #endif MKARGDEBUG
  
  showArgs (comline)
      char *comline;
--- 202,208 ----
  	showArgs (s);
      }
  }
! #endif /* MKARGDEBUG */
  
  showArgs (comline)
      char *comline;
***************
*** 402,405 ****
      else
  	return (iskanji (*cp));
  }
! #endif KANJI
--- 406,409 ----
      else
  	return (iskanji (*cp));
  }
! #endif /* KANJI */
Only in fep: fep_util.o
diff -cr fep.orig/fep_vi.c fep/fep_vi.c
*** fep.orig/fep_vi.c	Wed Sep 18 18:48:33 2002
--- fep/fep_vi.c	Tue Sep  3 09:41:44 2002
***************
*** 3,15 ****
  #ifndef lint
  static char rcsid[]=
  "$Header: fep_vi.c,v 4.7 91/05/29 14:31:10 utashiro Exp $ (SRA)";
! #endif lint
  
  #include <stdio.h>
  #include <sys/ioctl.h>
  #ifdef TERMIOS
  #include <termios.h>
! #ifdef __linux__
  #ifndef _POSIX_VDISABLE
  #define _POSIX_VDISABLE '\0'
  #endif
--- 3,15 ----
  #ifndef lint
  static char rcsid[]=
  "$Header: fep_vi.c,v 4.7 91/05/29 14:31:10 utashiro Exp $ (SRA)";
! #endif /* lint */
  
  #include <stdio.h>
  #include <sys/ioctl.h>
  #ifdef TERMIOS
  #include <termios.h>
! #if defined(__linux__) || defined(__CYGWIN__)
  #ifndef _POSIX_VDISABLE
  #define _POSIX_VDISABLE '\0'
  #endif
***************
*** 176,183 ****
--- 176,190 ----
      import (cft, initial_ttymode.c_cc[VSTART], ignore);
      import (cft, initial_ttymode.c_cc[VSTOP], ignore);
      */
+ #if 0
      import (cft, initial_ttymode.c_cc[VINTR], insert_and_flush);
      import (aft, initial_ttymode.c_cc[VINTR], insert_and_flush);
+ #else
+ 	/* added by noro */
+     import (cft, initial_ttymode.c_cc[VINTR], send_int_sig);
+ 	/* XXX : this may not be necessary */
+     import (aft, initial_ttymode.c_cc[VINTR], send_int_sig);
+ #endif
      import (cft, initial_ttymode.c_cc[VQUIT], insert_and_flush);
      import (cft, initial_ttymode.c_cc[VEOF], send_eof);
  #ifdef VSWTC
***************
*** 198,205 ****
--- 205,217 ----
      import (cft, tchars_buf.t_startx, ignore);
      import (cft, tchars_buf.t_stopc, ignore);
      */
+ #if 0
      import (cft, tchars_buf.t_intrc, insert_and_flush);
      import (aft, tchars_buf.t_intrc, insert_and_flush);
+ #else
+     import (cft, tchars_buf.t_intrc, send_int_sig);
+     import (aft, tchars_buf.t_intrc, send_int_sig);
+ #endif
      import (cft, tchars_buf.t_quitc, insert_and_flush);
      import (cft, tchars_buf.t_eofc, send_eof);
      import (cft, tchars_buf.t_brkc, insert_and_flush);
Only in fep: fep_vi.o
diff -cr fep.orig/feprc.sample fep/feprc.sample
*** fep.orig/feprc.sample	Wed Sep 18 18:48:33 2002
--- fep/feprc.sample	Tue Sep  3 09:41:44 2002
***************
*** 6,11 ****
--- 6,13 ----
  set alarm-on-eof
  set savehist=50
  
+ #sed editmode=vi
+ 
  echo "Welcome to fep! Editmode is" $editmode
  echo "I'm a front end processor for" $command
  
***************
*** 39,41 ****
--- 41,55 ----
  else
  	echo "History will be saved to" $history-file
  endif
+ 
+ fep-bind suspend "\^Z"
+ 
+ #Fujimoto's setting
+         fep-bind delete-previous-character "\^H"
+         fep-bind backward-character "\^[[D"
+         fep-bind forward-character "\^[[C"
+ #        fep-bind beginning-of-line "\^A"
+ #        fep-bind end-of-line "\^E"
+         fep-bind previous-history "\^[[A"
+         fep-bind next-history "\^[[B"
+ 
Only in fep: fepscript