home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / CURSES.LZH / BORDER.C < prev    next >
C/C++ Source or Header  |  1980-01-01  |  2KB  |  69 lines

  1. /****************************************************************/
  2. /* Box border control routines of the PCcurses package.        */
  3. /*                                */
  4. /****************************************************************/
  5. /* This version of curses is based on ncurses, a curses version    */
  6. /* originally written by Pavel Curtis at Cornell University.    */
  7. /* I have made substantial changes to make it run on IBM PC's,    */
  8. /* and therefore consider myself free make it public domain.    */
  9. /*        Bjorn Larsson (...mcvax!enea!infovax!bl)    */
  10. /****************************************************************/
  11. /* 1.3:    Released:                    881005    */
  12. /****************************************************************/
  13.  
  14. #include <curses.h>
  15. #include <curspriv.h>
  16.  
  17. char _curses_border_rcsid[] = "@(#)border.c v1.3 - 881005";
  18.  
  19. /****************************************************************/
  20. /* Wborder() sets the border characters in window win.        */ 
  21. /****************************************************************/
  22.  
  23. void wborder(win, l, r, t, b, tl, tr, bl, br)
  24.   WINDOW    *win;
  25.   int         l;
  26.   int         r;
  27.   int         t;
  28.   int         b;
  29.   int         tl;
  30.   int         tr;
  31.   int         bl;
  32.   int         br;
  33.   {
  34.   win->_borderchars[0] = (char) l;
  35.   win->_borderchars[1] = (char) r;
  36.   win->_borderchars[2] = (char) t;
  37.   win->_borderchars[3] = (char) b;
  38.   win->_borderchars[4] = (char) tl;
  39.   win->_borderchars[5] = (char) tr;
  40.   win->_borderchars[6] = (char) bl;
  41.   win->_borderchars[7] = (char) br;
  42.   } /* wborder */
  43.  
  44. /****************************************************************/
  45. /* Border() sets the border characters in the stdscr window.    */ 
  46. /* Don't make this a call to wborder() - it would require soo    */
  47. /* much stack for parameters...                    */
  48. /****************************************************************/
  49.  
  50. void border(l, r, t, b, tl, tr, bl, br)
  51.   int         l;
  52.   int         r;
  53.   int         t;
  54.   int         b;
  55.   int         tl;
  56.   int         tr;
  57.   int         bl;
  58.   int         br;
  59.   {
  60.   stdscr->_borderchars[0] = (char) l;
  61.   stdscr->_borderchars[1] = (char) r;
  62.   stdscr->_borderchars[2] = (char) t;
  63.   stdscr->_borderchars[3] = (char) b;
  64.   stdscr->_borderchars[4] = (char) tl;
  65.   stdscr->_borderchars[5] = (char) tr;
  66.   stdscr->_borderchars[6] = (char) bl;
  67.   stdscr->_borderchars[7] = (char) br;
  68.   } /* border */
  69.