From 76bf094ad4bd686af5ca20431350379b0881babd Mon Sep 17 00:00:00 2001 From: Ed Schouten Date: May 26 2009 18:52:46 +0000 Subject: Vendor import of ee 1.4.3. --- diff --git a/create.make b/create.make index dcf3e38..8ac56c3 100755 --- a/create.make +++ b/create.make @@ -4,14 +4,25 @@ # This script will determine if the system is a System V or BSD based # UNIX system and create a makefile for ee appropriate for the system. # -# $Header: /home/hugh/sources/old_ae/RCS/create.make,v 1.7 2001/01/20 04:57:17 hugh Exp hugh $ +# $Header: /home/hugh/sources/old_ae/RCS/create.make,v 1.12 2001/06/28 05:39:14 hugh Exp $ # +#set -x + # test for existence of termcap (exists on both BSD and SysV systems) if [ -f /etc/termcap -o -f /usr/share/lib/termcap -o -f /usr/share/misc/termcap ] then - termcap_exists="TRUE" + if [ -f /usr/share/lib/termcap ] + then + termcap_exists="-DTERMCAP=\"\\\"/usr/share/lib/termcap\\\"\"" + elif [ -f /usr/share/misc/termcap ] + then + termcap_exists="-DTERMCAP=\"\\\"/usr/share/misc/termcap\\\"\"" + elif [ -f /etc/termcap ] + then + termcap_exists="-DTERMCAP=\"\\\"/etc/termcap\\\"\"" + fi else termcap_exists="" fi @@ -235,7 +246,7 @@ fi echo "DEFINES = $termio $terminfo_exists $BSD_SELECT $catgets $select $curses " > make.local echo "" >> make.local -echo "CFLAGS = $HAS_UNISTD $HAS_STDARG $HAS_STDLIB $HAS_CTYPE $HAS_SYS_IOCTL $HAS_SYS_WAIT $five_lib $five_include $select_hdr $other_cflags" >> make.local +echo "CFLAGS = $HAS_UNISTD $HAS_STDARG $HAS_STDLIB $HAS_CTYPE $HAS_SYS_IOCTL $HAS_SYS_WAIT $five_lib $five_include $select_hdr $other_cflags $termcap_exists" >> make.local echo "" >> make.local echo "" >> make.local echo "all : $TARGET" >> make.local diff --git a/new_curse.c b/new_curse.c index 9ea8269..6672f1a 100644 --- a/new_curse.c +++ b/new_curse.c @@ -37,14 +37,14 @@ | Copyright (c) 1986, 1987, 1988, 1991, 1992, 1993, 1994, 1995 Hugh Mahon | All are rights reserved. | - | $Header: /home/hugh/sources/old_ae/RCS/new_curse.c,v 1.50 2001/01/19 02:53:40 hugh Exp hugh $ + | $Header: /home/hugh/sources/old_ae/RCS/new_curse.c,v 1.52 2001/06/28 05:39:42 hugh Exp $ | */ char *copyright_message[] = { "Copyright (c) 1986, 1987, 1988, 1991, 1992, 1993, 1994, 1995 Hugh Mahon", "All rights are reserved."}; -char * new_curse_name= "@(#) new_curse.c $Revision: 1.50 $"; +char * new_curse_name= "@(#) new_curse.c $Revision: 1.52 $"; #include "new_curse.h" #include @@ -501,6 +501,10 @@ int interrupt_flag = FALSE; /* set true if SIGWINCH received */ char *Strings; #endif +#if !defined(TERMCAP) +#define TERMCAP "/etc/termcap" +#endif + struct KEYS { int length; /* length of string sent by key */ char *string; /* string sent by key */ @@ -939,15 +943,15 @@ printf("starting initscr \n");fflush(stdout); if ((pointer = Term_File_name = getenv("TERMCAP")) != NULL) { if (*Term_File_name != '/') - Term_File_name = "/etc/termcap"; + Term_File_name = TERMCAP; } else { - Term_File_name = "/etc/termcap"; + Term_File_name = TERMCAP; } if ((TFP = fopen(Term_File_name, "r")) == NULL) { - printf("unable to open /etc/termcap file \n"); + printf("unable to open %s file \n", TERMCAP); exit(0); } for (value = 0; value < 1024; value++)