home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume8 / se / patch1 / term.patch
Encoding:
Text File  |  1987-02-02  |  3.5 KB  |  146 lines

  1. RCS file: RCS/term.c,v
  2. retrieving revision 1.7
  3. diff -c -r1.7 term.c
  4. *** /tmp/,RCSt1004590    Tue Feb  3 14:34:36 1987
  5. --- term.c    Tue Feb  3 14:33:55 1987
  6. ***************
  7. *** 1,9 ****
  8.   #ifndef lint
  9. ! static char RCSid[] = "$Header: term.c,v 1.7 86/11/12 11:37:30 arnold Exp $";
  10.   #endif
  11.   
  12.   /*
  13.    * $Log:    term.c,v $
  14.    * Revision 1.7  86/11/12  11:37:30  arnold
  15.    * Fixed winsize() to verify that cols and rows not 0 before assigning
  16.    * them to Nrows and Ncols.
  17. --- 1,13 ----
  18.   #ifndef lint
  19. ! static char RCSid[] = "$Header: term.c,v 1.8 87/02/03 14:32:32 arnold Exp $";
  20.   #endif
  21.   
  22.   /*
  23.    * $Log:    term.c,v $
  24. +  * Revision 1.8  87/02/03  14:32:32  arnold
  25. +  * Changes for non-windowing and USG systems; reorganization had
  26. +  * caused these to break during the compile.
  27. +  * 
  28.    * Revision 1.7  86/11/12  11:37:30  arnold
  29.    * Fixed winsize() to verify that cols and rows not 0 before assigning
  30.    * them to Nrows and Ncols.
  31. ***************
  32. *** 57,63 ****
  33.   ** Routines that are only if HARD_TERMS is NOT defined. These contain:
  34.   **    BSD/termlib routines
  35.   **    System V/terminfo routines
  36. ! **    Routines idenpendant of BSD/System V
  37.   ** Routines that are only if HARD_TERMS is defined.
  38.   ** Routines that have regular and conditonal code mixed.
  39.   */
  40. --- 61,67 ----
  41.   ** Routines that are only if HARD_TERMS is NOT defined. These contain:
  42.   **    BSD/termlib routines
  43.   **    System V/terminfo routines
  44. ! **    Routines independant of BSD/System V
  45.   ** Routines that are only if HARD_TERMS is defined.
  46.   ** Routines that have regular and conditonal code mixed.
  47.   */
  48. ***************
  49. *** 151,156 ****
  50. --- 155,161 ----
  51.           getdescrip ();        /* get terminal description */
  52.           Nrows = tgetnum ("li");
  53.           Ncols = tgetnum ("co");
  54. +         PC = pcstr ? pcstr[0] : EOS;
  55.           break;
  56.   
  57.       default:
  58. ***************
  59. *** 175,180 ****
  60. --- 180,187 ----
  61.   
  62.   #include <term.h>    /* should be all we really need */
  63.   
  64. + extern char *tgoto();
  65.   #define AM    auto_right_margin
  66.   #define TI    enter_ca_mode
  67.   #define TE    exit_ca_mode
  68. ***************
  69. *** 184,189 ****
  70. --- 191,197 ----
  71.   #define CE    clr_eol
  72.   #define DL    delete_line
  73.   #define AL    insert_line
  74. + #define CM    cursor_address
  75.   
  76.   /* setcaps -- get the capabilities from the terminfo database */
  77.   
  78. ***************
  79. *** 229,234 ****
  80. --- 237,244 ----
  81.   
  82.   #include <signal.h>
  83.   
  84. + #if defined(SIGWIND) || defined(SIGWINCH)
  85.   #ifdef SIGWIND            /* UNIX PC */
  86.   #include <sys/font.h>
  87.   #include <sys/window.h>
  88. ***************
  89. *** 268,274 ****
  90.   
  91.   winsize ()
  92.   {
  93. - #if defined(SIGWIND) || defined(SIGWINCH)
  94.       static int first = 1;
  95.       static char savestatus[MAXCOLS];
  96.       int row, oldstatus = Nrows - 1;
  97. --- 278,283 ----
  98. ***************
  99. *** 328,338 ****
  100.       loadstr (savestatus, Nrows - 1, 0, Ncols);
  101.       remark ("window size change");
  102.       tflush ();
  103. - #endif
  104.   }
  105.   
  106.   #else
  107.   
  108.   /* begin terminal dependant routines */
  109.   
  110.   /* addspos --- position cursor to (row, col) on ADDS Consul 980 */
  111. --- 337,355 ----
  112.       loadstr (savestatus, Nrows - 1, 0, Ncols);
  113.       remark ("window size change");
  114.       tflush ();
  115.   }
  116.   
  117.   #else
  118.   
  119. + winsize ()    /* no windowing system, don't do anything */
  120. + {
  121. +     return;
  122. + }
  123. + #endif
  124. + #else
  125.   /* begin terminal dependant routines */
  126.   
  127.   /* addspos --- position cursor to (row, col) on ADDS Consul 980 */
  128. ***************
  129. *** 2044,2052 ****
  130.   #else
  131.       if (setcaps (type) == ERR)
  132.           error (NO, "se: could not find terminal in system database");
  133. -     PC = pcstr ? pcstr[0] : EOS;
  134.   
  135.       if (*tgoto (CM, 0, 0) == 'O')    /* OOPS returned.. */
  136.           error (NO, "se: terminal does not have cursor motion.");
  137. --- 2061,2066 ----
  138.  
  139.