home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / windows / x / 21397 < prev    next >
Encoding:
Internet Message Format  |  1993-01-21  |  1.7 KB

  1. Path: sparky!uunet!spool.mu.edu!enterpoop.mit.edu!senator-bedfellow.mit.edu!athena.mit.edu!ghudson
  2. From: ghudson@athena.mit.edu (Greg Hudson)
  3. Newsgroups: comp.windows.x
  4. Subject: xterm termcap question
  5. Date: 21 Jan 1993 13:37:00 GMT
  6. Organization: Massachusetts Institute of Technology
  7. Lines: 34
  8. Distribution: world
  9. Message-ID: <1jm8tsINNe2v@senator-bedfellow.MIT.EDU>
  10. NNTP-Posting-Host: lockpick.mit.edu
  11. Summary: xterm termcap lacking "cs" capability
  12.  
  13. I haven't been lurking for a few weeks to make sure I'm avoiding
  14. common gaffes, but I have checked the FAQ briefly.  I apologize if I
  15. missed this question on the FAQ, but it seems unlikely, since it's
  16. actually a question about tty programming.
  17.  
  18. I'm the author of a couple of client programs that support full-screen
  19. tty displays, and I often run into the problem that the xterm termcap
  20. seems to be missing the "cs" (set scroll area) capability, even though
  21. xterms support it.  Users can set their TERM to vt100 and everything
  22. is fine, but my users don't generally know this, and I'd rather deal
  23. with the problem transparently if possible.  Unfortunately, most
  24. setups I've seen set the TERMCAP environment variable with all the
  25. termcap information so that the li# and co# fields will be correct, so
  26. the simple
  27.  
  28.     term = getenv("TERM");
  29.     if (!term)
  30.         barf();
  31.     if (strcmp(term, "xterm") == 0)
  32.         term = "vt100";
  33.  
  34. shouldn't help most of the time.
  35.  
  36. Has anybody else dealt with this problem?  Does anyone know *why* the
  37. xterm termcap is missing this capability?  My current plan is to check
  38. for an xterm termtype and hardcode the cs capability for it, but
  39. that's an ugly solution.  Of course, I may eventually write an X
  40. interface for my most recent program, and this would be the ideal
  41. solution.
  42.  
  43. Thanks for any help.
  44.  
  45. --GBH
  46.  
  47.