home *** CD-ROM | disk | FTP | other *** search
/ C!T ROM 2 / ctrom_ii_b.zip / ctrom_ii_b / PROGRAM / C / AECUR101 / TEECHAR.C < prev    next >
C/C++ Source or Header  |  1990-03-08  |  935b  |  44 lines

  1. /*----------------------------------------------------------------------
  2.  * 
  3.  *  teechar.c
  4.  *
  5.  *  copyright (c) 1987,88,89,90 J. Alan Eldridge
  6.  *
  7.  *  returns a graphic char used to create a complex
  8.  *  box type display
  9.  *
  10.  *  the positions on the box are numbered like this:
  11.  *
  12.  *          0
  13.  *             
  14.  *      3   4   1
  15.  *
  16.  *          2
  17.  *
  18.  *  therefore the characters are shaped like this (0 to 4):
  19.  *
  20.  *      ---          | 
  21.  *       |    --|   ---   |--   -|-
  22.  *
  23.  *  v & h are 0 for single lines, 1 for double lines
  24.  *
  25.  *----------------------------------------------------------------------
  26.  */
  27.  
  28. #include "curses.h"
  29.  
  30. teechar(pos, v, h)
  31. int pos, v, h;
  32. {
  33.     static UCHAR teechars[][2][2] = {
  34.         194, 209, 210, 203,
  35.         180, 181, 182, 185,
  36.         193, 207, 208, 202,
  37.         195, 198, 199, 204,
  38.         197, 216, 215, 206
  39.     };
  40.   
  41.     return teechars[pos][v][h] & 0xff;
  42. }
  43.  
  44.