Gadget name clashes

Jonathan Coxhead jonathan at doves.demon.co.uk
Tue Apr 4 04:27:48 BST 2000


   Tony wrote,

 | Note that I haven't yet tackled the OS_F issue; I was going to 
leave
 | it 'till later, but it may be worth doing now in order to kill off 
the
 | religious arguments (which would mean a further delay).

   Would you? Could you? Ooo!

 | Comments?

   Please do! It would be fabulous to be able to say "just change 
|os_f| into |os_fw|, and append |_w| to all filing system calls", 
instead of having to say "wait until the 32-bit |os_fw| is done, and 
then change |os_f| into |os_fw|, and append |_w| to all filing system 
calls".

   I suspect even the most vehement supporter of a 32-bit |os_f| will 
change their mind once they realise how easy it is to change to 
|os_fw|. (IMHO.)

   But, do you have anything reasonably complicated that could be 
used to test the changes? Unfortunately, DefMod uses CLib rather than 
OSLib for most of its file handling, but a version could be built 
that used xosfind_openin_w(), xos_bget_w() and xosfind_close_w() in 
"defmod.y", and then all the output files could be compared to make 
sure they were the same before and after ...

   It would be ideal to build a little confidence with the new system 
before releasing it on an unsuspecting world, but that only tests 3 
calls out of a total of ... umm ... lots!

 | BTW, I favour OS_FW over OS_W; I trust there are no objections?

   Not from here ...

 | >   Now, how about font handles ... do we also need |font_w|? 
 | >Including font_find_font_w(), font_lose_font_w(), font_paint_w(),
 | >etc, etc, etc??
 | 
 | Well, do we? My guess is 'yes'.

   I don't think it's worth doing, because of 1 insoluble problem: on 
entry to Wimp_LoadTemplate, R4 points to an array of 256 font usage 
counts, which means that the Wimp can only use fonts with handles <= 
255 in a template (and I bet that if it were to be handed a font 
handle > 255, it would overwrite someone else's memory---just the 
sort of bug we are trying to close the door on by leaving |os_f| at 8 
bits!).

   Until someone at RISCOS Ltd says with some degree of credibility 
that they intend to lift that restriction, and maybe suggests what 
kind of interface will be used as a replacement, I don't think it's 
worth worrying about.

 | Are there any others lurking?

   After a quick examination, I don't see any.

        /|
 o o o (_|/
        /|
       (_/



More information about the oslib-team mailing list