Newsgroups: rec.arts.int-fiction
Path: nntp.gmd.de!news.ruhr-uni-bochum.de!news.rhrz.uni-bonn.de!RRZ.Uni-Koeln.DE!news.duesseldorf.ecrc.net!news.ecrc.de!02-newsfeed.univie.ac.at!01-newsfeed.univie.ac.at!voskovec.radio.cz!www.nntp.primenet.com!nntp.primenet.com!howland.erols.net!newsfeed.internetmci.com!news.webspan.net!ix.netcom.com!netcom.com!erkyrath
From: erkyrath@netcom.com (Andrew Plotkin)
Subject: TADS porting question
Message-ID: <erkyrathDzt02p.n09@netcom.com>
Organization: NETCOM On-line Communication Services (408 261-4700 guest)
X-Newsreader: TIN [version 1.2 PL1]
Date: Thu, 24 Oct 1996 23:32:49 GMT
Lines: 40
Sender: erkyrath@netcom.netcom.com

So here's the latest snag I've run into.

TADS thinks that you can refer to a file by means of a pathname, which is 
a C string (null-terminated array of char). On the Mac, this is, when you 
come down to it, false. You can make something that looks like a 
pathname, but you eventually discover that it's a mistake.

I have a scheme which I think will behave correctly. The flaw is, games 
won't be able to store user-chosen pathnames in files. More specifically: 
if you call askfile(), the resulting string will only be meaningful until 
the Mac is turned off or rebooted. So
  str = askfile();
  restore(str);
will work, but if you try to keep str around and maintain its value 
between play sessions (in the save file), it will probably not work.

Similarly, if you write out a data file (the way Lethe Flow Pheonix 
does), and try to put the result of an askfile() in the data file, it 
won't work the next day when the player turns on his Mac, runs the game, 
and tries to read the data file.

(There's no problem using askfile() to *choose* the data file, except for 
the inherent one of insufficient information which I won't go into here.)

Is this too restrictive a limitation?

I can think of a more complex scheme which allows persistent file 
references, but it runs into its own fun: "pathname" strings could be 
arbitrarily long.

Another problem (with both schemes) is that the string returned by 
askfile() won't look much like a file name. I don't believe any 
existing games care about this.

--Z

-- 

"And Aholibamah bare Jeush, and Jaalam, and Korah: these were the
borogoves..."
