Changeset 956 for trunk/base


Ignore:
Timestamp:
Oct 5, 2002, 3:04:52 PM (22 years ago)
Author:
landonf (Landon Fuller)
Message:

When appending, verify that variable exists, otherwise, set variable
to supplied value

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/src/port1.0/portutil.tcl

    r951 r956  
    8282            global ${option} user_options \n\
    8383                \if \{!\[info exists user_options(${option})\]\} \{ \n\
    84                     set $option \[concat \$\{$option\} \$args\] \n\
    85                          if \{\[info exists option_procs($option)\]\} \{ \n\
    86                                 foreach p \$option_procs($option) \{ \n\
    87                                         eval \"\$p $option append \$args\" \n\
    88                                 \} \n\
    89                          \} \n\
     84                    if \{\[info exists ${option}\]\} \{ \n\
     85                        set ${option} \[concat \$\{$option\} \$args\] \n\
     86                    \} else \{ \n\
     87                        set ${option} \$args \n\
     88                    \} \n\
     89                    if \{\[info exists option_procs($option)\]\} \{ \n\
     90                        foreach p \$option_procs($option) \{ \n\
     91                            eval \"\$p $option append \$args\" \n\
     92                        \} \n\
     93                    \} \n\
    9094                \} \n\
    9195        \}"
Note: See TracChangeset for help on using the changeset viewer.