home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / sys / amiga / programm / 13294 < prev    next >
Encoding:
Internet Message Format  |  1992-09-12  |  1.9 KB

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