home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!spool.mu.edu!darwin.sura.net!Sirius.dfn.de!chx400!impch!alphanet!sysop
- From: sysop@alphanet.alphanet.ch (Marc SCHAEFER)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: How to store client data in XPR structure ?
- Distribution: world
- Reply-To: sysop@alphanet.ch
- Message-ID: <sysop.0dfw@alphanet.alphanet.ch>
- References: <sysop.0ddm@alphanet.alphanet.ch> <jbickers.0fjr@templar.actrix.gen.nz>
- Date: 12 Sep 92 12:31:26 GMT+2
- Organization: ALPHANET Network First - Colombier (NE), Switzerland
- Lines: 27
-
- In article <jbickers.0fjr@templar.actrix.gen.nz> jbickers@templar.actrix.gen.nz (John Bickers) writes:
- > Do your callback functions even get to see the XPR_IO structure?
- > I was under the impression they didn't, which I think is a flaw in
- > the design. I used a global variable. One drawback of this also is
-
- Yes, a major flaw for reentrant programs (or shared libraries, in my case).
- Callbacks should always be designed with a data pointer freely to use by the
- application (see RawDoFmt()). It should not depend on the program using globals.
-
- I have however found a solution, which consists in storing a pointer to my
- data structure in tc_Userdata. I will test it. However it implies that
- the XPR library does *not* uses tc_Userdata AND that the Task context is not changed.
-
- Btw. Is there somewhere any real doc on callback interface (not the one that
- describes the XPR standard from the user point of view). I found it really
- annoying to figure how it worked by reading other's sources, or by reading
- include files.
-
- Bye Ms...
-
- --
- +------------------_+-----------------------------------------------+
- | Marc SCHAEFER _ //| sysadm@alphanet.ch -or- schaefer@di.epfl.ch |
- | Battieux 6c \X/ | MUD:mud.imp.ch@2345 FTP:liasun3.epfl.ch:/pub2 |
- | 2013 COLOMBIER CH| Week fast response mail schaefer@di.epfl.ch |
- +-------------------+-----------------------------------------------+
- We pay for incoming and outgoing mail, please don't send long files
-