Annotation of 43BSDReno/contrib/emacs-18.55/src/terminfo.c, revision 1.1.1.1

1.1       root        1: /* Interface from Emacs to terminfo.
                      2:    Copyright (C) 1985, 1986 Free Software Foundation, Inc.
                      3: 
                      4: This file is part of GNU Emacs.
                      5: 
                      6: GNU Emacs is distributed in the hope that it will be useful,
                      7: but WITHOUT ANY WARRANTY.  No author or distributor
                      8: accepts responsibility to anyone for the consequences of using it
                      9: or for whether it serves any particular purpose or works at all,
                     10: unless he says so in writing.  Refer to the GNU Emacs General Public
                     11: License for full details.
                     12: 
                     13: Everyone is granted permission to copy, modify and redistribute
                     14: GNU Emacs, but only under the conditions described in the
                     15: GNU Emacs General Public License.   A copy of this license is
                     16: supposed to have been given to you along with GNU Emacs so you
                     17: can know your rights and responsibilities.  It should be in a
                     18: file named COPYING.  Among other things, the copyright notice
                     19: and this notice must be preserved on all copies.  */
                     20: 
                     21: /* Define these variables that serve as global parameters to termcap,
                     22:    so that we do not need to conditionalize the places in Emacs
                     23:    that set them.  */
                     24: 
                     25: char *UP, *BC, PC;
                     26: short ospeed;
                     27: 
                     28: static buffer[512];
                     29: 
                     30: /* Interface to curses/terminfo library.
                     31:    Turns out that all of the terminfo-level routines look
                     32:    like their termcap counterparts except for tparm, which replaces
                     33:    tgoto.  Not only is the calling sequence different, but the string
                     34:    format is different too.
                     35: */
                     36: 
                     37: char *
                     38: tparam (string, outstring, len, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9)
                     39:      char *string;
                     40:      char *outstring;
                     41:      int arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9;
                     42: {
                     43:   char *temp;
                     44:   extern char *tparm();
                     45: 
                     46:   temp = tparm (string, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
                     47:   if (outstring == 0)
                     48:     outstring = ((char *) (malloc ((strlen (temp)) + 1)));
                     49:   strcpy (outstring, temp);
                     50:   return outstring;
                     51: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.