nmh-workers
[Top] [All Lists]

Re: fmttest(1) Suffers Segmentation Violation.

2021-05-04 03:17:06
Hi Ken,

This dumps core for me.

    fmttest --x y -forma ''

I've had a look at the code and I suspect it's an easy fix related
to spotting no messages have been provided before attempting to loop
from 0 to 0 inclusive and indexing 0-1 but thought it better to
leave the fix to someone more confident in what's meant to happen.
:-)

Oh, strangely enough ... it's because it's trying to call
seq_setprev() with no messages set.

Not for me as I don't have Previous-Sequence set.  git-grep(1) suggests
our test suite doesn't set it either?

So, I guess "-message" is the default.

Oh, it definitely is.  :-)

And that suggests to me if you don't give a message on the command
line, it should default to 'cur' like other nmh programs, unless
people think it makes sense to fail in that case.

fmttest doesn't alter the message so I think ‘cur’ is the correct
default value of ‘msgs’.

(And I realize from reading the man page I never documented what
-file/-nofile means).

fmttest(1) here says

   ‘If the -file switch is given, the arguments are interpreted as
    filenames instead of message numbers, but otherwise the behavior is
    the same (except that the %(msg), %(cur), and %(unseen) function
    escapes will not provide any useful information).’

-- 
Cheers, Ralph.

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