Re: FVWM: FvwmM4 behaviour, anybody got a major investment in m4 code?

From: <jmknoble_at_pobox.com>
Date: Mon, 6 Oct 1997 21:28:53 -0400 (EDT)

Manfred--

I've been using FvwmM4 with non-standard quote characters for a while
now. Basically what i do is the following:

    m4_dnl
    m4_dnl # change to quote characters which aren't likely to be used
    m4_dnl # in `normal' combinations of characters.
    m4_dnl
    m4_changequote(`<%',`%>')
    m4_dnl
    m4_dnl # a macro to strip `standard' quotes from predefined fvwm
    m4_dnl # macros; this uses a trick of patsubst where omitting the
    m4_dnl # third argument causes matching text to be deleted from a
    m4_dnl # string.
    m4_dnl
    m4_define(<%stripquotes%>, <%m4_patsubst(<%$1%>, <%[`']%>)%>)
    m4_dnl
    m4_dnl # now strip the quotes from the predefined macros.
    m4_dnl
    m4_define(<%_FVWM_VERSION_%>, stripquotes(FVWM_VERSION))
    m4_define(<%_BITS_PER_RGB_%>, stripquotes(BITS_PER_RGB))
    m4_define(<%_CLASS_%>, stripquotes(CLASS))
    m4_define(<%_CLIENTHOST_%>, stripquotes(CLIENTHOST))
    m4_define(<%_COLOR_%>, stripquotes(COLOR))
    m4_define(<%_WMDIR_%>, stripquotes(FVWMDIR))
    m4_define(<%_HEIGHT_%>, stripquotes(HEIGHT))
    m4_define(<%_HOME_%>, stripquotes(HOME))
    m4_define(<%_HOSTNAME_%>, stripquotes(HOSTNAME))
    m4_define(<%_OPTIONS_%>, stripquotes(OPTIONS))
    m4_define(<%_OSTYPE_%>, stripquotes(OSTYPE))
    m4_define(<%_PLANES_%>, stripquotes(PLANES))
    m4_define(<%_RELEASE_%>, stripquotes(RELEASE))
    m4_define(<%_REVISION_%>, stripquotes(REVISION))
    m4_define(<%_SERVERHOST_%>, stripquotes(SERVERHOST))
    m4_define(<%_TWM_TYPE_%>, stripquotes(TWM_TYPE))
    m4_define(<%_USER_%>, stripquotes(USER))
    m4_define(<%_VENDOR_%>, stripquotes(VENDOR))
    m4_define(<%_VERSION_%>, stripquotes(VERSION))
    m4_define(<%_WIDTH_%>, stripquotes(WIDTH))
    m4_define(<%_X_RESOLUTION_%>, stripquotes(X_RESOLUTION))
    m4_define(<%_Y_RESOLUTION_%>, stripquotes(Y_RESOLUTION))
    m4_dnl
    m4_dnl # finally, get rid of stripquotes(), since we don't
    m4_dnl # need it anymore.
    m4_dnl
    m4_undefine(<%stripquotes%>)

The quoteless macros are surrounded by underscores; e.g. the stripped
version of `WIDTH' becomes `_WIDTH_'.

Hope that helps. Freundliche Grüße aus North Carolina.

--jim

%%%%%%%%%%%%%%% jim knoble %%%%%%%% jmknoble_at_pobox.com %%%%%%%%%%%%%%%%%

On 7 Oct 1997, Manfred Bartz wrote:

: I have started to use FvwmM4 for some adaptive startup behaviour.
: E.g. starting xterms with different fontsizes and geometries.
: However, I found that all predefined macros include an extra set of
: quotes. E.g. the predefined "WIDTH" expands to "`1600'". I find this
: very undesirable since it is not possible to do arithmetic with quoted
: numbers, e.g with ``m4_eval()''. I have patched FvwmM4 for my
: purposes to omit those extra quotes.
:
: Question: Has anybody got a big investment in FvwmM4's current
: quoting behaviour or should it be changed to allow arithmetic in m4?
:
: Or possibly: Am I missing something?
:
: --
: Manfred Bartz <mbartz_at_werple.net.au>

--
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 Oct 06 1997 - 20:39:39 BST

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