Subject: RE: FVWM: Erroneous .fvwm2rc parsing

From: [email-masked]
Date: Mon, 27 Sep 1999 13:46:09 -0700

well, I would say that the sh behaviour is a bug:-))

  sometime it is hard to distinguish the bug from the feature... (maybe it
is indeed a bug in fvwmrc parsing, it depends on what behaviour they wanted)

	erik

> -----Original Message-----
> From: jason [mailto:[email-masked]]
> Sent: Monday, September 27, 1999 1:26 PM
> To: Steffl, Erik
> Cc: 'fvwm mailing list'
> Subject: RE: FVWM: Erroneous .fvwm2rc parsing
>
>
>
>   Yes, I knew that's what its purpose was.  I just didn't expect it to
> apply on a comment line, so I thought it was a bug.  This is
> how /bin/sh
> works, e.g.:
>
> #!/bin/sh
> # \
> echo hello
> echo world
>
> produces the ouput:
>
> hello
> world
>
> when executed, since everything on a comment line is ignored.
>  I wasn't
> aware that fvwm implements this differently, especially since the way
> /bin/sh implements it seems more natural to me.  Oh, well.
> I'm glad to
> hear that it's not a bug.  ;-)
>
> -jason
>
>
> On Mon, 27 Sep 1999 [email-masked] wrote:
>
> >   Jason,
> >
> >   the \ character is often used to `unspecial` the special
> characters, in
> > this case meaning that the new line right after it would
> NOT be considered
> > an end of line - i.e. the next line is basically the same
> line for the
> > purposes of the program that reads the file.
> >
> >   it's probably clear enough, but here's an example anyway:
> >
> > first line \
> > second line
> >
> >   would be read as one line:
> >
> > first line second line
> >
> >   your MenuStyle command is thus commented out.
> >
> > 	erik
> >
>

--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: [email-masked] (Danny Dulai)
Date: 28 Sep 1999 02:56:20 -0000

>is indeed a bug in fvwmrc parsing, it depends on what behaviour they wanted)

I often use:

#!/bin/sh
# \
exec tclsh $0 $*

... rest of script

or replace tclsh with perl or whatever.. The sh executes the exec line,
tclsh and everything else skips it. Allows me to use tclsh from my PATH
instead of a hardcoded location. sh is always in /bin, everything else
changes location.

-- 
___________________________________________________________________________
Danny Dulai                                           Feet. Pumice. Lotion.
http://www.ishiboo.com/~nirva/                            [email-masked]
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: [email-masked] (Paul D. Smith)
Date: 28 Sep 1999 13:22:09 -0400

%% [email-masked] (Danny Dulai) writes:

  dd> On 09/27/99, [email-masked] said:
  >> sometime it is hard to distinguish the bug from the
  >> feature... (maybe it is indeed a bug in fvwmrc parsing, it depends
  >> on what behaviour they wanted)

  dd> I often use:

  dd> #!/bin/sh
  dd> # \
  dd> exec tclsh $0 $*

  dd> ... rest of script

  dd> or replace tclsh with perl or whatever.. The sh executes the exec
  dd> line, tclsh and everything else skips it.

Just an off-topic note: as far as I know this _only_ works with Tcl.  It
definitely doesn't work with Perl, which treats backslash-newlines in
comments just like the shell does1 (that is, ignores the backslash and
doesn't concatenate the newline).

I don't know of any other interpreter except tclsh that does it this
way.  Personally, I feel the perl/sh way is more intuitive: a comment is
a comment, and _everything_ in a comment should be completely
ignored... including trailing backslashes.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <[email-masked]>         Network Management Development
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist
-------------------------------------------------------------------------------
   These are my opinions---Nortel Networks takes no responsibility for them.
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: "John E. Garrott" <[email-masked]>
Date: Tue, 28 Sep 1999 13:28:30 -0700

> ignored... including trailing backslashes.

Python.

John

---

From: Dominik Vogt <[email-masked]>
Date: Wed, 29 Sep 1999 01:10:50 +0200

> ignored... including trailing backslashes.

The most intuitive way I can think of is that comment lines are completely
removed except that a trailing backslash prevents the line end.
Thus you could say

fooabr=1\
	2\
#	3\
	4

or in a makefile:

OBJECTS = \
#	foo.o \
	bar.o \
	foobar.o

and the lines beginning with '#' would be silently removed from
the input.

Bye

Dominik ^_^

--
Dominik Vogt, [email-masked]
Reply-To: [email-masked]
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].