home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / cprog / cursesp.zip / TABSIZE.C < prev    next >
C/C++ Source or Header  |  1991-12-02  |  2KB  |  51 lines

  1. /****************************************************************/
  2. /* Tabsize() 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 to make it public domain. */
  9. /*              Bjorn Larsson (...mcvax!enea!infovax!bl)        */
  10. /****************************************************************/
  11. /* 1.0: Release:                                        870515  */
  12. /* 1.2: Rcsid[] string for maintenance:                 881002  */
  13. /* 1.3: MSC -W3, Turbo'C' -w -w-pro checkes:            881005  */
  14. /****************************************************************/
  15.  
  16. #include <curses.h>
  17. #include <curspriv.h>
  18.  
  19. char _curses_tabsize_rcsid[] = "@(#)tabsize.c v1.3 - 881005";
  20.  
  21. /****************************************************************/
  22. /* Wtabsize(win,ts) sets the tabsize of window 'win' to 'ts',   */
  23. /* and returns the original value.                              */
  24. /****************************************************************/
  25.  
  26. int     wtabsize(win,ts)
  27.   WINDOW        *win;
  28.   int            ts;
  29.   {
  30.   int            origval;
  31.  
  32.   origval = win->_tabsize;
  33.   win->_tabsize = ts;
  34.   return(origval);
  35.   } /* wtabsize*/
  36.  
  37. /****************************************************************/
  38. /* Tabsize(ts) sets the tabsize of stdscr to 'ts', and returns  */
  39. /* the original value.                                          */
  40. /****************************************************************/
  41.  
  42. int     tabsize(ts)
  43.   int            ts;
  44.   {
  45.   int            origval;
  46.  
  47.   origval = stdscr->_tabsize;
  48.   stdscr->_tabsize = ts;
  49.   return(origval);
  50.   } /* tabsize */
  51.