Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.acorn.programmer > #393

DragAnObject_Start flags bit 17

Date 2011-06-02 22:20 +0100
From Matthew Phillips <mnews@sinenomine.freeserve.co.uk>
Newsgroups comp.sys.acorn.programmer
Subject DragAnObject_Start flags bit 17
Message-ID <32d538dd51.Matthew@sinenomine.freeserve.co.uk> (permalink)

Show all headers | View raw


I have inherited some C code which uses DragAnObject.  While tracking down an
incompatibility with RISC OS 4 I noticed that the call to DragAnObject_Start
had bit 17 of the flags word set, meaning that the C function would be called
back in SVC mode.

I wondered whether this was the cause of the incompatibility (it turned out
not to be) and so removed it.  I had been using the StrongHelp OS manual as
my reference.  However, when reading PRM 5 later I noticed that it says
of bit 17 "1: SVC mode (use for modules; also allows access to statics)".

My use is for a plain application, not a module.

I take it this means that if my function (or functions it in turn calls?)
needs to access any static variables I will need to set this bit.  Do you
think it means statics in the sense of statics declared in that function
(local to the function and retained between calls) or statics declared in
that C source file (global in that file, but inaccessible outside it)?

-- 
Matthew Phillips
Durham

Back to comp.sys.acorn.programmer | Previous | NextNext in thread | Find similar | Unroll thread


Thread

DragAnObject_Start flags bit 17 Matthew Phillips <mnews@sinenomine.freeserve.co.uk> - 2011-06-02 22:20 +0100
  Re: DragAnObject_Start flags bit 17 James Lampard <dontreplytothis@mailinator.com> - 2011-06-03 05:54 -0700
  Re: DragAnObject_Start flags bit 17 Martin Wuerthner <spamtrap@mw-software.com> - 2011-06-03 15:40 +0200

csiph-web