aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEd Schouten <ed@FreeBSD.org>2009-05-26 18:59:03 +0000
committerEd Schouten <ed@FreeBSD.org>2009-05-26 18:59:03 +0000
commit01177cd0a85d403222881e969001aeb764929a98 (patch)
tree3e34040f2a1d1e1cc8371065923935c517188235
parent5de7df10efb942ff55906e25173d05522613bca8 (diff)
Vendor import of ee 1.4.6.vendor/ee/1.4.6
Notes
Notes: svn path=/vendor/ee/dist/; revision=192838 svn path=/vendor/ee/1.4.6/; revision=192839; tag=vendor/ee/1.4.6
-rw-r--r--Changes4
-rwxr-xr-xcreate.make25
-rw-r--r--ee_version.h4
-rw-r--r--new_curse.c46
4 files changed, 50 insertions, 29 deletions
diff --git a/Changes b/Changes
index bfb0c18437ca..8e37d4db95d3 100644
--- a/Changes
+++ b/Changes
@@ -1,3 +1,7 @@
+version 1.4.6
+- modified new_curse.c to handle different subdirectory naming in terminfo
+ directory; first noted on Mac OS 10.2
+
version 1.4.5a (12/23/2001)
- modified get_options to be cleaner for arg handling
diff --git a/create.make b/create.make
index 8ac56c38c10e..5d6ec30624bb 100755
--- a/create.make
+++ b/create.make
@@ -4,11 +4,13 @@
# 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.12 2001/06/28 05:39:14 hugh Exp $
+# $Header: /home/hugh/sources/old_ae/RCS/create.make,v 1.13 2002/09/23 04:18:13 hugh Exp $
#
#set -x
+name_string="`uname`"
+
# 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 ]
@@ -223,16 +225,27 @@ else
fi
-if [ -n "$CFLAGS" ]
+if [ "$name_string" = "Darwin" ]
then
- if [ -z "`echo $CFLAGS | grep '[-]g'`" ]
+ if [ -n "$CFLAGS" ]
then
- other_cflags="${CFLAGS} -s"
+ other_cflags="${CFLAGS} -DNO_CATGETS"
else
- other_cflags="${CFLAGS}"
+ other_cflags="-DNO_CATGETS"
fi
else
- other_cflags="-s"
+
+ if [ -n "$CFLAGS" ]
+ then
+ if [ -z "`echo $CFLAGS | grep '[-]g'`" ]
+ then
+ other_cflags="${CFLAGS} -s"
+ else
+ other_cflags="${CFLAGS}"
+ fi
+ else
+ other_cflags="-s"
+ fi
fi
# time to write the makefile
diff --git a/ee_version.h b/ee_version.h
index fc767408239d..83260d2e78ca 100644
--- a/ee_version.h
+++ b/ee_version.h
@@ -2,5 +2,5 @@
| provide a version number for ee
*/
-#define EE_VERSION "1.4.5a"
-#define DATE_STRING "$Date: 2001/12/24 05:43:10 $"
+#define EE_VERSION "1.4.6"
+#define DATE_STRING "$Date: 2002/09/21 00:50:54 $"
diff --git a/new_curse.c b/new_curse.c
index 2ab6c5d32f5b..cc01092a4926 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.52 2001/06/28 05:39:42 hugh Exp hugh $
+ | $Header: /home/hugh/sources/old_ae/RCS/new_curse.c,v 1.54 2002/09/21 00:47:14 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.52 $";
+char * new_curse_name= "@(#) new_curse.c $Revision: 1.54 $";
#include "new_curse.h"
#include <signal.h>
@@ -662,6 +662,13 @@ int *virtual_lines;
static char nc_scrolling_ability = FALSE;
+char *terminfo_path[] = {
+ "/usr/lib/terminfo",
+ "/usr/share/lib/terminfo",
+ "/usr/share/terminfo",
+ NULL
+ };
+
#ifdef CAP
#if defined(__STDC__) || defined(__cplusplus)
@@ -771,6 +778,7 @@ void
initscr() /* initialize terminal for operations */
{
int value;
+ int counter;
char *lines_string;
char *columns_string;
#ifdef CAP
@@ -903,30 +911,26 @@ printf("starting initscr \n");fflush(stdout);
Term_File_name = malloc(Data_Line_len);
sprintf(Term_File_name, "%s/%c/%s", TERM_PATH, *TERMINAL_TYPE, TERMINAL_TYPE);
Fildes = open(Term_File_name, O_RDONLY);
+ if (Fildes == -1)
+ {
+ sprintf(Term_File_name, "%s/%x/%s", TERM_PATH, *TERMINAL_TYPE, TERMINAL_TYPE);
+ Fildes = open(Term_File_name, O_RDONLY);
+ }
}
- if (Fildes == -1)
- {
- TERM_PATH = "/usr/lib/terminfo";
- Data_Line_len = 23 + strlen(TERM_PATH) + strlen(TERMINAL_TYPE);
- Term_File_name = malloc(Data_Line_len);
- sprintf(Term_File_name, "%s/%c/%s", TERM_PATH, *TERMINAL_TYPE, TERMINAL_TYPE);
- Fildes = open(Term_File_name, O_RDONLY);
- }
- if (Fildes == -1)
- {
- TERM_PATH = "/usr/share/lib/terminfo";
- Data_Line_len = 23 + strlen(TERM_PATH) + strlen(TERMINAL_TYPE);
- Term_File_name = malloc(Data_Line_len);
- sprintf(Term_File_name, "%s/%c/%s", TERM_PATH, *TERMINAL_TYPE, TERMINAL_TYPE);
- Fildes = open(Term_File_name, O_RDONLY);
- }
- if (Fildes == -1)
+ counter = 0;
+ while ((Fildes == -1) && (terminfo_path[counter] != NULL))
{
- TERM_PATH = "/usr/share/terminfo";
+ TERM_PATH = terminfo_path[counter];
Data_Line_len = 23 + strlen(TERM_PATH) + strlen(TERMINAL_TYPE);
Term_File_name = malloc(Data_Line_len);
sprintf(Term_File_name, "%s/%c/%s", TERM_PATH, *TERMINAL_TYPE, TERMINAL_TYPE);
Fildes = open(Term_File_name, O_RDONLY);
+ if (Fildes == -1)
+ {
+ sprintf(Term_File_name, "%s/%x/%s", TERM_PATH, *TERMINAL_TYPE, TERMINAL_TYPE);
+ Fildes = open(Term_File_name, O_RDONLY);
+ }
+ counter++;
}
if (Fildes == -1)
{
@@ -1364,7 +1368,7 @@ Find_term() /* find terminal description in termcap file */
char *Name;
char *Ftemp;
- Ftemp = Name = malloc(strlen(TERMINAL_TYPE + 1) + 1);
+ Ftemp = Name = malloc(strlen(TERMINAL_TYPE) + 2);
strcpy(Name, TERMINAL_TYPE);
while (*Ftemp != (char)NULL)
Ftemp++;