1 /* Interface from Emacs to terminfo.
2 Copyright (C) 1985, 1986, 1993 Free Software Foundation, Inc.
4 This file is part of SXEmacs
6 SXEmacs is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
11 SXEmacs is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>. */
20 /* Synched up with: FSF 19.30. */
28 /* Every little bit of this God-damned file has caused all manner
29 of headaches due to inconsistent and incorrect header files
30 on one system or other, and we don't currently need anything here,
31 so just comment the whole damn lot out!!! */
39 /* Interface to curses/terminfo library.
40 Turns out that all of the terminfo-level routines look
41 like their termcap counterparts except for tparm, which replaces
42 tgoto. Not only is the calling sequence different, but the string
43 format is different too.
48 #include CURSES_H_FILE
54 #include TERMCAP_H_FILE
58 /* Sun, in their infinite lameness, supplies (possibly) broken headers
59 even under Solaris. GCC feels it necessary to correct things by
60 supplying its own headers. Unfortunately, if you build GCC under
61 one version of Solaris and then upgrade your Solaris, you may get
62 screwed because Sun in their continuing lameness changes curses.h
63 in such a way that the "fixed" GCC headers are now broken. (GCC
64 is equally lame in that it supplies "fixed" headers for curses.h
65 but not term.h.) However, it seems to work to just not include
66 term.h under Solaris, so we try that. KLUDGE! */
68 #if !(defined (__GNUC__) && defined (SOLARIS2))
73 extern void *xmalloc_atomic(int size);
75 #if 0 /* If this isn't declared somewhere, too bad */
76 extern char *tparm(const char *string, int arg1, int arg2, int arg3,
77 int arg4, int arg5, int arg6, int arg7, int arg8, int arg9);
80 /* XEmacs: renamed this function because just tparam() conflicts with
81 ncurses (We don't use this function anyway!) */
82 char *emacs_tparam(const char *string, char *outstring, int len, int arg1,
83 int arg2, int arg3, int arg4, int arg5, int arg6, int arg7,
88 temp = (char *)tparm(string, arg1, arg2, arg3, arg4, arg5, arg6, arg7,
91 outstring = (char *)xmalloc_atomic(strlen(temp) + 1);
93 strcpy(outstring, temp);