[clean-list] sfopen sorrows?

John van Groningen johnvg at cs.ru.nl
Wed May 31 16:32:01 MEST 2006


Philippos Apolinarius wrote:
>I don't know how to pose my problem, since I know very little about
>programming. I am preparing myself to take admission examinations to
>universities around the world (SAT, SATII and the like), and also
>proficiency in Chinese. As everybody else in the same situation, I
>use Flash Cards. The Flash Card managerial programs that I happen to
>use are written in Clean.  The Flash Card programs use the
>Functional Fragments to read things like JPG, PDF, compress stuff,
>etc. After using the program for some time (say, two hours), sfopen
>complains that there is an "IOError: sfopen: Too many files". I
>would like to know how to increase the number of files that sfopen
>can open for reading.

Download the source code for the runtime system, change MAX_N_FILES in wfileIO3.c (windows), mfileIO3.c (mac) or ufileIO2.c (linux/solaris),
compile a new _startup2.o (windows) or _startup.o (linux/solaris,
for mac also _startup.xo and _startup.cxo) file and replace the
file(s) in the Clean System Files folder of the StdEnv with the new one.

Files opened by sfopen cannot be closed, so instead the program should use
fopen and close files that are not used any more.

Kind regards,

John van Groningen


More information about the clean-list mailing list