public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
* Don't recognize 'option' in midst of prefs line
@ 2003-08-14  5:03 Jim Blandy
  2003-08-14 16:09 ` Keith Seitz
  0 siblings, 1 reply; 3+ messages in thread
From: Jim Blandy @ 2003-08-14  5:03 UTC (permalink / raw)
  To: insight


Does this look right?

It seems like something similar should be done for the case
immediately above this one, for section markers.  But I don't really
know enough about the official syntax of Windows config files to say
for sure.

2003-08-13  Jim Blandy  <jimb@redhat.com>

	* library/prefs.tcl (pref_read): The word 'option' must be the
	first thing on the line; it doesn't count if it appears in the
	middle of the line.

Index: gdb/gdbtk/library/prefs.tcl
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/prefs.tcl,v
retrieving revision 1.27
diff -c -r1.27 prefs.tcl
*** gdb/gdbtk/library/prefs.tcl	29 Jul 2003 22:08:10 -0000	1.27
--- gdb/gdbtk/library/prefs.tcl	14 Aug 2003 04:59:16 -0000
***************
*** 92,98 ****
  	    regexp {\[(.*)\]} $line match section
  	  }
  
! 	  {[ \t\n]*option.*} {
  	    set line [string trimleft $line]
  	    eval $line
  	  }
--- 92,98 ----
  	    regexp {\[(.*)\]} $line match section
  	  }
  
! 	  {^[ \t\n]*option.*} {
  	    set line [string trimleft $line]
  	    eval $line
  	  }

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Don't recognize 'option' in midst of prefs line
  2003-08-14  5:03 Don't recognize 'option' in midst of prefs line Jim Blandy
@ 2003-08-14 16:09 ` Keith Seitz
  0 siblings, 0 replies; 3+ messages in thread
From: Keith Seitz @ 2003-08-14 16:09 UTC (permalink / raw)
  To: Jim Blandy; +Cc: insight

On Wed, 2003-08-13 at 22:05, Jim Blandy wrote:

> It seems like something similar should be done for the case
> immediately above this one, for section markers.  But I don't really
> know enough about the official syntax of Windows config files to say
> for sure.

Better question is: why is this line even necessary? I don't see
anything that would cause the word "option" to be output by anything.
That particular line has been in there from the get-go, and I don't
recall every having seen a preference file with "option" in it (unless
it was the name of an exe or something).

Assuming that it is necessary, your patch looks correct (as do your
comments about the preceeding line). Please commit them.

Thanks!
Keith


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Don't recognize 'option' in midst of prefs line
@ 2003-12-11 22:20 Jim Blandy
  0 siblings, 0 replies; 3+ messages in thread
From: Jim Blandy @ 2003-12-11 22:20 UTC (permalink / raw)
  To: insight


I've finally gotten around to committing the patch that I posted and
Keith approved in August.  Here's what I committed:

2003-12-11  Jim Blandy  <jimb@redhat.com>

	* library/prefs.tcl (pref_read): The section marker or the word
	'option' must be the first thing on the line; they don't count if
	they appear in the middle of the line.

Index: gdb/gdbtk/library/prefs.tcl
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/prefs.tcl,v
retrieving revision 1.27
diff -c -r1.27 prefs.tcl
*** gdb/gdbtk/library/prefs.tcl	29 Jul 2003 22:08:10 -0000	1.27
--- gdb/gdbtk/library/prefs.tcl	11 Dec 2003 22:17:35 -0000
***************
*** 88,98 ****
  	    ;# empty line; ignore it
  	  }
  
! 	  {\[.*\]} {
  	    regexp {\[(.*)\]} $line match section
  	  }
  
! 	  {[ \t\n]*option.*} {
  	    set line [string trimleft $line]
  	    eval $line
  	  }
--- 88,98 ----
  	    ;# empty line; ignore it
  	  }
  
! 	  {^[ \t\n]*\[.*\]} {
  	    regexp {\[(.*)\]} $line match section
  	  }
  
! 	  {^[ \t\n]*option.*} {
  	    set line [string trimleft $line]
  	    eval $line
  	  }

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-12-11 22:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-14  5:03 Don't recognize 'option' in midst of prefs line Jim Blandy
2003-08-14 16:09 ` Keith Seitz
2003-12-11 22:20 Jim Blandy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).