nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] Loop support in mh-format?

2012-01-13 20:14:53
Hi Ken,

Staring at the code for fmt_compile.c ... it seems like there's some
support for looping in the format code (%[...]), but I don't believe
it's documented anywhere.  Anyone have any idea how it's supposed to
work?  Or even it it does?

I think the %[...%] is by “JLR”?  do_loop() sets up an FT_DONE that's 1
rather than the normal 0 and then the end of fmt_scan() at finished:
checks if it's true and if so returns the next format instead of NULL,
but only #ifdef JLR.  Without that defined it appears to be ignored so
formatting stops at the first %].  Just from reading, not running, so
could be wrong.  Didn't spot a caller that bothered to check the return
for non-NULL and call again...

Cheers, Ralph.

_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>