Vendor import of ee 1.4.6.
This commit is contained in:
parent
5de7df10ef
commit
01177cd0a8
4
Changes
4
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
|
||||
|
||||
|
25
create.make
25
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
|
||||
|
@ -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 $"
|
||||
|
46
new_curse.c
46
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)
|
||||
counter = 0;
|
||||
while ((Fildes == -1) && (terminfo_path[counter] != NULL))
|
||||
{
|
||||
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)
|
||||
{
|
||||
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++;
|
||||
|
Loading…
Reference in New Issue
Block a user