[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: how to list text files?
Michael J. Mahon <mjmahon@aol.com> wrote:
>> I thought about these lines as I didn't expect CiderPress to know
>> everything (though it comes close ;o).
>
> Merlin Pro (8-bit) always tacks a ".s" onto a source file name, so
> it's an application convention, not just a programmer convention.
Merlin-16 seems to do it as well.
I put something together that seems to work. It does a quick scan of
the file's contents to see if it's high ASCII with the occasional
low-ASCII space, and that a fair percentage of lines either start with
a space or a full-line comment ('*').
It tends to miss on files that are nothing but equates, since almost
every line starts with a label, so there is room for improvement.
The reformatter has different "confidence levels". Correct format with
filename ending in ".S" gets a "yes", correct format with no ".S" gets
a "maybe", ".S" alone gets a "probably not", and neither gets a "no".
"Yes" and "maybe" cause it to be used as the default conversion for
files of type TXT, "probably not" is non-default but still available,
and "no" means it's not in the drop-down menu.
--
Send mail to fadden@fadden.com (Andy McFadden) - http://www.fadden.com/
CD-Recordable FAQ - http://www.cdrfaq.org/
CiderPress Apple II archive utility for Windows - http://www.faddensoft.com/
Fight Internet Spam - http://spam.abuse.net/spam/ & http://spamcop.net/