home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / unix / wizards / 3635 < prev    next >
Encoding:
Internet Message Format  |  1992-08-16  |  1.1 KB

  1. Path: sparky!uunet!ferkel.ucsb.edu!ucsbcsl!mustang.mst6.lanl.gov!data.nas.nasa.gov!taligent!apple!usc!wupost!darwin.sura.net!Sirius.dfn.de!math.fu-berlin.de!news.netmbx.de!Germany.EU.net!mcsun!fuug!kiae!briga!ol
  2. From: ol@jet.riga.lv (Oleg Girko)
  3. Newsgroups: comp.unix.wizards
  4. Subject: Re: How to turn off termcap scrolling regions ("cs")
  5. Message-ID: <1992Aug16.140355.17230@jet.riga.lv>
  6. Date: 16 Aug 92 14:03:55 GMT
  7. References: <PDS.92Aug14143506@lemming.webo.dg.com>
  8. Organization: unknown
  9. Lines: 19
  10. X-Newsreader: Tin 1.1 PL4
  11.  
  12. pds@lemming.webo.dg.com (Paul D. Smith) writes:
  13.  
  14. | I have a piece of code which uses termcap to set a scrolling region
  15. | (if available, such as in vt100).  My problem is I can't find a
  16. | portable way to *turn off* the region again.
  17. | Given tgetstr("cs", buf), on my OS tgoto(buf, -1, -1); seems to do the
  18. | trick.  However, on another OS I know of -1,-1 doesn't work, but
  19. | tgoto(buf, 0, 0) does: however 0,0 doesn't work on my system :(.
  20.  
  21. This seems to work properly:
  22.  
  23.        LINES = tgetnum ("li");
  24.        ...
  25.        tgoto (buf, 0, LINES-1)
  26.  
  27. Oleg Girko               _   ,
  28. ol@infopro.spb.su      /  ) /
  29. ol@jet.riga.lv        (_ / (__
  30.