On 10 April 2010 14:36, <[email protected]> wrote: > pkmnfrk > 2010-04-09 19:36:28 -0700 (Fri, 09 Apr 2010) > 710 > Several untested major rewrites in RELOAD > > (Isn't that a catchy header?) > > I joke, they were all tested: > > 1. Instead of using the FB file I/O functions, I switched to the CRT I/O > functions, as they let me load directly into memory buffers
FB's file functions let you load into buffers, and we do it all over the place. But the syntax is UGLY. So ugly in fact that Simon started and I continued redeclaring the rtlib functions implementing GET and PUT and calling them directly without having to remember the BASIC syntatical nonsense: declare function fget alias "fb_FileGet" ( byval fnum as integer, byval pos as integer = 0, byval dst as any ptr, byval bytes as uinteger ) as integer declare function fput alias "fb_FilePut" ( byval fnum as integer, byval pos as integer = 0, byval src as any ptr, byval bytes as uinteger ) as integer I would prefer that we stuck to FB's file functions, so that there'll be less work in switching over to the Lumpfile abstracted file IO, but it shouldn't be too much work to replace all your uses of C file IO when I get around to it. > 2. Instead of using the FB String type, I switched to manually managed > ZStrings for the all-important string table. > 3. Instead of using the FB default memory management functions, I created > some new ones to wrap the private heap feature. Remember: this still only > works on Windows. Other platforms, or if it's disabled at compile time, use > the default heap. > > This should A) Fix bug 831, and B) make everything tons easier to deal with > in the future, RE adding new things. > --- > U wip/reload.bas > U wip/reload.bi > U wip/reloadtest.bas _______________________________________________ Ohrrpgce mailing list [email protected] http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
