Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!gatech!prism!gt0657c From: gt0657c@prism.gatech.EDU (geoff george) Newsgroups: comp.sys.mac.programmer Subject: MacProtos.h Message-ID: <15187@hydra.gatech.EDU> Date: 15 Oct 90 06:20:14 GMT Organization: Georgia Institute of Technology Lines: 45 I've just started using MacProtos.h, a copy of which I got from the info-mac archives at sumex. (Or maybe UT rice, not certain.) I like it a lot, since I'm compulsive about using what little typing C allows. (Yeah, I know, "Strong typing is for people with weak memories." I used to quote that a lot before ANSI C, but now that I can have type checking on parameters if I want it, well isn't weak memories why we don't all program in binary right down on the bare silicon? But I digress.) I've just encountered a problem. In trying to call FillRect(), I passed it the global "white" and it complained. I looked everything up, and found that IM (I have the promo edition, the old "phone book" I-III) gives the following declarations: TYPE Pattern = PACKED ARRAY [0..7] OF 0..255; VAR white: Pattern; FillRect (r: Rect; pat: Pattern); Think C 4's gives: typedef unsigned char Pattern[8]; extern Pattern white; which makes "white" a "char *". MacProtos.h gives: pascal void FillRect(Rect *r, Pattern *pat); which makes pat a "char * *" or "char * []". I believe that second parameter should be "Pattern pat", not "*pat". I also found the same thing everywhere that "Pattern" occurs in MacProtos.h. Am I missing something, like is Pattern a struct in MPW C or older Think (LightSpeed) Cs, or has no-one used FillRect() and MacProtos.h both in the same program? Out of curiousity, how widely _is_ MacProtos.h used? As I said, I personally love it, since it gives me a little more type checking that Think C has built in for Mac traps. regards, geoff george -- geoff george geoff@remvax.gatech.edu (my vax) or gt0657c@prism.gatech.edu (a touch of warmth from GaTech OCS) "Ordinary f---ing people - I hate 'em. Ordinary person spends his life avoiding tense situations; repo man spends his life getting INTO tense situations."