home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / mitsch75.zip / scheme-7_5_17-src.zip / scheme-7.5.17 / src / microcode / terminfo.c < prev    next >
C/C++ Source or Header  |  2001-03-03  |  2KB  |  60 lines

  1. /* Interface from Emacs to terminfo.
  2.    Copyright (C) 1985, 1986 Free Software Foundation, Inc.
  3.    Copyright (C) 1998-2001 Massachusetts Institute of Technology
  4.  
  5. $Id: terminfo.c,v 1.7 2001/03/03 05:14:10 cph Exp $
  6.  
  7. This file is part of GNU Emacs.
  8.  
  9. GNU Emacs is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY.  No author or distributor
  11. accepts responsibility to anyone for the consequences of using it
  12. or for whether it serves any particular purpose or works at all,
  13. unless he says so in writing.  Refer to the GNU Emacs General Public
  14. License for full details.
  15.  
  16. Everyone is granted permission to copy, modify and redistribute
  17. GNU Emacs, but only under the conditions described in the
  18. GNU Emacs General Public License.   A copy of this license is
  19. supposed to have been given to you along with GNU Emacs so you
  20. can know your rights and responsibilities.  It should be in a
  21. file named COPYING.  Among other things, the copyright notice
  22. and this notice must be preserved on all copies.  */
  23.  
  24. #include "config.h"
  25.  
  26. #ifdef STDC_HEADERS
  27. #  include <stdlib.h>
  28. #  include <string.h>
  29. #endif
  30.  
  31. extern char * EXFUN (tparm, (CONST char *, ...));
  32.  
  33. /* Interface to curses/terminfo library.
  34.    Turns out that all of the terminfo-level routines look
  35.    like their termcap counterparts except for tparm, which replaces
  36.    tgoto.  Not only is the calling sequence different, but the string
  37.    format is different too.  */
  38.  
  39. char *
  40. DEFUN (tparam, (string, outstring, len, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9),
  41.        CONST char * string AND
  42.        char * outstring AND
  43.        int len AND
  44.        int arg1 AND
  45.        int arg2 AND
  46.        int arg3 AND
  47.        int arg4 AND
  48.        int arg5 AND
  49.        int arg6 AND
  50.        int arg7 AND
  51.        int arg8 AND
  52.        int arg9)
  53. {
  54.   char * temp = (tparm (string, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9));
  55.   if (outstring == 0)
  56.     outstring = ((char *) (malloc ((strlen (temp)) + 1)));
  57.   strcpy (outstring, temp);
  58.   return (outstring);
  59. }
  60.