Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!usc!rpi!batcomputer!cornell!rochester!kodak!ispd-newsserver!ph From: ph@ssd.kodak.com (Pete Hoch) Newsgroups: comp.sys.mac.programmer Subject: Re: Is there a defacto standard for 'drop ins'? Message-ID: <1991Mar26.184520.11253@ssd.kodak.com> Date: 26 Mar 91 18:45:20 GMT References: <1CE00001.aolmdnz@tbomb.ice.com> <13094@adobe.UUCP> Sender: news@ssd.kodak.com Organization: Eastman Kodak Lines: 44 >><1991Mar21.223638.4346@ssd.kodak.com>, ph@ssd.kodak.com (Pete Hoch) writes: >>> So I was wondering, do they all do it the same way? Should >>> Apple step in and provide a filter manager? Is this hard to >>> do today without Apples help? Also, is this a good idea? >In article <1CE00001.aolmdnz@tbomb.ice.com> time@ice.com writes: >>Most of these mechanisms use a very similar technique. >>However, all differ in content and calling conventions, and it is In article <13094@adobe.UUCP> hawley@adobe.UUCP (Steve Hawley) writes: >Since Pete was interested in a general way of doing filters, why not have >the following (off the top of my head) for byte oriented streams: prototypes deleted >The idea is that the parent program passes in pointer to functions to do all >operations one would need for a stream. The main could then use the ops on >the stream to transform the data as needed: >Of course, this will not be particularly speedy because of the overhead added >by the function calling, but you wanted generality, right? However the overhead could be such a problem that this would not be practical. What I was thinking was something more allong the lines of a call back routine that the programmer supplies to the system. For example: pascal OSErr myFilter( void *source, // The data comes from long sSize, // size of the data in bytes long sNext, // offset to the next sample void *dest, // The data goes to long dSize, // size of the data in bytes long dNext) // offset to the next sample Then you need a way to select and install filters. Perhaps the Comm ToolBox is a good example of this and can be expanded and generalized. Pete -- Pete Hoch | ..somewhere..!kodak!ph ..or.. Color Systems ISPD. 3/65/RL | ph@ssd.kodak.com ..or.. Eastman Kodak Co. | ph@kodak.com Rochester, NY 14650-1805 | 716-722-????