Index: sim/testsuite/lib/sim-defs.exp =================================================================== RCS file: /cvs/src/src/sim/testsuite/lib/sim-defs.exp,v retrieving revision 1.3 diff -c -p -r1.3 sim-defs.exp *** sim/testsuite/lib/sim-defs.exp 31 Jul 2001 04:59:59 -0000 1.3 --- sim/testsuite/lib/sim-defs.exp 29 Aug 2003 20:00:55 -0000 *************** proc slurp_options { file } { *** 331,350 **** # whitespace is ignored anywhere except within the options list; # option names are alphabetic only set pat "^#${ws}(\[a-zA-Z\]*)\\(?(\[^):\]*)\\)?$ws:${ws}(.*)$ws\$" ! # Allow comment as first line of file. ! set firstline 1 while { [gets $f line] != -1 } { set line [string trim $line] # Whitespace here is space-tab. if [regexp $pat $line xxx opt_name opt_machs opt_val] { # match! lappend opt_array [list $opt_name $opt_machs $opt_val] } else { ! if { ! $firstline } { break } } - set firstline 0 } close $f return $opt_array --- 331,350 ---- # whitespace is ignored anywhere except within the options list; # option names are alphabetic only set pat "^#${ws}(\[a-zA-Z\]*)\\(?(\[^):\]*)\\)?$ws:${ws}(.*)$ws\$" ! # Allow arbitrary comments as first few lines line of file. ! set seen_opt 0 while { [gets $f line] != -1 } { set line [string trim $line] # Whitespace here is space-tab. if [regexp $pat $line xxx opt_name opt_machs opt_val] { # match! lappend opt_array [list $opt_name $opt_machs $opt_val] + set seen_opt 1 } else { ! if { $seen_opt } { break } } } close $f return $opt_array