home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / library / dos / communic / pcmail / termcap / tgetstr.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-06-05  |  1.4 KB  |  105 lines

  1. /*++
  2.  
  3. /* NAME
  4.  
  5. /*    tgetstr 3
  6.  
  7. /* SUMMARY
  8.  
  9. /*    extract string-valued capability from terminal database
  10.  
  11. /* PROJECT
  12.  
  13. /*    ms-dos/unix compatibility
  14.  
  15. /* PACKAGE
  16.  
  17. /*    termcap
  18.  
  19. /* SYNOPSIS
  20.  
  21. /*    char *tgetstr(name,area)
  22.  
  23. /*    char *name,**area;
  24.  
  25. /* DESCRIPTION
  26.  
  27. /*    tgetstr extracts the string value associated with the capability
  28.  
  29. /*    in "name", from the info obtained earlier through a call of
  30.  
  31. /*    tgetent(3). area is a pointer to a 1024-character buffer and is
  32.  
  33. /*    updated with each call of tgetstr(3).
  34.  
  35. /*
  36.  
  37. /*    Since the capabilities of the ms-dos console are stored in a static
  38.  
  39. /*    data structure,
  40.  
  41. /*    the area pointer is not used in the MS-DOS implementation.
  42.  
  43. /* SEE ALSO
  44.  
  45. /*    tgetent(3), extract terminal entry from database.
  46.  
  47. /*    termcap(3), Berkeley extensions to UNIX.
  48.  
  49. /* FILES
  50.  
  51. /*    ANSI.SYS, ibm pc console driver.
  52.  
  53. /* AUTHOR(S)
  54.  
  55. /*    W.Z. Venema
  56.  
  57. /*    Eindhoven University of Technology
  58.  
  59. /*    Department of Mathematics and Computer Science
  60.  
  61. /*    Den Dolech 2, P.O. Box 513, 5600 MB Eindhoven, The Netherlands
  62.  
  63. /* CREATION DATE
  64.  
  65. /*    Wed Jan  1 19:01:13 GMT+1:00 1986
  66.  
  67. /* LAST MODIFICATION
  68.  
  69. /*    90/01/22 13:57:13
  70.  
  71. /* VERSION/RELEASE
  72.  
  73. /*    2.1
  74.  
  75. /*--*/
  76.  
  77.  
  78.  
  79. #include "termcap.h"
  80.  
  81.  
  82.  
  83. char   *tgetstr(id, area)
  84.  
  85. register char *id;
  86.  
  87. char  **area;
  88.  
  89. {
  90.  
  91.     register Cap *p;
  92.  
  93.  
  94.  
  95.     for (p = _console; *p->name; p++)
  96.  
  97.     if (strcmp(id, p->name) == 0)
  98.  
  99.         return (p->cap);
  100.  
  101.     return 0;
  102.  
  103. }
  104.  
  105.