Re: FVWM: FvwmCpp: thanks for all the help, but...

From: Albrecht Kadlec <albrecht_at_auto.tuwien.ac.at>
Date: Tue, 4 Feb 97 17:04:20 +0100

>>>>> T == Tomas Halvarsson:

T> First of all I would like to apologize for asking twice yesterday. The
T> computer I sent the mail from panic'ed and died exactly the same
T> second i sent the first mail, so no fcc was written, and I didn't
T> think it was sent.

T> I finally got things working, sort of, but a problem remains:
T> Here are some rows from my .fvwm2rc file:

T> #ifdef SMEDJAN
T> #define P_NETSCAPE_GEO 814x900+0+1024
T> #define P_TALL_GEO 80x69
T> #define P_BIG_GEO 163x69
T> #define P_CON_GEO 151x5-0-0
T> ...
T> #elif SNICKERBOA
#elif def(SNICKERBOA)



T> #define P_NETSCAPE_GEO 814x900+0+1024
T> #define P_TALL_GEO 80x69
T> #define P_BIG_GEO 163x69
T> #define P_CON_GEO 151x5-0-0
T> ...
T> #endif
T> ...
T> AddToMenu Main "Main Menu" Title
T> #ifdef SNICKERBOA
T> + "New Terminal" Exec xterm -bg black -fg white -T Astrid &
T> #endif
T> + "Netscape" Exec netscape -display $HOSTDISPLAY
T> -geometry P_NETSCAPE_GEO &

T> And here's the problem:
T> the #ifdef SNICKERBOA "New Terminal" #endif thing work fine, but the
T> Netscape thing doesn't. I get this error:

T> Warning: Shell widget "netscape.bin" has an invalid geometry
T> specification: "P_NETSCAPE_GEO"

T> But when just putting the .fvwm2rc file through cpp, and redirecting
T> the output to a file, using the command:
T> cpp -DSNICKERBOA .fvwm2rc > the_output_file
T> the_output_file looks like it should, P_NETSCAPE_GEO is replaced with
T> 814x900+0+1024 and everything

how is SNICKERBOA defined ?

#define SNICKERBOA
just defines teh macro, but it has no value:
        #ifdef SNICKERBOA is evaluated
        #if SNICKERBOA isn't

#elif
        is short for
#else
#if
...


so you should use
#elif def(SNICKERBOA)
...
or
#else
#ifdef SNICKERBOA
...
instead (with additional #endif)



the cause for -DSNICKERBOA working is:

     -Dmacro
          Define macro macro with the string `1' as its defini-
          tion.

     -Dmacro=defn
          Define macro macro as defn. All instances of `-D' on
          the command line are processed before any `-U' or `-i'
          options.

so it's not equivalent to #define SNICKERBOA
which has no value.

albrecht
-- 
Garden Party held today, invites call the debs to play,
  social climbers polish ladders, wayward sons again have fathers,
edgy eggs and queing cumbers, rudely wakened from their slumber,
  time has come again for slaughter on the lawns by still Cam waters. -- Marillion
--
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 Tue Feb 04 1997 - 10:05:32 GMT

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:38:00 BST