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

Probs with MiNTLib



>From: Thomas Binder (Gryf) <binder@rbg.informatik.th-darmstadt.de>

>Hi all!
>
>As I played around with the MiNTLibs (PL 42, but the diffs to 43 and 44 show
>no differences in the files concerning my problems) I recognized two things:
>
>- scanf doesn't work properly with plain TOS

As dsb already said, this has been fixed.

>- on TOS 4.01 stderr won't work

>The second problem is due to an error(?) in the Falcon-TOS: Fforce(2, -1)
>returns EINHNDL, so anything written to stderr never appears on the screen.
>As far as I know, this Fforce-call was documented by ATARI, so I wondered why
>it didn't work. I then tried calling Fopen("CON:", 2) and *suprise*: I get
>handle 6, instead of -1 (as said in the german 'Profibuch'). So one solution
>(useable for all TOS-versions) would be calling Fforce(2, Fdup(1)), but since
>Fdup has some severe problems, I didn't use this way. Instead, I tried calling
>Fforce(2, Fopen("CON:", 2)), this works very nice. On old TOSes, the Fopen-
>call returns -1, on newer ones 6 (or higher), and Fforce will work again. The
>only disadvantage of this method is the the handle returned by the Fopen-call
>has to be closed (if it is >= 6), but that can easily be done in function
>exit. What do you think about that?

Does this happen only when running plain TOS 4.01, or also with MiNT?
If it happens with MiNT as well, I'd say this TOS bug is better off
being fixed in the MiNT kernel or in a TOS patch.

Cheers,
entropy

--
entropy -- it's not just a good idea, it's the second law.
Personal mail:      entropy@gnu.ai.mit.edu
MiNT library mail:  entropy@terminator.rs.itd.umich.edu
"what do you have against octal?" -jrb