Re: M4 Installation Under Windows

2011-12-22 Thread Eric Blake
list tends to favor free software compression methods (gzip, xz, ...) over the proprietary zip format. -- Eric Blake ebl...@redhat.com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: very basic question incr

2012-01-11 Thread Eric Blake
ck overflow > > I would appreciate being told the simple idiom I am trying to write. Once I > understand incr() I assume I could use eval(x *2) to produce doubling Indeed: define(`count', `0') define(`count', expr(count * 2)) -- Eric Blake ebl...@redhat.com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: very basic question incr

2012-01-11 Thread Eric Blake
and our public macro Now, every time you expand count, that results in the expansion of the current value of _count, as well as code to redefine _count to the next value. The same trick can be used with expr instead of incr when operating on the internal macro (basically, incr(value) is short for expr(value+1)). -- Eric Blake ebl...@redhat.com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: General outline of what I'm trying to do

2012-01-13 Thread Eric Blake
gnu.org/software/m4/manual/m4.html#Forloop define(`forloop', `pushdef(`$1', `$2')_forloop($@)popdef(`$1')')dnl define(`_forloop', `$4`'ifelse($1, `$3', `', `define(`$1', incr($1))$0($@)')')dnl define(`__genbit', `forloop(`__i', ifelse(`$2', `', __bit, `$2'), `$3', `\t"$1`'__i", ')dnl')dnl -- Eric Blake ebl...@redhat.com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: asterisks, dollar signs and percent signs!

2012-05-01 Thread Eric Blake
t) or changesyntax() (not yet released): indir(`$entry') call printf indir(`$exit') but that's not the clean syntax you were looking for. Hope that helps. -- Eric Blake ebl...@redhat.com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: prehistory of m4

2012-05-30 Thread Eric Blake
on. Is this something you would be interested having in the GNU M4 manual? If so, would you be able to help refactor this text into an actual patch to the m4 sources? -- Eric Blake ebl...@redhat.com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Descript

Re: A few gnu M4 extensions

2012-10-19 Thread Eric Blake
out it. > > Besides, we would like to say "thanks a lot!" to the whole team of gnu M4 > maintainers ! > > Gwenael & Thomas > -- Eric Blake ebl...@redhat.com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: A few gnu M4 extensions

2012-10-19 Thread Eric Blake
want a tgz of our directory ? Not yet. I don't want to pollute myself by reading your code until we are certain that copyright considerations are taken care of first. -- Eric Blake ebl...@redhat.com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: A few gnu M4 extensions

2012-10-19 Thread Eric Blake
the interest of protecting the FSF's existing copyright on the current m4 code base, the M4 package itself is open source and the GPL even guarantees you the right to make your changes public, just as it guarantees me the right to choose whether or not to read your changes. I hope I'm

Re: /usr/bin/m4: unrecognized option '--gnu'

2013-01-23 Thread Eric Blake
install'. Much as you would do for any GNU software. Whether or not there is a pre-built version of a newer m4 binary floating around in the AIX community is something that you would have to ask AIX folks about, since this list is only concerned with the source code distribution. -- Er

Re: [RFC] release 1.4.17?

2013-09-23 Thread Eric Blake
d now. > > Any reason to not roll up 1.4.17 from the current HEAD of branch-1.4? I'll > roll it sometime this week unless someone asks me not to :) Thank you for tackling that! -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org

Re: macros defined w/different quotes than m4sugar.m4; want to use m4sugar.m4 macros

2013-11-05 Thread Eric Blake
; in m4sugar.m4? Alas, m4 doesn't provide a push/pop stack of quotes, and m4sugar.m4 is quite hard-coded to exactly [] as the quoting characters. I'm afraid you'll have to do manual translation of the macros that interest you into your preferred quoting style. -- Eric Blake

Re: [SCM] GNU M4 source repository branch, branch-1.4, updated. v1.4.17-5-gcf5cbd2

2014-04-04 Thread Eric Blake
.643-c09a1-dirty":*$ ./bootstrap --skip-po Do NOT use the master branch (1.9a...) for bootstrapping. It is highly experimental still, and NOT ready for release yet. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: [SCM] GNU M4 source repository branch, branch-1.4, updated. v1.4.17-5-gcf5cbd2

2014-04-04 Thread Eric Blake
ok.com owner ever deciding to become more standards-compliance, which is unlikely). > I think the conversation should be between the email server maintainers > (gnu, outlook). A conversation between server owners won't make a difference. The problem is not in GNU's servers. -- Eric

Re: named arguments in m4?

2014-04-21 Thread Eric Blake
xperimental and nowhere near a release) agrees with you, and did attempt to add named argument support. But we're a long way off from ever making it actually useful enough to release; right now, the development is focused on the stable branch-1.4 branch. -- Eric Blake eblake redhat co

Re: Recommended m4 macro naming convention?

2014-05-02 Thread Eric Blake
ed macros with "function" > behavior (just like some C lowercase macros, eg, isascii), and use > UPPER_CASE for "pure" macros (simple substitution)? Again, that's more up to your project, and what you want to document and maintain for your local use of m4. -- Eric Bl

Re: Any basic cpp capability m4 cannot do?

2014-05-09 Thread Eric Blake
not necessarily efficiently). cpp can be abused to emulate Turing completeness, although it is even hairier than m4's Turing completeness: https://stackoverflow.com/questions/3136686/is-the-c99-preprocessor-turing-complete -- Eric Blake eblake redhat com+1-919-301-3266 Li

Re: Any basic cpp capability m4 cannot do?

2014-05-10 Thread Eric Blake
tasks, merely that all tasks that can be done in finite resources can be done in that language. You are correct that different languages have different strengths, and that m4's strength is in pre-processing tasks, while other tasks easy in many languages are rather convoluted in m4. --

Re: Suggestion to add ifndef builtin macro

2014-05-15 Thread Eric Blake
27;, `MACRO_1' defined, `MACRO_1' NOT defined) > m4_ifndef(`MACRO_1', `MACRO_1' NOT defined, `MACRO_1' defined) > Yes, if you write your m4_ifndef wrapper as above. > > $ cat ifndef-02.m4 > m4_define(`m4_ifndef', `m4_ifdef(`$1', `$3', `$2'

Re: Suggestion to add ifndef builtin macro

2014-05-19 Thread Eric Blake
as for a general-purpose library of m4 composite macros, I don't really know of anything designed for that purpose. But we could certainly document an m4_ifndef macro in the M4 manual, since it would be a useful teaching tool. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: Suggestion to let m4 discard comments

2014-06-05 Thread Eric Blake
ars ago on the master branch. Alas, the master branch is lacking some TLC and is in no shape for active use without more patches, and backporting that patch to the stable branch-1.4 is a bit invasive. http://git.savannah.gnu.org/cgit/m4.git/tree/doc/m4.texi#n656 -- Eric Blake eblake redhat com

Re: Suggestion to allow macros that don't expand within "string"

2014-06-18 Thread Eric Blake
teach input.c how to parse double-quoted strings, and figure out what new builtin macro to add to be able to toggle whether double-quoted strings should be treated specially (and even what their delimiter is) from that point on in the processing. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: Are frozen files really that hot?

2014-07-01 Thread Eric Blake
7;re not mandatory to use. But at this point, we can't rip it out of m4 - there are users that depend on it. The code is designed to not penalize people that aren't using it. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: Are frozen files really that hot?

2014-07-03 Thread Eric Blake
s. While it can be quite powerful at what it does, there doesn't seem to be many people flocking to use it. Whether that is because people don't know about it, or because m4 only fits a niche market, it's hard to justify adding features when there is already such a low volume of contribution and a lack of free time on my part to write new patches. I'd love to review patches from others - but such patches are rarely submitted. I _do_ like suggestions for improvement, but with the limited time I spend on m4, I like it more when those suggestions are accompanied by an implementation that demonstrate the improvement rather than just describing it in prose. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: Wondering why m4 ignored namespace concept

2014-07-15 Thread Eric Blake
d obscurity. Anyway, the purpose of > this post, if anyone still reading, :) is to: > > 1) Find out the reasoning (if any) why the original decision was made > not to always preface builtins with m4_ prefix. Because GNU m4 was just copying what others had already done, and then addin

Re: Wondering why m4 ignored namespace concept

2014-07-17 Thread Eric Blake
why do you say "was to allow modules" (not "is")? Is modules idea > thrown out? Is there a list of other ideas for "eventual m4 2.0"? The problem, as you may have noticed, is lack of developers with enough free time to push m4 2.0 to completion. Unless that chan

Re: Better way to interpret $N as dollars, not macro argument?

2014-08-15 Thread Eric Blake
ite such a patch. http://www.worldcat.org/title/users-guide-to-the-m5-macro-language/oclc/25491290 (Hmm, I know at one point I was able to read a pdf about M5 at no charge, but can't seem to find a URL for it via a quick search today) -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: How to install m4...

2015-02-16 Thread Eric Blake
e; that includes a pre-built version of both 'm4' and 'autoconf', along with other tools you will need to be able to compile software while in Windows. No need to go through the pain of bootstrapping your system when you can already get things ready to use. -- Eric Blake ebl

Re: Make m4 only call macros surrounded by brackets.

2015-03-02 Thread Eric Blake
m4 gpp.m4 > Got object file from memory but can't read symbols: File truncated. > A segfault is never good. Can you please post the contents of gpp.m4, show the exact version of m4 you are testing, and possible provide more of the backtrace, so that we can debug what went wrong? --

Re: Make m4 only call macros surrounded by brackets.

2015-03-03 Thread Eric Blake
On 03/03/2015 07:38 AM, Zack Piper wrote: > On Mon, Mar 02, 2015 at 06:53:56AM -0700, Eric Blake wrote: >> On 02/28/2015 04:21 PM, Zack Piper wrote: >> >>> >>> Hm, I found out how to do it. Unfortuently it seems to segfault when using >>> "changewor

Re: /Library/Developer/CommandLineTools/usr/bin/gm4: unrecognized option `--gnu'

2015-04-01 Thread Eric Blake
You could always build it yourself; 1.4.17 is here: http://ftp.gnu.org/gnu/m4/ -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: escaping backticks (`)

2015-04-09 Thread Eric Blake
quoting rules. Remember that autoconf intentionally went with [ ] as the quoting characters, because they were much likely to be balanced in output, as opposed to ` and ' not occurring in balanced pairs in shell scripts. In fact, choosing 2- or 3-byte quoting strings is even less ambiguous, alt

Re: safe define

2015-05-11 Thread Eric Blake
es quoting tricks to pass a literal $# and $0 to the inner function, and the inner function that then does the desired define using the literal strings in the right place. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: How substitute a name as part of a string

2015-05-13 Thread Eric Blake
ctly; you may want to use m4 with changequote done fairly early so that the rest of your scripting can use quoting more convenient for the shell. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: Can m4 be built without automake?

2015-06-15 Thread Eric Blake
GNU Autoconf 2.69 for GNU Autoconf 2.69." as a result of my repeated bootstrapping). -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: Can m4 be built without automake?

2015-06-15 Thread Eric Blake
first need to debug why it is not working for you. 'missing' is maintained by automake, so you may get more help on that mailing list. Or you could just go ahead and install 'GNU make' first, and put it on your path ahead of whatever unusual system make you are using, so that it no longer prints out the weird FSUM prefixes that confuse the rest of the build chain. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: Can m4 be built without automake?

2015-06-16 Thread Eric Blake
> # corresponding '.texi' files > touch doc/*.info Another thing to try: can you unpack an older GNU m4 tarball, one that was generated with automake 1.12 or newer (1.4.16 should fit the bill), and see if that builds just fine, because it used the older semantics of 'missing' that don't kill the build? If so, another thing to try to pinpoint the 'missing' script as the culprit would be to reproduce the unpacking timestamp skews in both 1.4.16 and 1.4.17 working directories, but then swap the 'missing' script between the two trees, before trying to build, and see if the swap causes the build failure to migrate to the build tree with the newer version of 'missing'. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: aclocal using automake Automake::XFile

2015-12-08 Thread Eric Blake
f you don't actually have a file named 'zupa' handy; and particularly since the aclocal usage is trying to use perl's open("command |") notation, not open("file") notation. Could it also be a problem with your particular build of perl, or maybe a newer version of perl has introduced some backwards incompatible change that autoconf/automake now need to work with? -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: How to automatically replace date string with m4?

2016-01-18 Thread Eric Blake
) to pick something that mixes nicer with shell (the way autoconf picked [] rather than `' for that very reason). -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: Help on M4 Usage

2016-04-29 Thread Eric Blake
ease help me to know > whether my requirement is achievable without modifying the .M4 definition > file? I'm coming up blank; looks like you'll have to modify your .M4 definition file. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: Help on M4 Usage

2016-04-29 Thread Eric Blake
unlike the C preprocessor, m4 does not have a way to identify C strings where macros are not to be expanded. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

m4-1.4.18 released [stable]

2016-12-31 Thread Eric Blake
1.4.18 (2016-12-31) [stable] ** Diagnose --word-regexp as unsupported if it was not configured. ** Preliminary support for OS/2. ** A number of portability improvements inherited from gnulib. -- Eric Blake signature.asc Description: OpenPGP digital signature

Re: Future Development of m4

2017-01-09 Thread Eric Blake
een on the list for several years but gone unreviewed due to lack of development time. > > I'm following m4-patches and Eric Blake has uttered several times something > along "development's going on as long as I manage to find some spare time," > and I respect tha

Re: Strings to Macro

2017-01-20 Thread Eric Blake
ans the overall result for a macro name: define(`concat', `$1$2')dnl forloop(`i',`1',APP_DOMAINS, `concat(`VARIABLE_APP_PORT',i)' ) -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: --discard-comments

2017-03-22 Thread Eric Blake
veloper time. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: Way for macro to know it's indentation in source?

2017-05-08 Thread Eric Blake
t the macro output should be indented; > would be nice to automate. Sorry; there's the builtin __line__, but that's as fine as the granularity gets for now. You'd have to patch m4 to add a new builtin for tracking column position. It sounds like your workaround is the best

Re: GNU M4 help

2017-07-17 Thread Eric Blake
4/m4.html currently 1.4.18 The EOL of open source software is a tricky thing to predict - there is no fixed release schedule, and therefore, all the more we can promise is that a version is not EOL until the next version is released. -- Eric Blake, Principal Software Engineer Red Hat, Inc.

Re: GNU M4 help

2017-07-17 Thread Eric Blake
On 07/17/2017 07:08 AM, Eric Blake wrote: > On 07/17/2017 06:17 AM, anindo.bur...@wellsfargo.com wrote: >> Hi, >> Can you please tell me the latest version of GNU M4 and its EOL , also can >> you please tell me the EOL of all the previous versions of GNU M4. > > T

Re: changequote oddity

2017-07-20 Thread Eric Blake
> ' ...and it takes this ' to end the quote, resulting in the literal output "ticks) " > $ m4 f > expandticks (```) > expandticks (ticks) > I don't know what you WANTED to have happen, but m4 did everything you asked it to do. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org signature.asc Description: OpenPGP digital signature

Re: tail calls

2017-10-31 Thread Eric Blake
instead patched autoconf itself to avoid some pointless copying by using smarter iteration in the first place rather than naive recursion that triggered m4's O(n^2) behaviors. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org |

Re: m4-latest on http://ftp.gnu.org/gnu/m4/ not latest

2018-01-03 Thread Eric Blake
On 12/29/2017 02:04 AM, Simon Matter wrote: > Hi, > > I just wanted to mention that the m4-latest.tar.* files on > http://ftp.gnu.org/gnu/m4/ are not the latest but an older version. Thanks for the report; I'll see if I can figure out how to update the symlinks properly

Re: one input producing multiple ouput

2018-02-19 Thread Eric Blake
multiple passes with different sets of macros? Yes, producing multiple output files is done by running m4 multiple times. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org

Re: passing a parenthesis character

2018-03-08 Thread Eric Blake
a quoted rather than bare unmatched parenthesis: define(`c', ``('') which may be what you want depending on where you expand the macro "c". In general, life with mismatched parenthesis can be tricky, but it's puzzlers like that which are fun to help on, so feel free to ask further related questions. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org

Re: Print literal $0 value

2018-07-07 Thread Eric Blake
separate $ from 0. And if all else fails (that is, if you come up with situations where nested quoting doesn't play nicely with what you have), you can always create a helper macro: define(`_my_macro', `/$1/ { print $$2 }') define(`my_macro', `_$0(`$1', 0)') whe

Re: m4_patsubst equivalent of: sed -e 's~(~%28~g' -e 's~)~%29~g'

2018-08-29 Thread Eric Blake
r-quoted string for each pattern to be substituted, then removes the overquotation at the end of the recursion, with the drawback that ^ and $ anchors don't work quite as expected (but your example sed script did not use anchors). -- Eric Blake, Principal Software Engineer Red Hat, Inc.

Re: Multiple successive "patsubst"s…

2018-09-19 Thread Eric Blake
f you paste what you've tried. Note that one-character quotes that might occur imbalanced in your text are inherently difficult to manage correctly through pattern substitutions; using a two-character quote delimiter that is unlikely to appear in any of the text you are processing can make life much easier (I chose [[ and ]]). -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org

Re: A little m4 puzzle

2018-11-12 Thread Eric Blake
ot with your lack of proper quoting. And the builtin can handle any two strings, not just strings that are valid as part of a macro name. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org

Re: Standard way to use m4sugar

2018-11-26 Thread Eric Blake
ovide a warning to the end user). So unless you are planning on preserving the perl wrapper around m4, there is not much point in porting the m4sugar language to pure m4. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org

Re: ignore information from included with -dV

2018-11-26 Thread Eric Blake
nd line -d argument can control. Thus, your solution is to define a wrapper around the 'include' macro which temporarily turns off debugging, includes the file, then reinstates debugging. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtu

Re: Continuous integration for m4

2018-12-10 Thread Eric Blake
ing that things build locally, but that does indeed mean that things can slip in affecting other platforms that a CI system would catch, so I'm not opposed to using one. But at the same time, I don't have the resources to administer a CI system myself. -- Eric Blake, Principal Softw

Re: test case test-getopt-posix failed

2019-04-24 Thread Eric Blake
gt; > https://github.com/habitat-sh/core-plans/blob/master/m4/fix-test-getopt-posix-with-glibc-2.26.patch Thanks; I guess it means I need to look into releasing an updated m4 against a newer gnulib. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtua

Re: Trouble with m4 on linux

2020-07-29 Thread Eric Blake
. Otherwise, we're completely guessing as to what you did and why it triggered some unspecified error. In all likelihood, the problem is not a bug in m4 but a misunderstanding on your part about how to use it. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301

Re: Is it possible to expand macro just once?

2020-10-12 Thread Eric Blake
f $, which may introduce its own oddities if the user supplied a macro definition containing $ that you aren't expanding as a macro. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org

Re: [m4] The source code has been broken for years

2021-05-07 Thread Eric Blake
er.hideRefs' > looks like it might be worth investigating, but I'm not certain. > > * Run the following in the bare repository; it should help the user out > by informing 'git clone' which branch to set up as the default: > > $ git symbolic

m4-1.4.18b released [beta]

2021-05-08 Thread Eric Blake
by default. ** Introduce the use of gettext, with the immediate benefit of nicer UTF-8 author names. Over time, more translations of program messages will become available. ** A number of portability improvements inherited from gnulib. -- Eric Blake, on behalf of the GNU M4 team

Request to reinstate project: m4-1.4.18b.pot

2021-05-08 Thread Eric Blake
get 1.4.19 out the door this month. [3] https://lists.gnu.org/archive/html/bug-m4/2021-03/msg00006.html -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org

maint.mk suggestion for gnupload

2021-05-08 Thread Eric Blake
n the suggested gnupload instructions it generates? -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org

Re: maint.mk suggestion for gnupload

2021-05-10 Thread Eric Blake
On 5/8/21 6:34 AM, Eric Blake wrote: > but it would be a lot nicer if I didn't have to remember to do that > after the fact. In fact, reading gnupload --help says it is as simple > as calling: > > $ gnupload --to ... --symlink-regex ... > > in the first place.

m4-1.4.18d released [beta]

2021-05-11 Thread Eric Blake
g.net --recv-keys A7A16B4A2527436A and rerun the 'gpg --verify' command. This release was bootstrapped with the following tools: Autoconf 2.69 Automake 1.16.2 Gnulib v0.1-4618-gc499a3c497 NEWS * Noteworthy changes in release 1.4.18d (2021-05-11) [beta] ** A number of portabili

Re: m4-1.4.18d released [beta]

2021-05-11 Thread Eric Blake
On 5/11/21 9:44 AM, Eric Blake wrote: > Hello M4 users, > > GNU M4 1.4.18d has been released. This release is a minor update, and > is marked beta in order to give translators the time to upload > translations before the stable 1.4.19 is released later this month. The > b

Re: Request to reinstate project: m4-1.4.18d.pot

2021-05-11 Thread Eric Blake
On 5/8/21 5:53 AM, Eric Blake wrote: > The following beta release includes a new m4.pot, where we would like to > reinstate the m4 translation domain with disclaimers required (since FSF > owns M4 copyright): > > file m4-1.4.18b/po/m4.pot within > https://alpha.gnu.org/gnu/m4

Re: Request to reinstate project: m4-1.4.18d.pot

2021-05-12 Thread Eric Blake
> Op 11-05-2021 om 17:08 schreef Eric Blake: >> m4.pot has been updated with many more strings as part of >> 1.4.18d.tar.xz, announced at >> https://lists.gnu.org/archive/html/m4-discuss/2021-05/msg2.html > > Ehm... you mean: > > https://lists.gnu.or

Re: IF / ELSE / ENDIF macros for M4

2021-05-26 Thread Eric Blake
copyright assignment. Certainly not something that will happen in time for the pending 1.4.19 release, but if there is didactic value in your macros that is not already covered in the manual, it may be worth future consideration. -- Eric Blake, Principal Software Engineer Red Hat, Inc.

Re: ftp site question

2021-05-26 Thread Eric Blake
beta has had enough soak time to get a few translation files submitted). -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org

m4-1.4.19 released [stable]

2021-05-28 Thread Eric Blake
509, as modern systems have enough memory to benefit from fewer hash collisions by default. ** Introduce the use of gettext, with the immediate benefit of nicer UTF-8 author names. Over time, more translations of program messages will become available. ** A number of portability i

Re: request for minor change to canonicalize-lgpl.c

2021-08-06 Thread Eric Blake
he identifier __stat for our own uses now that we know system headers are using it. Once it is fixed there, I need to do another m4 release anyways (1.4.19 has a bug with unintended locale sensitivity when it comes to parsing numbers), so eventually when I get the time, the 1.4.20 release wil

Re: Clang+libgcc issue

2021-08-17 Thread Eric Blake
in contact with people more familiar with your choice of toolchain. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org

Re: Maintaining global state with m4 macros

2021-12-02 Thread Eric Blake
lines] > Lbump(counter)2: In your definition, you did not separate `L' from `bump', so m4 tried to expand the `Lbump' macro (undefined, so output as-is), then stripped the nested quotes. > mvi a, 3 > > Instead I need: > > L2: >

Re: m4 newbie q: ifelse not operating based on the value of sysval

2022-11-29 Thread Eric Blake
; of the mkv macro expansion? That way, instead of matching "mkv", it would > match ".mkv". If you are asking "can m4 treat '.mkv' as a macro name", the answer is no for m4 1.4 unless it was built with --enable-changeword (which penalizes speed performance

Re: m4 newbie q: ifelse not operating based on the value of sysval

2022-12-06 Thread Eric Blake
gt; > > "mkv", it would match ".mkv". > > > > If you are asking "can m4 treat '.mkv' as a macro name", the answer is > > no for m4 1.4 unless it was built with --enable-changeword (which > > penalizes speed performance). But

Re: New Feature : Divert2 to custom named file

2023-01-30 Thread Eric Blake
llowing (note that when I write m4 code to interact with shell snippets, I prefer to use changequote to something less likely to trip up on shell syntax than m4's default of `'): changequote([, ])dnl define([body_h], ...m4 code to produce contents for file.h...)dnl define([body_c], ...m4 code

Re: AUTOCONF error

2023-11-16 Thread Eric Blake
to know what is actually going on - you didn't paste any actual terminal command lines, only one error message; you haven't even mentioned whether you are using WSL, Cygwin, MSYS, or some other Unix-like environment on Windows - so I can't even tell you have to modify PATH. -- Eric Bla

Re: diversion while collecting arguments

2024-06-22 Thread Eric Blake
avior of prioritizing argument collection over macro expansion output (I just tested FreeBSD's m4 at https://instantworkstation.com/virtual-machine to confirm). -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: nonuniform behavior of builtins

2024-09-11 Thread Eric Blake
#x27;, `realdnl`'')dnl() see what I just did? define(`realundefine', defn(`undefine'))dnl define(`undefine', `ifelse(`$#', 0, `errprint(`m4:'__file__:__line__`: Warning: missing argument to `$0' ')', `realundefine($@)')') -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: input file ends with non-newline

2024-12-07 Thread Eric Blake
e unlikely to be in the middle of the included file - at which point you can now treat the entire input file as a single m4 comment which undergoes no further expansion, then trim off your suffix sequence as you sanitize the data. But then you are at the issue of how you detect those first few bytes; perhaps syscmd or esyscmd can be used for that, although it's another set of interesting language barriers when you try to write m4 that produces valid shell code for grabbing untrusted bytes in a sanitized manner. -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: Perhaps it is time for a beta release of ver 1.6 ?

2025-04-04 Thread Eric Blake
iteration, such as pushdef stacks or by the use of GNU m4 extensions such as patsubst() or the ability to address $10 and beyond (POSIX only requires support for addressing up to $9, anything greater requires shift) to rewrite long $@ lists into O(N) processing in m4sugar's m4_foreach. --

Re: Perhaps it is time for a beta release of ver 1.6 ?

2025-04-04 Thread Eric Blake
m should have been fixed by upgrading to more recent gnulib. If it is still broken on the tip of branch-1.4, that is something that will need to be fixed before 1.4.20 is released. I haven't hit a libsigsegv link failure on my development machine, but part of the release process is trying to build elsewhere. -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: m4p: an implementation of GNU m4 in Python

2025-05-12 Thread Eric Blake
, line 8, in sys.exit(main()) ^^ File "/home/eblake/m4p/m4p/main.py", line 27, in main _main() File "/home/eblake/m4p/m4p/main.py", line 102, in _main parser.parse() File "/home/eblake/m4p/m4p/parser.py", line 511, in parse args = self.consume_arguments() ... ~2500 lines later... RecursionError: maximum recursion depth exceeded 120 -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: m4p: an implementation of GNU m4 in Python

2025-05-10 Thread Eric Blake
ream ModuleNotFoundError: No module named 'm4p' Maybe it's my naivete with python, but unless I can figure out how to run your code, I can't compare it against the C version to spot out where you are still incomplete in your implementation. -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

m4-1.4.20 released [stable]

2025-05-10 Thread Eric Blake
. Autoconf needs GNU 'm4' for generating 'configure' scripts, but not for running them. There have been 69 commits by 4 people in the 206 weeks since 1.4.19. See the NEWS below for a brief summary. Thanks to everyone who has contributed! The following people contributed changes

Re: m4p: an implementation of GNU m4 in Python

2025-05-10 Thread Eric Blake
. I have not had any > benchmarks, but from roughly looking at > how long tests take I'm measuring a 100x slowdown. I'm hoping to > rewrite it in Rust later to address that. > > Regards, > Nikolaos Chatzikonstantinou > -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: Order of operations should follow order of warnings in eval

2025-05-13 Thread Eric Blake
will find that you need to tweak m4p's eval to match: $ m4 eval(-1%3) -1 eval((0x7fff+2)%3) -1 $ m4p eval(-1%3) 2 eval((0x7fff+2)%3) 0 -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: Order of operations should follow order of warnings in eval

2025-05-13 Thread Eric Blake
alue diff --git i/m4p/parser.py w/m4p/parser.py index c387e1a..175df28 100644 --- i/m4p/parser.py +++ w/m4p/parser.py @@ -862,13 +862,17 @@ class Parser: self.info( pathname, line, b"divide by zero in eval: %b" % arg_expression ) +case CalcInfo.MOD_BY_ZERO: +self.info( +pathname, line, b"modulo by zero in eval: %b" % arg_expression +) case CalcInfo.NEGATIVE_EXP: self.info( pathname, line, b"negative exponent in eval: %b" % arg_expression, ) -case CalcInfo.INVALID_UNARY_OP | CalcInfo.INVALID_BINARY_OP: +case CalcInfo.INVALID_OP: self.returncode = 1 self.info( pathname, line, b"invalid operator in eval: %b" % arg_expression -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: m4p: an implementation of GNU m4 in Python

2025-05-12 Thread Eric Blake
On Mon, May 12, 2025 at 09:16:29AM -0500, Eric Blake wrote: > [Dropping automake; at this point, m4-discuss is the best place to > discuss how m4p is progressing] > Another bug you need to fix: $ echo divnum | m4p 1 $ echo m4_divnum | m4p -P $ all of the builtins appear to be broken w

Re: m4p: an implementation of GNU m4 in Python

2025-05-12 Thread Eric Blake
d when I get back home. Another one that is hopefully easy: $ printf 'divert(2)2\ndivert(1)1\n' | m4 1 2 $ printf 'divert(2)2\ndivert(1)1\n' | m4p $ Non-negative diversions are not being dumped automatically at end of input. -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: m4p: an implementation of GNU m4 in Python

2025-05-12 Thread Eric Blake
On Mon, May 12, 2025 at 10:24:12AM -0500, Eric Blake wrote: > On Mon, May 12, 2025 at 09:54:54AM -0500, Nikolaos Chatzikonstantinou wrote: > > > $ echo 'eval(1 || (1/0))' | m4-1.4.20 > > > 1 > > > $ echo 'eval(1 || (1/0))' | m4p > >

more m4p bugs

2025-05-16 Thread Eric Blake
define(`a', defn(`defn'))dnl dumpdef(`a') a: dumpdef(a) a: $ m4p dumpdef(`defn') defn: define(`a', defn(`defn'))dnl dumpdef(`a') m4:stdin:4: undefined macro `' dumpdef(a) a: -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: builtin() and warnings

2025-05-14 Thread Eric Blake
b A $ m4p define(a,A)define(b,defn(`defn'))define(c,b(`a'))dnl a b c A A which may be related to how you output the empty string for builtin(`defn') while still outputting "`defn'" for defn directly invoked with zero arguments. -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: how to debug broken patsubst in m4p

2025-05-14 Thread Eric Blake
t;credits" or "license" for more information. >>> import pygnuregex >>> pygnuregex.compile(b"a") Segmentation fault (core dumped) (.venv) -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: Order of operations should follow order of warnings in eval

2025-05-14 Thread Eric Blake
ximately: m4 1.4.19: 100ms m4 1.4.20:60ms# Faster, because I improved eval branch-1.6: 10ms# Faster, because I improved shift($@) iteration m4p:9631ms More importantly, if I double the number in forloop from 1000 to 2000, I see: m4 1.4.19:270ms# More than double - shift

<    1   2   3   4   >