|
yejun Wanderer
Joined: 13 Jun 2005 Posts: 51
|
Posted: Wed Aug 16, 2006 5:18 pm
feature request: next available file number |
I think it should be a system funtion something like %nextfile, which return an unused file numbers.
Currently, in zMud, in order to prevent file number conflict, I close files immediately after use and 3 hard drivers have been destroyed after a few months or days.
A flush command might be useful as well. |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Wed Aug 16, 2006 6:26 pm |
Actually, the entire system for dealing with files and the concept of "file numbers" is something that I plan to improve later with CMUD. The current file handling stuff in zMUD is pretty kludgy. Once the zApp libraries are integrated with CMUD, there are a bunch of new file functions that will be a lot more useful than the restrictive file number stuff.
Early versions of zMUD had no way to deal with "objects". So that's why a file number (handle) was used. It was also left over from the 16-bit memory days when you couldn't even have a dynamic array, which is why it's limited to 10 file numbers (or whatever the limit is). There's really no reason to do stuff this way anymore, except to maintain some compatibility. But new file features are not going to be added to this old system. The old system will be maintained for compability, but you'll be encouraged to use a newer file object system for CMUD. |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4702 Location: Pensacola, FL, USA
|
Posted: Wed Aug 16, 2006 6:29 pm |
i think the limit is actually 5
|
|
_________________ Discord: Shalimarwildcat |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Wed Aug 16, 2006 6:50 pm |
I think there were 10 total, but there are 5 text files and 5 binary files or something really kludgy like that.
|
|
|
|
|
|