Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 May 2009 18:59:03 +0000 (UTC)
From:      Ed Schouten <ed@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org
Subject:   svn commit: r192838 - vendor/ee/dist
Message-ID:  <200905261859.n4QIx36d069642@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ed
Date: Tue May 26 18:59:03 2009
New Revision: 192838
URL: http://svn.freebsd.org/changeset/base/192838

Log:
  Vendor import of ee 1.4.6.

Modified:
  vendor/ee/dist/Changes
  vendor/ee/dist/create.make
  vendor/ee/dist/ee_version.h
  vendor/ee/dist/new_curse.c

Modified: vendor/ee/dist/Changes
==============================================================================
--- vendor/ee/dist/Changes	Tue May 26 18:57:28 2009	(r192837)
+++ vendor/ee/dist/Changes	Tue May 26 18:59:03 2009	(r192838)
@@ -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
 

Modified: vendor/ee/dist/create.make
==============================================================================
--- vendor/ee/dist/create.make	Tue May 26 18:57:28 2009	(r192837)
+++ vendor/ee/dist/create.make	Tue May 26 18:59:03 2009	(r192838)
@@ -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

Modified: vendor/ee/dist/ee_version.h
==============================================================================
--- vendor/ee/dist/ee_version.h	Tue May 26 18:57:28 2009	(r192837)
+++ vendor/ee/dist/ee_version.h	Tue May 26 18:59:03 2009	(r192838)
@@ -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 $"

Modified: vendor/ee/dist/new_curse.c
==============================================================================
--- vendor/ee/dist/new_curse.c	Tue May 26 18:57:28 2009	(r192837)
+++ vendor/ee/dist/new_curse.c	Tue May 26 18:59:03 2009	(r192838)
@@ -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(std
 		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 descriptio
 	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++;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200905261859.n4QIx36d069642>