OSLib V6.00 alpha

Jonathan Coxhead jonathan at doves.demon.co.uk
Fri Apr 7 23:37:34 BST 2000


   I've just been browsing through comp.sys.acorn.programmer (or 
should that be "comp.sys.acorn.druck.spoiledbrat" :-) ?

   Nicely said!

 | >   So the postfix "_W" should be just "W" in the .swi files---
DefMod 
 | >will convert it to "_w" for C. (It's going to guess wrong for some
 | >edge cases, such as "BPutVW" -> "bput_vw", but I don't see that as
 | >important).
 | >
 | That's what I thought, and what I did to start with. It didn't 
work,
 | so I assumed my reasoning was incorrect. The attachment gives an
 | example of what happens...

   Oh, yes, I remember now ...

   I was also confused about the trailing V on vectors: that's not a 
problem, because it's before the underscore (there isn't one). So 
BPutV -> bputv all along.

   But for the rest, I carefully put in a special case so that 
trailing single capital letters would not get an underscore ... it 
was mainly so that os_writec(), os_writen() would come out nicely.

 | So, is this a DefMod bug, or doesn't it quite work in the way we
 | thought? Otherwise, I'd be inclined to revert to plan A; it doesn't
 | seem to do any harm (unless you know better?). 

   It does seems a bit naughty to put an underscore in a SWI name, 
though I can't think why it would cause any practical problems ... 
the only alternative that springs to mind is making a trailing W an 
exception to the rule that a single trailing capital gets no 
underscore. There's only one other of those in the whole of OSLib---
OS_TransitionKeyW---and that could be an exception to the exception. 
(It would join 2 others: Hourglass_LEDs, which converts to 
hourglass_leds() instead of the algorithmic hourglass_le_ds() and 
OS_CallAVector which converts to os_call_a_vector() instead of 
os_calla_vector().)

   Your call.

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



More information about the oslib-team mailing list