OpenCores
URL https://opencores.org/ocsvn/or1k_old/or1k_old/trunk

Subversion Repositories or1k_old

[/] [or1k_old/] [trunk/] [rc203soc/] [sw/] [uClinux/] [scripts/] [kconfig.tk] - Rev 1765

Go to most recent revision | Compare with Previous | Blame | View Log

#!/usr/bin/wish -f
#
# This is a handy replacement for ".widget cget" that requires neither tk4
# nor additional source code uglification.
#
proc cget { w option } {
        return "[lindex [$w configure $option] 4]"
}

#
# Function to compensate for broken config.in scripts like the sound driver,
# which make dependencies on variables that are never even conditionally
# defined.
#
proc vfix { var } {
        global $var
        if [ catch {eval concat $$var} ] {
                puts stdout "WARNING - broken Config.in!  $var was not declared!"
                set $var 0
        }
}

#
# Create a "reference" object to steal colors from.
#
button .ref
#
# On monochrome displays, -disabledforeground is blank by default; that's
# bad.  Fill it with -foreground instead.
#
if { [cget .ref -disabledforeground] == "" } {
        .ref configure -disabledforeground [cget .ref -foreground]
}


#
# Define some macros we will need to parse the config.in file.
#
proc mainmenu_name { text } {
        message .header.message -width 400 -relief raised -text "$text"
        pack .header.label .header.message -side left -padx 15
        wm title . "$text"
}

proc menu_option { w menu_num text } {
        button .f0.x$menu_num -text "$text" -width 50 -command "$w .$w \"$text\""
        pack .f0.x$menu_num -pady 1 -expand on
}

#
# Not used at the moment, but this runs a command in a subprocess and
# displays the result in a window with a scrollbar.
#
# For now, we just do external "make" commands to stdout with do_make, so
# this function is never called.
#
proc do_cmd { w command } {
        catch {destroy $w}
        toplevel $w -class Dialog
        frame $w.tb
        text $w.tb.text -relief raised -bd 2 -yscrollcommand "$w.tb.scroll set"
        scrollbar $w.tb.scroll -command "$w.tb.text yview"
        pack $w.tb.scroll -side right -fill y
        pack $w.tb.text -side left

        set oldFocus [focus]
        frame $w.back
        button $w.back.ok -text "OK" -width 20 \
                -command "destroy $w; focus $oldFocus" -state disabled
        button $w.back.ccl -text "Cancel" -width 20 \
                -command "destroy $w; focus $oldFocus"
        pack $w.tb -side top
        pack $w.back.ok $w.back.ccl -side left
        pack $w.back -side bottom -pady 10

        focus $w
        wm geometry $w +30+35

        $w.tb.text delete 1.0 end
        set f [open |$command]
        while {![eof $f]} {
                $w.tb.text insert end [read $f 256]
        }
        close $f
        $w.back.ok configure -state normal
}

proc load_configfile { w title func } {
        catch {destroy $w}
        toplevel $w -class Dialog
        global loadfile
        frame $w.x
        label $w.bm -bitmap questhead
        pack  $w.bm -pady 10 -side top -padx 10
        label $w.x.l -text "Enter filename:" -relief raised
        entry $w.x.x -width 35 -relief sunken -borderwidth 2 \
                -textvariable loadfile
        pack $w.x.l $w.x.x -anchor w -side left
        pack $w.x -side top -pady 10
        wm title $w "$title" 

        set oldFocus [focus]
        frame $w.f
        button $w.f.back -text "OK" -width 20 \
                -command "destroy $w; focus $oldFocus;$func .fileio"
        button $w.f.canc -text "Cancel" \
                -width 20 -command "destroy $w; focus $oldFocus"
        pack $w.f.back $w.f.canc -side left -pady 10 -padx 45
        pack $w.f -pady 10 -side bottom -padx 10 -anchor w
        focus $w
        global winx; global winy
        set winx [expr [winfo x .]+30]; set winy [expr [winfo y .]+30]
        wm geometry $w +$winx+$winy
}

proc maybe_exit { w } {
        catch {destroy $w}
        toplevel $w -class Dialog
        label $w.bm -bitmap questhead
        pack  $w.bm -pady 10 -side top -padx 10
        message $w.m -width 400 -aspect 300 \
                -text "Changes will be lost.  Are you sure?" -relief flat
        pack  $w.m -pady 10 -side top -padx 10
        wm title $w "Are you sure?" 

        set oldFocus [focus]
        frame $w.f
        button $w.f.back -text "OK" -width 20 \
                -command "exit"
        button $w.f.canc -text "Cancel" \
                -width 20 -command "destroy $w; focus $oldFocus"
        pack $w.f.back $w.f.canc -side left -pady 10 -padx 45
        pack $w.f -pady 10 -side bottom -padx 10 -anchor w
        focus $w
        global winx; global winy
        set winx [expr [winfo x .]+30]; set winy [expr [winfo y .]+30]
        wm geometry $w +$winx+$winy
}

proc read_config_file { w } {
        global loadfile
        if { [string length $loadfile] != 0 && [file readable $loadfile] == 1 } then {
                read_config $loadfile
        } else {
                catch {destroy $w}
                toplevel $w -class Dialog
                message $w.m -width 400 -aspect 300 -text \
                        "Unable to read file $loadfile" \
                         -relief raised 
                label $w.bm -bitmap error
                pack $w.bm $w.m -pady 10 -side top -padx 10
                wm title $w "Oops" 

                set oldFocus [focus]
                frame $w.f
                button $w.f.back -text "Bummer" \
                        -width 10 -command "destroy $w; focus $oldFocus"
                pack $w.f.back -side bottom -pady 10 -anchor s
                pack $w.f -pady 10 -side top -padx 10 -anchor s
                focus $w
                global winx; global winy
                set winx [expr [winfo x .]+30]; set winy [expr [winfo y .]+30]
                wm geometry $w +$winx+$winy
        }
}

proc write_config_file  { w } {
        global loadfile
        if { [string length $loadfile] != 0 
                && ([file writable $loadfile] == 1 || ([file exists $loadfile] == 0 && [file writable [file dirname $loadfile]] == 1)) } then {
                writeconfig $loadfile /dev/null
        } else {
                catch {destroy $w}
                toplevel $w -class Dialog
                message $w.m -width 400 -aspect 300 -text \
                        "Unable to write file $loadfile" \
                         -relief raised 
                label $w.bm -bitmap error
                pack $w.bm $w.m -pady 10 -side top -padx 10
                wm title $w "Oops" 

                set oldFocus [focus]
                frame $w.f
                button $w.f.back -text "OK" \
                        -width 10 -command "destroy $w; focus $oldFocus"
                pack $w.f.back -side bottom -pady 10 -anchor s
                pack $w.f -pady 10 -side top -padx 10 -anchor s
                focus $w
                global winx; global winy
                set winx [expr [winfo x .]+30]; set winy [expr [winfo y .]+30]
                wm geometry $w +$winx+$winy
        }
}

proc read_config { filename } {
        set file1 [open $filename r]
        clear_choices
        while { [gets $file1 line] >= 0} {
                if [regexp {([0-9A-Za-z_]+)=([ynm])} $line foo var value] {
                        if { $value == "y" } then { set cmd "global $var; set $var 1" }
                        if { $value == "n" } then { set cmd "global $var; set $var 0" }
                        if { $value == "m" } then { set cmd "global $var; set $var 2" }
                        eval $cmd
                }
                if [regexp {# ([0-9A-Za-z_]+) is not set} $line foo var] {
                        set cmd "global $var; set $var 0"
                        eval $cmd
                }
                if [regexp {([0-9A-Za-z_]+)=([0-9A-Fa-f]+)} $line foo var value] {
                        set cmd "global $var; set $var $value"
                        eval $cmd
                }
        }
        close $file1
        update_choices
        update_mainmenu .rdupd
}
proc write_comment { file1 file2 text } {
        puts $file1 ""
        puts $file1 "#"
        puts $file1 "# $text"
        puts $file1 "#"
        puts $file2 "/*"
        puts $file2 " * $text"
        puts $file2 " */"
}

proc write_tristate { file1 file2 varname variable dep } {
        if { $variable == 0 } \
                then { puts $file1 "# $varname is not set"; \
                       puts $file2 "#undef $varname"} \
        elseif { $variable == 2 || ($dep == 2 && $variable == 1) } \
                then { puts $file1 "$varname=m"; \
                       puts $file2 "#undef $varname"; \
                       puts $file2 "#define ${varname}_MODULE 1" } \
        elseif { $variable == 1 && $dep != 2 } \
                then { puts $file1 "$varname=y"; \
                       puts $file2 "#define $varname 1" } \
        else { \
            error "Attempting to write value for variable that is not configured ($varname)." \
        }
}

proc write_int { file1 file2 varname variable dep } {
        if { $dep == 0 } \
                then { puts $file1 "# $varname is not set"; \
                       puts $file2 "#undef $varname"} \
        else {
                puts $file1 "$varname=$variable"; \
                puts $file2 "#define $varname $variable"; \
        }
}

proc write_hex { file1 file2 varname variable dep } {
        if { $dep == 0 } \
                then { puts $file1 "# $varname is not set"; \
                       puts $file2 "#undef $varname"} \
        else {
                puts $file1 "$varname=$variable"; \
                puts $file2 "#define $varname 0x$variable"; \
        }
}

proc option_name {w mnum line text helpidx} {
        button $w.x$line.l -text "$text" -relief groove -anchor w
        $w.x$line.l configure -activefore [cget $w.x$line.l -fg] \
                                -activeback [cget $w.x$line.l -bg]
        button $w.x$line.help -text "Help" -relief raised \
                -command "dohelp .dohelp $helpidx"
        pack $w.x$line.help -side right -fill y
        pack $w.x$line.l -side right -fill both -expand on
}

proc toggle_switch {w mnum line text variable} {
        frame $w.x$line -relief sunken
        radiobutton $w.x$line.y -text "y" -variable $variable -value 1 \
                -relief groove -width 2 -command "update_menu$mnum .menu$mnum"
        radiobutton $w.x$line.m -text "m"  -variable $variable -value 2 \
                -relief groove -width 2 -command "update_menu$mnum .menu$mnum"
        radiobutton $w.x$line.n -text "n"  -variable $variable -value 0 \
                -relief groove -width 2 -command "update_menu$mnum .menu$mnum"
                
        option_name $w $mnum $line $text $variable
                
        pack $w.x$line.n $w.x$line.m $w.x$line.y -side right -fill y
}

proc bool {w mnum line text variable} {
        toggle_switch $w $mnum $line $text $variable
        $w.x$line.m configure -state disabled
        pack $w.x$line -anchor w -fill both -expand on
}

proc tristate {w mnum line text variable } {
        toggle_switch $w $mnum $line $text $variable
        pack $w.x$line -anchor w -fill both -expand on
}

proc dep_tristate {w mnum line text variable depend } {
        tristate $w $mnum $line $text $variable
}

proc int { w mnum line text variable } {
        frame $w.x$line
        entry $w.x$line.x -width 18 -relief sunken -borderwidth 2 \
                -textvariable $variable
        option_name $w $mnum $line $text $variable
        pack $w.x$line.x -anchor w -side right -fill y
        pack $w.x$line -anchor w -fill both -expand on
}

proc hex { w mnum line text variable } {
        int $w $mnum $line $text $variable
}

proc minimenu { w mnum line text variable helpidx } {
        frame $w.x$line
        menubutton $w.x$line.x -textvariable $variable -menu \
                $w.x$line.x.menu -relief raised \
                -width 15 -anchor w
        option_name $w $mnum $line $text $helpidx
        pack $w.x$line.x -anchor w -side right -fill y
        pack $w.x$line -anchor w -fill both -expand on
}

proc comment {w line text } {
#nothing done for comments now.
}

proc do_make { command } {
        exec sh -c $command <@stdin >@stdout 2>@stderr
#       do_cmd .make_window "sh -c $command"
}

proc dohelp {w var }  {
        catch {destroy $w}
        toplevel $w -class Dialog

        set filefound 0
        set found 0
        set lineno 0

        if { [file readable Documentation/Configure.help] == 1} then {
                set filefound 1
                set message [exec sed -n "
                        /^$var\[        \]*\$/,\${
                                /^$var\[        \]*\$/c\\
${var}:\\

                                /^#.*/d
                                /^\[    \]*\$/bL
                                H
                        }
                        d
                        :L x
                        s/\\n  //
                        s/\\n  / /g
                        p
                        q
                        " Documentation/Configure.help]
                set found [expr [string length "$message"] > 0]
        }
        
        frame $w.f1

        if { $found == 0 } then {
                if { $filefound == 0 } then {
                message $w.f1.m -width 750 -aspect 300 -relief flat -text \
                        "No help available - unable to open file Documentation/Configure.help.  This file should have come with your kernel."
                } else {
                message $w.f1.m -width 400 -aspect 300 -relief flat -text \
                        "No help available for $var"
                }
                label $w.f1.bm -bitmap error
                wm title $w "RTFM"
        } else {
                message $w.f1.m -width 400 -aspect 300 -text $message \
                         -relief flat
                label $w.f1.bm -bitmap info
                wm title $w "Configuration help" 
        }
        pack $w.f1.bm $w.f1.m -side left -padx 10
        pack $w.f1 -side top
        set oldFocus [focus]
        
        # Do the OK button
        #
        frame $w.f2
        button $w.f2.ok -text "OK" \
                -width 10 -command "destroy $w; focus $oldFocus"
        pack $w.f2.ok -side bottom -pady 10 -anchor s
        pack $w.f2 -side bottom -padx 10 -anchor s

        # Finish off the window
        #
        focus $w
        global winx; global winy
        set winx [expr [winfo x .]+30]; set winy [expr [winfo y .]+30]
        wm geometry $w +$winx+$winy
}

proc wrapup {w }  {
        catch {destroy $w}
        toplevel $w -class Dialog
        message $w.m -width 400 -aspect 300 -text \
                "The linux kernel is now hopefully configured for your setup. Check the top-level Makefile for additional configuration, and do a 'make dep ; make clean' if you want to be sure all the files are correctly re-made."  -relief raised 
        label $w.bm -bitmap info
        pack $w.bm $w.m -pady 10 -side top -padx 10
        wm title $w "Kernel build instructions" 

        set oldFocus [focus]
        frame $w.f
        button $w.f.back -text "OK" \
                -width 10 -command "exit"
        pack $w.f.back -side bottom -pady 10 -anchor s
        pack $w.f -pady 10 -side top -padx 10 -anchor s
        focus $w
        global winx; global winy
        set winx [expr [winfo x .]+30]; set winy [expr [winfo y .]+30]
        wm geometry $w +$winx+$winy

}

proc check_sound_config { num } {
#nothing for now.
}

proc do_sound {w mnum line} {
        message $w.x$line -width 400 -aspect 300 -text "Note: The sound drivers cannot as of yet be configured via the X-based interface" -relief raised
        pack $w.x$line -side top -pady 10
}

#
# Next set up the particulars for the top level menu, and define a few
# buttons which we will stick down at the bottom.
#
frame .header
label .header.label 

frame .f0 

mainmenu_name "uClinux/OR1K (w/o MMU) Kernel Configuration"
menu_option menu1 1 "Code maturity level options"
proc menu1 {w title} {
        catch {destroy $w}
        toplevel $w -class Dialog
        wm withdraw $w
        message $w.m -width 400 -aspect 300 -text \
                "Code maturity level options"  -relief raised
        pack $w.m -pady 10 -side top -padx 10
        wm title $w "Code maturity level options" 

        set oldFocus [focus]
        frame $w.f
        button $w.f.back -text "Main Menu" \
                -width 15 -command "destroy $w; focus $oldFocus; update_mainmenu $w"
        button $w.f.next -text "Next" \
                -width 15 -command " destroy $w; focus $oldFocus;  menu2 .menu2 \"$title\""
        button $w.f.prev -text "Prev" \
                -width 15 -command " destroy $w; focus $oldFocus; menu0 .menu0 \"$title\""
        $w.f.prev configure -state disabled
        pack $w.f.back $w.f.next $w.f.prev -side left -expand on
        pack $w.f -pady 10 -side bottom -anchor w -fill x
        frame $w.topline -relief ridge -borderwidth 2 -height 2
        pack $w.topline -side top -fill x

        frame $w.botline -relief ridge -borderwidth 2 -height 2
        pack $w.botline -side bottom -fill x

        frame $w.config
        pack $w.config -fill y -expand on

        scrollbar $w.config.vscroll -command "$w.config.canvas yview"
        pack $w.config.vscroll -side right -fill y

        canvas $w.config.canvas -height 1\
                -relief flat -borderwidth 0 -yscrollcommand "$w.config.vscroll set" \
                -width [expr [winfo screenwidth .] * 1 / 2] 
        frame $w.config.f
        pack $w.config.canvas -side right -fill y


        bool $w.config.f 1 0 "Prompt for development and/or incomplete code/drivers" CONFIG_EXPERIMENTAL



        focus $w
        update_menu1 $w.config.f
        global winx; global winy
        set winx [expr [winfo x .]+30]; set winy [expr [winfo y .]+30]
        wm geometry $w +$winx+$winy
        update idletasks
        $w.config.canvas create window 0 0 -anchor nw -window $w.config.f

        $w.config.canvas configure \
                -width [expr [winfo reqwidth $w.config.f] + 1]\
                -scrollregion "-1 -1 [expr [winfo reqwidth $w.config.f] + 1] \
                         [expr [winfo reqheight $w.config.f] + 1]"

        set winy [expr [winfo reqh $w] - [winfo reqh $w.config.canvas]]
        set scry [expr [winfo screenh $w] / 2]
        set maxy [expr [winfo screenh $w] * 3 / 4]
        set canvtotal [expr [winfo reqh $w.config.f] + 2]
        if [expr $winy + $canvtotal < $maxy] {
                $w.config.canvas configure -height $canvtotal
        } else {
                $w.config.canvas configure -height [expr $scry - $winy]
        }
        update idletasks
        wm maxsize $w [winfo width $w] [winfo screenheight $w]
        wm minsize $w [winfo width $w] 100

        wm deiconify $w
}


proc update_menu1 {w}  {
        update_define
}


menu_option menu2 2 "Platform dependant setup"
proc menu2 {w title} {
        catch {destroy $w}
        toplevel $w -class Dialog
        wm withdraw $w
        message $w.m -width 400 -aspect 300 -text \
                "Platform dependant setup"  -relief raised
        pack $w.m -pady 10 -side top -padx 10
        wm title $w "Platform dependant setup" 

        set oldFocus [focus]
        frame $w.f
        button $w.f.back -text "Main Menu" \
                -width 15 -command "destroy $w; focus $oldFocus; update_mainmenu $w"
        button $w.f.next -text "Next" \
                -width 15 -command " destroy $w; focus $oldFocus;  menu3 .menu3 \"$title\""
        button $w.f.prev -text "Prev" \
                -width 15 -command " destroy $w; focus $oldFocus; menu1 .menu1 \"$title\""
        pack $w.f.back $w.f.next $w.f.prev -side left -expand on
        pack $w.f -pady 10 -side bottom -anchor w -fill x
        frame $w.topline -relief ridge -borderwidth 2 -height 2
        pack $w.topline -side top -fill x

        frame $w.botline -relief ridge -borderwidth 2 -height 2
        pack $w.botline -side bottom -fill x

        frame $w.config
        pack $w.config -fill y -expand on

        scrollbar $w.config.vscroll -command "$w.config.canvas yview"
        pack $w.config.vscroll -side right -fill y

        canvas $w.config.canvas -height 1\
                -relief flat -borderwidth 0 -yscrollcommand "$w.config.vscroll set" \
                -width [expr [winfo screenwidth .] * 1 / 2] 
        frame $w.config.f
        pack $w.config.canvas -side right -fill y


        global tmpvar_0
        minimenu $w.config.f 2 0 "CPU" tmpvar_0 CONFIG_OR32
        menu $w.config.f.x0.x.menu
        $w.config.f.x0.x.menu add radiobutton -label "OR32" -variable tmpvar_0 -value "OR32" -command "update_menu2 .menu2.config.f"
        bool $w.config.f 2 1 "General OR32 board support" CONFIG_GEN
        global tmpvar_1
        minimenu $w.config.f 2 2 "Kernel executes from" tmpvar_1 CONFIG_RAMKERNEL
        menu $w.config.f.x2.x.menu
        $w.config.f.x2.x.menu add radiobutton -label "RAM" -variable tmpvar_1 -value "RAM" -command "update_menu2 .menu2.config.f"
        $w.config.f.x2.x.menu add radiobutton -label "ROM" -variable tmpvar_1 -value "ROM" -command "update_menu2 .menu2.config.f"



        focus $w
        update_menu2 $w.config.f
        global winx; global winy
        set winx [expr [winfo x .]+30]; set winy [expr [winfo y .]+30]
        wm geometry $w +$winx+$winy
        update idletasks
        $w.config.canvas create window 0 0 -anchor nw -window $w.config.f

        $w.config.canvas configure \
                -width [expr [winfo reqwidth $w.config.f] + 1]\
                -scrollregion "-1 -1 [expr [winfo reqwidth $w.config.f] + 1] \
                         [expr [winfo reqheight $w.config.f] + 1]"

        set winy [expr [winfo reqh $w] - [winfo reqh $w.config.canvas]]
        set scry [expr [winfo screenh $w] / 2]
        set maxy [expr [winfo screenh $w] * 3 / 4]
        set canvtotal [expr [winfo reqh $w.config.f] + 2]
        if [expr $winy + $canvtotal < $maxy] {
                $w.config.canvas configure -height $canvtotal
        } else {
                $w.config.canvas configure -height [expr $scry - $winy]
        }
        update idletasks
        wm maxsize $w [winfo width $w] [winfo screenheight $w]
        wm minsize $w [winfo width $w] 100

        wm deiconify $w
}


proc update_menu2 {w}  {
        update_define
        global tmpvar_0; vfix tmpvar_0
        global CONFIG_GEN; vfix CONFIG_GEN
        if {($tmpvar_0 == "OR32")} then { .menu2.config.f.x1.y configure -state normal;.menu2.config.f.x1.n configure -state normal;.menu2.config.f.x1.l configure -state normal;set CONFIG_GEN [expr $CONFIG_GEN&15];} else { .menu2.config.f.x1.y configure -state disabled;.menu2.config.f.x1.n configure -state disabled;.menu2.config.f.x1.l configure -state disabled;set CONFIG_GEN [expr $CONFIG_GEN|16];}
}


menu_option menu3 3 "General setup"
proc menu3 {w title} {
        catch {destroy $w}
        toplevel $w -class Dialog
        wm withdraw $w
        message $w.m -width 400 -aspect 300 -text \
                "General setup"  -relief raised
        pack $w.m -pady 10 -side top -padx 10
        wm title $w "General setup" 

        set oldFocus [focus]
        frame $w.f
        button $w.f.back -text "Main Menu" \
                -width 15 -command "destroy $w; focus $oldFocus; update_mainmenu $w"
        button $w.f.next -text "Next" \
                -width 15 -command " destroy $w; focus $oldFocus;  menu4 .menu4 \"$title\""
        button $w.f.prev -text "Prev" \
                -width 15 -command " destroy $w; focus $oldFocus; menu2 .menu2 \"$title\""
        pack $w.f.back $w.f.next $w.f.prev -side left -expand on
        pack $w.f -pady 10 -side bottom -anchor w -fill x
        frame $w.topline -relief ridge -borderwidth 2 -height 2
        pack $w.topline -side top -fill x

        frame $w.botline -relief ridge -borderwidth 2 -height 2
        pack $w.botline -side bottom -fill x

        frame $w.config
        pack $w.config -fill y -expand on

        scrollbar $w.config.vscroll -command "$w.config.canvas yview"
        pack $w.config.vscroll -side right -fill y

        canvas $w.config.canvas -height 1\
                -relief flat -borderwidth 0 -yscrollcommand "$w.config.vscroll set" \
                -width [expr [winfo screenwidth .] * 1 / 2] 
        frame $w.config.f
        pack $w.config.canvas -side right -fill y


        bool $w.config.f 3 0 "PCI bios support" CONFIG_PCI
        bool $w.config.f 3 1 "    PCI device list support" CONFIG_PCIDEVLIST
        bool $w.config.f 3 2 "Networking support" CONFIG_NET
        bool $w.config.f 3 3 "System V IPC" CONFIG_SYSVIPC
        bool $w.config.f 3 4 "Reduced memory footprint" CONFIG_REDUCED_MEMORY
        tristate $w.config.f 3 5 "Kernel support for flat binaries" CONFIG_BINFMT_FLAT
        tristate $w.config.f 3 6 "Kernel support for ELF binaries" CONFIG_BINFMT_ELF
        bool $w.config.f 3 7 "Compile kernel as ELF - if your GCC is ELF-GCC" CONFIG_KERNEL_ELF
        bool $w.config.f 3 8 "Console support" CONFIG_CONSOLE
        bool $w.config.f 3 9 "Enable serial echo" CONFIG_SERIAL_ECHO
        bool $w.config.f 3 10 "Frame buffer" CONFIG_FRAMEBUFFER



        focus $w
        update_menu3 $w.config.f
        global winx; global winy
        set winx [expr [winfo x .]+30]; set winy [expr [winfo y .]+30]
        wm geometry $w +$winx+$winy
        update idletasks
        $w.config.canvas create window 0 0 -anchor nw -window $w.config.f

        $w.config.canvas configure \
                -width [expr [winfo reqwidth $w.config.f] + 1]\
                -scrollregion "-1 -1 [expr [winfo reqwidth $w.config.f] + 1] \
                         [expr [winfo reqheight $w.config.f] + 1]"

        set winy [expr [winfo reqh $w] - [winfo reqh $w.config.canvas]]
        set scry [expr [winfo screenh $w] / 2]
        set maxy [expr [winfo screenh $w] * 3 / 4]
        set canvtotal [expr [winfo reqh $w.config.f] + 2]
        if [expr $winy + $canvtotal < $maxy] {
                $w.config.canvas configure -height $canvtotal
        } else {
                $w.config.canvas configure -height [expr $scry - $winy]
        }
        update idletasks
        wm maxsize $w [winfo width $w] [winfo screenheight $w]
        wm minsize $w [winfo width $w] 100

        wm deiconify $w
}


proc update_menu3 {w}  {
        update_define
        global CONFIG_PCI; vfix CONFIG_PCI
        global CONFIG_PCIDEVLIST; vfix CONFIG_PCIDEVLIST
        if {($CONFIG_PCI == 1)} then { .menu3.config.f.x1.y configure -state normal;.menu3.config.f.x1.n configure -state normal;.menu3.config.f.x1.l configure -state normal;set CONFIG_PCIDEVLIST [expr $CONFIG_PCIDEVLIST&15];} else { .menu3.config.f.x1.y configure -state disabled;.menu3.config.f.x1.n configure -state disabled;.menu3.config.f.x1.l configure -state disabled;set CONFIG_PCIDEVLIST [expr $CONFIG_PCIDEVLIST|16];}
        global CONFIG_CONSOLE; vfix CONFIG_CONSOLE
        global CONFIG_SERIAL_ECHO; vfix CONFIG_SERIAL_ECHO
        if {($CONFIG_CONSOLE == 1)} then { .menu3.config.f.x9.y configure -state normal;.menu3.config.f.x9.n configure -state normal;.menu3.config.f.x9.l configure -state normal;set CONFIG_SERIAL_ECHO [expr $CONFIG_SERIAL_ECHO&15];} else { .menu3.config.f.x9.y configure -state disabled;.menu3.config.f.x9.n configure -state disabled;.menu3.config.f.x9.l configure -state disabled;set CONFIG_SERIAL_ECHO [expr $CONFIG_SERIAL_ECHO|16];}
        global CONFIG_FRAMEBUFFER; vfix CONFIG_FRAMEBUFFER
        if {($CONFIG_CONSOLE == 1)} then { .menu3.config.f.x10.y configure -state normal;.menu3.config.f.x10.n configure -state normal;.menu3.config.f.x10.l configure -state normal;set CONFIG_FRAMEBUFFER [expr $CONFIG_FRAMEBUFFER&15];} else { .menu3.config.f.x10.y configure -state disabled;.menu3.config.f.x10.n configure -state disabled;.menu3.config.f.x10.l configure -state disabled;set CONFIG_FRAMEBUFFER [expr $CONFIG_FRAMEBUFFER|16];}
}


menu_option menu4 4 "Floppy, IDE, and other block devices"
proc menu4 {w title} {
        catch {destroy $w}
        toplevel $w -class Dialog
        wm withdraw $w
        message $w.m -width 400 -aspect 300 -text \
                "Floppy, IDE, and other block devices"  -relief raised
        pack $w.m -pady 10 -side top -padx 10
        wm title $w "Floppy, IDE, and other block devices" 

        set oldFocus [focus]
        frame $w.f
        button $w.f.back -text "Main Menu" \
                -width 15 -command "destroy $w; focus $oldFocus; update_mainmenu $w"
        button $w.f.next -text "Next" \
                -width 15 -command " destroy $w; focus $oldFocus;  menu5 .menu5 \"$title\""
        button $w.f.prev -text "Prev" \
                -width 15 -command " destroy $w; focus $oldFocus; menu3 .menu3 \"$title\""
        pack $w.f.back $w.f.next $w.f.prev -side left -expand on
        pack $w.f -pady 10 -side bottom -anchor w -fill x
        frame $w.topline -relief ridge -borderwidth 2 -height 2
        pack $w.topline -side top -fill x

        frame $w.botline -relief ridge -borderwidth 2 -height 2
        pack $w.botline -side bottom -fill x

        frame $w.config
        pack $w.config -fill y -expand on

        scrollbar $w.config.vscroll -command "$w.config.canvas yview"
        pack $w.config.vscroll -side right -fill y

        canvas $w.config.canvas -height 1\
                -relief flat -borderwidth 0 -yscrollcommand "$w.config.vscroll set" \
                -width [expr [winfo screenwidth .] * 1 / 2] 
        frame $w.config.f
        pack $w.config.canvas -side right -fill y


        tristate $w.config.f 4 0 "ROM disk memory block device" CONFIG_BLK_DEV_BLKMEM
        bool $w.config.f 4 1 "IDE harddisk support" CONFIG_BLK_DEV_IDE
        bool $w.config.f 4 2 "   Include IDE/ATAPI CDROM support" CONFIG_BLK_DEV_IDECD
        bool $w.config.f 4 3 "   Include IDE/ATAPI TAPE support" CONFIG_BLK_DEV_IDETAPE
        bool $w.config.f 4 4 "   Include IDE/ATAPI FLOPPY support (new)" CONFIG_BLK_DEV_IDEFLOPPY
        tristate $w.config.f 4 5 "Loopback device support" CONFIG_BLK_DEV_LOOP
        bool $w.config.f 4 6 "Multiple devices driver support" CONFIG_BLK_DEV_MD
        tristate $w.config.f 4 7 "   Linear (append) mode" CONFIG_MD_LINEAR
        tristate $w.config.f 4 8 "   RAID-0 (striping) mode" CONFIG_MD_STRIPED
        tristate $w.config.f 4 9 "RAM disk support" CONFIG_BLK_DEV_RAM
        bool $w.config.f 4 10 "   Release empty RAM disk blocks" CONFIG_RD_RELEASE_BLOCKS
        bool $w.config.f 4 11 "   Initial RAM disk (initrd) support" CONFIG_BLK_DEV_INITRD
        tristate $w.config.f 4 12 "FLASH device support" CONFIG_DEV_FLASH
        bool $w.config.f 4 13 "   FLASH Block device" CONFIG_BLK_DEV_FLASH
        bool $w.config.f 4 14 "   FLASH Character device" CONFIG_CHR_DEV_FLASH



        focus $w
        update_menu4 $w.config.f
        global winx; global winy
        set winx [expr [winfo x .]+30]; set winy [expr [winfo y .]+30]
        wm geometry $w +$winx+$winy
        update idletasks
        $w.config.canvas create window 0 0 -anchor nw -window $w.config.f

        $w.config.canvas configure \
                -width [expr [winfo reqwidth $w.config.f] + 1]\
                -scrollregion "-1 -1 [expr [winfo reqwidth $w.config.f] + 1] \
                         [expr [winfo reqheight $w.config.f] + 1]"

        set winy [expr [winfo reqh $w] - [winfo reqh $w.config.canvas]]
        set scry [expr [winfo screenh $w] / 2]
        set maxy [expr [winfo screenh $w] * 3 / 4]
        set canvtotal [expr [winfo reqh $w.config.f] + 2]
        if [expr $winy + $canvtotal < $maxy] {
                $w.config.canvas configure -height $canvtotal
        } else {
                $w.config.canvas configure -height [expr $scry - $winy]
        }
        update idletasks
        wm maxsize $w [winfo width $w] [winfo screenheight $w]
        wm minsize $w [winfo width $w] 100

        wm deiconify $w
}


proc update_menu4 {w}  {
        update_define
        global CONFIG_BLK_DEV_IDE; vfix CONFIG_BLK_DEV_IDE
        global CONFIG_BLK_DEV_IDECD; vfix CONFIG_BLK_DEV_IDECD
        if {($CONFIG_BLK_DEV_IDE == 1)} then { .menu4.config.f.x2.y configure -state normal;.menu4.config.f.x2.n configure -state normal;.menu4.config.f.x2.l configure -state normal;set CONFIG_BLK_DEV_IDECD [expr $CONFIG_BLK_DEV_IDECD&15];} else { .menu4.config.f.x2.y configure -state disabled;.menu4.config.f.x2.n configure -state disabled;.menu4.config.f.x2.l configure -state disabled;set CONFIG_BLK_DEV_IDECD [expr $CONFIG_BLK_DEV_IDECD|16];}
        global CONFIG_BLK_DEV_IDETAPE; vfix CONFIG_BLK_DEV_IDETAPE
        if {($CONFIG_BLK_DEV_IDE == 1)} then { .menu4.config.f.x3.y configure -state normal;.menu4.config.f.x3.n configure -state normal;.menu4.config.f.x3.l configure -state normal;set CONFIG_BLK_DEV_IDETAPE [expr $CONFIG_BLK_DEV_IDETAPE&15];} else { .menu4.config.f.x3.y configure -state disabled;.menu4.config.f.x3.n configure -state disabled;.menu4.config.f.x3.l configure -state disabled;set CONFIG_BLK_DEV_IDETAPE [expr $CONFIG_BLK_DEV_IDETAPE|16];}
        global CONFIG_BLK_DEV_IDEFLOPPY; vfix CONFIG_BLK_DEV_IDEFLOPPY
        if {($CONFIG_BLK_DEV_IDE == 1)} then { .menu4.config.f.x4.y configure -state normal;.menu4.config.f.x4.n configure -state normal;.menu4.config.f.x4.l configure -state normal;set CONFIG_BLK_DEV_IDEFLOPPY [expr $CONFIG_BLK_DEV_IDEFLOPPY&15];} else { .menu4.config.f.x4.y configure -state disabled;.menu4.config.f.x4.n configure -state disabled;.menu4.config.f.x4.l configure -state disabled;set CONFIG_BLK_DEV_IDEFLOPPY [expr $CONFIG_BLK_DEV_IDEFLOPPY|16];}
        global CONFIG_BLK_DEV_MD; vfix CONFIG_BLK_DEV_MD
        global CONFIG_MD_LINEAR; vfix CONFIG_MD_LINEAR
        if {($CONFIG_BLK_DEV_MD == 1)} then { .menu4.config.f.x7.y configure -state normal;.menu4.config.f.x7.n configure -state normal;.menu4.config.f.x7.m configure -state normal;.menu4.config.f.x7.l configure -state normal;set CONFIG_MD_LINEAR [expr $CONFIG_MD_LINEAR&15];} else { .menu4.config.f.x7.y configure -state disabled;.menu4.config.f.x7.n configure -state disabled;.menu4.config.f.x7.m configure -state disabled;.menu4.config.f.x7.l configure -state disabled;set CONFIG_MD_LINEAR [expr $CONFIG_MD_LINEAR|16];}
        global CONFIG_MD_STRIPED; vfix CONFIG_MD_STRIPED
        if {($CONFIG_BLK_DEV_MD == 1)} then { .menu4.config.f.x8.y configure -state normal;.menu4.config.f.x8.n configure -state normal;.menu4.config.f.x8.m configure -state normal;.menu4.config.f.x8.l configure -state normal;set CONFIG_MD_STRIPED [expr $CONFIG_MD_STRIPED&15];} else { .menu4.config.f.x8.y configure -state disabled;.menu4.config.f.x8.n configure -state disabled;.menu4.config.f.x8.m configure -state disabled;.menu4.config.f.x8.l configure -state disabled;set CONFIG_MD_STRIPED [expr $CONFIG_MD_STRIPED|16];}
        global CONFIG_BLK_DEV_RAM; vfix CONFIG_BLK_DEV_RAM
        global CONFIG_RD_RELEASE_BLOCKS; vfix CONFIG_RD_RELEASE_BLOCKS
        if {($CONFIG_BLK_DEV_RAM == 1)} then { .menu4.config.f.x10.y configure -state normal;.menu4.config.f.x10.n configure -state normal;.menu4.config.f.x10.l configure -state normal;set CONFIG_RD_RELEASE_BLOCKS [expr $CONFIG_RD_RELEASE_BLOCKS&15];} else { .menu4.config.f.x10.y configure -state disabled;.menu4.config.f.x10.n configure -state disabled;.menu4.config.f.x10.l configure -state disabled;set CONFIG_RD_RELEASE_BLOCKS [expr $CONFIG_RD_RELEASE_BLOCKS|16];}
        global CONFIG_BLK_DEV_INITRD; vfix CONFIG_BLK_DEV_INITRD
        if {($CONFIG_BLK_DEV_RAM == 1)} then { .menu4.config.f.x11.y configure -state normal;.menu4.config.f.x11.n configure -state normal;.menu4.config.f.x11.l configure -state normal;set CONFIG_BLK_DEV_INITRD [expr $CONFIG_BLK_DEV_INITRD&15];} else { .menu4.config.f.x11.y configure -state disabled;.menu4.config.f.x11.n configure -state disabled;.menu4.config.f.x11.l configure -state disabled;set CONFIG_BLK_DEV_INITRD [expr $CONFIG_BLK_DEV_INITRD|16];}
        global CONFIG_DEV_FLASH; vfix CONFIG_DEV_FLASH
        global CONFIG_BLK_DEV_FLASH; vfix CONFIG_BLK_DEV_FLASH
        if {($CONFIG_DEV_FLASH == 1)} then { .menu4.config.f.x13.y configure -state normal;.menu4.config.f.x13.n configure -state normal;.menu4.config.f.x13.l configure -state normal;set CONFIG_BLK_DEV_FLASH [expr $CONFIG_BLK_DEV_FLASH&15];} else { .menu4.config.f.x13.y configure -state disabled;.menu4.config.f.x13.n configure -state disabled;.menu4.config.f.x13.l configure -state disabled;set CONFIG_BLK_DEV_FLASH [expr $CONFIG_BLK_DEV_FLASH|16];}
        global CONFIG_CHR_DEV_FLASH; vfix CONFIG_CHR_DEV_FLASH
        if {($CONFIG_DEV_FLASH == 1)} then { .menu4.config.f.x14.y configure -state normal;.menu4.config.f.x14.n configure -state normal;.menu4.config.f.x14.l configure -state normal;set CONFIG_CHR_DEV_FLASH [expr $CONFIG_CHR_DEV_FLASH&15];} else { .menu4.config.f.x14.y configure -state disabled;.menu4.config.f.x14.n configure -state disabled;.menu4.config.f.x14.l configure -state disabled;set CONFIG_CHR_DEV_FLASH [expr $CONFIG_CHR_DEV_FLASH|16];}
}


menu_option menu5 5 "Networking options"
proc menu5 {w title} {
        catch {destroy $w}
        toplevel $w -class Dialog
        wm withdraw $w
        message $w.m -width 400 -aspect 300 -text \
                "Networking options"  -relief raised
        pack $w.m -pady 10 -side top -padx 10
        wm title $w "Networking options" 

        set oldFocus [focus]
        frame $w.f
        button $w.f.back -text "Main Menu" \
                -width 15 -command "destroy $w; focus $oldFocus; update_mainmenu $w"
        button $w.f.next -text "Next" \
                -width 15 -command " destroy $w; focus $oldFocus;  menu6 .menu6 \"$title\""
        button $w.f.prev -text "Prev" \
                -width 15 -command " destroy $w; focus $oldFocus; menu4 .menu4 \"$title\""
        pack $w.f.back $w.f.next $w.f.prev -side left -expand on
        pack $w.f -pady 10 -side bottom -anchor w -fill x
        frame $w.topline -relief ridge -borderwidth 2 -height 2
        pack $w.topline -side top -fill x

        frame $w.botline -relief ridge -borderwidth 2 -height 2
        pack $w.botline -side bottom -fill x

        frame $w.config
        pack $w.config -fill y -expand on

        scrollbar $w.config.vscroll -command "$w.config.canvas yview"
        pack $w.config.vscroll -side right -fill y

        canvas $w.config.canvas -height 1\
                -relief flat -borderwidth 0 -yscrollcommand "$w.config.vscroll set" \
                -width [expr [winfo screenwidth .] * 1 / 2] 
        frame $w.config.f
        pack $w.config.canvas -side right -fill y


        bool $w.config.f 5 0 "Network firewalls" CONFIG_FIREWALL
        bool $w.config.f 5 1 "Network aliasing" CONFIG_NET_ALIAS
        bool $w.config.f 5 2 "TCP/IP networking" CONFIG_INET
        bool $w.config.f 5 3 "IP: forwarding/gatewaying" CONFIG_IP_FORWARD
        bool $w.config.f 5 4 "IP: multicasting" CONFIG_IP_MULTICAST
        bool $w.config.f 5 5 "IP: syn cookies" CONFIG_SYN_COOKIES
        bool $w.config.f 5 6 "IP: firewalling" CONFIG_IP_FIREWALL
        bool $w.config.f 5 7 "IP: firewall packet logging" CONFIG_IP_FIREWALL_VERBOSE
        bool $w.config.f 5 8 "IP: masquerading" CONFIG_IP_MASQUERADE
        bool $w.config.f 5 9 "IP: ipautofw masquerading (EXPERIMENTAL)" CONFIG_IP_MASQUERADE_IPAUTOFW
        bool $w.config.f 5 10 "IP: ipportfw masquerading (EXPERIMENTAL)" CONFIG_IP_MASQUERADE_IPPORTFW
        bool $w.config.f 5 11 "IP: MS PPTP masq support (EXPERIMENTAL)" CONFIG_IP_MASQUERADE_PPTP
        bool $w.config.f 5 12 "IP: MS PPTP Call ID masq support (EXPERIMENTAL)" CONFIG_IP_MASQUERADE_PPTP_MULTICLIENT
        bool $w.config.f 5 13 "IP: MS PPTP masq debugging" DEBUG_IP_MASQUERADE_PPTP
        bool $w.config.f 5 14 "IP: MS PPTP masq verbose debugging" DEBUG_IP_MASQUERADE_PPTP_VERBOSE
        bool $w.config.f 5 15 "IP: IPSEC ESP & ISAKMP masq support (EXPERIMENTAL)" CONFIG_IP_MASQUERADE_IPSEC
        int $w.config.f 5 16 "IP: IPSEC masq table lifetime (minutes)" CONFIG_IP_MASQUERADE_IPSEC_EXPIRE
        bool $w.config.f 5 17 "IP: Disable inbound ESP destination guessing" CONFIG_IP_MASQUERADE_IPSEC_NOGUESS
        bool $w.config.f 5 18 "IP: IPSEC masq debugging" DEBUG_IP_MASQUERADE_IPSEC
        bool $w.config.f 5 19 "IP: IPSEC masq verbose debugging" DEBUG_IP_MASQUERADE_IPSEC_VERBOSE
        bool $w.config.f 5 20 "IP: ICMP masquerading" CONFIG_IP_MASQUERADE_ICMP
        bool $w.config.f 5 21 "IP: transparent proxy support (EXPERIMENTAL)" CONFIG_IP_TRANSPARENT_PROXY
        bool $w.config.f 5 22 "IP: always defragment" CONFIG_IP_ALWAYS_DEFRAG
        bool $w.config.f 5 23 "IP: accounting" CONFIG_IP_ACCT
        bool $w.config.f 5 24 "IP: optimize as router not host" CONFIG_IP_ROUTER
        tristate $w.config.f 5 25 "IP: tunneling" CONFIG_NET_IPIP
        bool $w.config.f 5 26 "IP: multicast routing (EXPERIMENTAL)" CONFIG_IP_MROUTE
        tristate $w.config.f 5 27 "IP: aliasing support" CONFIG_IP_ALIAS
        bool $w.config.f 5 28 "IP: ARP daemon support (EXPERIMENTAL)" CONFIG_ARPD
        bool $w.config.f 5 29 "IP: PC/TCP compatibility mode" CONFIG_INET_PCTCP
        tristate $w.config.f 5 30 "IP: Reverse ARP" CONFIG_INET_RARP
        bool $w.config.f 5 31 "IP: Disable Path MTU Discovery (normally enabled)" CONFIG_NO_PATH_MTU_DISCOVERY
        bool $w.config.f 5 32 "IP: Drop source routed frames" CONFIG_IP_NOSR
        bool $w.config.f 5 33 "IP: Allow large windows (not recommended if <16Mb of memory)" CONFIG_SKB_LARGE
        tristate $w.config.f 5 34 "The IPX protocol" CONFIG_IPX
        tristate $w.config.f 5 35 "Appletalk DDP" CONFIG_ATALK
        tristate $w.config.f 5 36 "Amateur Radio AX.25 Level 2" CONFIG_AX25
        dep_tristate $w.config.f 5 37 "Amateur Radio NET/ROM" CONFIG_NETROM CONFIG_AX25
        dep_tristate $w.config.f 5 38 "Amateur Radio X.25 PLP (Rose)" CONFIG_ROSE CONFIG_AX25
        bool $w.config.f 5 39 "Bridging (EXPERIMENTAL)" CONFIG_BRIDGE
        bool $w.config.f 5 40 "Kernel/User network link driver" CONFIG_NETLINK
        bool $w.config.f 5 41 "Routing messages" CONFIG_RTNETLINK



        focus $w
        update_menu5 $w.config.f
        global winx; global winy
        set winx [expr [winfo x .]+30]; set winy [expr [winfo y .]+30]
        wm geometry $w +$winx+$winy
        update idletasks
        $w.config.canvas create window 0 0 -anchor nw -window $w.config.f

        $w.config.canvas configure \
                -width [expr [winfo reqwidth $w.config.f] + 1]\
                -scrollregion "-1 -1 [expr [winfo reqwidth $w.config.f] + 1] \
                         [expr [winfo reqheight $w.config.f] + 1]"

        set winy [expr [winfo reqh $w] - [winfo reqh $w.config.canvas]]
        set scry [expr [winfo screenh $w] / 2]
        set maxy [expr [winfo screenh $w] * 3 / 4]
        set canvtotal [expr [winfo reqh $w.config.f] + 2]
        if [expr $winy + $canvtotal < $maxy] {
                $w.config.canvas configure -height $canvtotal
        } else {
                $w.config.canvas configure -height [expr $scry - $winy]
        }
        update idletasks
        wm maxsize $w [winfo width $w] [winfo screenheight $w]
        wm minsize $w [winfo width $w] 100

        wm deiconify $w
}


proc update_menu5 {w}  {
        update_define
        global CONFIG_NET; vfix CONFIG_NET
        global CONFIG_FIREWALL; vfix CONFIG_FIREWALL
        if {($CONFIG_NET == 1)} then { .menu5.config.f.x0.y configure -state normal;.menu5.config.f.x0.n configure -state normal;.menu5.config.f.x0.l configure -state normal;set CONFIG_FIREWALL [expr $CONFIG_FIREWALL&15];} else { .menu5.config.f.x0.y configure -state disabled;.menu5.config.f.x0.n configure -state disabled;.menu5.config.f.x0.l configure -state disabled;set CONFIG_FIREWALL [expr $CONFIG_FIREWALL|16];}
        global CONFIG_NET_ALIAS; vfix CONFIG_NET_ALIAS
        if {($CONFIG_NET == 1)} then { .menu5.config.f.x1.y configure -state normal;.menu5.config.f.x1.n configure -state normal;.menu5.config.f.x1.l configure -state normal;set CONFIG_NET_ALIAS [expr $CONFIG_NET_ALIAS&15];} else { .menu5.config.f.x1.y configure -state disabled;.menu5.config.f.x1.n configure -state disabled;.menu5.config.f.x1.l configure -state disabled;set CONFIG_NET_ALIAS [expr $CONFIG_NET_ALIAS|16];}
        global CONFIG_INET; vfix CONFIG_INET
        if {($CONFIG_NET == 1)} then { .menu5.config.f.x2.y configure -state normal;.menu5.config.f.x2.n configure -state normal;.menu5.config.f.x2.l configure -state normal;set CONFIG_INET [expr $CONFIG_INET&15];} else { .menu5.config.f.x2.y configure -state disabled;.menu5.config.f.x2.n configure -state disabled;.menu5.config.f.x2.l configure -state disabled;set CONFIG_INET [expr $CONFIG_INET|16];}
        global CONFIG_IP_FORWARD; vfix CONFIG_IP_FORWARD
        if {($CONFIG_NET == 1) && ($CONFIG_INET == 1)} then { .menu5.config.f.x3.y configure -state normal;.menu5.config.f.x3.n configure -state normal;.menu5.config.f.x3.l configure -state normal;set CONFIG_IP_FORWARD [expr $CONFIG_IP_FORWARD&15];} else { .menu5.config.f.x3.y configure -state disabled;.menu5.config.f.x3.n configure -state disabled;.menu5.config.f.x3.l configure -state disabled;set CONFIG_IP_FORWARD [expr $CONFIG_IP_FORWARD|16];}
        global CONFIG_IP_MULTICAST; vfix CONFIG_IP_MULTICAST
        if {($CONFIG_NET == 1) && ($CONFIG_INET == 1)} then { .menu5.config.f.x4.y configure -state normal;.menu5.config.f.x4.n configure -state normal;.menu5.config.f.x4.l configure -state normal;set CONFIG_IP_MULTICAST [expr $CONFIG_IP_MULTICAST&15];} else { .menu5.config.f.x4.y configure -state disabled;.menu5.config.f.x4.n configure -state disabled;.menu5.config.f.x4.l configure -state disabled;set CONFIG_IP_MULTICAST [expr $CONFIG_IP_MULTICAST|16];}
        global CONFIG_SYN_COOKIES; vfix CONFIG_SYN_COOKIES
        if {($CONFIG_NET == 1) && ($CONFIG_INET == 1)} then { .menu5.config.f.x5.y configure -state normal;.menu5.config.f.x5.n configure -state normal;.menu5.config.f.x5.l configure -state normal;set CONFIG_SYN_COOKIES [expr $CONFIG_SYN_COOKIES&15];} else { .menu5.config.f.x5.y configure -state disabled;.menu5.config.f.x5.n configure -state disabled;.menu5.config.f.x5.l configure -state disabled;set CONFIG_SYN_COOKIES [expr $CONFIG_SYN_COOKIES|16];}
        global CONFIG_IP_FIREWALL; vfix CONFIG_IP_FIREWALL
        if {($CONFIG_NET == 1) && ($CONFIG_INET == 1) && ($CONFIG_FIREWALL == 1)} then { .menu5.config.f.x6.y configure -state normal;.menu5.config.f.x6.n configure -state normal;.menu5.config.f.x6.l configure -state normal;set CONFIG_IP_FIREWALL [expr $CONFIG_IP_FIREWALL&15];} else { .menu5.config.f.x6.y configure -state disabled;.menu5.config.f.x6.n configure -state disabled;.menu5.config.f.x6.l configure -state disabled;set CONFIG_IP_FIREWALL [expr $CONFIG_IP_FIREWALL|16];}
        global CONFIG_IP_FIREWALL_VERBOSE; vfix CONFIG_IP_FIREWALL_VERBOSE
        if {($CONFIG_NET == 1) && ($CONFIG_INET == 1) && ($CONFIG_FIREWALL == 1) && ($CONFIG_IP_FIREWALL == 1)} then { .menu5.config.f.x7.y configure -state normal;.menu5.config.f.x7.n configure -state normal;.menu5.config.f.x7.l configure -state normal;set CONFIG_IP_FIREWALL_VERBOSE [expr $CONFIG_IP_FIREWALL_VERBOSE&15];} else { .menu5.config.f.x7.y configure -state disabled;.menu5.config.f.x7.n configure -state disabled;.menu5.config.f.x7.l configure -state disabled;set CONFIG_IP_FIREWALL_VERBOSE [expr $CONFIG_IP_FIREWALL_VERBOSE|16];}
        global CONFIG_IP_MASQUERADE; vfix CONFIG_IP_MASQUERADE
        if {($CONFIG_NET == 1) && ($CONFIG_INET == 1) && ($CONFIG_FIREWALL == 1) && ($CONFIG_IP_FIREWALL == 1)} then { .menu5.config.f.x8.y configure -state normal;.menu5.config.f.x8.n configure -state normal;.menu5.config.f.x8.l configure -state normal;set CONFIG_IP_MASQUERADE [expr $CONFIG_IP_MASQUERADE&15];} else { .menu5.config.f.x8.y configure -state disabled;.menu5.config.f.x8.n configure -state disabled;.menu5.config.f.x8.l configure -state disabled;set CONFIG_IP_MASQUERADE [expr $CONFIG_IP_MASQUERADE|16];}
        global CONFIG_EXPERIMENTAL; vfix CONFIG_EXPERIMENTAL
        global CONFIG_IP_MASQUERADE_IPAUTOFW; vfix CONFIG_IP_MASQUERADE_IPAUTOFW
        if {($CONFIG_NET == 1) && ($CONFIG_INET == 1) && ($CONFIG_FIREWALL == 1) && ($CONFIG_IP_FIREWALL == 1) && ($CONFIG_IP_MASQUERADE != 0) && ($CONFIG_EXPERIMENTAL == 1)} then { .menu5.config.f.x9.y configure -state normal;.menu5.config.f.x9.n configure -state normal;.menu5.config.f.x9.l configure -state normal;set CONFIG_IP_MASQUERADE_IPAUTOFW [expr $CONFIG_IP_MASQUERADE_IPAUTOFW&15];} else { .menu5.config.f.x9.y configure -state disabled;.menu5.config.f.x9.n configure -state disabled;.menu5.config.f.x9.l configure -state disabled;set CONFIG_IP_MASQUERADE_IPAUTOFW [expr $CONFIG_IP_MASQUERADE_IPAUTOFW|16];}
        global CONFIG_IP_MASQUERADE_IPPORTFW; vfix CONFIG_IP_MASQUERADE_IPPORTFW
        if {($CONFIG_NET == 1) && ($CONFIG_INET == 1) && ($CONFIG_FIREWALL == 1) && ($CONFIG_IP_FIREWALL == 1) && ($CONFIG_IP_MASQUERADE != 0) && ($CONFIG_EXPERIMENTAL == 1)} then { .menu5.config.f.x10.y configure -state normal;.menu5.config.f.x10.n configure -state normal;.menu5.config.f.x10.l configure -state normal;set CONFIG_IP_MASQUERADE_IPPORTFW [expr $CONFIG_IP_MASQUERADE_IPPORTFW&15];} else { .menu5.config.f.x10.y configure -state disabled;.menu5.config.f.x10.n configure -state disabled;.menu5.config.f.x10.l configure -state disabled;set CONFIG_IP_MASQUERADE_IPPORTFW [expr $CONFIG_IP_MASQUERADE_IPPORTFW|16];}
        global CONFIG_IP_MASQUERADE_PPTP; vfix CONFIG_IP_MASQUERADE_PPTP
        if {($CONFIG_NET == 1) && ($CONFIG_INET == 1) && ($CONFIG_FIREWALL == 1) && ($CONFIG_IP_FIREWALL == 1) && ($CONFIG_IP_MASQUERADE != 0) && ($CONFIG_EXPERIMENTAL == 1)} then { .menu5.config.f.x11.y configure -state normal;.menu5.config.f.x11.n configure -state normal;.menu5.config.f.x11.l configure -state normal;set CONFIG_IP_MASQUERADE_PPTP [expr $CONFIG_IP_MASQUERADE_PPTP&15];} else { .menu5.config.f.x11.y configure -state disabled;.menu5.config.f.x11.n configure -state disabled;.menu5.config.f.x11.l configure -state disabled;set CONFIG_IP_MASQUERADE_PPTP [expr $CONFIG_IP_MASQUERADE_PPTP|16];}
        global CONFIG_IP_MASQUERADE_PPTP_MULTICLIENT; vfix CONFIG_IP_MASQUERADE_PPTP_MULTICLIENT
        if {($CONFIG_NET == 1) && ($CONFIG_INET == 1) && ($CONFIG_FIREWALL == 1) && ($CONFIG_IP_FIREWALL == 1) && ($CONFIG_IP_MASQUERADE != 0) && ($CONFIG_EXPERIMENTAL == 1) && ($CONFIG_IP_MASQUERADE_PPTP == 1)} then { .menu5.config.f.x12.y configure -state normal;.menu5.config.f.x12.n configure -state normal;.menu5.config.f.x12.l configure -state normal;set CONFIG_IP_MASQUERADE_PPTP_MULTICLIENT [expr $CONFIG_IP_MASQUERADE_PPTP_MULTICLIENT&15];} else { .menu5.config.f.x12.y configure -state disabled;.menu5.config.f.x12.n configure -state disabled;.menu5.config.f.x12.l configure -state disabled;set CONFIG_IP_MASQUERADE_PPTP_MULTICLIENT [expr $CONFIG_IP_MASQUERADE_PPTP_MULTICLIENT|16];}
        global DEBUG_IP_MASQUERADE_PPTP; vfix DEBUG_IP_MASQUERADE_PPTP
        if {($CONFIG_NET == 1) && ($CONFIG_INET == 1) && ($CONFIG_FIREWALL == 1) && ($CONFIG_IP_FIREWALL == 1) && ($CONFIG_IP_MASQUERADE != 0) && ($CONFIG_EXPERIMENTAL == 1) && ($CONFIG_IP_MASQUERADE_PPTP == 1)} then { .menu5.config.f.x13.y configure -state normal;.menu5.config.f.x13.n configure -state normal;.menu5.config.f.x13.l configure -state normal;set DEBUG_IP_MASQUERADE_PPTP [expr $DEBUG_IP_MASQUERADE_PPTP&15];} else { .menu5.config.f.x13.y configure -state disabled;.menu5.config.f.x13.n configure -state disabled;.menu5.config.f.x13.l configure -state disabled;set DEBUG_IP_MASQUERADE_PPTP [expr $DEBUG_IP_MASQUERADE_PPTP|16];}
        global DEBUG_IP_MASQUERADE_PPTP_VERBOSE; vfix DEBUG_IP_MASQUERADE_PPTP_VERBOSE
        if {($CONFIG_NET == 1) && ($CONFIG_INET == 1) && ($CONFIG_FIREWALL == 1) && ($CONFIG_IP_FIREWALL == 1) && ($CONFIG_IP_MASQUERADE != 0) && ($CONFIG_EXPERIMENTAL == 1) && ($CONFIG_IP_MASQUERADE_PPTP == 1) && ($DEBUG_IP_MASQUERADE_PPTP == 1)} then { .menu5.config.f.x14.y configure -state normal;.menu5.config.f.x14.n configure -state normal;.menu5.config.f.x14.l configure -state normal;set DEBUG_IP_MASQUERADE_PPTP_VERBOSE [expr $DEBUG_IP_MASQUERADE_PPTP_VERBOSE&15];} else { .menu5.config.f.x14.y configure -state disabled;.menu5.config.f.x14.n configure -state disabled;.menu5.config.f.x14.l configure -state disabled;set DEBUG_IP_MASQUERADE_PPTP_VERBOSE [expr $DEBUG_IP_MASQUERADE_PPTP_VERBOSE|16];}
        global CONFIG_IP_MASQUERADE_IPSEC; vfix CONFIG_IP_MASQUERADE_IPSEC
        if {($CONFIG_NET == 1) && ($CONFIG_INET == 1) && ($CONFIG_FIREWALL == 1) && ($CONFIG_IP_FIREWALL == 1) && ($CONFIG_IP_MASQUERADE != 0) && ($CONFIG_EXPERIMENTAL == 1)} then { .menu5.config.f.x15.y configure -state normal;.menu5.config.f.x15.n configure -state normal;.menu5.config.f.x15.l configure -state normal;set CONFIG_IP_MASQUERADE_IPSEC [expr $CONFIG_IP_MASQUERADE_IPSEC&15];} else { .menu5.config.f.x15.y configure -state disabled;.menu5.config.f.x15.n configure -state disabled;.menu5.config.f.x15.l configure -state disabled;set CONFIG_IP_MASQUERADE_IPSEC [expr $CONFIG_IP_MASQUERADE_IPSEC|16];}
        global CONFIG_IP_MASQUERADE_IPSEC_EXPIRE; vfix CONFIG_IP_MASQUERADE_IPSEC_EXPIRE
        if {($CONFIG_NET == 1) && ($CONFIG_INET == 1) && ($CONFIG_FIREWALL == 1) && ($CONFIG_IP_FIREWALL == 1) && ($CONFIG_IP_MASQUERADE != 0) && ($CONFIG_EXPERIMENTAL == 1) && ($CONFIG_IP_MASQUERADE_IPSEC == 1)} then { .menu5.config.f.x16.x configure -state normal -fore [ cget .ref -foreground ]; .menu5.config.f.x16.l configure -state normal; } else { .menu5.config.f.x16.x configure -state disabled -fore [ cget .ref -disabledforeground ];.menu5.config.f.x16.l configure -state disabled;}
        global CONFIG_IP_MASQUERADE_IPSEC_NOGUESS; vfix CONFIG_IP_MASQUERADE_IPSEC_NOGUESS
        if {($CONFIG_NET == 1) && ($CONFIG_INET == 1) && ($CONFIG_FIREWALL == 1) && ($CONFIG_IP_FIREWALL == 1) && ($CONFIG_IP_MASQUERADE != 0) && ($CONFIG_EXPERIMENTAL == 1) && ($CONFIG_IP_MASQUERADE_IPSEC == 1)} then { .menu5.config.f.x17.y configure -state normal;.menu5.config.f.x17.n configure -state normal;.menu5.config.f.x17.l configure -state normal;set CONFIG_IP_MASQUERADE_IPSEC_NOGUESS [expr $CONFIG_IP_MASQUERADE_IPSEC_NOGUESS&15];} else { .menu5.config.f.x17.y configure -state disabled;.menu5.config.f.x17.n configure -state disabled;.menu5.config.f.x17.l configure -state disabled;set CONFIG_IP_MASQUERADE_IPSEC_NOGUESS [expr $CONFIG_IP_MASQUERADE_IPSEC_NOGUESS|16];}
        global DEBUG_IP_MASQUERADE_IPSEC; vfix DEBUG_IP_MASQUERADE_IPSEC
        if {($CONFIG_NET == 1) && ($CONFIG_INET == 1) && ($CONFIG_FIREWALL == 1) && ($CONFIG_IP_FIREWALL == 1) && ($CONFIG_IP_MASQUERADE != 0) && ($CONFIG_EXPERIMENTAL == 1) && ($CONFIG_IP_MASQUERADE_IPSEC == 1)} then { .menu5.config.f.x18.y configure -state normal;.menu5.config.f.x18.n configure -state normal;.menu5.config.f.x18.l configure -state normal;set DEBUG_IP_MASQUERADE_IPSEC [expr $DEBUG_IP_MASQUERADE_IPSEC&15];} else { .menu5.config.f.x18.y configure -state disabled;.menu5.config.f.x18.n configure -state disabled;.menu5.config.f.x18.l configure -state disabled;set DEBUG_IP_MASQUERADE_IPSEC [expr $DEBUG_IP_MASQUERADE_IPSEC|16];}
        global DEBUG_IP_MASQUERADE_IPSEC_VERBOSE; vfix DEBUG_IP_MASQUERADE_IPSEC_VERBOSE
        if {($CONFIG_NET == 1) && ($CONFIG_INET == 1) && ($CONFIG_FIREWALL == 1) && ($CONFIG_IP_FIREWALL == 1) && ($CONFIG_IP_MASQUERADE != 0) && ($CONFIG_EXPERIMENTAL == 1) && ($CONFIG_IP_MASQUERADE_IPSEC == 1) && ($DEBUG_IP_MASQUERADE_IPSEC == 1)} then { .menu5.config.f.x19.y configure -state normal;.menu5.config.f.x19.n configure -state normal;.menu5.config.f.x19.l configure -state normal;set DEBUG_IP_MASQUERADE_IPSEC_VERBOSE [expr $DEBUG_IP_MASQUERADE_IPSEC_VERBOSE&15];} else { .menu5.config.f.x19.y configure -state disabled;.menu5.config.f.x19.n configure -state disabled;.menu5.config.f.x19.l configure -state disabled;set DEBUG_IP_MASQUERADE_IPSEC_VERBOSE [expr $DEBUG_IP_MASQUERADE_IPSEC_VERBOSE|16];}
        global CONFIG_IP_MASQUERADE_ICMP; vfix CONFIG_IP_MASQUERADE_ICMP
        if {($CONFIG_NET == 1) && ($CONFIG_INET == 1) && ($CONFIG_FIREWALL == 1) && ($CONFIG_IP_FIREWALL == 1) && ($CONFIG_IP_MASQUERADE != 0)} then { .menu5.config.f.x20.y configure -state normal;.menu5.config.f.x20.n configure -state normal;.menu5.config.f.x20.l configure -state normal;set CONFIG_IP_MASQUERADE_ICMP [expr $CONFIG_IP_MASQUERADE_ICMP&15];} else { .menu5.config.f.x20.y configure -state disabled;.menu5.config.f.x20.n configure -state disabled;.menu5.config.f.x20.l configure -state disabled;set CONFIG_IP_MASQUERADE_ICMP [expr $CONFIG_IP_MASQUERADE_ICMP|16];}
        global CONFIG_IP_TRANSPARENT_PROXY; vfix CONFIG_IP_TRANSPARENT_PROXY
        if {($CONFIG_NET == 1) && ($CONFIG_INET == 1) && ($CONFIG_FIREWALL == 1) && ($CONFIG_IP_FIREWALL == 1) && ($CONFIG_EXPERIMENTAL == 1)} then { .menu5.config.f.x21.y configure -state normal;.menu5.config.f.x21.n configure -state normal;.menu5.config.f.x21.l configure -state normal;set CONFIG_IP_TRANSPARENT_PROXY [expr $CONFIG_IP_TRANSPARENT_PROXY&15];} else { .menu5.config.f.x21.y configure -state disabled;.menu5.config.f.x21.n configure -state disabled;.menu5.config.f.x21.l configure -state disabled;set CONFIG_IP_TRANSPARENT_PROXY [expr $CONFIG_IP_TRANSPARENT_PROXY|16];}
        global CONFIG_IP_ALWAYS_DEFRAG; vfix CONFIG_IP_ALWAYS_DEFRAG
        if {($CONFIG_NET == 1) && ($CONFIG_INET == 1) && ($CONFIG_FIREWALL == 1) && ($CONFIG_IP_FIREWALL == 1)} then { .menu5.config.f.x22.y configure -state normal;.menu5.config.f.x22.n configure -state normal;.menu5.config.f.x22.l configure -state normal;set CONFIG_IP_ALWAYS_DEFRAG [expr $CONFIG_IP_ALWAYS_DEFRAG&15];} else { .menu5.config.f.x22.y configure -state disabled;.menu5.config.f.x22.n configure -state disabled;.menu5.config.f.x22.l configure -state disabled;set CONFIG_IP_ALWAYS_DEFRAG [expr $CONFIG_IP_ALWAYS_DEFRAG|16];}
        global CONFIG_IP_ACCT; vfix CONFIG_IP_ACCT
        if {($CONFIG_NET == 1) && ($CONFIG_INET == 1)} then { .menu5.config.f.x23.y configure -state normal;.menu5.config.f.x23.n configure -state normal;.menu5.config.f.x23.l configure -state normal;set CONFIG_IP_ACCT [expr $CONFIG_IP_ACCT&15];} else { .menu5.config.f.x23.y configure -state disabled;.menu5.config.f.x23.n configure -state disabled;.menu5.config.f.x23.l configure -state disabled;set CONFIG_IP_ACCT [expr $CONFIG_IP_ACCT|16];}
        global CONFIG_IP_ROUTER; vfix CONFIG_IP_ROUTER
        if {($CONFIG_NET == 1) && ($CONFIG_INET == 1)} then { .menu5.config.f.x24.y configure -state normal;.menu5.config.f.x24.n configure -state normal;.menu5.config.f.x24.l configure -state normal;set CONFIG_IP_ROUTER [expr $CONFIG_IP_ROUTER&15];} else { .menu5.config.f.x24.y configure -state disabled;.menu5.config.f.x24.n configure -state disabled;.menu5.config.f.x24.l configure -state disabled;set CONFIG_IP_ROUTER [expr $CONFIG_IP_ROUTER|16];}
        global CONFIG_NET_IPIP; vfix CONFIG_NET_IPIP
        if {($CONFIG_NET == 1) && ($CONFIG_INET == 1)} then { .menu5.config.f.x25.y configure -state normal;.menu5.config.f.x25.n configure -state normal;.menu5.config.f.x25.m configure -state normal;.menu5.config.f.x25.l configure -state normal;set CONFIG_NET_IPIP [expr $CONFIG_NET_IPIP&15];} else { .menu5.config.f.x25.y configure -state disabled;.menu5.config.f.x25.n configure -state disabled;.menu5.config.f.x25.m configure -state disabled;.menu5.config.f.x25.l configure -state disabled;set CONFIG_NET_IPIP [expr $CONFIG_NET_IPIP|16];}
        global CONFIG_IP_MROUTE; vfix CONFIG_IP_MROUTE
        if {($CONFIG_NET == 1) && ($CONFIG_INET == 1) && ($CONFIG_IP_MULTICAST == 1) && ($CONFIG_EXPERIMENTAL == 1)} then { .menu5.config.f.x26.y configure -state normal;.menu5.config.f.x26.n configure -state normal;.menu5.config.f.x26.l configure -state normal;set CONFIG_IP_MROUTE [expr $CONFIG_IP_MROUTE&15];} else { .menu5.config.f.x26.y configure -state disabled;.menu5.config.f.x26.n configure -state disabled;.menu5.config.f.x26.l configure -state disabled;set CONFIG_IP_MROUTE [expr $CONFIG_IP_MROUTE|16];}
        global CONFIG_IP_ALIAS; vfix CONFIG_IP_ALIAS
        if {($CONFIG_NET == 1) && ($CONFIG_INET == 1) && ($CONFIG_NET_ALIAS == 1)} then { .menu5.config.f.x27.y configure -state normal;.menu5.config.f.x27.n configure -state normal;.menu5.config.f.x27.m configure -state normal;.menu5.config.f.x27.l configure -state normal;set CONFIG_IP_ALIAS [expr $CONFIG_IP_ALIAS&15];} else { .menu5.config.f.x27.y configure -state disabled;.menu5.config.f.x27.n configure -state disabled;.menu5.config.f.x27.m configure -state disabled;.menu5.config.f.x27.l configure -state disabled;set CONFIG_IP_ALIAS [expr $CONFIG_IP_ALIAS|16];}
        global CONFIG_NETLINK; vfix CONFIG_NETLINK
        global CONFIG_ARPD; vfix CONFIG_ARPD
        if {($CONFIG_NET == 1) && ($CONFIG_INET == 1) && ($CONFIG_EXPERIMENTAL == 1) && ($CONFIG_NETLINK == 1)} then { .menu5.config.f.x28.y configure -state normal;.menu5.config.f.x28.n configure -state normal;.menu5.config.f.x28.l configure -state normal;set CONFIG_ARPD [expr $CONFIG_ARPD&15];} else { .menu5.config.f.x28.y configure -state disabled;.menu5.config.f.x28.n configure -state disabled;.menu5.config.f.x28.l configure -state disabled;set CONFIG_ARPD [expr $CONFIG_ARPD|16];}
        global CONFIG_INET_PCTCP; vfix CONFIG_INET_PCTCP
        if {($CONFIG_NET == 1) && ($CONFIG_INET == 1)} then { .menu5.config.f.x29.y configure -state normal;.menu5.config.f.x29.n configure -state normal;.menu5.config.f.x29.l configure -state normal;set CONFIG_INET_PCTCP [expr $CONFIG_INET_PCTCP&15];} else { .menu5.config.f.x29.y configure -state disabled;.menu5.config.f.x29.n configure -state disabled;.menu5.config.f.x29.l configure -state disabled;set CONFIG_INET_PCTCP [expr $CONFIG_INET_PCTCP|16];}
        global CONFIG_INET_RARP; vfix CONFIG_INET_RARP
        if {($CONFIG_NET == 1) && ($CONFIG_INET == 1)} then { .menu5.config.f.x30.y configure -state normal;.menu5.config.f.x30.n configure -state normal;.menu5.config.f.x30.m configure -state normal;.menu5.config.f.x30.l configure -state normal;set CONFIG_INET_RARP [expr $CONFIG_INET_RARP&15];} else { .menu5.config.f.x30.y configure -state disabled;.menu5.config.f.x30.n configure -state disabled;.menu5.config.f.x30.m configure -state disabled;.menu5.config.f.x30.l configure -state disabled;set CONFIG_INET_RARP [expr $CONFIG_INET_RARP|16];}
        global CONFIG_NO_PATH_MTU_DISCOVERY; vfix CONFIG_NO_PATH_MTU_DISCOVERY
        if {($CONFIG_NET == 1) && ($CONFIG_INET == 1)} then { .menu5.config.f.x31.y configure -state normal;.menu5.config.f.x31.n configure -state normal;.menu5.config.f.x31.l configure -state normal;set CONFIG_NO_PATH_MTU_DISCOVERY [expr $CONFIG_NO_PATH_MTU_DISCOVERY&15];} else { .menu5.config.f.x31.y configure -state disabled;.menu5.config.f.x31.n configure -state disabled;.menu5.config.f.x31.l configure -state disabled;set CONFIG_NO_PATH_MTU_DISCOVERY [expr $CONFIG_NO_PATH_MTU_DISCOVERY|16];}
        global CONFIG_IP_NOSR; vfix CONFIG_IP_NOSR
        if {($CONFIG_NET == 1) && ($CONFIG_INET == 1)} then { .menu5.config.f.x32.y configure -state normal;.menu5.config.f.x32.n configure -state normal;.menu5.config.f.x32.l configure -state normal;set CONFIG_IP_NOSR [expr $CONFIG_IP_NOSR&15];} else { .menu5.config.f.x32.y configure -state disabled;.menu5.config.f.x32.n configure -state disabled;.menu5.config.f.x32.l configure -state disabled;set CONFIG_IP_NOSR [expr $CONFIG_IP_NOSR|16];}
        global CONFIG_SKB_LARGE; vfix CONFIG_SKB_LARGE
        if {($CONFIG_NET == 1) && ($CONFIG_INET == 1)} then { .menu5.config.f.x33.y configure -state normal;.menu5.config.f.x33.n configure -state normal;.menu5.config.f.x33.l configure -state normal;set CONFIG_SKB_LARGE [expr $CONFIG_SKB_LARGE&15];} else { .menu5.config.f.x33.y configure -state disabled;.menu5.config.f.x33.n configure -state disabled;.menu5.config.f.x33.l configure -state disabled;set CONFIG_SKB_LARGE [expr $CONFIG_SKB_LARGE|16];}
        global CONFIG_IPX; vfix CONFIG_IPX
        if {($CONFIG_NET == 1)} then { .menu5.config.f.x34.y configure -state normal;.menu5.config.f.x34.n configure -state normal;.menu5.config.f.x34.m configure -state normal;.menu5.config.f.x34.l configure -state normal;set CONFIG_IPX [expr $CONFIG_IPX&15];} else { .menu5.config.f.x34.y configure -state disabled;.menu5.config.f.x34.n configure -state disabled;.menu5.config.f.x34.m configure -state disabled;.menu5.config.f.x34.l configure -state disabled;set CONFIG_IPX [expr $CONFIG_IPX|16];}
        global CONFIG_ATALK; vfix CONFIG_ATALK
        if {($CONFIG_NET == 1)} then { .menu5.config.f.x35.y configure -state normal;.menu5.config.f.x35.n configure -state normal;.menu5.config.f.x35.m configure -state normal;.menu5.config.f.x35.l configure -state normal;set CONFIG_ATALK [expr $CONFIG_ATALK&15];} else { .menu5.config.f.x35.y configure -state disabled;.menu5.config.f.x35.n configure -state disabled;.menu5.config.f.x35.m configure -state disabled;.menu5.config.f.x35.l configure -state disabled;set CONFIG_ATALK [expr $CONFIG_ATALK|16];}
        global CONFIG_AX25; vfix CONFIG_AX25
        if {($CONFIG_NET == 1)} then { .menu5.config.f.x36.y configure -state normal;.menu5.config.f.x36.n configure -state normal;.menu5.config.f.x36.m configure -state normal;.menu5.config.f.x36.l configure -state normal;set CONFIG_AX25 [expr $CONFIG_AX25&15];} else { .menu5.config.f.x36.y configure -state disabled;.menu5.config.f.x36.n configure -state disabled;.menu5.config.f.x36.m configure -state disabled;.menu5.config.f.x36.l configure -state disabled;set CONFIG_AX25 [expr $CONFIG_AX25|16];}
        global CONFIG_NETROM; vfix CONFIG_NETROM
        if {($CONFIG_NET == 1) && ($CONFIG_AX25 != 0) && ($CONFIG_AX25 == 1 || $CONFIG_AX25 == 2)} then {       global CONFIG_AX25; vfix CONFIG_AX25
if { $CONFIG_AX25 != 1 && $CONFIG_AX25 != 0 } then {.menu5.config.f.x37.y configure -state disabled;} else {.menu5.config.f.x37.y configure -state normal;}; .menu5.config.f.x37.n configure -state normal;.menu5.config.f.x37.m configure -state normal;.menu5.config.f.x37.l configure -state normal;set CONFIG_NETROM [expr $CONFIG_NETROM&15];} else { .menu5.config.f.x37.y configure -state disabled;.menu5.config.f.x37.n configure -state disabled;.menu5.config.f.x37.m configure -state disabled;.menu5.config.f.x37.l configure -state disabled;set CONFIG_NETROM [expr $CONFIG_NETROM|16];}
        global CONFIG_ROSE; vfix CONFIG_ROSE
        if {($CONFIG_NET == 1) && ($CONFIG_AX25 != 0) && ($CONFIG_AX25 == 1 || $CONFIG_AX25 == 2)} then {       global CONFIG_AX25; vfix CONFIG_AX25
if { $CONFIG_AX25 != 1 && $CONFIG_AX25 != 0 } then {.menu5.config.f.x38.y configure -state disabled;} else {.menu5.config.f.x38.y configure -state normal;}; .menu5.config.f.x38.n configure -state normal;.menu5.config.f.x38.m configure -state normal;.menu5.config.f.x38.l configure -state normal;set CONFIG_ROSE [expr $CONFIG_ROSE&15];} else { .menu5.config.f.x38.y configure -state disabled;.menu5.config.f.x38.n configure -state disabled;.menu5.config.f.x38.m configure -state disabled;.menu5.config.f.x38.l configure -state disabled;set CONFIG_ROSE [expr $CONFIG_ROSE|16];}
        global CONFIG_BRIDGE; vfix CONFIG_BRIDGE
        if {($CONFIG_NET == 1) && ($CONFIG_EXPERIMENTAL == 1)} then { .menu5.config.f.x39.y configure -state normal;.menu5.config.f.x39.n configure -state normal;.menu5.config.f.x39.l configure -state normal;set CONFIG_BRIDGE [expr $CONFIG_BRIDGE&15];} else { .menu5.config.f.x39.y configure -state disabled;.menu5.config.f.x39.n configure -state disabled;.menu5.config.f.x39.l configure -state disabled;set CONFIG_BRIDGE [expr $CONFIG_BRIDGE|16];}
        if {($CONFIG_NET == 1)} then { .menu5.config.f.x40.y configure -state normal;.menu5.config.f.x40.n configure -state normal;.menu5.config.f.x40.l configure -state normal;set CONFIG_NETLINK [expr $CONFIG_NETLINK&15];} else { .menu5.config.f.x40.y configure -state disabled;.menu5.config.f.x40.n configure -state disabled;.menu5.config.f.x40.l configure -state disabled;set CONFIG_NETLINK [expr $CONFIG_NETLINK|16];}
        global CONFIG_RTNETLINK; vfix CONFIG_RTNETLINK
        if {($CONFIG_NET == 1) && ($CONFIG_NETLINK == 1)} then { .menu5.config.f.x41.y configure -state normal;.menu5.config.f.x41.n configure -state normal;.menu5.config.f.x41.l configure -state normal;set CONFIG_RTNETLINK [expr $CONFIG_RTNETLINK&15];} else { .menu5.config.f.x41.y configure -state disabled;.menu5.config.f.x41.n configure -state disabled;.menu5.config.f.x41.l configure -state disabled;set CONFIG_RTNETLINK [expr $CONFIG_RTNETLINK|16];}
}


menu_option menu6 6 "Network device support"
proc menu6 {w title} {
        catch {destroy $w}
        toplevel $w -class Dialog
        wm withdraw $w
        message $w.m -width 400 -aspect 300 -text \
                "Network device support"  -relief raised
        pack $w.m -pady 10 -side top -padx 10
        wm title $w "Network device support" 

        set oldFocus [focus]
        frame $w.f
        button $w.f.back -text "Main Menu" \
                -width 15 -command "destroy $w; focus $oldFocus; update_mainmenu $w"
        button $w.f.next -text "Next" \
                -width 15 -command " destroy $w; focus $oldFocus;  menu7 .menu7 \"$title\""
        button $w.f.prev -text "Prev" \
                -width 15 -command " destroy $w; focus $oldFocus; menu5 .menu5 \"$title\""
        pack $w.f.back $w.f.next $w.f.prev -side left -expand on
        pack $w.f -pady 10 -side bottom -anchor w -fill x
        frame $w.topline -relief ridge -borderwidth 2 -height 2
        pack $w.topline -side top -fill x

        frame $w.botline -relief ridge -borderwidth 2 -height 2
        pack $w.botline -side bottom -fill x

        frame $w.config
        pack $w.config -fill y -expand on

        scrollbar $w.config.vscroll -command "$w.config.canvas yview"
        pack $w.config.vscroll -side right -fill y

        canvas $w.config.canvas -height 1\
                -relief flat -borderwidth 0 -yscrollcommand "$w.config.vscroll set" \
                -width [expr [winfo screenwidth .] * 1 / 2] 
        frame $w.config.f
        pack $w.config.canvas -side right -fill y


        bool $w.config.f 6 0 "Network device support" CONFIG_NETDEVICES
        tristate $w.config.f 6 1 "Dummy net driver support" CONFIG_DUMMY
        tristate $w.config.f 6 2 "SLIP (serial line) support" CONFIG_SLIP
        bool $w.config.f 6 3 " CSLIP compressed headers" CONFIG_SLIP_COMPRESSED
        bool $w.config.f 6 4 " Keepalive and linefill" CONFIG_SLIP_SMART
        bool $w.config.f 6 5 " Six bit SLIP encapsulation" CONFIG_SLIP_MODE_SLIP6
        tristate $w.config.f 6 6 "PPP (point-to-point) support" CONFIG_PPP
        tristate $w.config.f 6 7 "EQL (serial line load balancing) support" CONFIG_EQUALIZER
        bool $w.config.f 6 8 "Open ethernet core" CONFIG_OETH



        focus $w
        update_menu6 $w.config.f
        global winx; global winy
        set winx [expr [winfo x .]+30]; set winy [expr [winfo y .]+30]
        wm geometry $w +$winx+$winy
        update idletasks
        $w.config.canvas create window 0 0 -anchor nw -window $w.config.f

        $w.config.canvas configure \
                -width [expr [winfo reqwidth $w.config.f] + 1]\
                -scrollregion "-1 -1 [expr [winfo reqwidth $w.config.f] + 1] \
                         [expr [winfo reqheight $w.config.f] + 1]"

        set winy [expr [winfo reqh $w] - [winfo reqh $w.config.canvas]]
        set scry [expr [winfo screenh $w] / 2]
        set maxy [expr [winfo screenh $w] * 3 / 4]
        set canvtotal [expr [winfo reqh $w.config.f] + 2]
        if [expr $winy + $canvtotal < $maxy] {
                $w.config.canvas configure -height $canvtotal
        } else {
                $w.config.canvas configure -height [expr $scry - $winy]
        }
        update idletasks
        wm maxsize $w [winfo width $w] [winfo screenheight $w]
        wm minsize $w [winfo width $w] 100

        wm deiconify $w
}


proc update_menu6 {w}  {
        update_define
        global CONFIG_NET; vfix CONFIG_NET
        global CONFIG_NETDEVICES; vfix CONFIG_NETDEVICES
        if {($CONFIG_NET == 1)} then { .menu6.config.f.x0.y configure -state normal;.menu6.config.f.x0.n configure -state normal;.menu6.config.f.x0.l configure -state normal;set CONFIG_NETDEVICES [expr $CONFIG_NETDEVICES&15];} else { .menu6.config.f.x0.y configure -state disabled;.menu6.config.f.x0.n configure -state disabled;.menu6.config.f.x0.l configure -state disabled;set CONFIG_NETDEVICES [expr $CONFIG_NETDEVICES|16];}
        global CONFIG_DUMMY; vfix CONFIG_DUMMY
        if {($CONFIG_NET == 1) && ($CONFIG_NETDEVICES == 1)} then { .menu6.config.f.x1.y configure -state normal;.menu6.config.f.x1.n configure -state normal;.menu6.config.f.x1.m configure -state normal;.menu6.config.f.x1.l configure -state normal;set CONFIG_DUMMY [expr $CONFIG_DUMMY&15];} else { .menu6.config.f.x1.y configure -state disabled;.menu6.config.f.x1.n configure -state disabled;.menu6.config.f.x1.m configure -state disabled;.menu6.config.f.x1.l configure -state disabled;set CONFIG_DUMMY [expr $CONFIG_DUMMY|16];}
        global CONFIG_SLIP; vfix CONFIG_SLIP
        if {($CONFIG_NET == 1) && ($CONFIG_NETDEVICES == 1)} then { .menu6.config.f.x2.y configure -state normal;.menu6.config.f.x2.n configure -state normal;.menu6.config.f.x2.m configure -state normal;.menu6.config.f.x2.l configure -state normal;set CONFIG_SLIP [expr $CONFIG_SLIP&15];} else { .menu6.config.f.x2.y configure -state disabled;.menu6.config.f.x2.n configure -state disabled;.menu6.config.f.x2.m configure -state disabled;.menu6.config.f.x2.l configure -state disabled;set CONFIG_SLIP [expr $CONFIG_SLIP|16];}
        global CONFIG_SLIP_COMPRESSED; vfix CONFIG_SLIP_COMPRESSED
        if {($CONFIG_NET == 1) && ($CONFIG_NETDEVICES == 1) && ($CONFIG_SLIP != 0)} then { .menu6.config.f.x3.y configure -state normal;.menu6.config.f.x3.n configure -state normal;.menu6.config.f.x3.l configure -state normal;set CONFIG_SLIP_COMPRESSED [expr $CONFIG_SLIP_COMPRESSED&15];} else { .menu6.config.f.x3.y configure -state disabled;.menu6.config.f.x3.n configure -state disabled;.menu6.config.f.x3.l configure -state disabled;set CONFIG_SLIP_COMPRESSED [expr $CONFIG_SLIP_COMPRESSED|16];}
        global CONFIG_SLIP_SMART; vfix CONFIG_SLIP_SMART
        if {($CONFIG_NET == 1) && ($CONFIG_NETDEVICES == 1) && ($CONFIG_SLIP != 0)} then { .menu6.config.f.x4.y configure -state normal;.menu6.config.f.x4.n configure -state normal;.menu6.config.f.x4.l configure -state normal;set CONFIG_SLIP_SMART [expr $CONFIG_SLIP_SMART&15];} else { .menu6.config.f.x4.y configure -state disabled;.menu6.config.f.x4.n configure -state disabled;.menu6.config.f.x4.l configure -state disabled;set CONFIG_SLIP_SMART [expr $CONFIG_SLIP_SMART|16];}
        global CONFIG_SLIP_MODE_SLIP6; vfix CONFIG_SLIP_MODE_SLIP6
        if {($CONFIG_NET == 1) && ($CONFIG_NETDEVICES == 1) && ($CONFIG_SLIP != 0)} then { .menu6.config.f.x5.y configure -state normal;.menu6.config.f.x5.n configure -state normal;.menu6.config.f.x5.l configure -state normal;set CONFIG_SLIP_MODE_SLIP6 [expr $CONFIG_SLIP_MODE_SLIP6&15];} else { .menu6.config.f.x5.y configure -state disabled;.menu6.config.f.x5.n configure -state disabled;.menu6.config.f.x5.l configure -state disabled;set CONFIG_SLIP_MODE_SLIP6 [expr $CONFIG_SLIP_MODE_SLIP6|16];}
        global CONFIG_PPP; vfix CONFIG_PPP
        if {($CONFIG_NET == 1) && ($CONFIG_NETDEVICES == 1)} then { .menu6.config.f.x6.y configure -state normal;.menu6.config.f.x6.n configure -state normal;.menu6.config.f.x6.m configure -state normal;.menu6.config.f.x6.l configure -state normal;set CONFIG_PPP [expr $CONFIG_PPP&15];} else { .menu6.config.f.x6.y configure -state disabled;.menu6.config.f.x6.n configure -state disabled;.menu6.config.f.x6.m configure -state disabled;.menu6.config.f.x6.l configure -state disabled;set CONFIG_PPP [expr $CONFIG_PPP|16];}
        global CONFIG_EQUALIZER; vfix CONFIG_EQUALIZER
        if {($CONFIG_NET == 1) && ($CONFIG_NETDEVICES == 1)} then { .menu6.config.f.x7.y configure -state normal;.menu6.config.f.x7.n configure -state normal;.menu6.config.f.x7.m configure -state normal;.menu6.config.f.x7.l configure -state normal;set CONFIG_EQUALIZER [expr $CONFIG_EQUALIZER&15];} else { .menu6.config.f.x7.y configure -state disabled;.menu6.config.f.x7.n configure -state disabled;.menu6.config.f.x7.m configure -state disabled;.menu6.config.f.x7.l configure -state disabled;set CONFIG_EQUALIZER [expr $CONFIG_EQUALIZER|16];}
        global CONFIG_OETH; vfix CONFIG_OETH
        if {($CONFIG_NET == 1) && ($CONFIG_NETDEVICES == 1)} then { .menu6.config.f.x8.y configure -state normal;.menu6.config.f.x8.n configure -state normal;.menu6.config.f.x8.l configure -state normal;set CONFIG_OETH [expr $CONFIG_OETH&15];} else { .menu6.config.f.x8.y configure -state disabled;.menu6.config.f.x8.n configure -state disabled;.menu6.config.f.x8.l configure -state disabled;set CONFIG_OETH [expr $CONFIG_OETH|16];}
}


menu_option menu7 7 "Filesystems"
proc menu7 {w title} {
        catch {destroy $w}
        toplevel $w -class Dialog
        wm withdraw $w
        message $w.m -width 400 -aspect 300 -text \
                "Filesystems"  -relief raised
        pack $w.m -pady 10 -side top -padx 10
        wm title $w "Filesystems" 

        set oldFocus [focus]
        frame $w.f
        button $w.f.back -text "Main Menu" \
                -width 15 -command "destroy $w; focus $oldFocus; update_mainmenu $w"
        button $w.f.next -text "Next" \
                -width 15 -command " destroy $w; focus $oldFocus;  menu8 .menu8 \"$title\""
        button $w.f.prev -text "Prev" \
                -width 15 -command " destroy $w; focus $oldFocus; menu6 .menu6 \"$title\""
        pack $w.f.back $w.f.next $w.f.prev -side left -expand on
        pack $w.f -pady 10 -side bottom -anchor w -fill x
        frame $w.topline -relief ridge -borderwidth 2 -height 2
        pack $w.topline -side top -fill x

        frame $w.botline -relief ridge -borderwidth 2 -height 2
        pack $w.botline -side bottom -fill x

        frame $w.config
        pack $w.config -fill y -expand on

        scrollbar $w.config.vscroll -command "$w.config.canvas yview"
        pack $w.config.vscroll -side right -fill y

        canvas $w.config.canvas -height 1\
                -relief flat -borderwidth 0 -yscrollcommand "$w.config.vscroll set" \
                -width [expr [winfo screenwidth .] * 1 / 2] 
        frame $w.config.f
        pack $w.config.canvas -side right -fill y


        bool $w.config.f 7 0 "Quota support" CONFIG_QUOTA
        tristate $w.config.f 7 1 "Minix fs support" CONFIG_MINIX_FS
        tristate $w.config.f 7 2 "Extended fs support" CONFIG_EXT_FS
        tristate $w.config.f 7 3 "Second extended fs support" CONFIG_EXT2_FS
        tristate $w.config.f 7 4 "xiafs filesystem support" CONFIG_XIA_FS
        tristate $w.config.f 7 5 "Native language support (Needed for FAT and ISO9660)" CONFIG_NLS
        dep_tristate $w.config.f 7 6 "ISO9660 cdrom filesystem support" CONFIG_ISO9660_FS CONFIG_NLS
        dep_tristate $w.config.f 7 7 "DOS FAT fs support" CONFIG_FAT_FS CONFIG_NLS
        dep_tristate $w.config.f 7 8 "MSDOS fs support" CONFIG_MSDOS_FS CONFIG_FAT_FS
        dep_tristate $w.config.f 7 9 "umsdos: Unix like fs on top of std MSDOS FAT fs" CONFIG_UMSDOS_FS CONFIG_MSDOS_FS
        dep_tristate $w.config.f 7 10 "VFAT (Windows-95) fs support" CONFIG_VFAT_FS CONFIG_FAT_FS



        focus $w
        update_menu7 $w.config.f
        global winx; global winy
        set winx [expr [winfo x .]+30]; set winy [expr [winfo y .]+30]
        wm geometry $w +$winx+$winy
        update idletasks
        $w.config.canvas create window 0 0 -anchor nw -window $w.config.f

        $w.config.canvas configure \
                -width [expr [winfo reqwidth $w.config.f] + 1]\
                -scrollregion "-1 -1 [expr [winfo reqwidth $w.config.f] + 1] \
                         [expr [winfo reqheight $w.config.f] + 1]"

        set winy [expr [winfo reqh $w] - [winfo reqh $w.config.canvas]]
        set scry [expr [winfo screenh $w] / 2]
        set maxy [expr [winfo screenh $w] * 3 / 4]
        set canvtotal [expr [winfo reqh $w.config.f] + 2]
        if [expr $winy + $canvtotal < $maxy] {
                $w.config.canvas configure -height $canvtotal
        } else {
                $w.config.canvas configure -height [expr $scry - $winy]
        }
        update idletasks
        wm maxsize $w [winfo width $w] [winfo screenheight $w]
        wm minsize $w [winfo width $w] 100

        wm deiconify $w
}


proc update_menu7 {w}  {
        update_define
        global CONFIG_NLS; vfix CONFIG_NLS
        global CONFIG_ISO9660_FS; vfix CONFIG_ISO9660_FS
        if {($CONFIG_NLS == 1 || $CONFIG_NLS == 2) && ($CONFIG_NLS == 1 || $CONFIG_NLS == 2)} then {    global CONFIG_NLS; vfix CONFIG_NLS
if { $CONFIG_NLS != 1 && $CONFIG_NLS != 0 } then {.menu7.config.f.x6.y configure -state disabled;} else {.menu7.config.f.x6.y configure -state normal;}; .menu7.config.f.x6.n configure -state normal;.menu7.config.f.x6.m configure -state normal;.menu7.config.f.x6.l configure -state normal;set CONFIG_ISO9660_FS [expr $CONFIG_ISO9660_FS&15];} else { .menu7.config.f.x6.y configure -state disabled;.menu7.config.f.x6.n configure -state disabled;.menu7.config.f.x6.m configure -state disabled;.menu7.config.f.x6.l configure -state disabled;set CONFIG_ISO9660_FS [expr $CONFIG_ISO9660_FS|16];}
        global CONFIG_FAT_FS; vfix CONFIG_FAT_FS
        if {($CONFIG_NLS == 1 || $CONFIG_NLS == 2) && ($CONFIG_NLS == 1 || $CONFIG_NLS == 2)} then {    global CONFIG_NLS; vfix CONFIG_NLS
if { $CONFIG_NLS != 1 && $CONFIG_NLS != 0 } then {.menu7.config.f.x7.y configure -state disabled;} else {.menu7.config.f.x7.y configure -state normal;}; .menu7.config.f.x7.n configure -state normal;.menu7.config.f.x7.m configure -state normal;.menu7.config.f.x7.l configure -state normal;set CONFIG_FAT_FS [expr $CONFIG_FAT_FS&15];} else { .menu7.config.f.x7.y configure -state disabled;.menu7.config.f.x7.n configure -state disabled;.menu7.config.f.x7.m configure -state disabled;.menu7.config.f.x7.l configure -state disabled;set CONFIG_FAT_FS [expr $CONFIG_FAT_FS|16];}
        global CONFIG_MSDOS_FS; vfix CONFIG_MSDOS_FS
        if {($CONFIG_NLS == 1 || $CONFIG_NLS == 2) && ($CONFIG_FAT_FS == 1 || $CONFIG_FAT_FS == 2)} then {      global CONFIG_FAT_FS; vfix CONFIG_FAT_FS
if { $CONFIG_FAT_FS != 1 && $CONFIG_FAT_FS != 0 } then {.menu7.config.f.x8.y configure -state disabled;} else {.menu7.config.f.x8.y configure -state normal;}; .menu7.config.f.x8.n configure -state normal;.menu7.config.f.x8.m configure -state normal;.menu7.config.f.x8.l configure -state normal;set CONFIG_MSDOS_FS [expr $CONFIG_MSDOS_FS&15];} else { .menu7.config.f.x8.y configure -state disabled;.menu7.config.f.x8.n configure -state disabled;.menu7.config.f.x8.m configure -state disabled;.menu7.config.f.x8.l configure -state disabled;set CONFIG_MSDOS_FS [expr $CONFIG_MSDOS_FS|16];}
        global CONFIG_UMSDOS_FS; vfix CONFIG_UMSDOS_FS
        if {($CONFIG_NLS == 1 || $CONFIG_NLS == 2) && ($CONFIG_MSDOS_FS == 1 || $CONFIG_MSDOS_FS == 2)} then {  global CONFIG_MSDOS_FS; vfix CONFIG_MSDOS_FS
if { $CONFIG_MSDOS_FS != 1 && $CONFIG_MSDOS_FS != 0 } then {.menu7.config.f.x9.y configure -state disabled;} else {.menu7.config.f.x9.y configure -state normal;}; .menu7.config.f.x9.n configure -state normal;.menu7.config.f.x9.m configure -state normal;.menu7.config.f.x9.l configure -state normal;set CONFIG_UMSDOS_FS [expr $CONFIG_UMSDOS_FS&15];} else { .menu7.config.f.x9.y configure -state disabled;.menu7.config.f.x9.n configure -state disabled;.menu7.config.f.x9.m configure -state disabled;.menu7.config.f.x9.l configure -state disabled;set CONFIG_UMSDOS_FS [expr $CONFIG_UMSDOS_FS|16];}
        global CONFIG_VFAT_FS; vfix CONFIG_VFAT_FS
        if {($CONFIG_NLS == 1 || $CONFIG_NLS == 2) && ($CONFIG_FAT_FS == 1 || $CONFIG_FAT_FS == 2)} then {      global CONFIG_FAT_FS; vfix CONFIG_FAT_FS
if { $CONFIG_FAT_FS != 1 && $CONFIG_FAT_FS != 0 } then {.menu7.config.f.x10.y configure -state disabled;} else {.menu7.config.f.x10.y configure -state normal;}; .menu7.config.f.x10.n configure -state normal;.menu7.config.f.x10.m configure -state normal;.menu7.config.f.x10.l configure -state normal;set CONFIG_VFAT_FS [expr $CONFIG_VFAT_FS&15];} else { .menu7.config.f.x10.y configure -state disabled;.menu7.config.f.x10.n configure -state disabled;.menu7.config.f.x10.m configure -state disabled;.menu7.config.f.x10.l configure -state disabled;set CONFIG_VFAT_FS [expr $CONFIG_VFAT_FS|16];}
}


menu_option menu8 8 "Select available code pages"
proc menu8 {w title} {
        catch {destroy $w}
        toplevel $w -class Dialog
        wm withdraw $w
        message $w.m -width 400 -aspect 300 -text \
                "Select available code pages"  -relief raised
        pack $w.m -pady 10 -side top -padx 10
        wm title $w "Select available code pages" 

        set oldFocus [focus]
        frame $w.f
        button $w.f.back -text "Main Menu" \
                -width 15 -command "destroy $w; focus $oldFocus; update_mainmenu $w"
        button $w.f.next -text "Next" \
                -width 15 -command " destroy $w; focus $oldFocus;  menu9 .menu9 \"$title\""
        button $w.f.prev -text "Prev" \
                -width 15 -command " destroy $w; focus $oldFocus; menu7 .menu7 \"$title\""
        pack $w.f.back $w.f.next $w.f.prev -side left -expand on
        pack $w.f -pady 10 -side bottom -anchor w -fill x
        frame $w.topline -relief ridge -borderwidth 2 -height 2
        pack $w.topline -side top -fill x

        frame $w.botline -relief ridge -borderwidth 2 -height 2
        pack $w.botline -side bottom -fill x

        frame $w.config
        pack $w.config -fill y -expand on

        scrollbar $w.config.vscroll -command "$w.config.canvas yview"
        pack $w.config.vscroll -side right -fill y

        canvas $w.config.canvas -height 1\
                -relief flat -borderwidth 0 -yscrollcommand "$w.config.vscroll set" \
                -width [expr [winfo screenwidth .] * 1 / 2] 
        frame $w.config.f
        pack $w.config.canvas -side right -fill y


        dep_tristate $w.config.f 8 0 "Codepage 437 (United States, Canada)" CONFIG_NLS_CODEPAGE_437 CONFIG_NLS
        dep_tristate $w.config.f 8 1 "Codepage 737 (Greek)" CONFIG_NLS_CODEPAGE_737 CONFIG_NLS
        dep_tristate $w.config.f 8 2 "Codepage 775 (Baltic Rim)" CONFIG_NLS_CODEPAGE_775 CONFIG_NLS
        dep_tristate $w.config.f 8 3 "Codepage 850 (Europe)" CONFIG_NLS_CODEPAGE_850 CONFIG_NLS
        dep_tristate $w.config.f 8 4 "Codepage 852 (Central/Eastern Europe)" CONFIG_NLS_CODEPAGE_852 CONFIG_NLS
        dep_tristate $w.config.f 8 5 "Codepage 855 (Cyrillic)" CONFIG_NLS_CODEPAGE_855 CONFIG_NLS
        dep_tristate $w.config.f 8 6 "Codepage 857 (Turkish)" CONFIG_NLS_CODEPAGE_857 CONFIG_NLS
        dep_tristate $w.config.f 8 7 "Codepage 860 (Portugese)" CONFIG_NLS_CODEPAGE_860 CONFIG_NLS
        dep_tristate $w.config.f 8 8 "Codepage 861 (Icelandic)" CONFIG_NLS_CODEPAGE_861 CONFIG_NLS
        dep_tristate $w.config.f 8 9 "Codepage 862 (Hebrew)" CONFIG_NLS_CODEPAGE_862 CONFIG_NLS
        dep_tristate $w.config.f 8 10 "Codepage 863 (Canadian French)" CONFIG_NLS_CODEPAGE_863 CONFIG_NLS
        dep_tristate $w.config.f 8 11 "Codepage 864 (Arabic)" CONFIG_NLS_CODEPAGE_864 CONFIG_NLS
        dep_tristate $w.config.f 8 12 "Codepage 865 (Nordic European)" CONFIG_NLS_CODEPAGE_865 CONFIG_NLS
        dep_tristate $w.config.f 8 13 "Codepage 866 (Cyrillic/Russian)" CONFIG_NLS_CODEPAGE_866 CONFIG_NLS
        dep_tristate $w.config.f 8 14 "Codepage 869 (Greek)" CONFIG_NLS_CODEPAGE_869 CONFIG_NLS
        dep_tristate $w.config.f 8 15 "Codepage 874 (Thai)" CONFIG_NLS_CODEPAGE_874 CONFIG_NLS
        dep_tristate $w.config.f 8 16 "NLS ISO 8859-1 (Latin 1; Western Europe)" CONFIG_NLS_ISO8859_1 CONFIG_NLS
        dep_tristate $w.config.f 8 17 "NLS ISO 8859-2 (Latin 2; Slavic/Central European)" CONFIG_NLS_ISO8859_2 CONFIG_NLS
        dep_tristate $w.config.f 8 18 "NLS ISO 8859-3 (Latin 3; Esperanto, Galician, Maltese, Turkish)" CONFIG_NLS_ISO8859_3 CONFIG_NLS
        dep_tristate $w.config.f 8 19 "NLS ISO 8859-4 (Latin 4; Estonian, Latvian, Lithuanian)" CONFIG_NLS_ISO8859_4 CONFIG_NLS
        dep_tristate $w.config.f 8 20 "NLS ISO 8859-5 (Cyrillic)" CONFIG_NLS_ISO8859_5 CONFIG_NLS
        dep_tristate $w.config.f 8 21 "NLS ISO 8859-6 (Arabic)" CONFIG_NLS_ISO8859_6 CONFIG_NLS
        dep_tristate $w.config.f 8 22 "NLS ISO 8859-7 (Modern Greek)" CONFIG_NLS_ISO8859_7 CONFIG_NLS
        dep_tristate $w.config.f 8 23 "NLS ISO 8859-8 (Hebrew)" CONFIG_NLS_ISO8859_8 CONFIG_NLS
        dep_tristate $w.config.f 8 24 "NLS ISO 8859-9 (Latin 5; Turkey)" CONFIG_NLS_ISO8859_9 CONFIG_NLS
        dep_tristate $w.config.f 8 25 "NLS ISO 8859-15 (Latin 9; Western European Languages with Euro)" CONFIG_NLS_ISO8859_15 CONFIG_NLS
        dep_tristate $w.config.f 8 26 "NLS KOI8-R (Russian)" CONFIG_NLS_KOI8_R CONFIG_NLS
        bool $w.config.f 8 27 "/proc filesystem support" CONFIG_PROC_FS
        tristate $w.config.f 8 28 "NFS filesystem support" CONFIG_NFS_FS
        bool $w.config.f 8 29 "   Root file system on NFS" CONFIG_ROOT_NFS
        bool $w.config.f 8 30 "      BOOTP support" CONFIG_RNFS_BOOTP
        bool $w.config.f 8 31 "      RARP support" CONFIG_RNFS_RARP
        tristate $w.config.f 8 32 "SMB filesystem support (to mount WfW shares etc..)" CONFIG_SMB_FS
        bool $w.config.f 8 33 "SMB Win95 bug work-around" CONFIG_SMB_WIN95
        tristate $w.config.f 8 34 "NCP filesystem support (to mount NetWare volumes)" CONFIG_NCP_FS
        bool $w.config.f 8 35 "   Packet singatures" CONFIG_NCPFS_PACKET_SIGNING
        bool $w.config.f 8 36 "   Proprietary file locking" CONFIG_NCPFS_IOCTL_LOCKING
        bool $w.config.f 8 37 "   Clear remove/delete inhibit when needed" CONFIG_NCPFS_STRONG
        bool $w.config.f 8 38 "   Use NFS namespace if available" CONFIG_NCPFS_NFS_NS
        bool $w.config.f 8 39 "   Use LONG (OS/2) namespace if available" CONFIG_NCPFS_OS2_NS
        bool $w.config.f 8 40 "   Allow mounting of volume subdirectories" CONFIG_NCPFS_MOUNT_SUBDIR
        tristate $w.config.f 8 41 "OS/2 HPFS filesystem support (read only)" CONFIG_HPFS_FS
        tristate $w.config.f 8 42 "System V and Coherent filesystem support" CONFIG_SYSV_FS
        tristate $w.config.f 8 43 "Kernel automounter support (experimental)" CONFIG_AUTOFS_FS
        tristate $w.config.f 8 44 "Amiga FFS filesystem support (EXPERIMENTAL)" CONFIG_AFFS_FS
        tristate $w.config.f 8 45 "ROM filesystem support" CONFIG_ROMFS_FS
        tristate $w.config.f 8 46 "Journaling FLASH filesystem support" CONFIG_JFFS_FS
        tristate $w.config.f 8 47 "UFS filesystem support (read only)" CONFIG_UFS_FS
        bool $w.config.f 8 48 "BSD disklabel (FreeBSD partition tables) support" CONFIG_BSD_DISKLABEL
        bool $w.config.f 8 49 "SMD disklabel (Sun partition tables) support" CONFIG_SMD_DISKLABEL



        focus $w
        update_menu8 $w.config.f
        global winx; global winy
        set winx [expr [winfo x .]+30]; set winy [expr [winfo y .]+30]
        wm geometry $w +$winx+$winy
        update idletasks
        $w.config.canvas create window 0 0 -anchor nw -window $w.config.f

        $w.config.canvas configure \
                -width [expr [winfo reqwidth $w.config.f] + 1]\
                -scrollregion "-1 -1 [expr [winfo reqwidth $w.config.f] + 1] \
                         [expr [winfo reqheight $w.config.f] + 1]"

        set winy [expr [winfo reqh $w] - [winfo reqh $w.config.canvas]]
        set scry [expr [winfo screenh $w] / 2]
        set maxy [expr [winfo screenh $w] * 3 / 4]
        set canvtotal [expr [winfo reqh $w.config.f] + 2]
        if [expr $winy + $canvtotal < $maxy] {
                $w.config.canvas configure -height $canvtotal
        } else {
                $w.config.canvas configure -height [expr $scry - $winy]
        }
        update idletasks
        wm maxsize $w [winfo width $w] [winfo screenheight $w]
        wm minsize $w [winfo width $w] 100

        wm deiconify $w
}


proc update_menu8 {w}  {
        update_define
        global CONFIG_NLS; vfix CONFIG_NLS
        global CONFIG_NLS_CODEPAGE_437; vfix CONFIG_NLS_CODEPAGE_437
        if {($CONFIG_NLS == 1 || $CONFIG_NLS == 2) && ($CONFIG_NLS == 1 || $CONFIG_NLS == 2)} then {    global CONFIG_NLS; vfix CONFIG_NLS
if { $CONFIG_NLS != 1 && $CONFIG_NLS != 0 } then {.menu8.config.f.x0.y configure -state disabled;} else {.menu8.config.f.x0.y configure -state normal;}; .menu8.config.f.x0.n configure -state normal;.menu8.config.f.x0.m configure -state normal;.menu8.config.f.x0.l configure -state normal;set CONFIG_NLS_CODEPAGE_437 [expr $CONFIG_NLS_CODEPAGE_437&15];} else { .menu8.config.f.x0.y configure -state disabled;.menu8.config.f.x0.n configure -state disabled;.menu8.config.f.x0.m configure -state disabled;.menu8.config.f.x0.l configure -state disabled;set CONFIG_NLS_CODEPAGE_437 [expr $CONFIG_NLS_CODEPAGE_437|16];}
        global CONFIG_NLS_CODEPAGE_737; vfix CONFIG_NLS_CODEPAGE_737
        if {($CONFIG_NLS == 1 || $CONFIG_NLS == 2) && ($CONFIG_NLS == 1 || $CONFIG_NLS == 2)} then {    global CONFIG_NLS; vfix CONFIG_NLS
if { $CONFIG_NLS != 1 && $CONFIG_NLS != 0 } then {.menu8.config.f.x1.y configure -state disabled;} else {.menu8.config.f.x1.y configure -state normal;}; .menu8.config.f.x1.n configure -state normal;.menu8.config.f.x1.m configure -state normal;.menu8.config.f.x1.l configure -state normal;set CONFIG_NLS_CODEPAGE_737 [expr $CONFIG_NLS_CODEPAGE_737&15];} else { .menu8.config.f.x1.y configure -state disabled;.menu8.config.f.x1.n configure -state disabled;.menu8.config.f.x1.m configure -state disabled;.menu8.config.f.x1.l configure -state disabled;set CONFIG_NLS_CODEPAGE_737 [expr $CONFIG_NLS_CODEPAGE_737|16];}
        global CONFIG_NLS_CODEPAGE_775; vfix CONFIG_NLS_CODEPAGE_775
        if {($CONFIG_NLS == 1 || $CONFIG_NLS == 2) && ($CONFIG_NLS == 1 || $CONFIG_NLS == 2)} then {    global CONFIG_NLS; vfix CONFIG_NLS
if { $CONFIG_NLS != 1 && $CONFIG_NLS != 0 } then {.menu8.config.f.x2.y configure -state disabled;} else {.menu8.config.f.x2.y configure -state normal;}; .menu8.config.f.x2.n configure -state normal;.menu8.config.f.x2.m configure -state normal;.menu8.config.f.x2.l configure -state normal;set CONFIG_NLS_CODEPAGE_775 [expr $CONFIG_NLS_CODEPAGE_775&15];} else { .menu8.config.f.x2.y configure -state disabled;.menu8.config.f.x2.n configure -state disabled;.menu8.config.f.x2.m configure -state disabled;.menu8.config.f.x2.l configure -state disabled;set CONFIG_NLS_CODEPAGE_775 [expr $CONFIG_NLS_CODEPAGE_775|16];}
        global CONFIG_NLS_CODEPAGE_850; vfix CONFIG_NLS_CODEPAGE_850
        if {($CONFIG_NLS == 1 || $CONFIG_NLS == 2) && ($CONFIG_NLS == 1 || $CONFIG_NLS == 2)} then {    global CONFIG_NLS; vfix CONFIG_NLS
if { $CONFIG_NLS != 1 && $CONFIG_NLS != 0 } then {.menu8.config.f.x3.y configure -state disabled;} else {.menu8.config.f.x3.y configure -state normal;}; .menu8.config.f.x3.n configure -state normal;.menu8.config.f.x3.m configure -state normal;.menu8.config.f.x3.l configure -state normal;set CONFIG_NLS_CODEPAGE_850 [expr $CONFIG_NLS_CODEPAGE_850&15];} else { .menu8.config.f.x3.y configure -state disabled;.menu8.config.f.x3.n configure -state disabled;.menu8.config.f.x3.m configure -state disabled;.menu8.config.f.x3.l configure -state disabled;set CONFIG_NLS_CODEPAGE_850 [expr $CONFIG_NLS_CODEPAGE_850|16];}
        global CONFIG_NLS_CODEPAGE_852; vfix CONFIG_NLS_CODEPAGE_852
        if {($CONFIG_NLS == 1 || $CONFIG_NLS == 2) && ($CONFIG_NLS == 1 || $CONFIG_NLS == 2)} then {    global CONFIG_NLS; vfix CONFIG_NLS
if { $CONFIG_NLS != 1 && $CONFIG_NLS != 0 } then {.menu8.config.f.x4.y configure -state disabled;} else {.menu8.config.f.x4.y configure -state normal;}; .menu8.config.f.x4.n configure -state normal;.menu8.config.f.x4.m configure -state normal;.menu8.config.f.x4.l configure -state normal;set CONFIG_NLS_CODEPAGE_852 [expr $CONFIG_NLS_CODEPAGE_852&15];} else { .menu8.config.f.x4.y configure -state disabled;.menu8.config.f.x4.n configure -state disabled;.menu8.config.f.x4.m configure -state disabled;.menu8.config.f.x4.l configure -state disabled;set CONFIG_NLS_CODEPAGE_852 [expr $CONFIG_NLS_CODEPAGE_852|16];}
        global CONFIG_NLS_CODEPAGE_855; vfix CONFIG_NLS_CODEPAGE_855
        if {($CONFIG_NLS == 1 || $CONFIG_NLS == 2) && ($CONFIG_NLS == 1 || $CONFIG_NLS == 2)} then {    global CONFIG_NLS; vfix CONFIG_NLS
if { $CONFIG_NLS != 1 && $CONFIG_NLS != 0 } then {.menu8.config.f.x5.y configure -state disabled;} else {.menu8.config.f.x5.y configure -state normal;}; .menu8.config.f.x5.n configure -state normal;.menu8.config.f.x5.m configure -state normal;.menu8.config.f.x5.l configure -state normal;set CONFIG_NLS_CODEPAGE_855 [expr $CONFIG_NLS_CODEPAGE_855&15];} else { .menu8.config.f.x5.y configure -state disabled;.menu8.config.f.x5.n configure -state disabled;.menu8.config.f.x5.m configure -state disabled;.menu8.config.f.x5.l configure -state disabled;set CONFIG_NLS_CODEPAGE_855 [expr $CONFIG_NLS_CODEPAGE_855|16];}
        global CONFIG_NLS_CODEPAGE_857; vfix CONFIG_NLS_CODEPAGE_857
        if {($CONFIG_NLS == 1 || $CONFIG_NLS == 2) && ($CONFIG_NLS == 1 || $CONFIG_NLS == 2)} then {    global CONFIG_NLS; vfix CONFIG_NLS
if { $CONFIG_NLS != 1 && $CONFIG_NLS != 0 } then {.menu8.config.f.x6.y configure -state disabled;} else {.menu8.config.f.x6.y configure -state normal;}; .menu8.config.f.x6.n configure -state normal;.menu8.config.f.x6.m configure -state normal;.menu8.config.f.x6.l configure -state normal;set CONFIG_NLS_CODEPAGE_857 [expr $CONFIG_NLS_CODEPAGE_857&15];} else { .menu8.config.f.x6.y configure -state disabled;.menu8.config.f.x6.n configure -state disabled;.menu8.config.f.x6.m configure -state disabled;.menu8.config.f.x6.l configure -state disabled;set CONFIG_NLS_CODEPAGE_857 [expr $CONFIG_NLS_CODEPAGE_857|16];}
        global CONFIG_NLS_CODEPAGE_860; vfix CONFIG_NLS_CODEPAGE_860
        if {($CONFIG_NLS == 1 || $CONFIG_NLS == 2) && ($CONFIG_NLS == 1 || $CONFIG_NLS == 2)} then {    global CONFIG_NLS; vfix CONFIG_NLS
if { $CONFIG_NLS != 1 && $CONFIG_NLS != 0 } then {.menu8.config.f.x7.y configure -state disabled;} else {.menu8.config.f.x7.y configure -state normal;}; .menu8.config.f.x7.n configure -state normal;.menu8.config.f.x7.m configure -state normal;.menu8.config.f.x7.l configure -state normal;set CONFIG_NLS_CODEPAGE_860 [expr $CONFIG_NLS_CODEPAGE_860&15];} else { .menu8.config.f.x7.y configure -state disabled;.menu8.config.f.x7.n configure -state disabled;.menu8.config.f.x7.m configure -state disabled;.menu8.config.f.x7.l configure -state disabled;set CONFIG_NLS_CODEPAGE_860 [expr $CONFIG_NLS_CODEPAGE_860|16];}
        global CONFIG_NLS_CODEPAGE_861; vfix CONFIG_NLS_CODEPAGE_861
        if {($CONFIG_NLS == 1 || $CONFIG_NLS == 2) && ($CONFIG_NLS == 1 || $CONFIG_NLS == 2)} then {    global CONFIG_NLS; vfix CONFIG_NLS
if { $CONFIG_NLS != 1 && $CONFIG_NLS != 0 } then {.menu8.config.f.x8.y configure -state disabled;} else {.menu8.config.f.x8.y configure -state normal;}; .menu8.config.f.x8.n configure -state normal;.menu8.config.f.x8.m configure -state normal;.menu8.config.f.x8.l configure -state normal;set CONFIG_NLS_CODEPAGE_861 [expr $CONFIG_NLS_CODEPAGE_861&15];} else { .menu8.config.f.x8.y configure -state disabled;.menu8.config.f.x8.n configure -state disabled;.menu8.config.f.x8.m configure -state disabled;.menu8.config.f.x8.l configure -state disabled;set CONFIG_NLS_CODEPAGE_861 [expr $CONFIG_NLS_CODEPAGE_861|16];}
        global CONFIG_NLS_CODEPAGE_862; vfix CONFIG_NLS_CODEPAGE_862
        if {($CONFIG_NLS == 1 || $CONFIG_NLS == 2) && ($CONFIG_NLS == 1 || $CONFIG_NLS == 2)} then {    global CONFIG_NLS; vfix CONFIG_NLS
if { $CONFIG_NLS != 1 && $CONFIG_NLS != 0 } then {.menu8.config.f.x9.y configure -state disabled;} else {.menu8.config.f.x9.y configure -state normal;}; .menu8.config.f.x9.n configure -state normal;.menu8.config.f.x9.m configure -state normal;.menu8.config.f.x9.l configure -state normal;set CONFIG_NLS_CODEPAGE_862 [expr $CONFIG_NLS_CODEPAGE_862&15];} else { .menu8.config.f.x9.y configure -state disabled;.menu8.config.f.x9.n configure -state disabled;.menu8.config.f.x9.m configure -state disabled;.menu8.config.f.x9.l configure -state disabled;set CONFIG_NLS_CODEPAGE_862 [expr $CONFIG_NLS_CODEPAGE_862|16];}
        global CONFIG_NLS_CODEPAGE_863; vfix CONFIG_NLS_CODEPAGE_863
        if {($CONFIG_NLS == 1 || $CONFIG_NLS == 2) && ($CONFIG_NLS == 1 || $CONFIG_NLS == 2)} then {    global CONFIG_NLS; vfix CONFIG_NLS
if { $CONFIG_NLS != 1 && $CONFIG_NLS != 0 } then {.menu8.config.f.x10.y configure -state disabled;} else {.menu8.config.f.x10.y configure -state normal;}; .menu8.config.f.x10.n configure -state normal;.menu8.config.f.x10.m configure -state normal;.menu8.config.f.x10.l configure -state normal;set CONFIG_NLS_CODEPAGE_863 [expr $CONFIG_NLS_CODEPAGE_863&15];} else { .menu8.config.f.x10.y configure -state disabled;.menu8.config.f.x10.n configure -state disabled;.menu8.config.f.x10.m configure -state disabled;.menu8.config.f.x10.l configure -state disabled;set CONFIG_NLS_CODEPAGE_863 [expr $CONFIG_NLS_CODEPAGE_863|16];}
        global CONFIG_NLS_CODEPAGE_864; vfix CONFIG_NLS_CODEPAGE_864
        if {($CONFIG_NLS == 1 || $CONFIG_NLS == 2) && ($CONFIG_NLS == 1 || $CONFIG_NLS == 2)} then {    global CONFIG_NLS; vfix CONFIG_NLS
if { $CONFIG_NLS != 1 && $CONFIG_NLS != 0 } then {.menu8.config.f.x11.y configure -state disabled;} else {.menu8.config.f.x11.y configure -state normal;}; .menu8.config.f.x11.n configure -state normal;.menu8.config.f.x11.m configure -state normal;.menu8.config.f.x11.l configure -state normal;set CONFIG_NLS_CODEPAGE_864 [expr $CONFIG_NLS_CODEPAGE_864&15];} else { .menu8.config.f.x11.y configure -state disabled;.menu8.config.f.x11.n configure -state disabled;.menu8.config.f.x11.m configure -state disabled;.menu8.config.f.x11.l configure -state disabled;set CONFIG_NLS_CODEPAGE_864 [expr $CONFIG_NLS_CODEPAGE_864|16];}
        global CONFIG_NLS_CODEPAGE_865; vfix CONFIG_NLS_CODEPAGE_865
        if {($CONFIG_NLS == 1 || $CONFIG_NLS == 2) && ($CONFIG_NLS == 1 || $CONFIG_NLS == 2)} then {    global CONFIG_NLS; vfix CONFIG_NLS
if { $CONFIG_NLS != 1 && $CONFIG_NLS != 0 } then {.menu8.config.f.x12.y configure -state disabled;} else {.menu8.config.f.x12.y configure -state normal;}; .menu8.config.f.x12.n configure -state normal;.menu8.config.f.x12.m configure -state normal;.menu8.config.f.x12.l configure -state normal;set CONFIG_NLS_CODEPAGE_865 [expr $CONFIG_NLS_CODEPAGE_865&15];} else { .menu8.config.f.x12.y configure -state disabled;.menu8.config.f.x12.n configure -state disabled;.menu8.config.f.x12.m configure -state disabled;.menu8.config.f.x12.l configure -state disabled;set CONFIG_NLS_CODEPAGE_865 [expr $CONFIG_NLS_CODEPAGE_865|16];}
        global CONFIG_NLS_CODEPAGE_866; vfix CONFIG_NLS_CODEPAGE_866
        if {($CONFIG_NLS == 1 || $CONFIG_NLS == 2) && ($CONFIG_NLS == 1 || $CONFIG_NLS == 2)} then {    global CONFIG_NLS; vfix CONFIG_NLS
if { $CONFIG_NLS != 1 && $CONFIG_NLS != 0 } then {.menu8.config.f.x13.y configure -state disabled;} else {.menu8.config.f.x13.y configure -state normal;}; .menu8.config.f.x13.n configure -state normal;.menu8.config.f.x13.m configure -state normal;.menu8.config.f.x13.l configure -state normal;set CONFIG_NLS_CODEPAGE_866 [expr $CONFIG_NLS_CODEPAGE_866&15];} else { .menu8.config.f.x13.y configure -state disabled;.menu8.config.f.x13.n configure -state disabled;.menu8.config.f.x13.m configure -state disabled;.menu8.config.f.x13.l configure -state disabled;set CONFIG_NLS_CODEPAGE_866 [expr $CONFIG_NLS_CODEPAGE_866|16];}
        global CONFIG_NLS_CODEPAGE_869; vfix CONFIG_NLS_CODEPAGE_869
        if {($CONFIG_NLS == 1 || $CONFIG_NLS == 2) && ($CONFIG_NLS == 1 || $CONFIG_NLS == 2)} then {    global CONFIG_NLS; vfix CONFIG_NLS
if { $CONFIG_NLS != 1 && $CONFIG_NLS != 0 } then {.menu8.config.f.x14.y configure -state disabled;} else {.menu8.config.f.x14.y configure -state normal;}; .menu8.config.f.x14.n configure -state normal;.menu8.config.f.x14.m configure -state normal;.menu8.config.f.x14.l configure -state normal;set CONFIG_NLS_CODEPAGE_869 [expr $CONFIG_NLS_CODEPAGE_869&15];} else { .menu8.config.f.x14.y configure -state disabled;.menu8.config.f.x14.n configure -state disabled;.menu8.config.f.x14.m configure -state disabled;.menu8.config.f.x14.l configure -state disabled;set CONFIG_NLS_CODEPAGE_869 [expr $CONFIG_NLS_CODEPAGE_869|16];}
        global CONFIG_NLS_CODEPAGE_874; vfix CONFIG_NLS_CODEPAGE_874
        if {($CONFIG_NLS == 1 || $CONFIG_NLS == 2) && ($CONFIG_NLS == 1 || $CONFIG_NLS == 2)} then {    global CONFIG_NLS; vfix CONFIG_NLS
if { $CONFIG_NLS != 1 && $CONFIG_NLS != 0 } then {.menu8.config.f.x15.y configure -state disabled;} else {.menu8.config.f.x15.y configure -state normal;}; .menu8.config.f.x15.n configure -state normal;.menu8.config.f.x15.m configure -state normal;.menu8.config.f.x15.l configure -state normal;set CONFIG_NLS_CODEPAGE_874 [expr $CONFIG_NLS_CODEPAGE_874&15];} else { .menu8.config.f.x15.y configure -state disabled;.menu8.config.f.x15.n configure -state disabled;.menu8.config.f.x15.m configure -state disabled;.menu8.config.f.x15.l configure -state disabled;set CONFIG_NLS_CODEPAGE_874 [expr $CONFIG_NLS_CODEPAGE_874|16];}
        global CONFIG_NLS_ISO8859_1; vfix CONFIG_NLS_ISO8859_1
        if {($CONFIG_NLS == 1 || $CONFIG_NLS == 2) && ($CONFIG_NLS == 1 || $CONFIG_NLS == 2)} then {    global CONFIG_NLS; vfix CONFIG_NLS
if { $CONFIG_NLS != 1 && $CONFIG_NLS != 0 } then {.menu8.config.f.x16.y configure -state disabled;} else {.menu8.config.f.x16.y configure -state normal;}; .menu8.config.f.x16.n configure -state normal;.menu8.config.f.x16.m configure -state normal;.menu8.config.f.x16.l configure -state normal;set CONFIG_NLS_ISO8859_1 [expr $CONFIG_NLS_ISO8859_1&15];} else { .menu8.config.f.x16.y configure -state disabled;.menu8.config.f.x16.n configure -state disabled;.menu8.config.f.x16.m configure -state disabled;.menu8.config.f.x16.l configure -state disabled;set CONFIG_NLS_ISO8859_1 [expr $CONFIG_NLS_ISO8859_1|16];}
        global CONFIG_NLS_ISO8859_2; vfix CONFIG_NLS_ISO8859_2
        if {($CONFIG_NLS == 1 || $CONFIG_NLS == 2) && ($CONFIG_NLS == 1 || $CONFIG_NLS == 2)} then {    global CONFIG_NLS; vfix CONFIG_NLS
if { $CONFIG_NLS != 1 && $CONFIG_NLS != 0 } then {.menu8.config.f.x17.y configure -state disabled;} else {.menu8.config.f.x17.y configure -state normal;}; .menu8.config.f.x17.n configure -state normal;.menu8.config.f.x17.m configure -state normal;.menu8.config.f.x17.l configure -state normal;set CONFIG_NLS_ISO8859_2 [expr $CONFIG_NLS_ISO8859_2&15];} else { .menu8.config.f.x17.y configure -state disabled;.menu8.config.f.x17.n configure -state disabled;.menu8.config.f.x17.m configure -state disabled;.menu8.config.f.x17.l configure -state disabled;set CONFIG_NLS_ISO8859_2 [expr $CONFIG_NLS_ISO8859_2|16];}
        global CONFIG_NLS_ISO8859_3; vfix CONFIG_NLS_ISO8859_3
        if {($CONFIG_NLS == 1 || $CONFIG_NLS == 2) && ($CONFIG_NLS == 1 || $CONFIG_NLS == 2)} then {    global CONFIG_NLS; vfix CONFIG_NLS
if { $CONFIG_NLS != 1 && $CONFIG_NLS != 0 } then {.menu8.config.f.x18.y configure -state disabled;} else {.menu8.config.f.x18.y configure -state normal;}; .menu8.config.f.x18.n configure -state normal;.menu8.config.f.x18.m configure -state normal;.menu8.config.f.x18.l configure -state normal;set CONFIG_NLS_ISO8859_3 [expr $CONFIG_NLS_ISO8859_3&15];} else { .menu8.config.f.x18.y configure -state disabled;.menu8.config.f.x18.n configure -state disabled;.menu8.config.f.x18.m configure -state disabled;.menu8.config.f.x18.l configure -state disabled;set CONFIG_NLS_ISO8859_3 [expr $CONFIG_NLS_ISO8859_3|16];}
        global CONFIG_NLS_ISO8859_4; vfix CONFIG_NLS_ISO8859_4
        if {($CONFIG_NLS == 1 || $CONFIG_NLS == 2) && ($CONFIG_NLS == 1 || $CONFIG_NLS == 2)} then {    global CONFIG_NLS; vfix CONFIG_NLS
if { $CONFIG_NLS != 1 && $CONFIG_NLS != 0 } then {.menu8.config.f.x19.y configure -state disabled;} else {.menu8.config.f.x19.y configure -state normal;}; .menu8.config.f.x19.n configure -state normal;.menu8.config.f.x19.m configure -state normal;.menu8.config.f.x19.l configure -state normal;set CONFIG_NLS_ISO8859_4 [expr $CONFIG_NLS_ISO8859_4&15];} else { .menu8.config.f.x19.y configure -state disabled;.menu8.config.f.x19.n configure -state disabled;.menu8.config.f.x19.m configure -state disabled;.menu8.config.f.x19.l configure -state disabled;set CONFIG_NLS_ISO8859_4 [expr $CONFIG_NLS_ISO8859_4|16];}
        global CONFIG_NLS_ISO8859_5; vfix CONFIG_NLS_ISO8859_5
        if {($CONFIG_NLS == 1 || $CONFIG_NLS == 2) && ($CONFIG_NLS == 1 || $CONFIG_NLS == 2)} then {    global CONFIG_NLS; vfix CONFIG_NLS
if { $CONFIG_NLS != 1 && $CONFIG_NLS != 0 } then {.menu8.config.f.x20.y configure -state disabled;} else {.menu8.config.f.x20.y configure -state normal;}; .menu8.config.f.x20.n configure -state normal;.menu8.config.f.x20.m configure -state normal;.menu8.config.f.x20.l configure -state normal;set CONFIG_NLS_ISO8859_5 [expr $CONFIG_NLS_ISO8859_5&15];} else { .menu8.config.f.x20.y configure -state disabled;.menu8.config.f.x20.n configure -state disabled;.menu8.config.f.x20.m configure -state disabled;.menu8.config.f.x20.l configure -state disabled;set CONFIG_NLS_ISO8859_5 [expr $CONFIG_NLS_ISO8859_5|16];}
        global CONFIG_NLS_ISO8859_6; vfix CONFIG_NLS_ISO8859_6
        if {($CONFIG_NLS == 1 || $CONFIG_NLS == 2) && ($CONFIG_NLS == 1 || $CONFIG_NLS == 2)} then {    global CONFIG_NLS; vfix CONFIG_NLS
if { $CONFIG_NLS != 1 && $CONFIG_NLS != 0 } then {.menu8.config.f.x21.y configure -state disabled;} else {.menu8.config.f.x21.y configure -state normal;}; .menu8.config.f.x21.n configure -state normal;.menu8.config.f.x21.m configure -state normal;.menu8.config.f.x21.l configure -state normal;set CONFIG_NLS_ISO8859_6 [expr $CONFIG_NLS_ISO8859_6&15];} else { .menu8.config.f.x21.y configure -state disabled;.menu8.config.f.x21.n configure -state disabled;.menu8.config.f.x21.m configure -state disabled;.menu8.config.f.x21.l configure -state disabled;set CONFIG_NLS_ISO8859_6 [expr $CONFIG_NLS_ISO8859_6|16];}
        global CONFIG_NLS_ISO8859_7; vfix CONFIG_NLS_ISO8859_7
        if {($CONFIG_NLS == 1 || $CONFIG_NLS == 2) && ($CONFIG_NLS == 1 || $CONFIG_NLS == 2)} then {    global CONFIG_NLS; vfix CONFIG_NLS
if { $CONFIG_NLS != 1 && $CONFIG_NLS != 0 } then {.menu8.config.f.x22.y configure -state disabled;} else {.menu8.config.f.x22.y configure -state normal;}; .menu8.config.f.x22.n configure -state normal;.menu8.config.f.x22.m configure -state normal;.menu8.config.f.x22.l configure -state normal;set CONFIG_NLS_ISO8859_7 [expr $CONFIG_NLS_ISO8859_7&15];} else { .menu8.config.f.x22.y configure -state disabled;.menu8.config.f.x22.n configure -state disabled;.menu8.config.f.x22.m configure -state disabled;.menu8.config.f.x22.l configure -state disabled;set CONFIG_NLS_ISO8859_7 [expr $CONFIG_NLS_ISO8859_7|16];}
        global CONFIG_NLS_ISO8859_8; vfix CONFIG_NLS_ISO8859_8
        if {($CONFIG_NLS == 1 || $CONFIG_NLS == 2) && ($CONFIG_NLS == 1 || $CONFIG_NLS == 2)} then {    global CONFIG_NLS; vfix CONFIG_NLS
if { $CONFIG_NLS != 1 && $CONFIG_NLS != 0 } then {.menu8.config.f.x23.y configure -state disabled;} else {.menu8.config.f.x23.y configure -state normal;}; .menu8.config.f.x23.n configure -state normal;.menu8.config.f.x23.m configure -state normal;.menu8.config.f.x23.l configure -state normal;set CONFIG_NLS_ISO8859_8 [expr $CONFIG_NLS_ISO8859_8&15];} else { .menu8.config.f.x23.y configure -state disabled;.menu8.config.f.x23.n configure -state disabled;.menu8.config.f.x23.m configure -state disabled;.menu8.config.f.x23.l configure -state disabled;set CONFIG_NLS_ISO8859_8 [expr $CONFIG_NLS_ISO8859_8|16];}
        global CONFIG_NLS_ISO8859_9; vfix CONFIG_NLS_ISO8859_9
        if {($CONFIG_NLS == 1 || $CONFIG_NLS == 2) && ($CONFIG_NLS == 1 || $CONFIG_NLS == 2)} then {    global CONFIG_NLS; vfix CONFIG_NLS
if { $CONFIG_NLS != 1 && $CONFIG_NLS != 0 } then {.menu8.config.f.x24.y configure -state disabled;} else {.menu8.config.f.x24.y configure -state normal;}; .menu8.config.f.x24.n configure -state normal;.menu8.config.f.x24.m configure -state normal;.menu8.config.f.x24.l configure -state normal;set CONFIG_NLS_ISO8859_9 [expr $CONFIG_NLS_ISO8859_9&15];} else { .menu8.config.f.x24.y configure -state disabled;.menu8.config.f.x24.n configure -state disabled;.menu8.config.f.x24.m configure -state disabled;.menu8.config.f.x24.l configure -state disabled;set CONFIG_NLS_ISO8859_9 [expr $CONFIG_NLS_ISO8859_9|16];}
        global CONFIG_NLS_ISO8859_15; vfix CONFIG_NLS_ISO8859_15
        if {($CONFIG_NLS == 1 || $CONFIG_NLS == 2) && ($CONFIG_NLS == 1 || $CONFIG_NLS == 2)} then {    global CONFIG_NLS; vfix CONFIG_NLS
if { $CONFIG_NLS != 1 && $CONFIG_NLS != 0 } then {.menu8.config.f.x25.y configure -state disabled;} else {.menu8.config.f.x25.y configure -state normal;}; .menu8.config.f.x25.n configure -state normal;.menu8.config.f.x25.m configure -state normal;.menu8.config.f.x25.l configure -state normal;set CONFIG_NLS_ISO8859_15 [expr $CONFIG_NLS_ISO8859_15&15];} else { .menu8.config.f.x25.y configure -state disabled;.menu8.config.f.x25.n configure -state disabled;.menu8.config.f.x25.m configure -state disabled;.menu8.config.f.x25.l configure -state disabled;set CONFIG_NLS_ISO8859_15 [expr $CONFIG_NLS_ISO8859_15|16];}
        global CONFIG_NLS_KOI8_R; vfix CONFIG_NLS_KOI8_R
        if {($CONFIG_NLS == 1 || $CONFIG_NLS == 2) && ($CONFIG_NLS == 1 || $CONFIG_NLS == 2)} then {    global CONFIG_NLS; vfix CONFIG_NLS
if { $CONFIG_NLS != 1 && $CONFIG_NLS != 0 } then {.menu8.config.f.x26.y configure -state disabled;} else {.menu8.config.f.x26.y configure -state normal;}; .menu8.config.f.x26.n configure -state normal;.menu8.config.f.x26.m configure -state normal;.menu8.config.f.x26.l configure -state normal;set CONFIG_NLS_KOI8_R [expr $CONFIG_NLS_KOI8_R&15];} else { .menu8.config.f.x26.y configure -state disabled;.menu8.config.f.x26.n configure -state disabled;.menu8.config.f.x26.m configure -state disabled;.menu8.config.f.x26.l configure -state disabled;set CONFIG_NLS_KOI8_R [expr $CONFIG_NLS_KOI8_R|16];}
        global CONFIG_INET; vfix CONFIG_INET
        global CONFIG_NFS_FS; vfix CONFIG_NFS_FS
        if {($CONFIG_INET == 1)} then { .menu8.config.f.x28.y configure -state normal;.menu8.config.f.x28.n configure -state normal;.menu8.config.f.x28.m configure -state normal;.menu8.config.f.x28.l configure -state normal;set CONFIG_NFS_FS [expr $CONFIG_NFS_FS&15];} else { .menu8.config.f.x28.y configure -state disabled;.menu8.config.f.x28.n configure -state disabled;.menu8.config.f.x28.m configure -state disabled;.menu8.config.f.x28.l configure -state disabled;set CONFIG_NFS_FS [expr $CONFIG_NFS_FS|16];}
        global CONFIG_ROOT_NFS; vfix CONFIG_ROOT_NFS
        if {($CONFIG_INET == 1) && ($CONFIG_NFS_FS == 1)} then { .menu8.config.f.x29.y configure -state normal;.menu8.config.f.x29.n configure -state normal;.menu8.config.f.x29.l configure -state normal;set CONFIG_ROOT_NFS [expr $CONFIG_ROOT_NFS&15];} else { .menu8.config.f.x29.y configure -state disabled;.menu8.config.f.x29.n configure -state disabled;.menu8.config.f.x29.l configure -state disabled;set CONFIG_ROOT_NFS [expr $CONFIG_ROOT_NFS|16];}
        global CONFIG_RNFS_BOOTP; vfix CONFIG_RNFS_BOOTP
        if {($CONFIG_INET == 1) && ($CONFIG_NFS_FS == 1) && ($CONFIG_ROOT_NFS == 1)} then { .menu8.config.f.x30.y configure -state normal;.menu8.config.f.x30.n configure -state normal;.menu8.config.f.x30.l configure -state normal;set CONFIG_RNFS_BOOTP [expr $CONFIG_RNFS_BOOTP&15];} else { .menu8.config.f.x30.y configure -state disabled;.menu8.config.f.x30.n configure -state disabled;.menu8.config.f.x30.l configure -state disabled;set CONFIG_RNFS_BOOTP [expr $CONFIG_RNFS_BOOTP|16];}
        global CONFIG_RNFS_RARP; vfix CONFIG_RNFS_RARP
        if {($CONFIG_INET == 1) && ($CONFIG_NFS_FS == 1) && ($CONFIG_ROOT_NFS == 1)} then { .menu8.config.f.x31.y configure -state normal;.menu8.config.f.x31.n configure -state normal;.menu8.config.f.x31.l configure -state normal;set CONFIG_RNFS_RARP [expr $CONFIG_RNFS_RARP&15];} else { .menu8.config.f.x31.y configure -state disabled;.menu8.config.f.x31.n configure -state disabled;.menu8.config.f.x31.l configure -state disabled;set CONFIG_RNFS_RARP [expr $CONFIG_RNFS_RARP|16];}
        global CONFIG_SMB_FS; vfix CONFIG_SMB_FS
        if {($CONFIG_INET == 1)} then { .menu8.config.f.x32.y configure -state normal;.menu8.config.f.x32.n configure -state normal;.menu8.config.f.x32.m configure -state normal;.menu8.config.f.x32.l configure -state normal;set CONFIG_SMB_FS [expr $CONFIG_SMB_FS&15];} else { .menu8.config.f.x32.y configure -state disabled;.menu8.config.f.x32.n configure -state disabled;.menu8.config.f.x32.m configure -state disabled;.menu8.config.f.x32.l configure -state disabled;set CONFIG_SMB_FS [expr $CONFIG_SMB_FS|16];}
        global CONFIG_SMB_WIN95; vfix CONFIG_SMB_WIN95
        if {($CONFIG_INET == 1) && ($CONFIG_SMB_FS != 0)} then { .menu8.config.f.x33.y configure -state normal;.menu8.config.f.x33.n configure -state normal;.menu8.config.f.x33.l configure -state normal;set CONFIG_SMB_WIN95 [expr $CONFIG_SMB_WIN95&15];} else { .menu8.config.f.x33.y configure -state disabled;.menu8.config.f.x33.n configure -state disabled;.menu8.config.f.x33.l configure -state disabled;set CONFIG_SMB_WIN95 [expr $CONFIG_SMB_WIN95|16];}
        global CONFIG_IPX; vfix CONFIG_IPX
        global CONFIG_NCP_FS; vfix CONFIG_NCP_FS
        if {($CONFIG_IPX != 0)} then { .menu8.config.f.x34.y configure -state normal;.menu8.config.f.x34.n configure -state normal;.menu8.config.f.x34.m configure -state normal;.menu8.config.f.x34.l configure -state normal;set CONFIG_NCP_FS [expr $CONFIG_NCP_FS&15];} else { .menu8.config.f.x34.y configure -state disabled;.menu8.config.f.x34.n configure -state disabled;.menu8.config.f.x34.m configure -state disabled;.menu8.config.f.x34.l configure -state disabled;set CONFIG_NCP_FS [expr $CONFIG_NCP_FS|16];}
        global CONFIG_NCPFS_PACKET_SIGNING; vfix CONFIG_NCPFS_PACKET_SIGNING
        if {($CONFIG_IPX != 0) && ($CONFIG_NCP_FS != 0)} then { .menu8.config.f.x35.y configure -state normal;.menu8.config.f.x35.n configure -state normal;.menu8.config.f.x35.l configure -state normal;set CONFIG_NCPFS_PACKET_SIGNING [expr $CONFIG_NCPFS_PACKET_SIGNING&15];} else { .menu8.config.f.x35.y configure -state disabled;.menu8.config.f.x35.n configure -state disabled;.menu8.config.f.x35.l configure -state disabled;set CONFIG_NCPFS_PACKET_SIGNING [expr $CONFIG_NCPFS_PACKET_SIGNING|16];}
        global CONFIG_NCPFS_IOCTL_LOCKING; vfix CONFIG_NCPFS_IOCTL_LOCKING
        if {($CONFIG_IPX != 0) && ($CONFIG_NCP_FS != 0)} then { .menu8.config.f.x36.y configure -state normal;.menu8.config.f.x36.n configure -state normal;.menu8.config.f.x36.l configure -state normal;set CONFIG_NCPFS_IOCTL_LOCKING [expr $CONFIG_NCPFS_IOCTL_LOCKING&15];} else { .menu8.config.f.x36.y configure -state disabled;.menu8.config.f.x36.n configure -state disabled;.menu8.config.f.x36.l configure -state disabled;set CONFIG_NCPFS_IOCTL_LOCKING [expr $CONFIG_NCPFS_IOCTL_LOCKING|16];}
        global CONFIG_NCPFS_STRONG; vfix CONFIG_NCPFS_STRONG
        if {($CONFIG_IPX != 0) && ($CONFIG_NCP_FS != 0)} then { .menu8.config.f.x37.y configure -state normal;.menu8.config.f.x37.n configure -state normal;.menu8.config.f.x37.l configure -state normal;set CONFIG_NCPFS_STRONG [expr $CONFIG_NCPFS_STRONG&15];} else { .menu8.config.f.x37.y configure -state disabled;.menu8.config.f.x37.n configure -state disabled;.menu8.config.f.x37.l configure -state disabled;set CONFIG_NCPFS_STRONG [expr $CONFIG_NCPFS_STRONG|16];}
        global CONFIG_NCPFS_NFS_NS; vfix CONFIG_NCPFS_NFS_NS
        if {($CONFIG_IPX != 0) && ($CONFIG_NCP_FS != 0)} then { .menu8.config.f.x38.y configure -state normal;.menu8.config.f.x38.n configure -state normal;.menu8.config.f.x38.l configure -state normal;set CONFIG_NCPFS_NFS_NS [expr $CONFIG_NCPFS_NFS_NS&15];} else { .menu8.config.f.x38.y configure -state disabled;.menu8.config.f.x38.n configure -state disabled;.menu8.config.f.x38.l configure -state disabled;set CONFIG_NCPFS_NFS_NS [expr $CONFIG_NCPFS_NFS_NS|16];}
        global CONFIG_NCPFS_OS2_NS; vfix CONFIG_NCPFS_OS2_NS
        if {($CONFIG_IPX != 0) && ($CONFIG_NCP_FS != 0)} then { .menu8.config.f.x39.y configure -state normal;.menu8.config.f.x39.n configure -state normal;.menu8.config.f.x39.l configure -state normal;set CONFIG_NCPFS_OS2_NS [expr $CONFIG_NCPFS_OS2_NS&15];} else { .menu8.config.f.x39.y configure -state disabled;.menu8.config.f.x39.n configure -state disabled;.menu8.config.f.x39.l configure -state disabled;set CONFIG_NCPFS_OS2_NS [expr $CONFIG_NCPFS_OS2_NS|16];}
        global CONFIG_NCPFS_MOUNT_SUBDIR; vfix CONFIG_NCPFS_MOUNT_SUBDIR
        if {($CONFIG_IPX != 0) && ($CONFIG_NCP_FS != 0)} then { .menu8.config.f.x40.y configure -state normal;.menu8.config.f.x40.n configure -state normal;.menu8.config.f.x40.l configure -state normal;set CONFIG_NCPFS_MOUNT_SUBDIR [expr $CONFIG_NCPFS_MOUNT_SUBDIR&15];} else { .menu8.config.f.x40.y configure -state disabled;.menu8.config.f.x40.n configure -state disabled;.menu8.config.f.x40.l configure -state disabled;set CONFIG_NCPFS_MOUNT_SUBDIR [expr $CONFIG_NCPFS_MOUNT_SUBDIR|16];}
        global CONFIG_EXPERIMENTAL; vfix CONFIG_EXPERIMENTAL
        global CONFIG_AUTOFS_FS; vfix CONFIG_AUTOFS_FS
        if {($CONFIG_EXPERIMENTAL == 1)} then { .menu8.config.f.x43.y configure -state normal;.menu8.config.f.x43.n configure -state normal;.menu8.config.f.x43.m configure -state normal;.menu8.config.f.x43.l configure -state normal;set CONFIG_AUTOFS_FS [expr $CONFIG_AUTOFS_FS&15];} else { .menu8.config.f.x43.y configure -state disabled;.menu8.config.f.x43.n configure -state disabled;.menu8.config.f.x43.m configure -state disabled;.menu8.config.f.x43.l configure -state disabled;set CONFIG_AUTOFS_FS [expr $CONFIG_AUTOFS_FS|16];}
        global CONFIG_AFFS_FS; vfix CONFIG_AFFS_FS
        if {($CONFIG_EXPERIMENTAL == 1)} then { .menu8.config.f.x44.y configure -state normal;.menu8.config.f.x44.n configure -state normal;.menu8.config.f.x44.m configure -state normal;.menu8.config.f.x44.l configure -state normal;set CONFIG_AFFS_FS [expr $CONFIG_AFFS_FS&15];} else { .menu8.config.f.x44.y configure -state disabled;.menu8.config.f.x44.n configure -state disabled;.menu8.config.f.x44.m configure -state disabled;.menu8.config.f.x44.l configure -state disabled;set CONFIG_AFFS_FS [expr $CONFIG_AFFS_FS|16];}
        global CONFIG_UFS_FS; vfix CONFIG_UFS_FS
        global CONFIG_BSD_DISKLABEL; vfix CONFIG_BSD_DISKLABEL
        if {($CONFIG_UFS_FS != 0)} then { .menu8.config.f.x48.y configure -state normal;.menu8.config.f.x48.n configure -state normal;.menu8.config.f.x48.l configure -state normal;set CONFIG_BSD_DISKLABEL [expr $CONFIG_BSD_DISKLABEL&15];} else { .menu8.config.f.x48.y configure -state disabled;.menu8.config.f.x48.n configure -state disabled;.menu8.config.f.x48.l configure -state disabled;set CONFIG_BSD_DISKLABEL [expr $CONFIG_BSD_DISKLABEL|16];}
        global CONFIG_SMD_DISKLABEL; vfix CONFIG_SMD_DISKLABEL
        if {($CONFIG_UFS_FS != 0)} then { .menu8.config.f.x49.y configure -state normal;.menu8.config.f.x49.n configure -state normal;.menu8.config.f.x49.l configure -state normal;set CONFIG_SMD_DISKLABEL [expr $CONFIG_SMD_DISKLABEL&15];} else { .menu8.config.f.x49.y configure -state disabled;.menu8.config.f.x49.n configure -state disabled;.menu8.config.f.x49.l configure -state disabled;set CONFIG_SMD_DISKLABEL [expr $CONFIG_SMD_DISKLABEL|16];}
}


menu_option menu9 9 "Character devices"
proc menu9 {w title} {
        catch {destroy $w}
        toplevel $w -class Dialog
        wm withdraw $w
        message $w.m -width 400 -aspect 300 -text \
                "Character devices"  -relief raised
        pack $w.m -pady 10 -side top -padx 10
        wm title $w "Character devices" 

        set oldFocus [focus]
        frame $w.f
        button $w.f.back -text "Main Menu" \
                -width 15 -command "destroy $w; focus $oldFocus; update_mainmenu $w"
        button $w.f.next -text "Next" \
                -width 15 -command " destroy $w; focus $oldFocus;  menu10 .menu10 \"$title\""
        button $w.f.prev -text "Prev" \
                -width 15 -command " destroy $w; focus $oldFocus; menu8 .menu8 \"$title\""
        pack $w.f.back $w.f.next $w.f.prev -side left -expand on
        pack $w.f -pady 10 -side bottom -anchor w -fill x
        frame $w.topline -relief ridge -borderwidth 2 -height 2
        pack $w.topline -side top -fill x

        frame $w.botline -relief ridge -borderwidth 2 -height 2
        pack $w.botline -side bottom -fill x

        frame $w.config
        pack $w.config -fill y -expand on

        scrollbar $w.config.vscroll -command "$w.config.canvas yview"
        pack $w.config.vscroll -side right -fill y

        canvas $w.config.canvas -height 1\
                -relief flat -borderwidth 0 -yscrollcommand "$w.config.vscroll set" \
                -width [expr [winfo screenwidth .] * 1 / 2] 
        frame $w.config.f
        pack $w.config.canvas -side right -fill y


        bool $w.config.f 9 0 "Serial support" CONFIG_SERIAL
        bool $w.config.f 9 1 "Watchdog Timer Support" CONFIG_WATCHDOG
        bool $w.config.f 9 2 "PS/2 Keyboard" CONFIG_KEYBOARD



        focus $w
        update_menu9 $w.config.f
        global winx; global winy
        set winx [expr [winfo x .]+30]; set winy [expr [winfo y .]+30]
        wm geometry $w +$winx+$winy
        update idletasks
        $w.config.canvas create window 0 0 -anchor nw -window $w.config.f

        $w.config.canvas configure \
                -width [expr [winfo reqwidth $w.config.f] + 1]\
                -scrollregion "-1 -1 [expr [winfo reqwidth $w.config.f] + 1] \
                         [expr [winfo reqheight $w.config.f] + 1]"

        set winy [expr [winfo reqh $w] - [winfo reqh $w.config.canvas]]
        set scry [expr [winfo screenh $w] / 2]
        set maxy [expr [winfo screenh $w] * 3 / 4]
        set canvtotal [expr [winfo reqh $w.config.f] + 2]
        if [expr $winy + $canvtotal < $maxy] {
                $w.config.canvas configure -height $canvtotal
        } else {
                $w.config.canvas configure -height [expr $scry - $winy]
        }
        update idletasks
        wm maxsize $w [winfo width $w] [winfo screenheight $w]
        wm minsize $w [winfo width $w] 100

        wm deiconify $w
}


proc update_menu9 {w}  {
        update_define
}


menu_option menu10 10 "Kernel hacking"
proc menu10 {w title} {
        catch {destroy $w}
        toplevel $w -class Dialog
        wm withdraw $w
        message $w.m -width 400 -aspect 300 -text \
                "Kernel hacking"  -relief raised
        pack $w.m -pady 10 -side top -padx 10
        wm title $w "Kernel hacking" 

        set oldFocus [focus]
        frame $w.f
        button $w.f.back -text "Main Menu" \
                -width 15 -command "destroy $w; focus $oldFocus; update_mainmenu $w"
        button $w.f.next -text "Next" \
                -width 15 -command " destroy $w; focus $oldFocus;  menu11 .menu11 \"$title\""
        $w.f.next configure -state disabled
        button $w.f.prev -text "Prev" \
                -width 15 -command " destroy $w; focus $oldFocus; menu9 .menu9 \"$title\""
        pack $w.f.back $w.f.next $w.f.prev -side left -expand on
        pack $w.f -pady 10 -side bottom -anchor w -fill x
        frame $w.topline -relief ridge -borderwidth 2 -height 2
        pack $w.topline -side top -fill x

        frame $w.botline -relief ridge -borderwidth 2 -height 2
        pack $w.botline -side bottom -fill x

        frame $w.config
        pack $w.config -fill y -expand on

        scrollbar $w.config.vscroll -command "$w.config.canvas yview"
        pack $w.config.vscroll -side right -fill y

        canvas $w.config.canvas -height 1\
                -relief flat -borderwidth 0 -yscrollcommand "$w.config.vscroll set" \
                -width [expr [winfo screenwidth .] * 1 / 2] 
        frame $w.config.f
        pack $w.config.canvas -side right -fill y


        bool $w.config.f 10 0 "Kernel profiling support" CONFIG_PROFILE
        int $w.config.f 10 1 " Profile shift count" CONFIG_PROFILE_SHIFT



        focus $w
        update_menu10 $w.config.f
        global winx; global winy
        set winx [expr [winfo x .]+30]; set winy [expr [winfo y .]+30]
        wm geometry $w +$winx+$winy
        update idletasks
        $w.config.canvas create window 0 0 -anchor nw -window $w.config.f

        $w.config.canvas configure \
                -width [expr [winfo reqwidth $w.config.f] + 1]\
                -scrollregion "-1 -1 [expr [winfo reqwidth $w.config.f] + 1] \
                         [expr [winfo reqheight $w.config.f] + 1]"

        set winy [expr [winfo reqh $w] - [winfo reqh $w.config.canvas]]
        set scry [expr [winfo screenh $w] / 2]
        set maxy [expr [winfo screenh $w] * 3 / 4]
        set canvtotal [expr [winfo reqh $w.config.f] + 2]
        if [expr $winy + $canvtotal < $maxy] {
                $w.config.canvas configure -height $canvtotal
        } else {
                $w.config.canvas configure -height [expr $scry - $winy]
        }
        update idletasks
        wm maxsize $w [winfo width $w] [winfo screenheight $w]
        wm minsize $w [winfo width $w] 100

        wm deiconify $w
}


proc update_menu10 {w}  {
        update_define
        global CONFIG_PROFILE; vfix CONFIG_PROFILE
        global CONFIG_PROFILE_SHIFT; vfix CONFIG_PROFILE_SHIFT
        if {($CONFIG_PROFILE == 1)} then { .menu10.config.f.x1.x configure -state normal -fore [ cget .ref -foreground ]; .menu10.config.f.x1.l configure -state normal; } else { .menu10.config.f.x1.x configure -state disabled -fore [ cget .ref -disabledforeground ];.menu10.config.f.x1.l configure -state disabled;}
}


proc update_mainmenu {w}  {
        global CONFIG_NET; vfix CONFIG_NET
        if {($CONFIG_NET == 1)} then { .f0.x5 configure -state normal } else { .f0.x5 configure -state disabled }
        if {($CONFIG_NET == 1)} then { .f0.x6 configure -state normal } else { .f0.x6 configure -state disabled }
        global CONFIG_NLS; vfix CONFIG_NLS
        if {($CONFIG_NLS == 1 || $CONFIG_NLS == 2)} then { .f0.x8 configure -state normal } else { .f0.x8 configure -state disabled }
}


set CONFIG_EXPERIMENTAL 0
set tmpvar_0 "(not set)"
set CONFIG_OR32 0
set CONFIG_GEN 0
set tmpvar_1 "(not set)"
set CONFIG_RAMKERNEL 0
set CONFIG_ROMKERNEL 0
set CONFIG_PCI 0
set CONFIG_PCIDEVLIST 0
set CONFIG_NET 0
set CONFIG_SYSVIPC 0
set CONFIG_REDUCED_MEMORY 0
set CONFIG_BINFMT_FLAT 0
set CONFIG_BINFMT_ELF 0
set CONFIG_KERNEL_ELF 0
set CONFIG_CONSOLE 0
set CONFIG_SERIAL_ECHO 0
set CONFIG_FRAMEBUFFER 0
set CONFIG_BLK_DEV_BLKMEM 0
set CONFIG_BLK_DEV_IDE 0
set CONFIG_BLK_DEV_IDECD 0
set CONFIG_BLK_DEV_IDETAPE 0
set CONFIG_BLK_DEV_IDEFLOPPY 0
set CONFIG_BLK_DEV_LOOP 0
set CONFIG_BLK_DEV_MD 0
set CONFIG_MD_LINEAR 0
set CONFIG_MD_STRIPED 0
set CONFIG_BLK_DEV_RAM 0
set CONFIG_RD_RELEASE_BLOCKS 0
set CONFIG_BLK_DEV_INITRD 0
set CONFIG_DEV_FLASH 0
set CONFIG_BLK_DEV_FLASH 0
set CONFIG_CHR_DEV_FLASH 0
set CONFIG_FIREWALL 0
set CONFIG_NET_ALIAS 0
set CONFIG_INET 0
set CONFIG_IP_FORWARD 0
set CONFIG_IP_MULTICAST 0
set CONFIG_SYN_COOKIES 0
set CONFIG_IP_FIREWALL 0
set CONFIG_IP_FIREWALL_VERBOSE 0
set CONFIG_IP_MASQUERADE 0
set CONFIG_IP_MASQUERADE_IPAUTOFW 0
set CONFIG_IP_MASQUERADE_IPPORTFW 0
set CONFIG_IP_MASQUERADE_PPTP 0
set CONFIG_IP_MASQUERADE_PPTP_MULTICLIENT 0
set DEBUG_IP_MASQUERADE_PPTP 0
set DEBUG_IP_MASQUERADE_PPTP_VERBOSE 0
set CONFIG_IP_MASQUERADE_IPSEC 0
set CONFIG_IP_MASQUERADE_IPSEC_EXPIRE 30
set CONFIG_IP_MASQUERADE_IPSEC_NOGUESS 0
set DEBUG_IP_MASQUERADE_IPSEC 0
set DEBUG_IP_MASQUERADE_IPSEC_VERBOSE 0
set CONFIG_IP_MASQUERADE_ICMP 0
set CONFIG_IP_TRANSPARENT_PROXY 0
set CONFIG_IP_ALWAYS_DEFRAG 0
set CONFIG_IP_ACCT 0
set CONFIG_IP_ROUTER 0
set CONFIG_NET_IPIP 0
set CONFIG_IP_MROUTE 0
set CONFIG_IP_ALIAS 0
set CONFIG_ARPD 0
set CONFIG_INET_PCTCP 0
set CONFIG_INET_RARP 0
set CONFIG_NO_PATH_MTU_DISCOVERY 0
set CONFIG_IP_NOSR 0
set CONFIG_SKB_LARGE 0
set CONFIG_IPX 0
set CONFIG_ATALK 0
set CONFIG_AX25 0
set CONFIG_NETROM 0
set CONFIG_ROSE 0
set CONFIG_BRIDGE 0
set CONFIG_NETLINK 0
set CONFIG_RTNETLINK 0
set CONFIG_NETDEVICES 0
set CONFIG_DUMMY 0
set CONFIG_SLIP 0
set CONFIG_SLIP_COMPRESSED 0
set CONFIG_SLIP_SMART 0
set CONFIG_SLIP_MODE_SLIP6 0
set CONFIG_PPP 0
set CONFIG_EQUALIZER 0
set CONFIG_OETH 0
set CONFIG_QUOTA 0
set CONFIG_MINIX_FS 0
set CONFIG_EXT_FS 0
set CONFIG_EXT2_FS 0
set CONFIG_XIA_FS 0
set CONFIG_NLS 0
set CONFIG_ISO9660_FS 0
set CONFIG_FAT_FS 0
set CONFIG_MSDOS_FS 0
set CONFIG_UMSDOS_FS 0
set CONFIG_VFAT_FS 0
set CONFIG_NLS_CODEPAGE_437 0
set CONFIG_NLS_CODEPAGE_737 0
set CONFIG_NLS_CODEPAGE_775 0
set CONFIG_NLS_CODEPAGE_850 0
set CONFIG_NLS_CODEPAGE_852 0
set CONFIG_NLS_CODEPAGE_855 0
set CONFIG_NLS_CODEPAGE_857 0
set CONFIG_NLS_CODEPAGE_860 0
set CONFIG_NLS_CODEPAGE_861 0
set CONFIG_NLS_CODEPAGE_862 0
set CONFIG_NLS_CODEPAGE_863 0
set CONFIG_NLS_CODEPAGE_864 0
set CONFIG_NLS_CODEPAGE_865 0
set CONFIG_NLS_CODEPAGE_866 0
set CONFIG_NLS_CODEPAGE_869 0
set CONFIG_NLS_CODEPAGE_874 0
set CONFIG_NLS_ISO8859_1 0
set CONFIG_NLS_ISO8859_2 0
set CONFIG_NLS_ISO8859_3 0
set CONFIG_NLS_ISO8859_4 0
set CONFIG_NLS_ISO8859_5 0
set CONFIG_NLS_ISO8859_6 0
set CONFIG_NLS_ISO8859_7 0
set CONFIG_NLS_ISO8859_8 0
set CONFIG_NLS_ISO8859_9 0
set CONFIG_NLS_ISO8859_15 0
set CONFIG_NLS_KOI8_R 0
set CONFIG_PROC_FS 0
set CONFIG_NFS_FS 0
set CONFIG_ROOT_NFS 0
set CONFIG_RNFS_BOOTP 0
set CONFIG_RNFS_RARP 0
set CONFIG_SMB_FS 0
set CONFIG_SMB_WIN95 0
set CONFIG_NCP_FS 0
set CONFIG_NCPFS_PACKET_SIGNING 0
set CONFIG_NCPFS_IOCTL_LOCKING 0
set CONFIG_NCPFS_STRONG 0
set CONFIG_NCPFS_NFS_NS 0
set CONFIG_NCPFS_OS2_NS 0
set CONFIG_NCPFS_MOUNT_SUBDIR 0
set CONFIG_HPFS_FS 0
set CONFIG_SYSV_FS 0
set CONFIG_AUTOFS_FS 0
set CONFIG_AFFS_FS 0
set CONFIG_ROMFS_FS 0
set CONFIG_JFFS_FS 0
set CONFIG_UFS_FS 0
set CONFIG_BSD_DISKLABEL 0
set CONFIG_SMD_DISKLABEL 0
set CONFIG_SERIAL 0
set CONFIG_WATCHDOG 0
set CONFIG_KEYBOARD 0
set CONFIG_PROFILE 0
set CONFIG_PROFILE_SHIFT 2
proc writeconfig {file1 file2} {
        set cfg [open $file1 w]
        set autocfg [open $file2 w]
        set notmod 1
        set notset 0
        puts $cfg "#"
        puts $cfg "# Automatically generated make config: don't edit"
        puts $cfg "#"
        puts $autocfg "/*"
        puts $autocfg " * Automatically generated C config: don't edit"
        puts $autocfg " */"
        global CONFIG_UCLINUX
        write_tristate $cfg $autocfg CONFIG_UCLINUX $CONFIG_UCLINUX $notmod
        write_comment $cfg $autocfg "Code maturity level options"
        global CONFIG_EXPERIMENTAL
        write_tristate $cfg $autocfg CONFIG_EXPERIMENTAL $CONFIG_EXPERIMENTAL $notmod
        write_comment $cfg $autocfg "Platform dependant setup"
        global tmpvar_0
        if { $tmpvar_0 == "OR32" } then { write_tristate $cfg $autocfg CONFIG_OR32 1 $notmod }
        write_comment $cfg $autocfg "Platform"
        global CONFIG_GEN
        if {($tmpvar_0 == "OR32")} then { write_tristate $cfg $autocfg CONFIG_GEN $CONFIG_GEN $notmod }
        global tmpvar_1
        if { $tmpvar_1 == "RAM" } then { write_tristate $cfg $autocfg CONFIG_RAMKERNEL 1 $notmod }
        if { $tmpvar_1 == "ROM" } then { write_tristate $cfg $autocfg CONFIG_ROMKERNEL 1 $notmod }
        write_comment $cfg $autocfg "General setup"
        global CONFIG_PCI
        write_tristate $cfg $autocfg CONFIG_PCI $CONFIG_PCI $notmod
        global CONFIG_PCIDEVLIST
        if {($CONFIG_PCI == 1)} then { write_tristate $cfg $autocfg CONFIG_PCIDEVLIST $CONFIG_PCIDEVLIST $notmod }
        global CONFIG_NET
        write_tristate $cfg $autocfg CONFIG_NET $CONFIG_NET $notmod
        global CONFIG_SYSVIPC
        write_tristate $cfg $autocfg CONFIG_SYSVIPC $CONFIG_SYSVIPC $notmod
        global CONFIG_REDUCED_MEMORY
        write_tristate $cfg $autocfg CONFIG_REDUCED_MEMORY $CONFIG_REDUCED_MEMORY $notmod
        global CONFIG_BINFMT_FLAT
        write_tristate $cfg $autocfg CONFIG_BINFMT_FLAT $CONFIG_BINFMT_FLAT $notmod
        global CONFIG_BINFMT_ELF
        write_tristate $cfg $autocfg CONFIG_BINFMT_ELF $CONFIG_BINFMT_ELF $notmod
        global CONFIG_KERNEL_ELF
        write_tristate $cfg $autocfg CONFIG_KERNEL_ELF $CONFIG_KERNEL_ELF $notmod
        global CONFIG_CONSOLE
        write_tristate $cfg $autocfg CONFIG_CONSOLE $CONFIG_CONSOLE $notmod
        global CONFIG_SERIAL_ECHO
        if {($CONFIG_CONSOLE == 1)} then { write_tristate $cfg $autocfg CONFIG_SERIAL_ECHO $CONFIG_SERIAL_ECHO $notmod }
        global CONFIG_FRAMEBUFFER
        if {($CONFIG_CONSOLE == 1)} then { write_tristate $cfg $autocfg CONFIG_FRAMEBUFFER $CONFIG_FRAMEBUFFER $notmod }
        write_comment $cfg $autocfg "Floppy, IDE, and other block devices"
        global CONFIG_BLK_DEV_BLKMEM
        write_tristate $cfg $autocfg CONFIG_BLK_DEV_BLKMEM $CONFIG_BLK_DEV_BLKMEM $notmod
        global CONFIG_BLK_DEV_IDE
        write_tristate $cfg $autocfg CONFIG_BLK_DEV_IDE $CONFIG_BLK_DEV_IDE $notmod
        global CONFIG_BLK_DEV_IDECD
        if {($CONFIG_BLK_DEV_IDE == 1)} then { write_tristate $cfg $autocfg CONFIG_BLK_DEV_IDECD $CONFIG_BLK_DEV_IDECD $notmod }
        global CONFIG_BLK_DEV_IDETAPE
        if {($CONFIG_BLK_DEV_IDE == 1)} then { write_tristate $cfg $autocfg CONFIG_BLK_DEV_IDETAPE $CONFIG_BLK_DEV_IDETAPE $notmod }
        global CONFIG_BLK_DEV_IDEFLOPPY
        if {($CONFIG_BLK_DEV_IDE == 1)} then { write_tristate $cfg $autocfg CONFIG_BLK_DEV_IDEFLOPPY $CONFIG_BLK_DEV_IDEFLOPPY $notmod }
        write_comment $cfg $autocfg "Additional Block/FLASH Devices"
        global CONFIG_BLK_DEV_LOOP
        write_tristate $cfg $autocfg CONFIG_BLK_DEV_LOOP $CONFIG_BLK_DEV_LOOP $notmod
        global CONFIG_BLK_DEV_MD
        write_tristate $cfg $autocfg CONFIG_BLK_DEV_MD $CONFIG_BLK_DEV_MD $notmod
        global CONFIG_MD_LINEAR
        if {($CONFIG_BLK_DEV_MD == 1)} then { write_tristate $cfg $autocfg CONFIG_MD_LINEAR $CONFIG_MD_LINEAR $notmod }
        global CONFIG_MD_STRIPED
        if {($CONFIG_BLK_DEV_MD == 1)} then { write_tristate $cfg $autocfg CONFIG_MD_STRIPED $CONFIG_MD_STRIPED $notmod }
        global CONFIG_BLK_DEV_RAM
        write_tristate $cfg $autocfg CONFIG_BLK_DEV_RAM $CONFIG_BLK_DEV_RAM $notmod
        global CONFIG_RD_RELEASE_BLOCKS
        if {($CONFIG_BLK_DEV_RAM == 1)} then { write_tristate $cfg $autocfg CONFIG_RD_RELEASE_BLOCKS $CONFIG_RD_RELEASE_BLOCKS $notmod }
        global CONFIG_BLK_DEV_INITRD
        if {($CONFIG_BLK_DEV_RAM == 1)} then { write_tristate $cfg $autocfg CONFIG_BLK_DEV_INITRD $CONFIG_BLK_DEV_INITRD $notmod }
        global CONFIG_DEV_FLASH
        write_tristate $cfg $autocfg CONFIG_DEV_FLASH $CONFIG_DEV_FLASH $notmod
        global CONFIG_BLK_DEV_FLASH
        if {($CONFIG_DEV_FLASH == 1)} then { write_tristate $cfg $autocfg CONFIG_BLK_DEV_FLASH $CONFIG_BLK_DEV_FLASH $notmod }
        global CONFIG_CHR_DEV_FLASH
        if {($CONFIG_DEV_FLASH == 1)} then { write_tristate $cfg $autocfg CONFIG_CHR_DEV_FLASH $CONFIG_CHR_DEV_FLASH $notmod }
        if {($CONFIG_NET == 1)} then {write_comment $cfg $autocfg "Networking options"}
        global CONFIG_FIREWALL
        if {($CONFIG_NET == 1)} then { write_tristate $cfg $autocfg CONFIG_FIREWALL $CONFIG_FIREWALL $notmod }
        global CONFIG_NET_ALIAS
        if {($CONFIG_NET == 1)} then { write_tristate $cfg $autocfg CONFIG_NET_ALIAS $CONFIG_NET_ALIAS $notmod }
        global CONFIG_INET
        if {($CONFIG_NET == 1)} then { write_tristate $cfg $autocfg CONFIG_INET $CONFIG_INET $notmod }
        global CONFIG_IP_FORWARD
        if {($CONFIG_NET == 1) && ($CONFIG_INET == 1)} then { write_tristate $cfg $autocfg CONFIG_IP_FORWARD $CONFIG_IP_FORWARD $notmod }
        global CONFIG_IP_MULTICAST
        if {($CONFIG_NET == 1) && ($CONFIG_INET == 1)} then { write_tristate $cfg $autocfg CONFIG_IP_MULTICAST $CONFIG_IP_MULTICAST $notmod }
        global CONFIG_SYN_COOKIES
        if {($CONFIG_NET == 1) && ($CONFIG_INET == 1)} then { write_tristate $cfg $autocfg CONFIG_SYN_COOKIES $CONFIG_SYN_COOKIES $notmod }
        global CONFIG_IP_FIREWALL
        if {($CONFIG_NET == 1) && ($CONFIG_INET == 1) && ($CONFIG_FIREWALL == 1)} then { write_tristate $cfg $autocfg CONFIG_IP_FIREWALL $CONFIG_IP_FIREWALL $notmod }
        global CONFIG_IP_FIREWALL_VERBOSE
        if {($CONFIG_NET == 1) && ($CONFIG_INET == 1) && ($CONFIG_FIREWALL == 1) && ($CONFIG_IP_FIREWALL == 1)} then { write_tristate $cfg $autocfg CONFIG_IP_FIREWALL_VERBOSE $CONFIG_IP_FIREWALL_VERBOSE $notmod }
        global CONFIG_IP_MASQUERADE
        if {($CONFIG_NET == 1) && ($CONFIG_INET == 1) && ($CONFIG_FIREWALL == 1) && ($CONFIG_IP_FIREWALL == 1)} then { write_tristate $cfg $autocfg CONFIG_IP_MASQUERADE $CONFIG_IP_MASQUERADE $notmod }
        if {($CONFIG_NET == 1) && ($CONFIG_INET == 1) && ($CONFIG_FIREWALL == 1) && ($CONFIG_IP_FIREWALL == 1) && ($CONFIG_IP_MASQUERADE != 0)} then {write_comment $cfg $autocfg "Protocol-specific masquerading support will be built as modules."}
        global CONFIG_IP_MASQUERADE_IPAUTOFW
        if {($CONFIG_NET == 1) && ($CONFIG_INET == 1) && ($CONFIG_FIREWALL == 1) && ($CONFIG_IP_FIREWALL == 1) && ($CONFIG_IP_MASQUERADE != 0) && ($CONFIG_EXPERIMENTAL == 1)} then { write_tristate $cfg $autocfg CONFIG_IP_MASQUERADE_IPAUTOFW $CONFIG_IP_MASQUERADE_IPAUTOFW $notmod }
        global CONFIG_IP_MASQUERADE_IPPORTFW
        if {($CONFIG_NET == 1) && ($CONFIG_INET == 1) && ($CONFIG_FIREWALL == 1) && ($CONFIG_IP_FIREWALL == 1) && ($CONFIG_IP_MASQUERADE != 0) && ($CONFIG_EXPERIMENTAL == 1)} then { write_tristate $cfg $autocfg CONFIG_IP_MASQUERADE_IPPORTFW $CONFIG_IP_MASQUERADE_IPPORTFW $notmod }
        global CONFIG_IP_MASQUERADE_PPTP
        if {($CONFIG_NET == 1) && ($CONFIG_INET == 1) && ($CONFIG_FIREWALL == 1) && ($CONFIG_IP_FIREWALL == 1) && ($CONFIG_IP_MASQUERADE != 0) && ($CONFIG_EXPERIMENTAL == 1)} then { write_tristate $cfg $autocfg CONFIG_IP_MASQUERADE_PPTP $CONFIG_IP_MASQUERADE_PPTP $notmod }
        global CONFIG_IP_MASQUERADE_PPTP_MULTICLIENT
        if {($CONFIG_NET == 1) && ($CONFIG_INET == 1) && ($CONFIG_FIREWALL == 1) && ($CONFIG_IP_FIREWALL == 1) && ($CONFIG_IP_MASQUERADE != 0) && ($CONFIG_EXPERIMENTAL == 1) && ($CONFIG_IP_MASQUERADE_PPTP == 1)} then { write_tristate $cfg $autocfg CONFIG_IP_MASQUERADE_PPTP_MULTICLIENT $CONFIG_IP_MASQUERADE_PPTP_MULTICLIENT $notmod }
        global DEBUG_IP_MASQUERADE_PPTP
        if {($CONFIG_NET == 1) && ($CONFIG_INET == 1) && ($CONFIG_FIREWALL == 1) && ($CONFIG_IP_FIREWALL == 1) && ($CONFIG_IP_MASQUERADE != 0) && ($CONFIG_EXPERIMENTAL == 1) && ($CONFIG_IP_MASQUERADE_PPTP == 1)} then { write_tristate $cfg $autocfg DEBUG_IP_MASQUERADE_PPTP $DEBUG_IP_MASQUERADE_PPTP $notmod }
        global DEBUG_IP_MASQUERADE_PPTP_VERBOSE
        if {($CONFIG_NET == 1) && ($CONFIG_INET == 1) && ($CONFIG_FIREWALL == 1) && ($CONFIG_IP_FIREWALL == 1) && ($CONFIG_IP_MASQUERADE != 0) && ($CONFIG_EXPERIMENTAL == 1) && ($CONFIG_IP_MASQUERADE_PPTP == 1) && ($DEBUG_IP_MASQUERADE_PPTP == 1)} then { write_tristate $cfg $autocfg DEBUG_IP_MASQUERADE_PPTP_VERBOSE $DEBUG_IP_MASQUERADE_PPTP_VERBOSE $notmod }
        global CONFIG_IP_MASQUERADE_IPSEC
        if {($CONFIG_NET == 1) && ($CONFIG_INET == 1) && ($CONFIG_FIREWALL == 1) && ($CONFIG_IP_FIREWALL == 1) && ($CONFIG_IP_MASQUERADE != 0) && ($CONFIG_EXPERIMENTAL == 1)} then { write_tristate $cfg $autocfg CONFIG_IP_MASQUERADE_IPSEC $CONFIG_IP_MASQUERADE_IPSEC $notmod }
        global CONFIG_IP_MASQUERADE_IPSEC_EXPIRE
        if {($CONFIG_NET == 1) && ($CONFIG_INET == 1) && ($CONFIG_FIREWALL == 1) && ($CONFIG_IP_FIREWALL == 1) && ($CONFIG_IP_MASQUERADE != 0) && ($CONFIG_EXPERIMENTAL == 1) && ($CONFIG_IP_MASQUERADE_IPSEC == 1)} then { write_int $cfg $autocfg CONFIG_IP_MASQUERADE_IPSEC_EXPIRE $CONFIG_IP_MASQUERADE_IPSEC_EXPIRE $notmod }
        global CONFIG_IP_MASQUERADE_IPSEC_NOGUESS
        if {($CONFIG_NET == 1) && ($CONFIG_INET == 1) && ($CONFIG_FIREWALL == 1) && ($CONFIG_IP_FIREWALL == 1) && ($CONFIG_IP_MASQUERADE != 0) && ($CONFIG_EXPERIMENTAL == 1) && ($CONFIG_IP_MASQUERADE_IPSEC == 1)} then { write_tristate $cfg $autocfg CONFIG_IP_MASQUERADE_IPSEC_NOGUESS $CONFIG_IP_MASQUERADE_IPSEC_NOGUESS $notmod }
        global DEBUG_IP_MASQUERADE_IPSEC
        if {($CONFIG_NET == 1) && ($CONFIG_INET == 1) && ($CONFIG_FIREWALL == 1) && ($CONFIG_IP_FIREWALL == 1) && ($CONFIG_IP_MASQUERADE != 0) && ($CONFIG_EXPERIMENTAL == 1) && ($CONFIG_IP_MASQUERADE_IPSEC == 1)} then { write_tristate $cfg $autocfg DEBUG_IP_MASQUERADE_IPSEC $DEBUG_IP_MASQUERADE_IPSEC $notmod }
        global DEBUG_IP_MASQUERADE_IPSEC_VERBOSE
        if {($CONFIG_NET == 1) && ($CONFIG_INET == 1) && ($CONFIG_FIREWALL == 1) && ($CONFIG_IP_FIREWALL == 1) && ($CONFIG_IP_MASQUERADE != 0) && ($CONFIG_EXPERIMENTAL == 1) && ($CONFIG_IP_MASQUERADE_IPSEC == 1) && ($DEBUG_IP_MASQUERADE_IPSEC == 1)} then { write_tristate $cfg $autocfg DEBUG_IP_MASQUERADE_IPSEC_VERBOSE $DEBUG_IP_MASQUERADE_IPSEC_VERBOSE $notmod }
        global CONFIG_IP_MASQUERADE_ICMP
        if {($CONFIG_NET == 1) && ($CONFIG_INET == 1) && ($CONFIG_FIREWALL == 1) && ($CONFIG_IP_FIREWALL == 1) && ($CONFIG_IP_MASQUERADE != 0)} then { write_tristate $cfg $autocfg CONFIG_IP_MASQUERADE_ICMP $CONFIG_IP_MASQUERADE_ICMP $notmod }
        global CONFIG_IP_TRANSPARENT_PROXY
        if {($CONFIG_NET == 1) && ($CONFIG_INET == 1) && ($CONFIG_FIREWALL == 1) && ($CONFIG_IP_FIREWALL == 1) && ($CONFIG_EXPERIMENTAL == 1)} then { write_tristate $cfg $autocfg CONFIG_IP_TRANSPARENT_PROXY $CONFIG_IP_TRANSPARENT_PROXY $notmod }
        global CONFIG_IP_ALWAYS_DEFRAG
        if {($CONFIG_NET == 1) && ($CONFIG_INET == 1) && ($CONFIG_FIREWALL == 1) && ($CONFIG_IP_FIREWALL == 1)} then { write_tristate $cfg $autocfg CONFIG_IP_ALWAYS_DEFRAG $CONFIG_IP_ALWAYS_DEFRAG $notmod }
        global CONFIG_IP_ACCT
        if {($CONFIG_NET == 1) && ($CONFIG_INET == 1)} then { write_tristate $cfg $autocfg CONFIG_IP_ACCT $CONFIG_IP_ACCT $notmod }
        global CONFIG_IP_ROUTER
        if {($CONFIG_NET == 1) && ($CONFIG_INET == 1)} then { write_tristate $cfg $autocfg CONFIG_IP_ROUTER $CONFIG_IP_ROUTER $notmod }
        global CONFIG_NET_IPIP
        if {($CONFIG_NET == 1) && ($CONFIG_INET == 1)} then { write_tristate $cfg $autocfg CONFIG_NET_IPIP $CONFIG_NET_IPIP $notmod }
        global CONFIG_IP_MROUTE
        if {($CONFIG_NET == 1) && ($CONFIG_INET == 1) && ($CONFIG_IP_MULTICAST == 1) && ($CONFIG_EXPERIMENTAL == 1)} then { write_tristate $cfg $autocfg CONFIG_IP_MROUTE $CONFIG_IP_MROUTE $notmod }
        global CONFIG_IP_ALIAS
        if {($CONFIG_NET == 1) && ($CONFIG_INET == 1) && ($CONFIG_NET_ALIAS == 1)} then { write_tristate $cfg $autocfg CONFIG_IP_ALIAS $CONFIG_IP_ALIAS $notmod }
        global CONFIG_ARPD
        global CONFIG_NETLINK; vfix CONFIG_NETLINK
        if {($CONFIG_NET == 1) && ($CONFIG_INET == 1) && ($CONFIG_EXPERIMENTAL == 1) && ($CONFIG_NETLINK == 1)} then { write_tristate $cfg $autocfg CONFIG_ARPD $CONFIG_ARPD $notmod }
        if {($CONFIG_NET == 1) && ($CONFIG_INET == 1)} then {write_comment $cfg $autocfg "(it is safe to leave these untouched)"}
        global CONFIG_INET_PCTCP
        if {($CONFIG_NET == 1) && ($CONFIG_INET == 1)} then { write_tristate $cfg $autocfg CONFIG_INET_PCTCP $CONFIG_INET_PCTCP $notmod }
        global CONFIG_INET_RARP
        if {($CONFIG_NET == 1) && ($CONFIG_INET == 1)} then { write_tristate $cfg $autocfg CONFIG_INET_RARP $CONFIG_INET_RARP $notmod }
        global CONFIG_NO_PATH_MTU_DISCOVERY
        if {($CONFIG_NET == 1) && ($CONFIG_INET == 1)} then { write_tristate $cfg $autocfg CONFIG_NO_PATH_MTU_DISCOVERY $CONFIG_NO_PATH_MTU_DISCOVERY $notmod }
        global CONFIG_IP_NOSR
        if {($CONFIG_NET == 1) && ($CONFIG_INET == 1)} then { write_tristate $cfg $autocfg CONFIG_IP_NOSR $CONFIG_IP_NOSR $notmod }
        global CONFIG_SKB_LARGE
        if {($CONFIG_NET == 1) && ($CONFIG_INET == 1)} then { write_tristate $cfg $autocfg CONFIG_SKB_LARGE $CONFIG_SKB_LARGE $notmod }
        if {($CONFIG_NET == 1)} then {write_comment $cfg $autocfg " "}
        global CONFIG_IPX
        if {($CONFIG_NET == 1)} then { write_tristate $cfg $autocfg CONFIG_IPX $CONFIG_IPX $notmod }
        global CONFIG_ATALK
        if {($CONFIG_NET == 1)} then { write_tristate $cfg $autocfg CONFIG_ATALK $CONFIG_ATALK $notmod }
        global CONFIG_AX25
        if {($CONFIG_NET == 1)} then { write_tristate $cfg $autocfg CONFIG_AX25 $CONFIG_AX25 $notmod }
        global CONFIG_NETROM
        if {($CONFIG_NET == 1) && ($CONFIG_AX25 != 0) && ($CONFIG_AX25 == 1 || $CONFIG_AX25 == 2)} then { write_tristate $cfg $autocfg CONFIG_NETROM $CONFIG_NETROM $CONFIG_AX25 } 
        global CONFIG_ROSE
        if {($CONFIG_NET == 1) && ($CONFIG_AX25 != 0) && ($CONFIG_AX25 == 1 || $CONFIG_AX25 == 2)} then { write_tristate $cfg $autocfg CONFIG_ROSE $CONFIG_ROSE $CONFIG_AX25 } 
        global CONFIG_BRIDGE
        if {($CONFIG_NET == 1) && ($CONFIG_EXPERIMENTAL == 1)} then { write_tristate $cfg $autocfg CONFIG_BRIDGE $CONFIG_BRIDGE $notmod }
        if {($CONFIG_NET == 1)} then { write_tristate $cfg $autocfg CONFIG_NETLINK $CONFIG_NETLINK $notmod }
        global CONFIG_RTNETLINK
        if {($CONFIG_NET == 1) && ($CONFIG_NETLINK == 1)} then { write_tristate $cfg $autocfg CONFIG_RTNETLINK $CONFIG_RTNETLINK $notmod }
        if {($CONFIG_NET == 1)} then {write_comment $cfg $autocfg "Network device support"}
        global CONFIG_NETDEVICES
        if {($CONFIG_NET == 1)} then { write_tristate $cfg $autocfg CONFIG_NETDEVICES $CONFIG_NETDEVICES $notmod }
        global CONFIG_DUMMY
        if {($CONFIG_NET == 1) && ($CONFIG_NETDEVICES == 1)} then { write_tristate $cfg $autocfg CONFIG_DUMMY $CONFIG_DUMMY $notmod }
        global CONFIG_SLIP
        if {($CONFIG_NET == 1) && ($CONFIG_NETDEVICES == 1)} then { write_tristate $cfg $autocfg CONFIG_SLIP $CONFIG_SLIP $notmod }
        global CONFIG_SLIP_COMPRESSED
        if {($CONFIG_NET == 1) && ($CONFIG_NETDEVICES == 1) && ($CONFIG_SLIP != 0)} then { write_tristate $cfg $autocfg CONFIG_SLIP_COMPRESSED $CONFIG_SLIP_COMPRESSED $notmod }
        global CONFIG_SLIP_SMART
        if {($CONFIG_NET == 1) && ($CONFIG_NETDEVICES == 1) && ($CONFIG_SLIP != 0)} then { write_tristate $cfg $autocfg CONFIG_SLIP_SMART $CONFIG_SLIP_SMART $notmod }
        global CONFIG_SLIP_MODE_SLIP6
        if {($CONFIG_NET == 1) && ($CONFIG_NETDEVICES == 1) && ($CONFIG_SLIP != 0)} then { write_tristate $cfg $autocfg CONFIG_SLIP_MODE_SLIP6 $CONFIG_SLIP_MODE_SLIP6 $notmod }
        global CONFIG_PPP
        if {($CONFIG_NET == 1) && ($CONFIG_NETDEVICES == 1)} then { write_tristate $cfg $autocfg CONFIG_PPP $CONFIG_PPP $notmod }
        if {($CONFIG_NET == 1) && ($CONFIG_NETDEVICES == 1) && ( ! $CONFIG_PPP == 0)} then {write_comment $cfg $autocfg "CCP compressors for PPP are only built as modules."}
        global CONFIG_EQUALIZER
        if {($CONFIG_NET == 1) && ($CONFIG_NETDEVICES == 1)} then { write_tristate $cfg $autocfg CONFIG_EQUALIZER $CONFIG_EQUALIZER $notmod }
        global CONFIG_OETH
        if {($CONFIG_NET == 1) && ($CONFIG_NETDEVICES == 1)} then { write_tristate $cfg $autocfg CONFIG_OETH $CONFIG_OETH $notmod }
        write_comment $cfg $autocfg "Filesystems"
        global CONFIG_QUOTA
        write_tristate $cfg $autocfg CONFIG_QUOTA $CONFIG_QUOTA $notmod
        global CONFIG_MINIX_FS
        write_tristate $cfg $autocfg CONFIG_MINIX_FS $CONFIG_MINIX_FS $notmod
        global CONFIG_EXT_FS
        write_tristate $cfg $autocfg CONFIG_EXT_FS $CONFIG_EXT_FS $notmod
        global CONFIG_EXT2_FS
        write_tristate $cfg $autocfg CONFIG_EXT2_FS $CONFIG_EXT2_FS $notmod
        global CONFIG_XIA_FS
        write_tristate $cfg $autocfg CONFIG_XIA_FS $CONFIG_XIA_FS $notmod
        global CONFIG_NLS
        write_tristate $cfg $autocfg CONFIG_NLS $CONFIG_NLS $notmod
        global CONFIG_ISO9660_FS
        if {($CONFIG_NLS == 1 || $CONFIG_NLS == 2) && ($CONFIG_NLS == 1 || $CONFIG_NLS == 2)} then { write_tristate $cfg $autocfg CONFIG_ISO9660_FS $CONFIG_ISO9660_FS $CONFIG_NLS } 
        global CONFIG_FAT_FS
        if {($CONFIG_NLS == 1 || $CONFIG_NLS == 2) && ($CONFIG_NLS == 1 || $CONFIG_NLS == 2)} then { write_tristate $cfg $autocfg CONFIG_FAT_FS $CONFIG_FAT_FS $CONFIG_NLS } 
        global CONFIG_MSDOS_FS
        if {($CONFIG_NLS == 1 || $CONFIG_NLS == 2) && ($CONFIG_FAT_FS == 1 || $CONFIG_FAT_FS == 2)} then { write_tristate $cfg $autocfg CONFIG_MSDOS_FS $CONFIG_MSDOS_FS $CONFIG_FAT_FS } 
        global CONFIG_UMSDOS_FS
        if {($CONFIG_NLS == 1 || $CONFIG_NLS == 2) && ($CONFIG_MSDOS_FS == 1 || $CONFIG_MSDOS_FS == 2)} then { write_tristate $cfg $autocfg CONFIG_UMSDOS_FS $CONFIG_UMSDOS_FS $CONFIG_MSDOS_FS } 
        global CONFIG_VFAT_FS
        if {($CONFIG_NLS == 1 || $CONFIG_NLS == 2) && ($CONFIG_FAT_FS == 1 || $CONFIG_FAT_FS == 2)} then { write_tristate $cfg $autocfg CONFIG_VFAT_FS $CONFIG_VFAT_FS $CONFIG_FAT_FS } 
        if {($CONFIG_NLS == 1 || $CONFIG_NLS == 2)} then {write_comment $cfg $autocfg "Select available code pages"}
        global CONFIG_NLS_CODEPAGE_437
        if {($CONFIG_NLS == 1 || $CONFIG_NLS == 2) && ($CONFIG_NLS == 1 || $CONFIG_NLS == 2)} then { write_tristate $cfg $autocfg CONFIG_NLS_CODEPAGE_437 $CONFIG_NLS_CODEPAGE_437 $CONFIG_NLS } 
        global CONFIG_NLS_CODEPAGE_737
        if {($CONFIG_NLS == 1 || $CONFIG_NLS == 2) && ($CONFIG_NLS == 1 || $CONFIG_NLS == 2)} then { write_tristate $cfg $autocfg CONFIG_NLS_CODEPAGE_737 $CONFIG_NLS_CODEPAGE_737 $CONFIG_NLS } 
        global CONFIG_NLS_CODEPAGE_775
        if {($CONFIG_NLS == 1 || $CONFIG_NLS == 2) && ($CONFIG_NLS == 1 || $CONFIG_NLS == 2)} then { write_tristate $cfg $autocfg CONFIG_NLS_CODEPAGE_775 $CONFIG_NLS_CODEPAGE_775 $CONFIG_NLS } 
        global CONFIG_NLS_CODEPAGE_850
        if {($CONFIG_NLS == 1 || $CONFIG_NLS == 2) && ($CONFIG_NLS == 1 || $CONFIG_NLS == 2)} then { write_tristate $cfg $autocfg CONFIG_NLS_CODEPAGE_850 $CONFIG_NLS_CODEPAGE_850 $CONFIG_NLS } 
        global CONFIG_NLS_CODEPAGE_852
        if {($CONFIG_NLS == 1 || $CONFIG_NLS == 2) && ($CONFIG_NLS == 1 || $CONFIG_NLS == 2)} then { write_tristate $cfg $autocfg CONFIG_NLS_CODEPAGE_852 $CONFIG_NLS_CODEPAGE_852 $CONFIG_NLS } 
        global CONFIG_NLS_CODEPAGE_855
        if {($CONFIG_NLS == 1 || $CONFIG_NLS == 2) && ($CONFIG_NLS == 1 || $CONFIG_NLS == 2)} then { write_tristate $cfg $autocfg CONFIG_NLS_CODEPAGE_855 $CONFIG_NLS_CODEPAGE_855 $CONFIG_NLS } 
        global CONFIG_NLS_CODEPAGE_857
        if {($CONFIG_NLS == 1 || $CONFIG_NLS == 2) && ($CONFIG_NLS == 1 || $CONFIG_NLS == 2)} then { write_tristate $cfg $autocfg CONFIG_NLS_CODEPAGE_857 $CONFIG_NLS_CODEPAGE_857 $CONFIG_NLS } 
        global CONFIG_NLS_CODEPAGE_860
        if {($CONFIG_NLS == 1 || $CONFIG_NLS == 2) && ($CONFIG_NLS == 1 || $CONFIG_NLS == 2)} then { write_tristate $cfg $autocfg CONFIG_NLS_CODEPAGE_860 $CONFIG_NLS_CODEPAGE_860 $CONFIG_NLS } 
        global CONFIG_NLS_CODEPAGE_861
        if {($CONFIG_NLS == 1 || $CONFIG_NLS == 2) && ($CONFIG_NLS == 1 || $CONFIG_NLS == 2)} then { write_tristate $cfg $autocfg CONFIG_NLS_CODEPAGE_861 $CONFIG_NLS_CODEPAGE_861 $CONFIG_NLS } 
        global CONFIG_NLS_CODEPAGE_862
        if {($CONFIG_NLS == 1 || $CONFIG_NLS == 2) && ($CONFIG_NLS == 1 || $CONFIG_NLS == 2)} then { write_tristate $cfg $autocfg CONFIG_NLS_CODEPAGE_862 $CONFIG_NLS_CODEPAGE_862 $CONFIG_NLS } 
        global CONFIG_NLS_CODEPAGE_863
        if {($CONFIG_NLS == 1 || $CONFIG_NLS == 2) && ($CONFIG_NLS == 1 || $CONFIG_NLS == 2)} then { write_tristate $cfg $autocfg CONFIG_NLS_CODEPAGE_863 $CONFIG_NLS_CODEPAGE_863 $CONFIG_NLS } 
        global CONFIG_NLS_CODEPAGE_864
        if {($CONFIG_NLS == 1 || $CONFIG_NLS == 2) && ($CONFIG_NLS == 1 || $CONFIG_NLS == 2)} then { write_tristate $cfg $autocfg CONFIG_NLS_CODEPAGE_864 $CONFIG_NLS_CODEPAGE_864 $CONFIG_NLS } 
        global CONFIG_NLS_CODEPAGE_865
        if {($CONFIG_NLS == 1 || $CONFIG_NLS == 2) && ($CONFIG_NLS == 1 || $CONFIG_NLS == 2)} then { write_tristate $cfg $autocfg CONFIG_NLS_CODEPAGE_865 $CONFIG_NLS_CODEPAGE_865 $CONFIG_NLS } 
        global CONFIG_NLS_CODEPAGE_866
        if {($CONFIG_NLS == 1 || $CONFIG_NLS == 2) && ($CONFIG_NLS == 1 || $CONFIG_NLS == 2)} then { write_tristate $cfg $autocfg CONFIG_NLS_CODEPAGE_866 $CONFIG_NLS_CODEPAGE_866 $CONFIG_NLS } 
        global CONFIG_NLS_CODEPAGE_869
        if {($CONFIG_NLS == 1 || $CONFIG_NLS == 2) && ($CONFIG_NLS == 1 || $CONFIG_NLS == 2)} then { write_tristate $cfg $autocfg CONFIG_NLS_CODEPAGE_869 $CONFIG_NLS_CODEPAGE_869 $CONFIG_NLS } 
        global CONFIG_NLS_CODEPAGE_874
        if {($CONFIG_NLS == 1 || $CONFIG_NLS == 2) && ($CONFIG_NLS == 1 || $CONFIG_NLS == 2)} then { write_tristate $cfg $autocfg CONFIG_NLS_CODEPAGE_874 $CONFIG_NLS_CODEPAGE_874 $CONFIG_NLS } 
        global CONFIG_NLS_ISO8859_1
        if {($CONFIG_NLS == 1 || $CONFIG_NLS == 2) && ($CONFIG_NLS == 1 || $CONFIG_NLS == 2)} then { write_tristate $cfg $autocfg CONFIG_NLS_ISO8859_1 $CONFIG_NLS_ISO8859_1 $CONFIG_NLS } 
        global CONFIG_NLS_ISO8859_2
        if {($CONFIG_NLS == 1 || $CONFIG_NLS == 2) && ($CONFIG_NLS == 1 || $CONFIG_NLS == 2)} then { write_tristate $cfg $autocfg CONFIG_NLS_ISO8859_2 $CONFIG_NLS_ISO8859_2 $CONFIG_NLS } 
        global CONFIG_NLS_ISO8859_3
        if {($CONFIG_NLS == 1 || $CONFIG_NLS == 2) && ($CONFIG_NLS == 1 || $CONFIG_NLS == 2)} then { write_tristate $cfg $autocfg CONFIG_NLS_ISO8859_3 $CONFIG_NLS_ISO8859_3 $CONFIG_NLS } 
        global CONFIG_NLS_ISO8859_4
        if {($CONFIG_NLS == 1 || $CONFIG_NLS == 2) && ($CONFIG_NLS == 1 || $CONFIG_NLS == 2)} then { write_tristate $cfg $autocfg CONFIG_NLS_ISO8859_4 $CONFIG_NLS_ISO8859_4 $CONFIG_NLS } 
        global CONFIG_NLS_ISO8859_5
        if {($CONFIG_NLS == 1 || $CONFIG_NLS == 2) && ($CONFIG_NLS == 1 || $CONFIG_NLS == 2)} then { write_tristate $cfg $autocfg CONFIG_NLS_ISO8859_5 $CONFIG_NLS_ISO8859_5 $CONFIG_NLS } 
        global CONFIG_NLS_ISO8859_6
        if {($CONFIG_NLS == 1 || $CONFIG_NLS == 2) && ($CONFIG_NLS == 1 || $CONFIG_NLS == 2)} then { write_tristate $cfg $autocfg CONFIG_NLS_ISO8859_6 $CONFIG_NLS_ISO8859_6 $CONFIG_NLS } 
        global CONFIG_NLS_ISO8859_7
        if {($CONFIG_NLS == 1 || $CONFIG_NLS == 2) && ($CONFIG_NLS == 1 || $CONFIG_NLS == 2)} then { write_tristate $cfg $autocfg CONFIG_NLS_ISO8859_7 $CONFIG_NLS_ISO8859_7 $CONFIG_NLS } 
        global CONFIG_NLS_ISO8859_8
        if {($CONFIG_NLS == 1 || $CONFIG_NLS == 2) && ($CONFIG_NLS == 1 || $CONFIG_NLS == 2)} then { write_tristate $cfg $autocfg CONFIG_NLS_ISO8859_8 $CONFIG_NLS_ISO8859_8 $CONFIG_NLS } 
        global CONFIG_NLS_ISO8859_9
        if {($CONFIG_NLS == 1 || $CONFIG_NLS == 2) && ($CONFIG_NLS == 1 || $CONFIG_NLS == 2)} then { write_tristate $cfg $autocfg CONFIG_NLS_ISO8859_9 $CONFIG_NLS_ISO8859_9 $CONFIG_NLS } 
        global CONFIG_NLS_ISO8859_15
        if {($CONFIG_NLS == 1 || $CONFIG_NLS == 2) && ($CONFIG_NLS == 1 || $CONFIG_NLS == 2)} then { write_tristate $cfg $autocfg CONFIG_NLS_ISO8859_15 $CONFIG_NLS_ISO8859_15 $CONFIG_NLS } 
        global CONFIG_NLS_KOI8_R
        if {($CONFIG_NLS == 1 || $CONFIG_NLS == 2) && ($CONFIG_NLS == 1 || $CONFIG_NLS == 2)} then { write_tristate $cfg $autocfg CONFIG_NLS_KOI8_R $CONFIG_NLS_KOI8_R $CONFIG_NLS } 
        global CONFIG_PROC_FS
        write_tristate $cfg $autocfg CONFIG_PROC_FS $CONFIG_PROC_FS $notmod
        global CONFIG_NFS_FS
        if {($CONFIG_INET == 1)} then { write_tristate $cfg $autocfg CONFIG_NFS_FS $CONFIG_NFS_FS $notmod }
        global CONFIG_ROOT_NFS
        if {($CONFIG_INET == 1) && ($CONFIG_NFS_FS == 1)} then { write_tristate $cfg $autocfg CONFIG_ROOT_NFS $CONFIG_ROOT_NFS $notmod }
        global CONFIG_RNFS_BOOTP
        if {($CONFIG_INET == 1) && ($CONFIG_NFS_FS == 1) && ($CONFIG_ROOT_NFS == 1)} then { write_tristate $cfg $autocfg CONFIG_RNFS_BOOTP $CONFIG_RNFS_BOOTP $notmod }
        global CONFIG_RNFS_RARP
        if {($CONFIG_INET == 1) && ($CONFIG_NFS_FS == 1) && ($CONFIG_ROOT_NFS == 1)} then { write_tristate $cfg $autocfg CONFIG_RNFS_RARP $CONFIG_RNFS_RARP $notmod }
        global CONFIG_SMB_FS
        if {($CONFIG_INET == 1)} then { write_tristate $cfg $autocfg CONFIG_SMB_FS $CONFIG_SMB_FS $notmod }
        global CONFIG_SMB_WIN95
        if {($CONFIG_INET == 1) && ($CONFIG_SMB_FS != 0)} then { write_tristate $cfg $autocfg CONFIG_SMB_WIN95 $CONFIG_SMB_WIN95 $notmod }
        global CONFIG_NCP_FS
        if {($CONFIG_IPX != 0)} then { write_tristate $cfg $autocfg CONFIG_NCP_FS $CONFIG_NCP_FS $notmod }
        global CONFIG_NCPFS_PACKET_SIGNING
        if {($CONFIG_IPX != 0) && ($CONFIG_NCP_FS != 0)} then { write_tristate $cfg $autocfg CONFIG_NCPFS_PACKET_SIGNING $CONFIG_NCPFS_PACKET_SIGNING $notmod }
        global CONFIG_NCPFS_IOCTL_LOCKING
        if {($CONFIG_IPX != 0) && ($CONFIG_NCP_FS != 0)} then { write_tristate $cfg $autocfg CONFIG_NCPFS_IOCTL_LOCKING $CONFIG_NCPFS_IOCTL_LOCKING $notmod }
        global CONFIG_NCPFS_STRONG
        if {($CONFIG_IPX != 0) && ($CONFIG_NCP_FS != 0)} then { write_tristate $cfg $autocfg CONFIG_NCPFS_STRONG $CONFIG_NCPFS_STRONG $notmod }
        global CONFIG_NCPFS_NFS_NS
        if {($CONFIG_IPX != 0) && ($CONFIG_NCP_FS != 0)} then { write_tristate $cfg $autocfg CONFIG_NCPFS_NFS_NS $CONFIG_NCPFS_NFS_NS $notmod }
        global CONFIG_NCPFS_OS2_NS
        if {($CONFIG_IPX != 0) && ($CONFIG_NCP_FS != 0)} then { write_tristate $cfg $autocfg CONFIG_NCPFS_OS2_NS $CONFIG_NCPFS_OS2_NS $notmod }
        global CONFIG_NCPFS_MOUNT_SUBDIR
        if {($CONFIG_IPX != 0) && ($CONFIG_NCP_FS != 0)} then { write_tristate $cfg $autocfg CONFIG_NCPFS_MOUNT_SUBDIR $CONFIG_NCPFS_MOUNT_SUBDIR $notmod }
        global CONFIG_HPFS_FS
        write_tristate $cfg $autocfg CONFIG_HPFS_FS $CONFIG_HPFS_FS $notmod
        global CONFIG_SYSV_FS
        write_tristate $cfg $autocfg CONFIG_SYSV_FS $CONFIG_SYSV_FS $notmod
        global CONFIG_AUTOFS_FS
        if {($CONFIG_EXPERIMENTAL == 1)} then { write_tristate $cfg $autocfg CONFIG_AUTOFS_FS $CONFIG_AUTOFS_FS $notmod }
        global CONFIG_AFFS_FS
        if {($CONFIG_EXPERIMENTAL == 1)} then { write_tristate $cfg $autocfg CONFIG_AFFS_FS $CONFIG_AFFS_FS $notmod }
        global CONFIG_AMIGA_PARTITION
        if {($CONFIG_EXPERIMENTAL == 1) && ($CONFIG_AFFS_FS != 0)} then {write_tristate $cfg $autocfg CONFIG_AMIGA_PARTITION 1 $notmod }
        global CONFIG_ROMFS_FS
        write_tristate $cfg $autocfg CONFIG_ROMFS_FS $CONFIG_ROMFS_FS $notmod
        global CONFIG_JFFS_FS
        write_tristate $cfg $autocfg CONFIG_JFFS_FS $CONFIG_JFFS_FS $notmod
        global CONFIG_UFS_FS
        write_tristate $cfg $autocfg CONFIG_UFS_FS $CONFIG_UFS_FS $notmod
        global CONFIG_BSD_DISKLABEL
        if {($CONFIG_UFS_FS != 0)} then { write_tristate $cfg $autocfg CONFIG_BSD_DISKLABEL $CONFIG_BSD_DISKLABEL $notmod }
        global CONFIG_SMD_DISKLABEL
        if {($CONFIG_UFS_FS != 0)} then { write_tristate $cfg $autocfg CONFIG_SMD_DISKLABEL $CONFIG_SMD_DISKLABEL $notmod }
        write_comment $cfg $autocfg "Character devices"
        global CONFIG_SERIAL
        write_tristate $cfg $autocfg CONFIG_SERIAL $CONFIG_SERIAL $notmod
        global CONFIG_WATCHDOG
        write_tristate $cfg $autocfg CONFIG_WATCHDOG $CONFIG_WATCHDOG $notmod
        global CONFIG_KEYBOARD
        write_tristate $cfg $autocfg CONFIG_KEYBOARD $CONFIG_KEYBOARD $notmod
        write_comment $cfg $autocfg "Kernel hacking"
        global CONFIG_PROFILE
        write_tristate $cfg $autocfg CONFIG_PROFILE $CONFIG_PROFILE $notmod
        global CONFIG_PROFILE_SHIFT
        if {($CONFIG_PROFILE == 1)} then { write_int $cfg $autocfg CONFIG_PROFILE_SHIFT $CONFIG_PROFILE_SHIFT $notmod }
        close $cfg
        close $autocfg
}


proc clear_choices { } {
        global CONFIG_OR32; set CONFIG_OR32 0
        global CONFIG_RAMKERNEL; set CONFIG_RAMKERNEL 0
        global CONFIG_ROMKERNEL; set CONFIG_ROMKERNEL 0
}


proc update_choices { } {
        global tmpvar_0
        global CONFIG_OR32
        if { $CONFIG_OR32 == 1 } then { set tmpvar_0 "OR32" }
        global tmpvar_1
        global CONFIG_RAMKERNEL
        if { $CONFIG_RAMKERNEL == 1 } then { set tmpvar_1 "RAM" }
        global CONFIG_ROMKERNEL
        if { $CONFIG_ROMKERNEL == 1 } then { set tmpvar_1 "ROM" }
}


proc update_define { } {
        global CONFIG_UCLINUX; set CONFIG_UCLINUX 0
        global CONFIG_AMIGA_PARTITION; set CONFIG_AMIGA_PARTITION 0
        set CONFIG_UCLINUX 1
        global CONFIG_EXPERIMENTAL; vfix CONFIG_EXPERIMENTAL
        global CONFIG_AFFS_FS; vfix CONFIG_AFFS_FS
        if {($CONFIG_EXPERIMENTAL == 1) && ($CONFIG_AFFS_FS != 0)} then { set CONFIG_AMIGA_PARTITION 1 } 
}


set defaults "arch/or32/defconfig"

pack .header -side top -padx 10 -pady 10 -expand on
pack .f0 -side top -padx 15 -pady 10 -fill y -expand on

#
# Misc buttons to save/restore state and so forth.
# 
frame .f0_bot
frame .f0_bot.r
frame .f0_bot.l

#
# Read the user's settings from .config.  These will override whatever is
# in config.in.  Don't do this if the user specified a -D to force
# the defaults.
#
if { [file readable .config] == 1} then {
        if { $argc > 0 } then {
                if { [lindex $argv 0] != "-D" } then {
                        read_config .config
                }
                else
                {
                        read_config $defaults
                }
        } else {
                read_config .config
        }
} else {
        read_config $defaults
}

update_mainmenu .f0

button .f0_bot.r.save -text "Save and Exit" -width 25 -command {
        writeconfig .config include/linux/autoconf.h; wrapup .wrap }

button .f0_bot.r.quit -text "Quit Without Saving" -width 25 \
        -command { maybe_exit .maybe }

button .f0_bot.l.store -text "Store Configuration to File" -width 25 -command {
        load_configfile .load "Save Configuration in file" write_config_file
}

button .f0_bot.l.load -text "Load Configuration from File" -width 25 -command {
        load_configfile .load "Load Configuration from file" read_config_file
}

pack  .f0_bot.r.save .f0_bot.r.quit -padx 25 -ipadx 10 -ipady 2 -expand on
pack  .f0_bot.l.load .f0_bot.l.store -padx 25 -ipadx 10 -ipady 2 -expand on

pack .f0_bot.r -side left -padx 15 -pady 10 -expand on -fill y
pack .f0_bot.l -side right -padx 15 -pady 10 -expand on -fill y

pack .f0_bot -fill both -expand on

#
# If we cannot write our config files, disable the write button.
#
if { [file exists .config] == 1 } then {
                if { [file writable .config] == 0 } then {
                        .f0_bot.r.save configure -state disabled
                }
        } else {
                if { [file writable .] == 0 } then {
                        .f0_bot.r.save configure -state disabled
                }
        }

if { [file exists include/linux/autoconf.h] == 1 } then {
                if { [file writable include/linux/autoconf.h] == 0 } then {
                        .f0_bot.r.save configure -state disabled
                }
        } else {
                if { [file writable include/linux/] == 0 } then {
                        .f0_bot.r.save configure -state disabled
                }
        }

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.