Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site uw-beaver Path: utzoo!watmath!clyde!burl!ulysses!mhuxj!houxm!vax135!cornell!uw-beaver!info-mac From: info-mac@uw-beaver Newsgroups: fa.info-mac Subject: SFGetFile & FileFilter Message-ID: <157@uw-beaver> Date: Wed, 12-Dec-84 15:58:55 EST Article-I.D.: uw-beave.157 Posted: Wed Dec 12 15:58:55 1984 Date-Received: Fri, 14-Dec-84 06:04:42 EST Sender: daemon@uw-beaver Organization: U of Washington Computer Science Lines: 23 From: INTMET@BBNA.ARPA Using the sumacc C system to provide a replacement for the default file filter used with the standard sfgetfile dialog has the usual amout of hair involved with calling a sumacc routine from a toolbox routine expecting a pascal call site. Beyond this I pass on the discovery that a false return value is minus one here and that 1, the usual false value for pascal, or 1<<7 (assuming some confusion about which byte is the boolean) will not work. Thus: FileFilter() { FileParam *a; short *retptr; retptr= (short *)getpargs(&a,sizeof a); *retptr = -1; } Will put up a dialog that offer's no files at all. I assume this is a bug in the toolbox,but it could be a bug in the glue, or the documentation. ps. Has anybody gotten the ".print" driver to work under the original release of sumacc, I havent't found a source for the new release yet. Ben Hyde, Cambridge -------