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

Re: Some diffs for MiNT 1.12h3



In <199506061930.AA23170@irs.inf.tu-dresden.de>,
Michael Hohmuth (hohmuth@inf.tu-dresden.de) wrote:

>Martin Koehling wrote:
>
>> Here are some small patches for MiNT 1.12h3 you might find useful.
>
>One more complaint:
>
>> [...]
>> main.c:
>>     Look for the name of the executable file MiNT was started from
>>     by peeking into our parent's DTA area - filenames like MNT12H3.PRG
>>     are now possible (controlled by preprocessor Symbol AUTO_FIX).
>>     (MiNT needs to know its filename in order to be able to execute
>>     programs *after* itself in the AUTO folder...)
>
>Now that I've looked at the code, I think it's kind of kludgy: It may
>easily fail if MiNT has been run from another program (different from
>TOS' AUTO folder scanner), but still before GEM has been run.  In this
>case, it may look at a DTA area completely unrelated to locating the
>MiNT executable.
>I think it's better to keep it the way it is (looking only for
>MINT.PRG and MINTNP.PRG in the AUTO folder).

Yes, it's definitely a kludge - that's the reason get_my_name() takes
the precaution of checking whether the name matches M[I]NT*.PRG; I think
it's _very_ unlikely that the parent's DTA contains a filename matching
this patterns unless it *is* the name of the currently executing
program...

What's the worst thing that can happen?
MiNT might start running programs located after it in the AUTO folder
even if MiNT itself was started from a shell; the very same thing might
happen if the "old" method is used...
And if no copy of MiNT is present in the AUTO folder, *nothing* will
happen in both cases!

>Opinions?

I think the advantages outweigh possible problems - after all, *most*
users will simply put MiNT into their AUTO folders; and I remember several
complaints in comp.sys.atari.* about MiNT not executing programs after it
in the AUTO folder - probably because it was carelessly renamed...

>(Perhaps I should include a "contrib" directory in the release,
>containing patches I haven't applied to my source base but which are
>still useful in certain circumstances?)

Wouldn't it be more useful to add those patches to the source and to
disable them using conditional compilation (if at all possibly)?
That's exactly the purpose of the symbol AUTO_FIX in my patch...

Martin

-- 
 Martin Koehling | mk@anuurn.do.open.de | Martin_Koehling@un.maus.ruhr.de