Warning: this is an htmlized version!
The original is across this link,
and the conversion rules are here.
# eev/libeeg/msg - a library for eeg4.
# By edrx, 2001nov26.
# Htmlized version: <http://angg.twu.net/eev/libeeg/msg.html>.

# This file defines the "msg" function and its friends, for e-scripts
# that need to show messages on the screen. We suppose that the
# controlled program is `screen', and so there's a way to redraw the
# screen to erase the message.

# (find-eev "eeg3" "do_message")

# (eeman "4 console_codes" "set brown foreground")
# (eeman "4 console_codes" "Move cursor to the indicated row, column")
#
proc colorstr {color str} { return "\033\[m\033\[${color}m$str\033\[m" }
proc yrstr {str} { colorstr {1;33;41} $str }	;# yellow on red
proc rowyrstr {row str} { return "\033\[$row;1f[yrstr $str]" }

# (find-node "(screen)Redisplay" "Command: redisplay")
set redraw "\001l"
proc doredraw {} { send [gset redraw] }
proc __msg {str} {
  send_user $str
  expect_user -re [gset action_re]
  doredraw
}

proc _msg {str} { __msg [yrstr $str] }
proc msg {str} { appendaction [list _msg $str] }

proc _rowmsg {row str} { __msg [rowyrstr $row $str] }
proc rowmsg {str} { appendaction [list _rowmsg $str] }






#
#  Local Variables:
#  mode:		 tcl
#  coding:               no-conversion
#  ee-anchor-format:     "«%s»"
#  ee-charset-indicator: "Ñ"
#  End: