FVWM: FvwmCpp

From: Marco Mariani <m.mariani_at_imola.nettuno.it>
Date: Tue, 20 Aug 1996 00:13:34 -0100 (GMT-0100)

Hi all!

If you use FvwmCpp on the whole .fvwm2rc, how do you protect yourself
against errors like the following:

.fvwm2rc:19: invalid preprocessing directive name
.fvwm2rc:23: invalid preprocessing directive name
.fvwm2rc:29: invalid preprocessing directive name
.fvwm2rc:35: invalid preprocessing directive name
.fvwm2rc:37: invalid preprocessing directive name
.fvwm2rc:44: invalid preprocessing directive name
.fvwm2rc:47: unterminated character constant
.fvwm2rc:77: parse error
.fvwm2rc:85: unterminated string or character constant
.fvwm2rc:229: unterminated string or character constant
.fvwm2rc:77: unterminated `#if' conditional


The first ones are due to the '##' which I use sometimes and is mistaken
for a preprocessor directive (it is triggered by '#*' also), and the
others are quite common if you write a ' in a comment or '#if' or things
like that.

At the moment, I use the following:

----- /var/X11R6/lib/xinit/xinitrc:

[...]

/var/X11R6/lib/fvwm2/precpp.pl <~/.fvwm2rc >~/.fvwm2rc.cpp
fvwm2 -cmd "FvwmCpp -Cppprog /usr/bin/cpp $HOME/.fvwm2rc.cpp"

----- /var/X11R6/lib/fvwm2/precpp.pl:

#!/usr/bin/perl

while(<>) {
   (! /^ *#/ || /^ *# *(include|define|if|endif|ifdef|undef|else|elif|
                 line|error|pragma)/) && print $_;
}


It works, but does not protect against the '# if' at line 77.

If you use '#if' without any space in your preprocessed files, you
can change the "/^ *# *(" with "/^ *#(".

As soon as I find the time, I could implement this thing into FvwmCpp, if
you think it is of any use.

Of course, FvwmCpp is the result of a random mutation, so I can't contact
the author via e-mail.


All The Best,
 Marco

Excuse the waste of bandwidth, please send flames to my alternate address
(bill_at_microsoft.com).


--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_hpc.uh.edu.
To report problems, send mail to fvwm-owner_at_hpc.uh.edu.
Received on Mon Aug 19 1996 - 17:20:56 BST

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:37:59 BST