lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lynx-dev terminal emulators, SIGWINCH


From: Klaus Weide
Subject: Re: lynx-dev terminal emulators, SIGWINCH
Date: Fri, 12 May 2000 19:54:17 -0500 (CDT)

On Fri, 12 May 2000, Klaus Weide wrote:

> If your curses lib does *NOT* update its idea of the window size -
> use a better one.  Or maybe it needs to be configured in some way
> (environment variables?) in order to give precedence to actual size
> determined from system calls over the LINES and COLUMNS variables.

I looked at the logic in ncurses again (a 5.0 beta - hope that's still
current in this respect).
- There is a function use_env().  The default is TRUE.  According to
  the man page, it's not an ncurses extension.
  If set to FALSE, only the size from the $TERM's description is used.
- You may want to add an explicit call to use_env(TRUE), should your
  curses have this, too, but with a different default.
- If use_env(TRUE) is in effect, ncurses tries to use LINES/COLUMNS
  environment variables if present and valid, otherwise it queries
  the system via an ioctl call.  (If both fail, it falls back to
  defaults.)
- There's a comment that indicates that this follows Solaris curses's
  behavior.
- Actually, when using a current lynx compiled with ncurses, that size
  determination (function _nc_get_screensize()) "normally" doesn't
  come into play, because lynx does
    #if defined(HAVE_RESIZETERM)
            resizeterm(LYlines, LYcols);
    #else
  to update curses's idea of the screen dimensions to its own idea.
- "Normally" above means when changing the window size while lynx is
  in the foreground.  There are other situations, like changing the
  windows size when lynx is suspended or "shelled out" ('!').

Summarized advice for Best Resizing Behavior with lynx:

- Use bash(2?) as a shell.  Use 'shopt -s checkwinsize' to let bash
  always keep track of the window size.  Bash will update LINES and
  COLUMNS variables.
- Do NOT export LINES and COLUMNS.  Do not eval `resize` (which does
  that).  Not if you want lynx to always use the current size, and
  expect to change it during lynx sessions.
- Compile lynx with slang or ncurses.
- Enable SOURCE_CACHE in order to get automatic reformatting (of some
  pages) after size change.
- Use '^R' or similar ('\' twice, '^V' twice, ...) otherwise to get
  page reformatted if necessary.
- Try NONRESTARTING_SIGWINCH if using curses or ncurses.  May make
  reaction to size change more immediate (rather than deferred until
  a key is pressed).  If that's already happening, don't use it.
  (It may have some negative effects in some situations.)

    Klaus


; To UNSUBSCRIBE: Send "unsubscribe lynx-dev" to address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]