Convert consecutive FSF copyright years to ranges.
[bpt/emacs.git] / src / terminfo.c
CommitLineData
d427b66a 1/* Interface from Emacs to terminfo.
73b0cd50 2 Copyright (C) 1985-1986, 2001-2011 Free Software Foundation, Inc.
d427b66a
JB
3
4This file is part of GNU Emacs.
5
9ec0b715 6GNU Emacs is free software: you can redistribute it and/or modify
d427b66a 7it under the terms of the GNU General Public License as published by
9ec0b715
GM
8the Free Software Foundation, either version 3 of the License, or
9(at your option) any later version.
d427b66a
JB
10
11GNU Emacs is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
9ec0b715 17along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
d427b66a 18
d676eef3 19#include <config.h>
d7306fe6 20#include <setjmp.h>
495de6e9 21#include "lisp.h"
d676eef3 22
d427b66a
JB
23/* Define these variables that serve as global parameters to termcap,
24 so that we do not need to conditionalize the places in Emacs
25 that set them. */
26
27char *UP, *BC, PC;
d676eef3 28
d427b66a
JB
29/* Interface to curses/terminfo library.
30 Turns out that all of the terminfo-level routines look
31 like their termcap counterparts except for tparm, which replaces
32 tgoto. Not only is the calling sequence different, but the string
33 format is different too.
34*/
35
36char *
da31e629
JB
37tparam (char *string, char *outstring,
38 int len, int arg1, int arg2, int arg3, int arg4,
39 int arg5, int arg6, int arg7, int arg8, int arg9)
d427b66a
JB
40{
41 char *temp;
da31e629 42 extern char *tparm (char *str, ...);
d427b66a
JB
43
44 temp = tparm (string, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
45 if (outstring == 0)
495de6e9 46 outstring = ((char *) (xmalloc ((strlen (temp)) + 1)));
d427b66a
JB
47 strcpy (outstring, temp);
48 return outstring;
49}
ab5796a9 50