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

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