head 1.2; access; symbols; locks mys:1.2; strict; comment @# @; 1.2 date 2000.04.11.21.41.24; author mys; state Exp; branches; next 1.1; 1.1 date 99.11.09.21.32.05; author mys; state Exp; branches; next ; desc @@ 1.2 log @*** empty log message *** @ text @# Copyright (C) 1999 - Martin Strauss - under terms of GPL ####################################################### # Farbige Syntax # ok ! proc Syntax {E START END} { global I_befehl syntax_flag if $syntax_flag { set NEW_syntax [$E search "\\" $START $END] if {$NEW_syntax != ""} { $E tag remove syntax_green $NEW_syntax $END $E tag remove syntax_red $NEW_syntax $END $E tag remove syntax_blue $NEW_syntax $END set LISTE [array names I_befehl] lappend LISTE "$" "\\" "\[" "\]" "\{" "\}" ";" "." "-" while {$NEW_syntax != ""} { $E mark set syntax $NEW_syntax if {[$E get syntax-1c syntax] != "\\"} { set ksp [lsearch -exact $LISTE [$E get syntax+1c {syntax+1c wordend}]] if {$ksp == -1} { $E tag add syntax_red syntax {syntax+1c wordend} } else { $E tag add syntax_green syntax {syntax+1c wordend} } } elseif {[$E get syntax-2c syntax-1c] != "\\"} { set ksp [lsearch -exact $LISTE [$E get syntax+1c {syntax+1c wordend}]] if {$ksp == -1} { $E tag add syntax_red syntax {syntax+1c wordend} } else { $E tag add syntax_green syntax {syntax+1c wordend} } } set NEW_syntax [$E search "\\" syntax+1c $END] } set NEW_syntax [$E search "%" $START $END] while {$NEW_syntax != ""} { $E mark set syntax $NEW_syntax if {[$E get syntax-1c syntax] != "\\"} { $E tag add syntax_blue syntax {syntax lineend} $E tag remove syntax_red syntax {syntax lineend} } else { $E tag add syntax_green syntax-1c syntax+1c $E tag remove syntax_red syntax-1c syntax+1c } set NEW_syntax [$E search "%" syntax+1c $END] } set NEW_syntax [$E search "$" $START $END] while {$NEW_syntax != ""} { $E mark set syntax $NEW_syntax $E tag add syntax_green syntax syntax+1c $E tag remove syntax_red syntax syntax+1c set NEW_syntax [$E search "$" syntax+1c $END] } }}} @ 1.1 log @Initial revision @ text @d1 54 a54 54 # Copyright (C) 1999 - Martin Strauss - under terms of GPL ####################################################### # Farbige Syntax # ok ! proc Syntax {E START END} { global I_befehl syntax_flag if $syntax_flag { set NEW_syntax [$E search "\\" $START $END] if {$NEW_syntax != ""} { $E tag remove syntax_green $NEW_syntax $END $E tag remove syntax_red $NEW_syntax $END $E tag remove syntax_blue $NEW_syntax $END set LISTE [array names I_befehl] lappend LISTE "$" "\\" "\[" "\]" "\{" "\}" ";" "." "-" while {$NEW_syntax != ""} { $E mark set syntax $NEW_syntax if {[$E get syntax-1c syntax] != "\\"} { set ksp [lsearch -exact $LISTE [$E get syntax+1c {syntax+1c wordend}]] if {$ksp == -1} { $E tag add syntax_red syntax {syntax+1c wordend} } else { $E tag add syntax_green syntax {syntax+1c wordend} } } elseif {[$E get syntax-2c syntax-1c] != "\\"} { set ksp [lsearch -exact $LISTE [$E get syntax+1c {syntax+1c wordend}]] if {$ksp == -1} { $E tag add syntax_red syntax {syntax+1c wordend} } else { $E tag add syntax_green syntax {syntax+1c wordend} } } set NEW_syntax [$E search "\\" syntax+1c $END] } set NEW_syntax [$E search "%" $START $END] while {$NEW_syntax != ""} { $E mark set syntax $NEW_syntax if {[$E get syntax-1c syntax] != "\\"} { $E tag add syntax_blue syntax {syntax lineend} $E tag remove syntax_red syntax {syntax lineend} } else { $E tag add syntax_green syntax-1c syntax+1c $E tag remove syntax_red syntax-1c syntax+1c } set NEW_syntax [$E search "%" syntax+1c $END] } set NEW_syntax [$E search "$" $START $END] while {$NEW_syntax != ""} { $E mark set syntax $NEW_syntax $E tag add syntax_green syntax syntax+1c $E tag remove syntax_red syntax syntax+1c set NEW_syntax [$E search "$" syntax+1c $END] } }}} @