[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MiNT] MiNTlib - new functions
On Sat, 26 Dec 1998 14:49:42 +0100, Guido Flohr wrote:
GF>> 1) keyboard input - something like kbhit() and getch()
GF>
GF>I think these functions are missing on purpose. Correct me if
GF>I´m wrong but I think they were introduced by Borland for
GF>Turbo C (and that´s why they are very popular in M$-DOG
GF>environments). In which header file do you want to declare
GF>them? There is no standard one I think.
ext.h, for example? It doesn´t matter there´s no standard Unix header
file, we can introduce our own one. MiNTlib is the library for easy
writting of applications for Atari computers, isn´t it? So if we put
there some extensions that would cover special features (or bugs) of
Atari OSes I think nobody would mind it.
I simply thought programmers could make use of such functions.
GF>new linker will support weak symbols and this will give a chance
GF>for a clean solution. The library could then define the
GF>symbols "kbhit" and "getch" as weak (so they can be safely
GF>overriden by user-supplied functions)
I don´t need weak symbols, I need to get the _real_ routines into the
library.
GF>I think a select on "/dev/tty" will do the job. Maybe you have
GF>to put the terminal into raw mode before.
GF>As far as I see it, this should work on all OSes, not only MiNT.
select on /dev/ under single TOS? /dev/ does not exist there.
GF>> For example by creating a "ab de" filename GEMDOS really writes the "ab
GF>> de" filename (including the space) to directory entry.
GF>> I thought it would be nice if MiNTlib converted the filename for me.
GF>> Any opinions or algorithms?
GF>
GF>IMHO this is the file system driver´s job, not the library´s.
yes, that´s right, but who´s going to fix the file system driver in
single TOS 1.0?!? Nobody. Or should I write a GDIALOG (cfr. WDIALOG ;)
and let my application force user to install it into AUTO folder? No, I
don´t like this.
So if the routine for converting names to 8+3 is not in a TSR fixing
GEMDOS, it can be in the application itself only. And instead of copying
that function into every single application I ever write or port (or
creating my own pslib - cfr. cflib ;) I would rather put it into the
MiNTlib, since this is the common place for such general routines.
Petr
--
E-mail: stehlik@cas3.zlin.vutbr.cz PARCP developer
WWW: http://cas3.zlin.vutbr.cz/~stehlik/ MiNTOS/Linux user
mirror: http://users.zln.cz/~pstehlik/ Atari 800XL emulation
mirror: http://www.stehlik.cyberstrider.org/ Atari Falcon040