[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#308602: Documentation bug


I was wrong in my last reply to #308602, it is not fixed.

To summarise the current situation (including #241888):

   - absolute pathnames always work, even with dots in it
   - files starting with a dot are always skipped (#308602)
   - relative pathnames don't work (#241888)

The manpage says:

   "You  can  specify  a  specific file, a directory which contains one
   or more files, or the special word all which says to use all the
   standard databases."

So instead of messing with the code, I suggest we simply call it a
documentation bug and change the man page. How about adding the

   "Directories must be specified by absolute pathnames. Filenames
   starting with a dot are ignored."

This way, #241888 and #308602 become usage errors which warrant
wontfix. ;)

JFTR, the code in is_fortfile() is braindead:

 * is_fortfile:
 *      Return TRUE if the file is a fortune database file.  We try and
 *      exclude files without reading them if possible to avoid
 *      overhead.  Files which start with ".", or which have "illegal"
 *      suffixes, as contained in suflist[], are ruled out.
int is_fortfile(char *file, char **datp, char **posp)
    register int i;
    register char *sp;
    register char *datfile;
    static char *suflist[] =
    {				/* list of "illegal" suffixes" */
	"dat", "pos", "c", "h", "p", "i", "f",
	"pas", "ftn", "ins.c", "ins,pas",
	"ins.ftn", "sml",

The use of register variables here is completely superfluous, and
specifying an extension blacklist to skip certain files is naive at
best. If anything, this should have been a whitelist. Or why is .mp3
missing? Or .mkv? ;)

Feel free to do whatever you like with these bugs, I'm not using the
program anymore. ;)

Cheers and sorry for the noise in the previous message, I didn't
carefully check the bug reports.

Reply to: