[cc65] fd to IOCB bug, close not recycling IOCBs

From: Thom Cherryhomes <thom.cherryhomes1gmail.com>
Date: 2014-08-14 06:02:46
Ok guys,

I am at the end...of my fucking rope...

I have managed to side-step this for weeks now, but I need to either
figure out if:

(1) this is a problem I am doing, not using something correctly, OR
(2) this is a problem that someone (myself included) needs to fix in
the standard libs for atari.

If I use fopen and fclose enough times, I eventually get an EMFILE
error. No way around it, I've written several pieces of different code
that exhibit this behavior.

I am working on functions for a user database for a BBS, and it has a
test harness that is failing.

The error is shown here: http://i.imgur.com/z4lvizT.png

The code is here:

This is me as a result of this bug:

The files it is accessing are:

* NUMUSERS, a simple counter.
* USER.DAT, the user database
* USER.IDX, the index file.

Once any of these files are done being used, I fclose them. I am
trying to conserve IOCBs as much as I can, because they are so few on
the Atari.

Can anyone help?

To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Thu Aug 14 06:03:09 2014

This archive was generated by hypermail 2.1.8 : 2014-08-14 06:03:11 CEST