Re: FVWM: M4 vs. Cpp: pros and cons

From: Richard Lister <ric_at_giccs.georgetown.edu>
Date: Mon, 16 Nov 1998 13:41:36 -0500

On Fri, 13 Nov 1998 18:08:31 -0330 (NST)
Neil Zanella <nzanella_at_cs.mun.ca>
wrote concerning 'Re: FVWM: M4 vs. Cpp: pros and cons':
>
>
> Fine, but it would be nice to hear *your* opinion on M4 vs. Cpp as well.


I think the main (pretty trivial) reasons I went with M4 were:

1. CPP would have required me to change all my comments from
   # ... to /* ... */.

2. CPP would require \ escapes for all newlines in macros, whereas M4 doesn't.


e.g. I do stuff like this:

m4_define(DECOR, `AddToDecor $1
+ WindowFont WINDOWFONT
+ HilightColor Yellow $2

+ BorderStyle Active (Solid $2)
+ BorderStyle InActive (Solid $3 -- HiddenHandles)

+ TitleStyle RightJustified
+ TitleStyle Inactive (VGradient 32 $3 Black -- Raised)
+ TitleStyle ActiveUp (VGradient 32 $3 Black -- Raised)
+ TitleStyle ActiveDown (VGradient 32 Black $3 -- Flat)

+ ButtonStyle All Simple
+ ButtonStyle All InActive (VGradient 32 $3 Black -- Raised)
+ ButtonStyle All ActiveUp (VGradient 32 $3 Black -- Raised)
+ ButtonStyle All ActiveDown (VGradient 32 Black $3 -- Flat)

+ AddButtonStyle 2 ActiveUp (MiniIcon)
+ AddButtonStyle 2 InActive (MiniIcon)
+ AddButtonStyle 2 ActiveDown (Pixmap mini-exp.xpm)
')

DECOR(editor, EDITOR_COLOUR, LightGoldenRod)
DECOR(xterm, XTERM_COLOUR, Cyan)


In general M4 is more flexible, but for most simple macros that may not
be much of an issue.

Ric

Richard J Lister, Georgetown Institute for Cognitive and Computational Sciences
Georgetown University Medical Center, Washington, DC 20007, USA
Phone: +1 202-687 2878
Email: ric_at_giccs.georgetown.edu
Web: http://www.giccs.georgetown.edu/~ric/
--
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 Nov 16 1998 - 12:52:59 GMT

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