home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / os / linux / 23338 < prev    next >
Encoding:
Internet Message Format  |  1993-01-09  |  2.3 KB

  1. Xref: sparky comp.os.linux:23338 rec.games.hack:8035
  2. Newsgroups: comp.os.linux,rec.games.hack
  3. Path: sparky!uunet!haven.umd.edu!darwin.sura.net!blaze.cs.jhu.edu!circle.cs.jhu.edu!hymowitz
  4. From: hymowitz@circle.cs.jhu.edu (Hymie!)
  5. Subject: color hack for linux - trying to fix...
  6. Message-ID: <1993Jan9.072906.6260@blaze.cs.jhu.edu>
  7. Sender: news@blaze.cs.jhu.edu (Usenet news system)
  8. Reply-To: hymowitz@cs.jhu.edu (Hymie!)
  9. Organization: Creative Sensualities dept, Jacquie's House of Underwear
  10. Date: Sat, 9 Jan 1993 07:29:06 GMT
  11. Lines: 40
  12.  
  13. hello there... i'm not sure which of theset wo groups can help more, so...
  14.  
  15. i have nethack 3.0i for linux, and i want to get color.  i used this
  16. advice...
  17.  
  18. >At compile time:
  19. > 1) #define TEXTCOLOR in include/unixconf.h
  20. > 2) if you're using TERMINFO, that's it; however, if you're using TERMCAP,
  21. >    then you'll need to modify src/termcap.c.  Change the source code at the
  22. >    very last routine so that it reads ``# if 0'' instead of ``# ifdef UNIX''.
  23. >    You need the non-Unix version of function init_hilite() since that Unix
  24. >    version supports TERMINFO only.
  25. >At run time:
  26. > 3) enable both "color" and "standout" in NETHACKOPTIONS or with the 'O'
  27. >    command.  Neglecting to set "standout" is a fairly common problem.
  28. >
  29. >     I have no idea whether Linux uses terminfo or termcap or both, so
  30. >can't advise about step #2, but your Makefile is already choosing one or
  31. >the other.
  32. >        Pat Rankin, rankin@eql.caltech.edu
  33.  
  34. it uses termcap.
  35.  
  36. this worked great, as a  start.  the problem is there's too /much/ color.
  37. for example, when it prints a green character, /everything/ is green until
  38. it hits a blue character, then /everything/ is blue until ...
  39.  
  40. so i'm hoping to find the color-print routine so i can tell it to print
  41. a 'no-color' (\033[0m) afterwards.  but i don't even know where to begin
  42. looking.  (well, i began with decl.c, pri.c and termcap.c which include the
  43. color function called hilites, but i'm stuck from there)
  44.  
  45. can anybody offer insight?  thanx in advance.
  46.  
  47. --hymie
  48. hymowitz@cs.jhu.edu                                         hymie@jhuvms.bitnet
  49. -------------------------------------------------------------------------------
  50. Okay, so ten out of ten for style,
  51. but minus several million for good thinking, yeah?          --Zaphod Beeblebrox
  52. -------------------------------------------------------------------------------
  53.