home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1999 March B
/
SCO_CASTOR4RRT.iso
/
base
/
root.15
/
etc
/
dcu.d
/
scripts
/
scr_init
/
scr_init~
Wrap
Text File
|
1998-08-19
|
3KB
|
112 lines
#ident "@(#)scr_init 4.1"
if [ -z "$MSGWID" ]
then
call int_varload WCURRENT "@longp:&Wcurrent"
DEFBORD=4
BADYELLOW=0
typeset bgchar=32 # default background character is "space"
case "$TERM" in
*vt*)
call Wsetborder_string '@string_t:!++++-|!'
;;
*386|*386-M|*386-m)
typeset bgchar=${ISL_BGCHAR:-176} # background is stippled.
BADYELLOW=1
;;
*386*ie)
if [ "$1" = "boot" ]
then
# The computer's monitor is being used with a special version of
# the 8859-1 code set that contains the stipple character at
# location 128.
typeset bgchar=${ISL_BGCHAR:-128} # bkgrnd is stippled.
else
:
# The computer's monitor is being used with the 8859-1 code set,
# which does not contain the stipple character. Therefore, use the
# default background character as assigned above.
fi
BADYELLOW=1
;;
*386*mb)
typeset bgchar=32 # multibyte background is space
BADYELLOW=1
;;
esac
if [ -n "$ISL_BG" ]
then
if [ "$INIT_SCREEN" = "true" ]
then
call win_init ${ISL_BG:-$BLUE} ${ISL_FG:-$WHITE} $bgchar
else
call win_init ${ISL_BG:-$BLUE} ${ISL_FG:-$WHITE} $bgchar > /dev/null 2>&1
fi
else
call win_init ${ISL_BG:-$BLUE} ${ISL_FG:-$WHITE} $bgchar
fi
cdecl longp play='&LINES'
cprint -v LINES play
cset play='&COLS'
cprint -v COLUMNS play >&2
integer HEADBOTLINE=0 FOOTBOTLINE=$LINES-1 FOOTTOPLINE=FOOTBOTLINE-FOOTER_HEIGHT+1 MSGLINE=FOOTTOPLINE-1 LASTLINE=MSGLINE-1
ADVANCED=:
NOTADVANCED=on
advanced() {
eval "$ADVANCED"
NOTADVANCED=
}
MENU_SELECT_FG=${ISL_MENU_SELECT_FG:-$WHITE}
MENU_SELECT_BG=${ISL_MENU_SELECT_BG:-$RED}
HELP_BG=${ISL_HELP_BG:-$BLUE}
HELP_FG=${ISL_HELP_FG:-$WHITE}
ERROR_BG=${ISL_ERROR_BG:-$RED}
ERROR_FG=${ISL_ERROR_FG:-$WHITE}
COMBO1_BG=${ISL_COMBO1_BG:-$BLUE}
COMBO1_FG=${ISL_COMBO1_FG:-$WHITE}
COMBO2_BG=${ISL_COMBO2_BG:-$CYAN}
COMBO2_FG=${ISL_COMBO2_FG:-$BLACK}
COMBO3_BG=${ISL_COMBO3_BG:-$BLUE}
COMBO3_FG=${ISL_COMBO3_FG:-$WHITE}
function init_head
{
unset -f init_head
open_window 0 0 $COLUMNS-1 0 -noborder -fg ${ISL_HEAD_FG:-$WHITE} -bg ${ISL_HEAD_BG:-$BLUE}
HEADWID=$CURWIN
iscolor || wsetattr $HEADWID 01000000
integer len="(COLUMNS-${#GENERIC_HEADER})/2" len2=COLUMNS-len
typeset -L$len buf=
typeset -L$len2 buf2="$GENERIC_HEADER"
wclear $HEADWID
wprintf $HEADWID "$buf$buf2"
}
function init_footer {
unset -f init_footer
open_window -noborder 0 $MSGLINE $COLUMNS-1 $MSGLINE -fg ${ISL_MSG_FG:-$BLACK} -bg ${ISL_MSG_BG:-$WHITE}
MSGWID=$CURWIN
open_window 0 $FOOTTOPLINE $COLUMNS-1 $FOOTBOTLINE -noborder -fg ${ISL_FOOTER_FG:-$WHITE} -bg ${ISL_FOOTER_BG:-$BLUE}
FOOTWID=$CURWIN
iscolor || wsetattr $FOOTWID 01000000
}
if [ -n "$ISL_BG" ]
then
if [ "$INIT_SCREEN" = "true" ]
then
init_head
init_footer
else
{
init_head
} > /dev/null
init_footer
echo -n "\033[2c"
fi
else
init_head
init_footer
fi
fi