home *** CD-ROM | disk | FTP | other *** search
/ Executor 2.0 / executorv2.0.iso / pc / dos / extra / docs / maillist / text / archive.96 / text1984.txt < prev    next >
Encoding:
Text File  |  1996-07-25  |  3.7 KB  |  127 lines

  1.     id m0tuaps-0007r2a; Thu, 7 Mar 96 01:14 MST
  2. Sender: owner-executor
  3. Received: from ardi.com by ftp.ardi.com
  4.     (Smail3.1.29.1 #3) id m0tuaoz-0007qtn; Thu, 7 Mar 96 01:13 MST
  5. Path: sloth.swcp.com!news.ironhorse.com!news.unisys.com.br!news.uoregon.edu!hpg30a.csc.cuhk.hk!news.cuhk.edu.hk!agate!news.ucdavis.edu!slouken
  6. From: slouken@cs.ucdavis.edu (Sam Oscar Lantinga)
  7. Newsgroups: comp.emulators.mac.executor
  8. Subject: Re: selection color under executor
  9. Date: 6 Mar 1996 22:08:11 GMT
  10. Organization: University of California, Davis
  11. Lines: 105
  12. Message-ID: <4hl2cb$3im@mark.ucdavis.edu>
  13. References: <4he2g0$ms@news.cc.utah.edu> <m0tuMsW-000GOKC@gwar.ardi.com>
  14. NNTP-Posting-Host: maybach.cs.ucdavis.edu
  15. X-Newsreader: TIN [version 1.2 PL2]
  16. To: executor@ardi.com
  17. X-MailNews-Gateway: From newsgroup comp.emulators.mac.executor
  18. Sender: owner-executor@ardi.com
  19. Precedence: bulk
  20.  
  21. Mat Hostetter (mat@ardi.com) wrote:
  22. : >>>>> "zinc" == zinc  <zinc@zifi.genetics.utah.edu> writes:
  23.  
  24. :     zinc> is it possible to change the color used by programs such as
  25. :     zinc> Word or KaleidaGraph for selected text?  on my system the
  26. :     zinc> default is a bright yellow which isn't too bad but i usually
  27. :     zinc> like more mellow colors.
  28.  
  29. :     zinc> this is with E/L 1.99q7 (ELF) Linux 1.3.70 X-Windows
  30.  
  31. : On a Mac the highlighting color is stored as a 6-byte RGB value at
  32. : address 0xDA0.  Executor sets that to R:G:B = 0xFFFF:0xFFFF:0x0000 by
  33. : default (bright yellow).
  34.  
  35. : Someone could probably write a desk accessory to let you change this
  36. : value.  Since you're using Linux, I suppose you could change the value
  37. : of the memory locations holding the highlight color in gdb.  Heh.
  38.  
  39.     *laugh*  Okay, I tried it and it works.
  40.  
  41. Here's a script to run executor under Linux with a selection color
  42. of your choice. :)  GDB is pretty awesome.
  43.  
  44. Usage: ehigh [-svga] colorname
  45.  
  46. "colorname" can be any color that is recognized by X11 programs.
  47.  
  48. See ya!
  49.  
  50.     -Sam Lantinga            (slouken@cs.ucdavis.edu)
  51.  
  52. -----------------------------------------------------------------
  53. -- Save the following script to a file named 'ehigh' and then run
  54.    chmod 755 ehigh
  55. -- Note that this is just a hack, and isn't supported. :)
  56. -----------------------------------------------------------------
  57. #!/bin/sh
  58. #
  59. # This is a script to change the highlight color of executor, the
  60. # Macintosh emulator from ARDI.
  61. #
  62. # Note that the Macintosh color palette differs greatly from that
  63. # of the X11 standard colors, so the color you get might not be
  64. # the color you expect. :-)
  65. #
  66. # It's a hack, and not supported in any way. :)
  67.  
  68.  
  69. # Choose your executor!
  70. binary=/usr/local/bin/executor
  71. if [ "$1" = "-svga" ]; then
  72.     echo "WARNING!"
  73.     echo "-- Modifying executor-svga can cause your system to freeze!"
  74.     echo ""
  75.     echo -n "Press Ctrl-C to abort: "
  76.     read junk
  77.     binary=/usr/local/bin/executor-svga
  78.     shift
  79. fi
  80.  
  81. # Get the color highlight value
  82. rgbtxt=/usr/lib/X11/rgb.txt
  83. if [ "$1" = "" ]; then
  84.     value1=0xFFFF
  85.     value2=0xFFFF
  86.     value3=0x0000
  87. else
  88.     color=`egrep "    $1$" $rgbtxt`
  89.     if [ "$color" = "" ]; then
  90.         (echo "Color '$1' not found!";
  91.          echo "Possible matches:"
  92.          fgrep -i "$1" $rgbtxt
  93.         ) | less
  94.         exit
  95.     fi
  96.     value1=`echo "$color" |
  97.         awk '{printf("0x%2x%2x",\$1,\$1)}' | sed 's/ /0/g'`
  98.     value2=`echo "$color" |
  99.         awk '{printf("0x%2x%2x",\$2,\$2)}' | sed 's/ /0/g'`
  100.     value3=`echo "$color" |
  101.         awk '{printf("0x%2x%2x",\$3,\$3)}' | sed 's/ /0/g'`
  102. fi
  103.  
  104. # Save our script...
  105. cat >$HOME/Delete_ME <<__EOF__
  106. file $binary
  107. break mmap
  108. run
  109. c
  110. x/3h 0xDA0
  111. set variable *0xDA0 = $value1
  112. set variable *0xDA2 = $value2
  113. set variable *0xDA4 = $value3
  114. x/3h 0xDA0
  115. d 1
  116. quit
  117. __EOF__
  118.  
  119. # Run it. :-)
  120. gdb --command=$HOME/Delete_ME
  121. rm -f $HOME/Delete_ME
  122.  
  123. clear
  124. echo "Thank you very much."
  125.  
  126.