Re: strange --version issue

2008-04-09 Thread Eric Blake
iece of advice - you can use $ PATH=$PATH to force the hash to clear itself after changing where a binary is installed, and, in bash, $ shopt -s checkhash to force bash to be smarter about its hashing choices. - -- Don't work too hard, make some time for fun as well! Eric Blake

the need for qindir [was: 2.62 AT_SETUP limitations]

2008-04-24 Thread Eric Blake
es in the output. Then you will have (in m4sugar quoting): m4_define([m4_qsubstr], [m4_qindir([m4_substr], $@)]) such that m4_define([b], [HI]) m4_substr([abc], [1], [1]) => HI m4_qsubstr([abc], [1], [1]) => b - -- Don't work too hard, make some time for fun as well! Eric Blake

Re: the need for qindir

2008-04-25 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Akim Demaille on 4/25/2008 4:11 AM: |>>> "EB" == Eric Blake <[EMAIL PROTECTED]> writes: | | >> Something like a new primitive "eval and return quoted" would fill | >> the gap. | | &g

Re: Filter user macro invocation

2008-04-28 Thread Eric Blake
the manual: http://www.gnu.org/software/m4/manual/m4.html#Ifelse Look for the example of defining `foo', in the third example. - -- Don't work too hard, make some time for fun as well! Eric Blake [EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (Cygwi

Re: Filter user macro invocation

2008-04-30 Thread Eric Blake
nvert quadrigraphs. This task becomes even harder if you must handle unbalanced quotes in the output without a post-processing pass. - -- Don't work too hard, make some time for fun as well! Eric Blake [EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (Cyg

Re: Filter user macro invocation

2008-05-03 Thread Eric Blake
27;`0')') define(`_define_blind', `define(`$1', `ifelse(`$3', `0', ``$4'', `$2')')') And to test it: define_blind(`foo', `bar-$1')dnl defn(`foo') => ifelse(`$3', `0', ``$0'', `bar-$1') foo => foo

Re: Filter user macro invocation

2008-05-03 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Eric Blake on 4/30/2008 7:35 PM: | | to make define always treat new macros like this. Hmm, maybe I should | mention that in the manual. | Done as follows: - -- Don't work too hard, make some time for fun as well! Eric

Re: /usr/lib/charset.alias

2008-05-20 Thread Eric Blake
he sources of the file. Rather, patch lib/config.charset, and send that patch to bug-gnu-libiconv. Then _all_ GNU programs that share the generated charset.alias will benefit. -- Eric Blake ___ m4-discuss mailing list m4-discuss@gnu.org http://lists.gnu.org/mailman/listinfo/m4-discuss

Re: extensions module and Solaris

2008-05-27 Thread Eric Blake
creating the child process, that the new fds created for communication with the child do not interfere with the three automatic stdio streams? - -- Don't work too hard, make some time for fun as well! Eric Blake [EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.

Re: system(), Solaris, and the 'execute' module

2008-06-02 Thread Eric Blake
inary locked into a specific installation location for syscmd to work. - -- Don't work too hard, make some time for fun as well! Eric Blake [EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (Cygwin) Comment: Public k

Re: ./126.diversions expected to fail for 1.4.11?

2008-06-21 Thread Eric Blake
un as well! Eric Blake [EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkhc7RMACgkQ84KuGfSFAYASYwCgmW6w4FBAV8J1z

Re: problem embedding argument inside nested macro def's

2008-06-27 Thread Eric Blake
`1'. That way, in DEF, use of $1 refers to the argument of ___DEF, and use of $2 refers to the deferred string $1 for use in the second round of defines. -- Eric Blake ___ m4-discuss mailing list m4-discuss@gnu.org http://lists.gnu.org/mailman/listinfo/m4-discuss

Re: outdated m4sugar

2008-07-11 Thread Eric Blake
Thanks! Actually, we probably need to do copyright papers for you anyway | because of your previous patch. My previous patch falls under the trivial rules, but I'm already starting the paperwork process. | | However, of the issues you've mentioned, updating m4sugar seems like the | leas

Re: m4sugar and m4 1.6, bison

2008-07-11 Thread Eric Blake
or only the testsuite, but the testsuite should already catch the inadvertent deletion of the Makefile-generated version.m4. Not that I specifically tested this, though (besides, make is pretty good about regenerating version.m4 as needed). - -- Don't work too hard, make some time

Re: m4sugar and m4 1.6, bison

2008-07-13 Thread Eric Blake
l after m4_append is fixed to be O(n) (no scaling improvements result by making the search faster if the insertion is still slow). | | Still completely untested, of course... | - -- Don't work too hard, make some time for fun as well! Eric Blake [EMAIL PROTECTED] -B

Re: m4sugar and m4 1.6, bison

2008-07-14 Thread Eric Blake
1) set size querying, if desired, by making m4_set_add and m4_set_remove modify _m4_set_size($1). - -- Don't work too hard, make some time for fun as well! Eric Blake [EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (Cygwin) Comment: Public key at home.comcas

Re: complexity of repeated use of m4_append

2008-07-15 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Ralf Wildenhues on 7/14/2008 1:23 PM: | Hi Eric, | | * Eric Blake wrote on Sun, Jul 13, 2008 at 05:40:51AM CEST: |> In the meantime, I coded up a test; I will probably commit it as |> m4/examples/append.m4 and add it to the m4 tes

linkedhash-list vs. hash

2008-07-22 Thread Eric Blake
d using linkedhash-list for minimal code size. Any other comments on recommended hash implementations or how either gnulib module could borrow ideas from each other? - -- Don't work too hard, make some time for fun as well! Eric Blake [EMAIL PROTECTED] -BEGIN PGP SIGNATURE

Re: linkedhash-list vs. hash

2008-07-26 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Bruno Haible on 7/23/2008 5:40 AM: | Eric Blake wrote: |> both linkedhash-list and hash appear to fit the bill | | The main difference between linkedhash-list and hash is that the former | implements a list in its own right,

Re: popdef(undefined), __m4_version__

2008-07-29 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 [adding m4-discuss, in case anyone on that list wants to chime in] According to Ralf Wildenhues on 7/28/2008 10:40 AM: | Hello Eric, | | Eric Blake byu.net> writes: [the current snapshot in preparation for m4 1.6 warn on defn(undefined), which

Re: EBCDIC support?

2008-07-30 Thread Eric Blake
and these days, they are quite rare), but if you encounter any bugs, feel free to report them. - -- Don't work too hard, make some time for fun as well! Eric Blake [EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (Cygwin) Comment: Public key at home.comcast.

Re: Porting m4 to z/OS

2008-07-30 Thread Eric Blake
e ranges), and possibly the regexp/patsubst builtins. | | Any help will be warmly received... | - -- Don't work too hard, make some time for fun as well! Eric Blake [EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (Cygwin) Comment: Public key at

Re: Porting m4 to z/OS

2008-07-30 Thread Eric Blake
unctions available from gnulib; Bruno Haible has more tips on how to port them to a new platform. - -- Don't work too hard, make some time for fun as well! Eric Blake [EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (Cygwin) Comment: Public key at home.comcas

Re: popdef(undefined), __m4_version__

2008-08-03 Thread Eric Blake
.62 would be OBE, only necessary for the small window of unreleased m4 that warned by default rather than providing a configuration knob). - -- Don't work too hard, make some time for fun as well! Eric Blake [EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (Cygwi

__m4_version__ and frozen files [was: O(n) patches and side effects]

2008-08-22 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 [adding m4-discuss] According to Ralf Wildenhues on 8/22/2008 12:23 AM: > Hi Eric, > > * Eric Blake wrote on Fri, Aug 22, 2008 at 06:23:38AM CEST: >> Meanwhile, I discovered a slight flaw in m4_init that I'm not >> su

Re: popdef(undefined), __m4_version__

2008-08-25 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Eric Blake on 8/3/2008 5:39 PM: > | > | That's not to say the default mode need necessarily be compatible, but > | at least detecting that we are running inside autoconf and setting the > | right options to work without

Re: popdef(undefined), __m4_version__

2008-08-26 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Eric Blake on 8/25/2008 7:07 AM: > > Here's what I'm planning on committing to m4; it adds debugmode(d) as a > new flag that controls whether dereferencing undefined macros warns, then > enables the flag by default

Re: __m4_version__ and frozen files [was: O(n) patches and side effects]

2008-08-26 Thread Eric Blake
n files. But since it is simpler, I'll implement it first, and if I can't figure out how to rework xsystem today, then I'll go ahead with the release of 2.63 with just that patch (the release of m4 1.6 is still up in the air as to whether it should use V1 or V2 frozen files). -

Re: popdef(undefined), __m4_version__

2008-08-27 Thread Eric Blake
Eric Blake byu.net> writes: > Here's what I'm planning on committing to m4; it adds debugmode(d) as a > new flag that controls whether dereferencing undefined macros warns, then > enables the flag by default unless an explicit -d specifies other flags or > if -E is in

Re: regexp() nth parameterized subexpression

2008-08-30 Thread Eric Blake
t in m4 2.0 it gives the tenth () rather than the first () followed by literal 0. But that would still be quite a wait. - -- Don't work too hard, make some time for fun as well! Eric Blake [EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (Cygwin) Comment: Public

Re: submit the following for Gnu m4 documentation

2008-08-30 Thread Eric Blake
fine(`javaize_lc',`lowcase_initial(javaize(`$1'))') As the manual is about m4, and not Java, I think it would be nicer to use a bit more generic name for this macro; maybe camelcase? - -- Don't work too hard, make some time for fun as well! Eric Blake [EMAIL PROTECTED]

Re: regexp() nth parameterized subexpression

2008-08-30 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Jack Woehr on 8/30/2008 3:27 PM: > Eric Blake wrote: >> - >> Documented limitation in the current implementation. >> http://www.gnu.org/software/m4/manual/m4.html#Regexp > > D'oh, excuse the stupid que

Re: submit the following for Gnu m4 documentation

2008-08-30 Thread Eric Blake
ays nice to hear success stories; glad we could be of assistance! - -- Don't work too hard, make some time for fun as well! Eric Blake [EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/ebla

Re: Finding spurious spacing in m4 texts

2008-09-19 Thread Eric Blake
t the extra whitespace in your macro expansions. Remember, m4 strips leading spaces during argument collection, but not trailing spaces. It may be that you have trailing spaces in your macro arguments, which result in the extra whitespace in your output. - -- Don't work too hard, make some

Re: Comma in the output of esyscmd

2008-09-24 Thread Eric Blake
ed in unbalanced quotes (hence the reason that autoconf introduced the notion of quadrigraphs, where the m4sugar wrapper language post-processes m4 output to allow the generation of unbalanced [ or ]). Maybe someday the post-processing of quadrigraphs can also be built into m4 (ie. introduce quadrigrap

Re: Question about m4 include/sinclude

2008-09-30 Thread Eric Blake
files, and making sure I don't repeat files (using something like stat() > and the inode and > device to make sure I handle symlinks). I agree - that seems gross. And as autoconf developers have already noted, m4 is the best language for parsing m4 - it is almost impossible to write r

Re: Question about m4 include/sinclude

2008-10-01 Thread Eric Blake
oad that on top of the normal modules to change include at the C level rather than the m4 level. - -- Don't work too hard, make some time for fun as well! Eric Blake [EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (Cygwin) Comment: Public key at home.comcas

GNU M4-1.4.12 released (stable)

2008-10-11 Thread Eric Blake
erify' command. This release was bootstrapped with the following tools: Autoconf 2.63 Automake 1.10.1 Gnulib v0.0-1196-g8eaac7a Excerpt from the NEWS file: * Noteworthy changes in Version 1.4.12 (2008-10-10) [stable] Released by Eric Blake, based on git version 1.4.11.* ** Fix

Re: [PATCH] use m4_require to implement AS_REQUIRE

2008-10-17 Thread Eric Blake
macro is being expanded during argument collection, so we can't even protect against these sorts of subtle diversion bugs (maybe I should add a macro that expands to the current nesting depth?). - -- Don't work too hard, make some time for fun as well! Eric Blake [EMAIL P

Re: Can a pushdef pop itself dependably?

2008-10-28 Thread Eric Blake
simple test to weed out broken m4). - -- Don't work too hard, make some time for fun as well! Eric Blake [EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG wi

Re: [PATCH] add m4_stack_foreach and m4_stack_foreach_lifo

2008-10-28 Thread Eric Blake
4@&[EMAIL PROTECTED] m4@&[EMAIL PROTECTED] m4@&[EMAIL > PROTECTED] m4@&[EMAIL PROTECTED]) The test title is automatically a keyword, so the second listing of m4_stack_foreach is redundant. Let's also add a test of m4_dumpdefs to this test. - -- Don't work too ha

Re: [PATCH] add m4_stack_foreach and m4_stack_foreach_lifo

2008-10-28 Thread Eric Blake
constructing a macro call with multiple arguments; this has the nice side effect of even fewer macros that can't be m4_copy'd). And part 2 uses _m4_stack_reverse to simplify the m4_set code. Anyone want to review this before I push? >From 5080896aebf85e754ad8bbb3a8f9be8f96a44b8b M

Re: Newbie - having difficulty with a macro

2008-11-01 Thread Eric Blake
intermediate expansion is: m4_format(`%d foo, bar %d', `3', `2') You may also want to play with the --debug=aeqt flag to m4 to see the various macro expansions in action. - -- Don't work too hard, make some time for fun as well! Eric Blake [EMAIL PROT

dumpdef output destination

2008-12-19 Thread Eric Blake
s autoconf 2.63 files for other reasons) Harder for autoconf My personal preference is option 1, unless someone can speak up with a counter- argument soon. -- Eric Blake ___ m4-discuss mailing list m4-discuss@gnu.org http://lists.gnu.org/mailman/listinfo/m4-discuss

Re: dumpdef output destination

2008-12-19 Thread Eric Blake
Eric Blake byu.net> writes: > So which option should I use? > > Option 1 - make 1.6 dumpdef always go to stderr > > Option 2 - make 2.0 dumpdef always go to debugfile > I just thought of a new option: Option 3 - add a flag to both 1.6 and 2.0 debugmode that controls

Re: dumpdef output destination

2008-12-23 Thread Eric Blake
dev.org iEYEARECAAYFAklRrHMACgkQ84KuGfSFAYAp6QCeIRlgLEneYIEEaq8BAsILUEr6 zs0AnAt2q//QoAOH4LlS6yMgb8m/Ja2j =rCbD -END PGP SIGNATURE- From df6bfeeaac6bdc1ef8e5406c6ac051af2c10d0d8 Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Mon, 22 Dec 2008 05:45:40 -0700 Subject: [PATCH] Add debugmode(o) to c

improve substr

2008-12-24 Thread Eric Blake
ng selected lies outside the original string. If there are no newlines, this could also be achieved on the master branch with an extended regular expression, although that is probably slower: define(`substr', `ifelse(`$#', `4', `patsubst(`$1', `^(.{$2}).{$3}', `\1$4'

Re: improve substr

2008-12-24 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Jack Woehr on 12/24/2008 7:14 PM: > Eric Blake wrote: >> Again, implementing this natively will be more efficient. What do you >> think of adding these two enhancements to substr? >> > I think anything you wa

Re: Link time

2009-01-15 Thread Eric Blake
3Den%26rlz%3D1G1GGLQ_ENUS241%26sa%3DN&usg=ALkJrhjp32n1_vh_FSwBXHu_DiAmJsrAVg#d20070306 > www.cs.stir.ac.uk/~kjt/research/pdf/expl-m4.pdf There are some m4 constructs listed there, but even after the google translation, I am not quite sure what you found in there that piqued your int

functional programming (Was: Link time)

2009-01-16 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 [Please keep the list in the loop] According to t...@speakeasy.net on 1/15/2009 7:53 PM: > Many thanks, Eric Blake. > The m4.texinfo document direct from git repository , specifically the > section > building macros with macros was very

Re: install questions

2009-02-13 Thread Eric Blake
le `/usr/local/bin/m4': > Permission denied This question has come up before; it is not a bug in m4. Your problem is that you can't install into a root-owned directory unless you have root permissions: http://lists.gnu.org/archive/html/bug-m4/2009-01/msg00018.html - -- Do

Re: Require m4_ prefix from within the file?

2009-03-17 Thread Eric Blake
eate m4_exit rather than m4_m4exit. - -- Don't work too hard, make some time for fun as well! Eric Blake e...@byu.net -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment:

GNU M4 1.4.13 released (stable)

2009-04-01 Thread Eric Blake
ion 1.4.13 (2009-04-01) [stable] Released by Eric Blake, based on git version 1.4.12.* ** The manual is now distributed under the terms of FDL 1.3. ** The `divert' and `undivert' builtins have been made more efficient when using temporary files for large diversions. ** The `transl

Re: GNU M4 1.4.13 released (stable)

2009-04-01 Thread Eric Blake
silent-rules automake option was mentioned rather extensively on the automake-patches list, but you are probably right in observing that the plain automake list did not see as much commentary on it. - -- Don't work too hard, make some time for fun as well! Eric Blake e.

Re: ifdef usage

2009-04-21 Thread Eric Blake
d the macro "VNC", as you wanted. Now that "'VNC'" is not a macro, your ifdef usage is checking whether "'VNC'" is defined, which it is not, still explaining your surprise. > > Am I missing something or have I misunderstood what the manual says > about how to use ifdef and -D ? You misunderstood the portion about quoting characters. Let us know if there is any way to improve the manual to make it more obvious that they are intentionally distinct strings. -- Eric Blake

Re: ifdef usage

2009-04-21 Thread Eric Blake
Eric Blake byu.net> writes: Aargh. I typed my first answer too hastily. > Incorrect quotes. By default, m4 uses "`" and "'", not "'" and "'". > Therefore, you ended up defining a macro literally named "'VNC'"

Re: process pipes

2009-04-30 Thread Eric Blake
x27; works just like any other Unixy filter. - -- Don't work too hard, make some time for fun as well! Eric Blake e...@byu.net -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using

Re: AW: use m4 as a replacement for sed

2009-05-15 Thread Eric Blake
vious that you intended to start a new macro-name token at the point of the close-quote. It is also common to see empty quotes, in case app_mssql_ is desired to be a macro name: name app_mssql_`'DBSRV - -- Don't work too hard, make some time for fun as well! Eric Blake e.

Re: Using m4 between the C preprocessor and compiler?

2009-07-04 Thread Eric Blake
notion of file name; generally from the command line or [s]include builtins, but also from... __file__(value) - change the internal file name pushdef(`__line__', `value') - override the builtin __line__, such that you no longer get autoincrementing until you popdef or go back to

Re: [PATCH] Improve compatibility between M4 and CPP.

2009-07-08 Thread Eric Blake
as an option, we should break this into multiple patches - one that adds an optional argument to __line__/__file__, and another patch that introduces the new option, rather than doing it all in one patch. - -- Don't work too hard, make some time for fun as well! Eric Blake e...@b

Re: [PATCH] Improve compatibility between M4 and CPP.

2009-07-08 Thread Eric Blake
, no, because the proposed changes to __line__ are useful without injecting m4 between cpp and cc1. And git makes it particularly easy to split patches into smaller, logical chunks. - -- Don't work too hard, make some time for fun as well! Eric Blake

Re: [PATCH] Improve compatibility between M4 and CPP.

2009-07-08 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Eric Blake on 7/8/2009 7:41 AM: > But even then, I would still like for > 'm4 --sync' to be short for 'm4 --synclines' rather than an ambiguous > option, so suggestions for a better name that avoids opt

Re: [PATCH] Improve compatibility between M4 and CPP.

2009-07-08 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 [please keep the discussion on the list] According to Raphael 'Kena' Poss on 7/8/2009 7:43 AM: > > Op 8 jul 2009, om 14:41 heeft Eric Blake het volgende geschreven: >> so suggestions for a better name that avoids option-name

autom4te and processing stdin

2009-07-22 Thread Eric Blake
t '-'): diff --git a/ChangeLog b/ChangeLog index e1a6494..031b00d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-07-22 Eric Blake + + Lack of input files implies stdin (and thus autom4te --force). + * tests/tools.at (autoconf: input from stdin): Test this. +

Re: do not get any output using debug options...

2009-08-12 Thread Eric Blake
debug, --debug=aeq, --debugfile=file Which platform is this on? Can you show me the results of 'make check'? Are you using libsigsegv? - -- Don't work too hard, make some time for fun as well! Eric Blake e...@byu.net -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.

Re: AT_LINE

2009-09-14 Thread Eric Blake
7;t appear in a stable released version of m4 for quite some time. This also reminds me that I have plans to implement __line__(value) for m4 1.6, which allows one to change the current reported line on the fly; but I haven't gotten to that yet. - -- Don't work too hard, make some t

Re: m4 changequote bug

2009-11-19 Thread Eric Blake
work too hard, make some time for fun as well! Eric Blake e...@byu.net -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAksFQugACgkQ84

Re: m4 changequote bug

2009-11-19 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Eric Blake on 11/19/2009 6:06 AM: > According to Josef Vukovic on 11/18/2009 10:26 PM: >> Hello, > >> I am searching for an old m4 version which have the Bug regarding >> changequote: > >> define(foo,

Re: m4 changequote bug

2009-11-23 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 [please keep replies on the list, and adding bug-gdb] According to Josef Vukovic on 11/23/2009 5:37 AM: > > > 2009/11/19 Eric Blake mailto:e...@byu.net>> > > > I'm not sure when that was fixed, but I confirmed t

Re: expansion

2009-11-30 Thread Eric Blake
is similar to defn in that it can show quoted contents of a macro definition, but different in that it also performs $1 substitution more like a regular macro expansion. - -- Don't work too hard, make some time for fun as well! Eric Blake e...@byu.net -BEGIN PGP SIGNATURE-

Re: expansion

2009-11-30 Thread Eric Blake
entation for the next person to read about issues like this. [1] http://www.gnu.org/software/m4/manual/m4.html#Ifdef - -- Don't work too hard, make some time for fun as well! Eric Blake e...@byu.net -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (Cygwin) Comment: Public key

Re: Access macro variable via an expression

2010-01-12 Thread Eric Blake
ments(A, B, C, D, E) using _ as the incrementing counter to track how many arguments have been visited during m4_map_args. -- Don't work too hard, make some time for fun as well! Eric Blake e...@byu.net signature.asc Description: OpenPGP digital signature

GNU M4 1.4.14 released (stable)

2010-02-25 Thread Eric Blake
ion 1.4.14 (2010-02-24) [stable] Released by Eric Blake, based on git version 1.4.13.* ** Fix regression introduced in 1.4.12 where executing with stdout closed could crash m4 on exit on some platforms. ** Fix regressions introduced in 1.4.13 in the `esyscmd' builtin, where closed f

Re: floating point in M4

2010-05-03 Thread Eric Blake
that knows how to treat it otherwise. So yes, you can transport floating point numbers, as strings, using m4. -- Eric Blake ebl...@redhat.com+1-801-349-2682 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: collecting arguments for esyscmd while sending the output to stdin

2010-07-30 Thread Eric Blake
t; Right now it seems like esyscmd expands undivert($1) but > does not capture the result of the expansion as an argument. Correct - the expansion of undivert is _always_ the empty string; the undiverted text was instead routed to the current diversion without any further m4 scanning. If the curren

Re: random number generator

2010-08-18 Thread Eric Blake
y argument to printf. You can modify your esyscmd to force bash: esyscmd([/bin/bash -c 'printf "$RANDOM"']) -- Eric Blake ebl...@redhat.com+1-801-349-2682 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: random number generator

2010-08-18 Thread Eric Blake
"\"$RANDOM\""') By the way, since mixing `' and shell code is rather painful, that is an argument for using changequote. > Im running M4 on Ubuntu, I don't know if that matters It does matter. Ubuntu defaults /bin/sh to dash. Fedora, on the other hand, leaves /bin/sh as bash. -- Eric Blake ebl...@redhat.com+1-801-349-2682 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: random number generator

2010-08-18 Thread Eric Blake
On 08/18/2010 11:58 AM, Eric Blake wrote: >> printf: 1: usage: printf format [arg ...] > > And dash's /bin/sh does NOT have $RANDOM, so you ended up doing the same > as esyscmd(`printf '). [I hit send too soon; here's some clarifications] dash does not own /bin/s

Re: random number generator

2010-08-18 Thread Eric Blake
o type number and get a number kicked back. But what else am > I missing? One other thing to try is m4's debugmode; 'm4 -daeqt' can prove rather invaluable for tracing every single macro call. -- Eric Blake ebl...@redhat.com+1-801-349-2682 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: random number generator

2010-08-18 Thread Eric Blake
Bah. Problem of quoting. "" interpolates within the outer shell, so you _also_ need to escape the $ to have it make it to the inner shell. define(`number',`esyscmd(`/bin/bash -c "printf \"\$RANDOM\""')')dnl That's why I like [] better than `'

GNU M4 1.4.15 released [stable]

2010-08-31 Thread Eric Blake
stable] ** Fix regression introduced in 1.4.9b where the `format' builtin could crash on an invalid format string. ** Fix compilation against newer glibc, and on AIX 7.1BETA. ** A number of portability improvements inherited from gnulib. -- GNU M4 team Eric Blake

Re: Having Trouble with m4 Input (m4 version 1.4.13)

2010-09-03 Thread Eric Blake
-quote define, or use other tricks to ensure that you don't inadvertently end up expanding the define built-in with zero arguments (GNU m4 explicitly documents that the define built-in when invoked with zero arguments expands to it's own name, as if it hadn't been a macro,

Re: Having Trouble with m4 Input (m4 version 1.4.13)

2010-09-03 Thread Eric Blake
o be shorthand for including the file in-place every time Min is expanded. -- Eric Blake ebl...@redhat.com+1-801-349-2682 Libvirt virtualization library http://libvirt.org

Re: Having Trouble with m4 Input (m4 version 1.4.13)

2010-09-03 Thread Eric Blake
] works well. But if you use m4 to pre-process files into html, then `' generally works. You may also try the style of using quote strings that are longer than one byte, which is less likely to occur within the text being quoted. -- Eric Blake ebl...@redhat.com+1-801-349-

Re: patsubst: multiline text

2010-09-06 Thread Eric Blake
he first line: patsubst({-}patsubst({{ml_text}}, {^}, { }), {^- }, {- }) (Untested, but hopefully gives you enough ideas). -- Eric Blake ebl...@redhat.com+1-801-349-2682 Libvirt virtualization library http://libvirt.org

Re: patsubst: multiline text

2010-09-08 Thread Eric Blake
n mirrors glibc). But, as has recently been noted on this list, M4 2.0 is a ways off (mainly due to lack of developer time). -- Eric Blake ebl...@redhat.com+1-801-349-2682 Libvirt virtualization library http://libvirt.org

Re: patsubst: multiline text

2010-09-08 Thread Eric Blake
On 09/08/2010 03:45 PM, clemens fischer wrote: Eric Blake wrote: M4 1.4.x only supports the glibc emacs flavor of regexp. M4 2.0 has improved regex support, allowing you to choose different flavors supported by glibc, such as strict posix, extended regex, and so forth, but still needs

Re: Process only sections of a file? (newbie)

2010-09-15 Thread Eric Blake
tside tags). Is that possible? changecom(`') will treat all sequences as comments, and thus not do any m4 processing of that portion of the text. -- Eric Blake ebl...@redhat.com+1-801-349-2682 Libvirt virtualization library http://libvirt.org

Re: Process only sections of a file? (newbie)

2010-09-17 Thread Eric Blake
On 09/17/2010 09:40 AM, Gary wrote: Eric Blake wrote: On 09/15/2010 03:49 AM, Gary wrote: Sorry if this is obviously documented somewhere, but I couldn't find it (or perhaps found it and didn't understand it...). What I would like to do is only have m4 process certain sections

Re: Process only sections of a file? (newbie)

2010-09-20 Thread Eric Blake
won't exist, because it is a git symlink to the gnulib submodule, but since you are insisting on a CVS mirror checkout instead, which doesn't understand git symlinks, that explains why it doesn't exist for you. -- Eric Blake ebl...@redhat.com+1-801-349-2682 Libvirt virtualization library http://libvirt.org

Re: macro name with `:'

2010-09-21 Thread Eric Blake
built bleeding edge m4.git (which will someday become m4 2.0), you can use the changesyntax() builtin to do all that changeword was doing, and more, and without the speed penalty. But that means relying on unreleased software, which is subject to change. -- Eric Blake ebl...@redhat.com+1-801-349-2682 Libvirt virtualization library http://libvirt.org

Re: M4 and dependencies

2010-09-29 Thread Eric Blake
papers. -- Eric Blake ebl...@redhat.com+1-801-349-2682 Libvirt virtualization library http://libvirt.org

Re: How to not expand in strings

2010-10-01 Thread Eric Blake
in part of m4 would be nice, but no one has contributed code. -- Eric Blake ebl...@redhat.com+1-801-349-2682 Libvirt virtualization library http://libvirt.org

Re: [PATCH 1/2] docs: mention more history

2010-10-21 Thread Eric Blake
On 10/21/2010 01:15 PM, Eric Blake wrote: I'd like to release 1.4.16 soon to correct some build bugs on several platforms that have since had gnulib fixes. As such, I'm pushing this now and will soon have a snapshot available for testing. http://people.redhat.com/eblake/m4/m4-1.4.

Re: making sense of m4 sources.

2010-12-31 Thread Eric Blake
way to learn the differences between the code bases is to compare related patches between the branches. -- Eric Blake ebl...@redhat.com+1-801-349-2682 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

GNU M4 1.4.16 released [stable]

2011-03-01 Thread Eric Blake
n 1.4.11 and a false negative in 1.4.15. ** A number of portability improvements inherited from gnulib. -- Eric Blake ebl...@redhat.com+1-801-349-2682 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: Simple method of including a file that bypasses macro expansion

2011-07-18 Thread Eric Blake
hich I will call 'oinclude' such that include(a) oinclude(b) expands to hello and goodbye world. include(`a') undivert(`b'). -- Eric Blake ebl...@redhat.com+1-801-349-2682 Libvirt virtualization library http://libvirt.org

Re: Noob needs help with examples/foreachq

2011-08-24 Thread Eric Blake
emachine.m4') At which point, adding in your double-quoted comma would look like: define(`from_states', `foreachq(`y', `$@', `y`, '')') Hmmm, what happened to State1? I know I'll need to do a counter or something to eventually not add an extra comma, but now it seems the $@ isn't right. Your problem is that because you were underquoting arguments, m4 started treating the comma as an argument separator, rather than as a literal string, so you ended up calling statemachine() with (way) more than the intended 4 arguments. -- Eric Blake ebl...@redhat.com+1-801-349-2682 Libvirt virtualization library http://libvirt.org

Re: import-environment in release

2011-09-22 Thread Eric Blake
s the beta tarball 1.4n, but that version doesn't play well with modern autoconf, and it is not available in any stable release. -- Eric Blake ebl...@redhat.com+1-801-349-2682 Libvirt virtualization library http://libvirt.org

Re: An m4 puzzlement.

2011-12-14 Thread Eric Blake
ows selecting different regex flavors (m4 1.4.x defaulted to emacs flavor, which lacks RE_CHAR_CLASSES, but the goal is to allow the posix flavor which includes RE_CHAR_CLASSES). Until then, unfortunately, the best I can suggest is to instead write your regexp as `^[a-zA-Z]*$'; this has no loss in

<    1   2   3   4   >