home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / sys / hp / 15161 < prev    next >
Encoding:
Text File  |  1993-01-21  |  4.4 KB  |  175 lines

  1. Newsgroups: comp.sys.hp
  2. Path: sparky!uunet!think.com!paperboy.osf.org!osf.org!dbrooks
  3. From: dbrooks@osf.org (David Brooks)
  4. Subject: Re: How to avoid 'setenv LINES XX' ???
  5. Message-ID: <1993Jan21.173842.29508@osf.org>
  6. Sender: news@osf.org (USENET News System)
  7. Organization: Open Software Foundation
  8. References:  <MEYER.93Jan21163728@ibsen.geomatic.no>
  9. Date: Thu, 21 Jan 1993 17:38:42 GMT
  10. Lines: 163
  11.  
  12. meyer@geomatic.no (Harald Martens Meyer) writes:
  13. | I have a HP9000/720. I recently upgraded to HP-UX 9.0, and find that I
  14. | have to do 'setenv LINES XX' if I try to resize xterm's. (If I don't
  15. | do that, 'more' and 'man' gets confused). I had to do this on HPterms
  16. | on HP-UX8.07, but not on xterm's.
  17. | Is there any way to avoid this. (Preferebly on both HP- and xterm's)
  18.  
  19. The current X11R5 (pl21) xterm has *two* bugs in it, which prevent it
  20. (a) setting LINES and COLUMNS initially (b) signalling window size
  21. changes.  Seems like whoever built your xterm didn't get those bugs
  22. fixed.
  23.  
  24. Also, you have to be running a HP standard shell.  Bash, for example,
  25. doesn't DTRT with the window size signal.
  26.  
  27. Finally, you don't have to setenv directly.  eval `resize` will do it.
  28.  
  29. Patches to mit/clients/xterm:
  30. *** /tmp/,RCSt1a18628    Thu Jan 21 12:37:13 1993
  31. --- main.c    Tue Nov  3 15:29:22 1992
  32. ***************
  33. *** 1,5
  34.   #ifndef lint
  35. ! static char *rid="$XConsortium: main.c,v 1.200 92/03/11 17:36:12 gildea Exp $";
  36.   #endif /* lint */
  37.   
  38.   /*
  39.  
  40. --- 1,5 -----
  41.   #ifndef lint
  42. ! static char *rid="$Header: main.c,v 1.202.1.1 92/09/30 09:15:50 dbrooks Exp $";
  43.   #endif /* lint */
  44.   
  45.   /*
  46. ***************
  47. *** 172,178
  48.   #include <sys/utsname.h>
  49.   #endif /* hpux */
  50.   
  51. ! #ifdef apollo
  52.   #define ttyslot() 1
  53.   #endif /* apollo */
  54.   
  55.  
  56. --- 172,178 -----
  57.   #include <sys/utsname.h>
  58.   #endif /* hpux */
  59.   
  60. ! #if defined(apollo) && OSMAJORVERSION == 10 && OSMINORVERSION < 4
  61.   #define ttyslot() 1
  62.   #endif /* apollo */
  63.   
  64. ***************
  65. *** 1056,1061
  66.           unsigned char *old_bufend;
  67.   
  68.           old_bufend = (unsigned char *) _bufend(stderr);
  69.           stderr->_file = i;
  70.           _bufend(stderr) = old_bufend;
  71.   #else    /* USE_SYSV_TERMIO */
  72.  
  73. --- 1056,1065 -----
  74.           unsigned char *old_bufend;
  75.   
  76.           old_bufend = (unsigned char *) _bufend(stderr);
  77. + #ifdef hpux
  78. +         stderr->__fileH = (i >> 8);
  79. +         stderr->__fileL = i;
  80. + #else
  81.           stderr->_file = i;
  82.   #endif
  83.           _bufend(stderr) = old_bufend;
  84. ***************
  85. *** 1057,1062
  86.   
  87.           old_bufend = (unsigned char *) _bufend(stderr);
  88.           stderr->_file = i;
  89.           _bufend(stderr) = old_bufend;
  90.   #else    /* USE_SYSV_TERMIO */
  91.           stderr->_file = i;
  92.  
  93. --- 1061,1067 -----
  94.           stderr->__fileL = i;
  95.   #else
  96.           stderr->_file = i;
  97. + #endif
  98.           _bufend(stderr) = old_bufend;
  99.   #else    /* USE_SYSV_TERMIO */
  100.           stderr->_file = i;
  101. ***************
  102. *** 2372,2378
  103.   #endif /* USE_HANDSHAKE */
  104.   
  105.   #ifdef USE_SYSV_ENVVARS
  106. - #ifndef TIOCSWINSZ        /* window size not stored in driver? */
  107.           sprintf (numbuf, "%d", screen->max_col + 1);
  108.           Setenv("COLUMNS=", numbuf);
  109.           sprintf (numbuf, "%d", screen->max_row + 1);
  110.  
  111. --- 2377,2382 -----
  112.   #endif /* USE_HANDSHAKE */
  113.   
  114.   #ifdef USE_SYSV_ENVVARS
  115.           sprintf (numbuf, "%d", screen->max_col + 1);
  116.           Setenv("COLUMNS=", numbuf);
  117.           sprintf (numbuf, "%d", screen->max_row + 1);
  118. ***************
  119. *** 2377,2383
  120.           Setenv("COLUMNS=", numbuf);
  121.           sprintf (numbuf, "%d", screen->max_row + 1);
  122.           Setenv("LINES=", numbuf);
  123. - #endif /* TIOCSWINSZ */
  124.   #ifdef UTMP
  125.           if (pw) {    /* SVR4 doesn't provide these */
  126.               if (!getenv("HOME"))
  127.  
  128. --- 2381,2386 -----
  129.           Setenv("COLUMNS=", numbuf);
  130.           sprintf (numbuf, "%d", screen->max_row + 1);
  131.           Setenv("LINES=", numbuf);
  132.   #ifdef UTMP
  133.           if (pw) {    /* SVR4 doesn't provide these */
  134.               if (!getenv("HOME"))
  135. *** /tmp/,RCSt1a18638    Thu Jan 21 12:38:13 1993
  136. --- screen.c    Mon Sep 28 16:43:41 1992
  137. ***************
  138. *** 1,5
  139.   /*
  140. !  *    $XConsortium: screen.c,v 1.30 91/08/22 16:27:13 gildea Exp $
  141.    */
  142.   
  143.   /*
  144.  
  145. --- 1,5 -----
  146.   /*
  147. !  *    $Header: screen.c,v 1.30.1.1 92/09/24 12:38:18 dbrooks Exp $
  148.    */
  149.   
  150.   /*
  151. ***************
  152. *** 33,39
  153.   
  154.   #include <stdio.h>
  155.   #include <signal.h>
  156. ! #ifdef SVR4
  157.   #include <termios.h>
  158.   #else
  159.   #include <sys/ioctl.h>
  160.  
  161. --- 33,39 -----
  162.   
  163.   #include <stdio.h>
  164.   #include <signal.h>
  165. ! #if defined(SVR4) || defined(hpux)
  166.   #include <termios.h>
  167.   #else
  168.   #include <sys/ioctl.h>
  169. -- 
  170. David Brooks                    dbrooks@osf.org
  171. Open Software Foundation            uunet!osf.org!dbrooks
  172. Shine out, fair sun, with all your heat!  Black winter freezes to his seat...
  173. The boneless fish close quaking lies...the stars in icicles arise!
  174.