OSLib bug fixes (various)

Tony van der Hoff OSLib at mk-net.demon.co.uk
Fri Jan 12 10:33:14 GMT 2001


On Thu, 11 Jan 2001, at 14:30:48, Timothy Baldwin <tim at reinhouse.freeser
ve.co.uk> wrote on the subject "OSLib bug fixes (various)":

>Attached is a patch which fixes various bugs in OSLib:
>
Thanks, Tim, that's quite a list! I have had a brief look at your
patches, and have also forwarded this to the OSLib-user mail list, which
is the forum where such things get peer reviewed. I suggest you might
like to join that list if you want to take part in any ensuing
discussion. Meanwhile, here are my early thoughts; Please excuse the re-
shuffling below.

The bug fixes are especially welcome; without such feedback OSLib could
not develop:

>+ Fixed null pointer dereferences in IndexHelp, BindHelp and DefMod -cstrong
The SCL, at least, treats null pointers to a string argument to *printf
the same as a pointer to a null string. However, I accept that this
behaviour is not defined, so I guess your proposal makes it more
portable.

>+ 2 SWI numbers corrected in swi.ToolBox.
Good, thank you!

>+ os_int_on() and os_int_off() added as these can be called from user
>   and 32 bit modes.
Really? With valid APCS - this was the reason they weren't included in
the first place.

>+ DefMod no longer ignores errors from ObjAsm
Did it? In that case, good move! What errors are you expecting?

>+ Removed dependency on rm.
What on earth for? You only seem to have introduced another dependency.
It is certainly far better to clean specific targets that your catch-all
*wipe. That is one I can't accept.

>+ SWILib extended to allow it to be used to compile DefMod.
Well, it was always intended to do so. I'm surprised you had problems,
as it seems to work fine here.

>+ Fixed Makefiles using incorrect paths
>   (eg, OSLib on C: and Stubs on CLib: )
It's not incorrect in my environment. If you want to change the
distribution in any way for your own use, that's fine; but you'll have
to maintain it yourself. The point is that not many users feel the need
to build their own library, so putting much effort into supporting this
activity is not IMO an effective use of time.

I do think we deserve a bit more of an explanation of why you consider
the remaining changes to be necessary, or for that matter desirable.
Tinkering with paths may make it more appropriate to your environment,
at the expense of someone else's. I'm all in favour of making it more
general, but some of these seem to be changing things for the sake of
making change, and are certainly a matter of personal taste. I would
hardly call them bug-fixes. Maybe other users will add their opinions.

>+ No need install the Tools now, and they are built as needed.
There is some merit in this.

>+ DefMod accepts -o for all modes, and deletes output file on error.
>+ Makefile changed to use the above.
>+ DefMod checks SWI numbers with |xos_swi_number_from_string|.
>+ BASIC programs detokenised to assist with diff/patch/cvs/rcs.
>+ !OSLib.Sources.HelpData may now be a raFS Dir.
>+ s;0 and s32;0 renamed to s-0 and s32-0 to avoid Makefile problems.
>+ diffs target added to !OSLib.Sources.Makefile.
>+ SWILib now has oslib directory.
>+ Added !OSLib.!CleanAll and !OSlib.Tools.Bin.TrimMake
>+ Tests conditionlised on the presence of the compiler.
>+ Added various clean targets.
>+ Casts from _kernel_oserror* to os_error* in DefMod.
>+ And probally some more I've forgotten.
>+ It now compiles out of the box!
>
>
>Bugs found but not fixed:
>
>+ OSLibSupport files were missing from source ditribution.
OSLibSupport has its own distribution, with source.

>+ Gcc test assumes incorrect location for libgcc (on prerelease 3).
Not in my environment.
>
>The patch requires GNU diffutils to apply (Darren Salt's port ffom
>http://www.youmustbejoking.demon.co.uk).
>
>FYI: I intend to port DefMod to UNIX to use in a RISC OS emulator I intend to
>write.
>
Good luck, that's what open source is all about! Nonetheless, it seems
to me that you'd be better starting by writing your emulator, which
might be generally useful, rather than porting DefMod, which, on its
own, is utterly useless in the UNIX environment. Still, your choice.

-- 
Tony van der Hoff         |  mailto:OSLib at mk-net.demon.co.uk
Buckinghamshire, England  |  http://www.mk-net.demon.co.uk/oslib/
----------------------------------------------------------------



More information about the oslib-user mailing list