Path: utzoo!mnetor!uunet!husc6!mailrus!nrl-cmf!ames!pasteur!ucbvax!dewey.soe.berkeley.edu!oster From: oster@dewey.soe.berkeley.edu (David Phillip Oster) Newsgroups: comp.sys.mac.programmer Subject: Re: Goin' Crazy on a Mac, or, How I Love MPW "GlobalData" Message-ID: <23981@ucbvax.BERKELEY.EDU> Date: 8 May 88 16:14:53 GMT References: <8816@eleazar.Dartmouth.EDU> <7327@drutx.ATT.COM> <23952@ucbvax.BERKELEY.EDU> <306@piring.cwi.nl> Sender: usenet@ucbvax.BERKELEY.EDU Reply-To: oster@dewey.soe.berkeley.edu.UUCP (David Phillip Oster) Organization: School of Education, UC-Berkeley Lines: 24 In article <306@piring.cwi.nl> guido@cwi.nl (Guido van Rossum) writes: >The generators mentioned >produce their output as C code (mostly data initializations), so how do >you suggest we create the resource in the first place? It has to be run >through a compiler at some point... My apologies, you are right. I was confused because I've used this technique on a grammar for C and although _all_ the initialized structures were over 32k, no _single_ structure was anywhere close. If you really do have single structures over 32k, of course you can break them into smaller pieces and concatenate them in the tiny one-shot C programs that write their single large piece of initialized data into a resource fork (I usually just have them write to themselves, which is already open, and the default destination of AddResource anyway. Then I manually copy the resource to its final destination using ResEdit.) If the yacc grammar is changing, then I write a small tool to do the resource moving. More commonly, you are porting a working program from some other machine, so this job only needs to be done once. (Why, you could write a one-shot on that other machine that writes the data out as a binary file, port the binary file to the mac, and just copy it into a resource in a tiny program. (Beware of intel et al byte swapping if that other machine isn't a Vax or a 68000.)) It is a pain. The workaround is still simple and short.