home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Mac Game Programming Gurus / TricksOfTheMacGameProgrammingGurus.iso / Information / CSMP Digest / volume 1 / csmp-v1-127.txt < prev    next >
Encoding:
Text File  |  1994-12-08  |  40.3 KB  |  1,161 lines  |  [TEXT/R*ch]

  1. C.S.M.P. Digest             Tue, 30 Jun 92       Volume 1 : Issue 127
  2.  
  3. Today's Topics:
  4.  
  5.     PBLockRange
  6.     HELP: How do traps/selectors work?
  7.     Notification Mgr. Question
  8.     Is MacApp 3.0 available???
  9.     Using Menus during Interrupts???
  10.     Color QuickDraw and GWorlds
  11.     Number of strings in a STR#?
  12.     MPW C and > 32K structs
  13.     How to tell if monitor is in color was(Re: Most efficient bla, bla...)
  14.     Need help with INITs (specifically, patching traps)
  15.     MacBinary format and empty forks
  16.     REWARD OFFERED: Think C Multisegment Driver Problem
  17.  
  18.  
  19.  
  20. -------------------------------------------------------
  21.  
  22. From: dcastell@csg.uwaterloo.ca (David Castell)
  23. Subject: PBLockRange
  24. Organization: Computer Systems Group
  25. Date: Tue, 26 May 1992 17:04:56 GMT
  26.  
  27. In IM-IV is says that the PBLockRange call can be used on files that are
  28. open in shared mode.  However, it has been my observation that this call
  29. can't be used on just any volume, but only works on shared volumes.  Is this
  30. call supposed to work on non-shared volumes?
  31.  
  32. Dave Castell
  33. Computer Systems Group
  34.  
  35. +++++++++++++++++++++++++++
  36.  
  37. From: unity@mcl.ucsb.edu (Pete Gontier)
  38. Date: 29 May 92 16:26:04 GMT
  39.  
  40. dcastell@csg.uwaterloo.ca (David Castell) writes:
  41.  
  42. >In IM-IV is says that the PBLockRange call can be used on files that are
  43. >open in shared mode.  However, it has been my observation that this call
  44. >can't be used on just any volume, but only works on shared volumes.  Is this
  45. >call supposed to work on non-shared volumes?
  46.  
  47. I was playing around with these calls the other day. I found that I could
  48. not only open a shared file on a local volume, but that I could lock a
  49. range on a file opened read-only on a local volume. I don't know if the
  50. calls had any effect, but they did not generate errors.
  51.  
  52. I'm running 7.0.1 tuned with 1.1.1 and no file sharing.
  53. - --
  54.  Pete Gontier // EC Technology // unity@mcl.ucsb.edu
  55.  
  56. ---------------------------
  57.  
  58. From: kevin@crash.cts.com (Kevin Hill)
  59. Subject: HELP: How do traps/selectors work?
  60. Date: 22 May 92 00:58:25 GMT
  61. Organization: Crash TimeSharing, El Cajon, CA
  62.  
  63.  
  64.   I have just purchased books III and IV, and after perusing the globals section
  65. and the system traps sections I have a couple of questions.. 
  66.   Are these address that contain the address of the Toolbox call in question?
  67.   What is a selector?  Can I put in my own routines at these address locations
  68. and have my program do something before the Toolbox call goes? (I know, I have
  69. to save the A5 environment like i found, is there more I would have to watch
  70. for?)
  71.   Thanks!
  72.  
  73.   -Kevin Hill
  74.  
  75. +++++++++++++++++++++++++++
  76.  
  77. From: stevec@Apple.COM (Steve Christensen)
  78. Date: 30 May 92 02:30:20 GMT
  79. Organization: Apple Computer Inc., Cupertino, CA
  80.  
  81. kevin@crash.cts.com (Kevin Hill) writes:
  82. >I have just purchased books III and IV, and after perusing the globals section
  83. >and the system traps sections I have a couple of questions.. 
  84. >  Are these address that contain the address of the Toolbox call in question?
  85. >  What is a selector?  Can I put in my own routines at these address locations
  86. >and have my program do something before the Toolbox call goes? (I know, I have
  87. >to save the A5 environment like i found, is there more I would have to watch
  88. >for?)
  89.  
  90. Traps are not addresses, they are pseudo-instructions.  Executing a trap
  91. "instruction" causes the CPU to dispatch to the appropriate Toolbox or OS
  92. routine (i.e., putting a size into register D0 and executing the $A022 trap
  93. will call NewHandle).
  94.  
  95. Selectors are numbers that are passed to some routines that specify which
  96. of the functions that a particular routine performs.  For example, passing
  97. a selector value of 1 to HFSDispatch causes it to perform the OpenWD function.
  98.  
  99. You can "patch" these trap routines with your own code when you want to do
  100. something in addition to what the routine normally does.  To do this, you
  101. need to call GetTrapAddress to get the address of the original trap routine,
  102. and then call SetTrapAddress to install your routine.  It's your responsibility
  103. to save the original routine's address and call it as part of your patch.
  104. Also, you must observe the register saving convention appropriate for the
  105. trap you are patching, not just saving A5.
  106.  
  107. steve
  108.  
  109. - -- 
  110. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  111.   Steve Christensen            Never hit a man with glasses.
  112.   stevec@apple.com            Hit him with a baseball bat.
  113.  
  114. ---------------------------
  115.  
  116. From: steve.herman%express@freedom.msfc.nasa.gov (Steve Herman)
  117. Subject: Notification Mgr. Question
  118. Organization: Boeing Computer Support Services (BCSS)
  119. Date: Fri, 22 May 1992 20:56:32 GMT
  120.  
  121. Hello all,
  122.  
  123.     Inside Mac Vol VI states that the nmIcon field of an NMRec can contain "a 
  124. handle to a small icon or to an icon family containing a small color icon".  
  125. If I get a handle to an 'SICN' resource and plug it into this field 
  126. everything works fine.  However, if I try to put a handle to an 'ICN#', 
  127. 'ics#', 'ics4' or 'ics8' into the field it doesn't work.
  128.  
  129.     I'm not getting any sort of error on my GetResource call or the NMInstall 
  130. call.  And the NMInstall is placing the mark by my application name under the 
  131. application menu.
  132.  
  133.     Just what is meant by a handle to an icon family?  Does anyone know the 
  134. trick to get this to work?
  135.  
  136. Thanks,
  137.  
  138. Steve  
  139.  
  140.  
  141. - -------------------------------------
  142. Steve Herman - BCSS
  143. "Happiness is just a 'Flaming Moe' away"
  144.     - Moe the Bartender
  145. - -------------------------------------
  146.  
  147. +++++++++++++++++++++++++++
  148.  
  149. From: absurd@applelink.apple.com (Tim Dierks, software saboteur)
  150. Date: 29 May 92 18:10:43 GMT
  151. Organization: MacDTS Misfits
  152.  
  153. In article <1992May22.205632.22328@lambda.msfc.nasa.gov>, steve.herman%express@freedom.msfc.nasa.gov (Steve Herman) writes:
  154. > Hello all,
  155. >     Inside Mac Vol VI states that the nmIcon field of an NMRec can contain "a 
  156. > handle to a small icon or to an icon family containing a small color icon".  
  157. > If I get a handle to an 'SICN' resource and plug it into this field 
  158. > everything works fine.  However, if I try to put a handle to an 'ICN#', 
  159. > 'ics#', 'ics4' or 'ics8' into the field it doesn't work.
  160. >     I'm not getting any sort of error on my GetResource call or the NMInstall 
  161. > call.  And the NMInstall is placing the mark by my application name under the 
  162. > application menu.
  163. >     Just what is meant by a handle to an icon family?  Does anyone know the 
  164. > trick to get this to work?
  165.  
  166. This line was left in the documentation accidentally; at the time, we did
  167. not document the icon utilities, which is what you need to do this.  However,
  168. now we do, and you should examine Tech Note #306, "Drawing Icons the System
  169. 7 Way" for details on creating and using icon families.
  170.  
  171. Tim Dierks
  172. MacDTS, but I speak for the trees
  173.  
  174. ---------------------------
  175.  
  176. From: quesnel@ems (Rene Quesnel)
  177. Subject: Is MacApp 3.0 available???
  178. Date: 28 May 92 11:38:33 GMT
  179. Organization: Faculty of Music, McGill University
  180.  
  181. Does anyone has any idea when MacApp 3.0 will be available? Everybody is
  182. talking about it but at APDA, the official word is that it is not 
  183. shipping yet (except as part of ETO). We have a project to start with
  184. MacApp. If it is going to be released in a couple weeks, we'll wait for
  185. the new version but if it is going to take another six months, we'll
  186. start with 2.0.1. Does anyone have any info on this?
  187.  
  188. Thanks,
  189. Rene Quesnel
  190. quesnel@music.mcgill.ca
  191.  
  192. +++++++++++++++++++++++++++
  193.  
  194. From: ksand@apple.com (Kent Sandvik)
  195. Date: 29 May 92 21:59:10 GMT
  196. Organization: MacDTS Mongols
  197.  
  198. In article <1992May28.113833.29090@thunder.mcrcim.mcgill.edu>, quesnel@ems (Rene
  199. Quesnel) writes:
  200. > Does anyone has any idea when MacApp 3.0 will be available? Everybody is
  201. > talking about it but at APDA, the official word is that it is not 
  202. > shipping yet (except as part of ETO). We have a project to start with
  203. > MacApp. If it is going to be released in a couple weeks, we'll wait for
  204. > the new version but if it is going to take another six months, we'll
  205. > start with 2.0.1. Does anyone have any info on this?
  206.  
  207.    MacApp 3.0 has been available for a long time on ETO (#7), as for a 
  208. full APDA product, I think we are talking about weeks or even less,
  209. but someone from the marketing group might know better.
  210. - --
  211.                                               Cheers, Kent
  212.  
  213.  
  214. ---------------------------
  215.  
  216. From: rsherman@mthvax.cs.miami.edu (Roby Sherman)
  217. Subject: Using Menus during Interrupts???
  218. Date: 27 May 92 13:44:52 GMT
  219. Organization: The Tao of Programming
  220.  
  221. Hello all...
  222.  
  223.  
  224.       I'm trying to write an interrupt based routine that will bring up
  225. a pop-up menu. Once the routine is called, I setup the A5 enviroment,
  226. and I go to call POPUPMENUSELECT. The menu comes up and then the mouse
  227. hangs. Any Idea how I can do this? It must be possible, since OnCueII
  228. and other such programs draw menus at Interrupt time.
  229.  
  230.  
  231.  
  232.          thanks in advance...
  233.  
  234.                    Roby
  235. - -- 
  236. rsherman@mthvax.cs.miami.edu                    Roby Sherman
  237.  
  238. +++++++++++++++++++++++++++
  239.  
  240. From: dougm@cns.caltech.edu (Doug McNaught)
  241. Date: 27 May 92 20:29:03 GMT
  242. Organization: California Institute of Technology
  243.  
  244. In article <1003okINN5af@mthvax.cs.miami.edu> rsherman@mthvax.cs.miami.edu (Roby Sherman) writes:
  245.  
  246.    Hello all...
  247.  
  248.  
  249.      I'm trying to write an interrupt based routine that will bring up
  250.    a pop-up menu. Once the routine is called, I setup the A5 enviroment,
  251.    and I go to call POPUPMENUSELECT. The menu comes up and then the mouse
  252.    hangs. Any Idea how I can do this? It must be possible, since OnCueII
  253.    and other such programs draw menus at Interrupt time.
  254.  
  255. No, they don't. They patch traps. Calling the Toolbox at interrupt
  256. time is a good way to crash (can you say "re-entrancy problems? Knew
  257. you could!)
  258.   Try patching FindWindow() or MenuSelect().
  259.  
  260. regards,
  261. doug
  262. - --
  263. Doug McNaught              |"Sadder still to watch it die/ Then never to have
  264. dougm@cns.caltech.edu      | known it/ For you, the blind who once could see/
  265. mcnaught@midget.towson.edu | The bell tolls for thee..." --Neil Peart
  266.   Nobody approves my opinions! Not even me, sometimes. Read at your own risk.
  267.  
  268. +++++++++++++++++++++++++++
  269.  
  270. From: buckeye@spf.trw.com (John Wallace)
  271. Organization: TRW Data Systems Center, Redondo Beach, CA
  272. Date: Thu, 28 May 92 18:34:29 GMT
  273.  
  274. In article <1003okINN5af@mthvax.cs.miami.edu> rsherman@mthvax.cs.miami.edu (Roby Sherman) writes:
  275. >Hello all...
  276. >
  277. >
  278. >      I'm trying to write an interrupt based routine that will bring up
  279. >a pop-up menu. Once the routine is called, I setup the A5 enviroment,
  280. >and I go to call POPUPMENUSELECT. The menu comes up and then the mouse
  281. >hangs. Any Idea how I can do this? It must be possible, since OnCueII
  282. >and other such programs draw menus at Interrupt time.
  283. >
  284. >                   Roby
  285. >-- 
  286. >rsherman@mthvax.cs.miami.edu                    Roby Sherman
  287.  
  288. You shouldn't draw menus at interrupt time since they will definitely
  289. move memory.  You could, however, do it at idle time.  The easiest
  290. way to do this is to install a GNEFilter (which gets called when
  291. ever the program calls GetNextEvent or WaitNextEvent).  Since these
  292. calls are allowed to move memory, then you should be ok.  
  293.  
  294. I have written code that does this, and it does a good job of
  295. letting me to do actions when someone else's program is running.
  296. The only problem is that it won't work unless the active program
  297. calls GetNextEvent.  
  298.  
  299. Cheers!
  300. John
  301.  
  302. - ----
  303. John Wallace    buckeye@spf.trw.com
  304.  
  305.  
  306. +++++++++++++++++++++++++++
  307.  
  308. From: stevec@Apple.COM (Steve Christensen)
  309. Date: 30 May 92 02:37:31 GMT
  310. Organization: Apple Computer Inc., Cupertino, CA
  311.  
  312. rsherman@mthvax.cs.miami.edu (Roby Sherman) writes:
  313. >      I'm trying to write an interrupt based routine that will bring up
  314. >a pop-up menu. Once the routine is called, I setup the A5 enviroment,
  315. >and I go to call POPUPMENUSELECT. The menu comes up and then the mouse
  316. >hangs. Any Idea how I can do this? It must be possible, since OnCueII
  317. >and other such programs draw menus at Interrupt time.
  318.  
  319. Are you sure OnCueII, etc., are drawing menus at interrupt time?  Generally,
  320. any kind of drawing that involves QuickDraw can't be done at interrupt time
  321. because heap blocks can move, and the heap could have been in an inconsistent
  322. state.  More than likely they're hooked into GetNextEvent and do the popup
  323. menus at that time...
  324.  
  325. steve
  326.  
  327. - -- 
  328. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  329.   Steve Christensen            Never hit a man with glasses.
  330.   stevec@apple.com            Hit him with a baseball bat.
  331.  
  332. ---------------------------
  333.  
  334. From: S4161006@deimos.ucc.umass.edu (S4161006)
  335. Subject: Color QuickDraw and GWorlds
  336. Organization: University of Massachusetts at Amherst
  337. Date: Wed, 27 May 1992 16:58:03 GMT
  338.  
  339. I'm about to take the big plunge into graphics with a tetris-like game.
  340. When a piece move I want it to smoothly redraw what was underneath it.  From
  341. reading Inside Mac VI it seem like the Graphics Device Manager off-screen
  342. gWorlds are the way to do this well.  What I had a hard time figuring out is
  343. whether this option is available on a Mac not running System 7.  If not is
  344. there another accepted way of smothly redrawing the window.  Thanks in advance.
  345.  
  346. Mike Houser
  347. UMass
  348.  
  349. - -mh 
  350.  
  351. +++++++++++++++++++++++++++
  352.  
  353. From: jmatthews@desire.wright.edu
  354. Date: 28 May 92 23:31:38 EST
  355. Organization: Wright State University 
  356.  
  357. In article <1992May27.165803.22556@nic.umass.edu>, S4161006@deimos.ucc.umass.edu (S4161006) writes:
  358. > I'm about to take the big plunge into graphics with a tetris-like game.
  359. > When a piece move I want it to smoothly redraw what was underneath it.  From
  360. > reading Inside Mac VI it seem like the Graphics Device Manager off-screen
  361. > gWorlds are the way to do this well.  What I had a hard time figuring out is
  362. > whether this option is available on a Mac not running System 7.  If not is
  363. > there another accepted way of smothly redrawing the window.  Thanks in adv-
  364. > ance.
  365.  
  366. GWorlds are supposed to be available on all machines running System 7. They are
  367. also available with System 6.0.5 and later if Color QuickDraw is present.
  368. Inside Mac VI suggests that GWorlds should work on non-Color QuickDraw Macs
  369. under System 7.0 given a few precautions. I've had (sorry to whine) no luck
  370. making this happen. Anybody?
  371.  
  372. A good alternative for non-CQD machines and earlier Systems is Apple's DTS
  373. sample code SC015.OffScreen and SC016.OffSample available from ftp.apple.com
  374. (130.43.2.3) or the d e v e l o p CD.
  375.  
  376. o----------------------------------------------------------------------------o
  377. | John B. Matthews, jmatthews@desire.wright.edu, disclaimer:= myViews <> WSU |
  378. | "I'm a commensal .sig virus, indistinguishable from an ordinary organelle."|
  379. o----------------------------------------------------------------------------o
  380.  
  381. ---------------------------
  382.  
  383. From: eric@homebase.vistachrome.com (Eric Brunson)
  384. Subject: Number of strings in a STR#?
  385. Date: 29 May 92 17:51:20 GMT
  386. Organization: Vista-Chrome Incorporated
  387.  
  388. The first byte of the STR# resource type tells the number
  389. of strings in the string list, but I haven't seen a call 
  390. that will return that to my program.  Has anyone ever 
  391. come up against this problem?
  392.  
  393. Please email, I'll summarize if it's non-trivial.
  394.  
  395. Thanks,
  396. Eric
  397.  
  398.  
  399. - -- 
  400. Eric Brunson               These opinions are mine alone,
  401. eric@vistachrome.com         but they could be yours for a low monthly fee!
  402. "He's a genius, eh, he hooked up our stereo."
  403.  
  404. +++++++++++++++++++++++++++
  405.  
  406. From: gshields@starfish (Gerald Shields)
  407. Organization: Interactive Systems, Cambridge, MA 02138-5302
  408. Date: Fri, 29 May 1992 22:18:46 GMT
  409.  
  410. In article <1992May29.175120.18368@homebase.vistachrome.com>, 
  411. eric@homebase.vistachrome.com (Eric Brunson) writes:
  412. > Path: 
  413. dirtydog.ima.isc.com!newsserver.pixel.kodak.com!rpi!uwm.edu!spool.mu.edu!uunet!r
  414. de!eric
  415. > From: eric@homebase.vistachrome.com (Eric Brunson)
  416. > Newsgroups: comp.sys.mac.programmer
  417. > Subject: Number of strings in a STR#?
  418. > Message-ID: <1992May29.175120.18368@homebase.vistachrome.com>
  419. > Date: 29 May 92 17:51:20 GMT
  420. > Article-I.D.: homebase.1992May29.175120.18368
  421. > Distribution: comp.sys.mac.programmer
  422. > Organization: Vista-Chrome Incorporated
  423. > Lines: 15
  424. > The first byte of the STR# resource type tells the number
  425. > of strings in the string list, but I haven't seen a call 
  426. > that will return that to my program.  Has anyone ever 
  427. > come up against this problem?
  428. > Please email, I'll summarize if it's non-trivial.
  429. > Thanks,
  430. > Eric
  431. > -- 
  432. > Eric Brunson               These opinions are mine alone,
  433. > eric@vistachrome.com         but they could be yours for a low monthly fee!
  434. > "He's a genius, eh, he hooked up our stereo."
  435.  
  436.  
  437. Eric,
  438.  
  439. the following code snippet shold do the job
  440.  
  441.     short num_strings;
  442.     Handle str_h;
  443.  
  444.     str_h = GetResource( 'STR#', your string ID here );
  445.     if ( str_h == (Handle)0 )
  446.     {
  447.         handle errors here;
  448.     }
  449.     num_strings = (*(short *)(*str_h));
  450.     ReleaseResource( str_h );
  451.  
  452.  
  453. Jerry Shields
  454.  
  455.  
  456.  
  457. ---------------------------
  458.  
  459. From: Bernhard Damberger <bernied@ncsa.uiuc.edu>
  460. Subject: MPW C and > 32K structs
  461. Organization: NCSA - University of Illinois
  462. Date: Thu, 28 May 1992 06:05:44 GMT
  463.  
  464.  
  465.  
  466. +++++++++++++++++++++++++++
  467.  
  468. From: Bernhard Damberger <bernied@ncsa.uiuc.edu>
  469. Organization: NCSA - University of Illinois
  470. Date: Thu, 28 May 1992 06:10:09 GMT
  471.  
  472. I am getting this annoying message from the MPW C compiler:
  473.     ### Error 427 Can't use structures > 32k
  474.  
  475. Basically I am trying to port some Unix app to MPW (as a tool) and it has
  476. a huge 
  477. pulsating data struct that is (you guessed it) > 32K.  Obviously MPW C
  478. does not 
  479. like this.
  480.     I have tried the following compiler options to no avail:
  481.  
  482.     -bigseg (generate single large (>32K) code segment, 68020 only)
  483.     -m (generate 32-bit references for data (less efficient code))
  484.     -model far (generate load-time relocatable 32-bit references
  485.     for data and code).
  486.  
  487. Any ideas out there?  Any possible C options that I missed?  Is MPW C
  488. really 
  489. this crippled?
  490.  
  491. Thanks for your help...
  492.  
  493. +++++++++++++++++++++++++++
  494.  
  495. From: ksand@apple.com (Kent Sandvik)
  496. Date: 29 May 92 21:58:11 GMT
  497. Organization: MacDTS Mongols
  498.  
  499. In article <Boy6Gy.6JD@news.cso.uiuc.edu>, bernied@ncsa.uiuc.edu (Bernhard
  500. Damberger) writes:
  501. > I am getting this annoying message from the MPW C compiler:
  502. >     ### Error 427 Can't use structures > 32k
  503. > Basically I am trying to port some Unix app to MPW (as a tool) and it has
  504. > a huge 
  505. > pulsating data struct that is (you guessed it) > 32K.  Obviously MPW C
  506. > does not 
  507. > like this.
  508. >     I have tried the following compiler options to no avail:
  509.  
  510. >     -bigseg (generate single large (>32K) code segment, 68020 only)
  511. >     -m (generate 32-bit references for data (less efficient code))
  512. >     -model far (generate load-time relocatable 32-bit references
  513. >     for data and code).
  514.  
  515. > Any ideas out there?  Any possible C options that I missed?  Is MPW C
  516. > really 
  517. > this crippled?
  518.  
  519. "Oh the pain, suffering, and grief, when UNIX programmers try to misuse
  520. the MacOS memory system using malloc and stack based structures."
  521.  
  522. Yes, the MPW C compiler has a limitation of array/struct sizes, no bigger
  523. than 32k, it's a compiler, not runtime, limitation.
  524.  
  525. What to do, what to do, check out handles and pointers in the Memory Manager.
  526. And make them as big as you want, as long as end users have memory in their
  527. machines.
  528. - --
  529.                                               Cheers, Kent
  530.  
  531.  
  532. +++++++++++++++++++++++++++
  533.  
  534. From: creiman@void.ncsa.uiuc.edu (Charlie Reiman)
  535. Date: 30 May 92 05:04:17 GMT
  536. Organization: University of Illinois at Urbana
  537.  
  538. ksand@apple.com (Kent Sandvik) writes:
  539.  
  540. >In article <Boy6Gy.6JD@news.cso.uiuc.edu>, bernied@ncsa.uiuc.edu (Bernhard
  541. >Damberger) writes:
  542. >> I am getting this annoying message from the MPW C compiler:
  543. >>     ### Error 427 Can't use structures > 32k
  544. >> 
  545. >> Basically I am trying to port some Unix app to MPW (as a tool) and it has
  546. >> a huge 
  547. >> pulsating data struct that is (you guessed it) > 32K.  Obviously MPW C
  548. >> does not 
  549. >> like this.
  550. >>     I have tried the following compiler options to no avail:
  551.  
  552. >>     -bigseg (generate single large (>32K) code segment, 68020 only)
  553. >>     -m (generate 32-bit references for data (less efficient code))
  554. >>     -model far (generate load-time relocatable 32-bit references
  555. >>     for data and code).
  556.  
  557. >> Any ideas out there?  Any possible C options that I missed?  Is MPW C
  558. >> really 
  559. >> this crippled?
  560.  
  561. >"Oh the pain, suffering, and grief, when UNIX programmers try to misuse
  562. >the MacOS memory system using malloc and stack based structures."
  563.  
  564. >Yes, the MPW C compiler has a limitation of array/struct sizes, no bigger
  565. >than 32k, it's a compiler, not runtime, limitation.
  566.  
  567. >What to do, what to do, check out handles and pointers in the Memory Manager.
  568. >And make them as big as you want, as long as end users have memory in their
  569. >machines.
  570.  
  571. Bernie had a 2-d array nestled within the data strucure, which isn't
  572. the easiest thing to fake with Handles... Anyway, we managed to figure
  573. out a solution. I don't know if he's tried it yet, but I think it'll 
  574. work.
  575.  
  576. new_thread(): Why is there a 32k limit? We can have over 32k of
  577. globals, segments larger than 32k, code resources of enormous
  578. magnitude-- but C structures are special? I smell something fishy
  579. here.  I don't want to put Apple folks on the spot, but I am curious as
  580. to what gives. I know I'm not the only person to smack his nose against
  581. that particular limit.
  582.  
  583. Although, I must admit: UNIX programmers do tend to get carried away
  584. with memory allocation. Man, I could tell some stories of attrocious
  585. abuse. I do envy that reckless abandon, though...
  586.  
  587. - -- 
  588. Charlie Reiman - creiman@ncsa.uiuc.edu
  589. Have a bajillion brilliant Jobsian lithium licks.
  590.  
  591. ---------------------------
  592.  
  593. From: mxmora@unix.SRI.COM (Matt Mora)
  594. Subject: How to tell if monitor is in color was(Re: Most efficient bla, bla...)
  595. Date: 28 May 92 23:12:43 GMT
  596. Organization: SRI International, Menlo Park, California
  597.  
  598. In article <1992May28.145037.8305@waikato.ac.nz> ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University) writes:
  599.  
  600. >> I am writing a custom ldef in pascal (I know this seems to be the major
  601. >> source of my problem) and I want to draw a gray line.
  602.  
  603. >If you persist in slurring Pascal in this way, I shall be forced to ask
  604. >you to step outside. :-)
  605.  
  606. I personaly like Pascal and program in it when ever I get a chance. I was
  607. just trying to beat the Pascal bashers to the punch. :-)
  608.  
  609.  
  610. >For the particular case of the standard 50% grey pattern, here's a routine
  611. >which will return a PatPtr that you can dereference and pass to the
  612. >appropriate QuickDraw calls:
  613.  
  614. >    Function grayPtr : PatPtr;
  615. >        Inline
  616. >        $2055,        { move.l (a5), a0 }
  617. >        $41E8, $FFE8,    { lea -24(a0), a0 }
  618. >        $2E88;        { move.l a0, (sp) }
  619.  
  620. Thanks for the code. I used the one that was posted earlier but I think
  621. yours is the same. Thanks again for such a quick response.
  622.  
  623. Now for another question. I'm putting a final touch on a program and would 
  624. like the button outline to be gray when the button is inactive and on a color
  625. screen. Not just a gray pattern the gray color.
  626.  
  627. I got the gray part working but how do I know if the button outline
  628. will be drawn in color or b/w? I need to know if the monitor the button
  629. outline is on, is in the 1 bit mode show I can draw the outline in the gray
  630. pattern instead of the gray color. Anyone know how to tell?
  631.  
  632.  
  633. Thanks
  634.  
  635. Matt
  636.  
  637. - -- 
  638. ___________________________________________________________
  639. Matthew Mora                |   my Mac  Matt_Mora@sri.com
  640. SRI International           |  my unix  mxmora@unix.sri.com
  641. ___________________________________________________________
  642.  
  643. +++++++++++++++++++++++++++
  644.  
  645. From: keith@taligent.com (Keith Rollin)
  646. Date: 29 May 92 02:40:50 GMT
  647. Organization: Taligent
  648.  
  649. In article <35464@unix.SRI.COM>, mxmora@unix.SRI.COM (Matt Mora) writes:
  650. > Now for another question. I'm putting a final touch on a program and would 
  651. > like the button outline to be gray when the button is inactive and on a color
  652. > screen. Not just a gray pattern the gray color.
  653. > I got the gray part working but how do I know if the button outline
  654. > will be drawn in color or b/w? I need to know if the monitor the button
  655. > outline is on, is in the 1 bit mode show I can draw the outline in the gray
  656. > pattern instead of the gray color. Anyone know how to tell?
  657.  
  658. Well, I'm a System 7 weenie, so I'd use DeviceLoop. It tells you the depth of
  659. the GDevice you are being asked to write to, so you can make your determination
  660. based on that. However, I think that you have to make sure you're drawing into a
  661. CGrafPort (as opposed to a GrafPort) before diving into DeviceLoop.
  662.  
  663. I did some stuff like this for Mac Programming Secrets. I used DeviceLoop to
  664. draw list items in dithered grey or real grey depending on the what was
  665. available, even if the list crossed monitors of different depths. If you want,
  666. send me mail and I'll send you the code.
  667.  
  668. If you want to be compatible with 6.0.x, then the coolest thing would be to
  669. write your own version of DeviceLoop (I have a vague feeling that there might be
  670. something on this in DTS's Snippets folder on ftp.apple.com).
  671.  
  672. - --
  673. Keith Rollin
  674. Phantom Programmer
  675. Taligent, Inc.
  676.  
  677. ---------------------------
  678.  
  679. From: ehanson@BugsBunny.acslab.umbc.edu (Mr. Erik Hanson; ARTS-SCI (UGRAD))
  680. Subject: Need help with INITs (specifically, patching traps)
  681. Organization: University of Maryland Baltimore County, Mathematics Department
  682. Date: Fri, 29 May 1992 02:38:56 GMT
  683.  
  684. Howdy.
  685.  
  686. I'm writing my first System Extension, and I need a bit o' help.
  687. If anybody can show me some code (or point me towards some code)
  688. that would help me learn how to patch traps (specifically the
  689. StandardGetFile trap, but any trap will do), I'd be grateful.
  690. I've got IM I-VI, but no X-Ref, and I haven't been able to find
  691. any help in there. So, if it is in there, and somebody could tell
  692. me where, I'd be quite happy.
  693.  
  694. Also, any code for that might help me write an Extension would
  695. also be welcomed.
  696.  
  697. (And in payment, I'll release my super-cool Extension as
  698. freeware. (And not get-payments-from-both-people-in-the-world-
  699. who-support-sharware-ware. ;-) )
  700.  
  701.  
  702. Seeya!
  703. Erk
  704.  
  705. ______________________________________________________________________________
  706. Erik Hanson   University o' Maryland Baltimore County   ehanson@umbc3.umbc.edu
  707.  
  708. +++++++++++++++++++++++++++
  709.  
  710. From: keith@taligent.com (Keith Rollin)
  711. Date: 29 May 92 21:23:24 GMT
  712. Organization: Taligent
  713.  
  714. In article <1992May29.023856.21865@umbc3.umbc.edu>,
  715. ehanson@BugsBunny.acslab.umbc.edu (Mr. Erik Hanson; ARTS-SCI (UGRAD)) writes:
  716. > Howdy.
  717. > I'm writing my first System Extension, and I need a bit o' help.
  718. > If anybody can show me some code (or point me towards some code)
  719. > that would help me learn how to patch traps (specifically the
  720. > StandardGetFile trap, but any trap will do), I'd be grateful.
  721. > I've got IM I-VI, but no X-Ref, and I haven't been able to find
  722. > any help in there. So, if it is in there, and somebody could tell
  723. > me where, I'd be quite happy.
  724. > Also, any code for that might help me write an Extension would
  725. > also be welcomed.
  726.  
  727.  
  728. I patch Standard File in a Boomerang-like INIT that I call Pointed Stick.
  729. Normally, if I were helping someone patch their first trap, I'd start of with
  730. something simple (in Mac Programming Secrets, 2nd Edition, I show how to patch
  731. MenuKey). However, patching Standard File is tricky, because a single trap is
  732. used to dispatch to a number of functions that all take a different set of
  733. parameters.
  734.  
  735. This is how I patched Standard File in Pointed Stick (using THINK C, which makes
  736. the patching of traps easy by allowing the use of global variables):
  737.  
  738.  
  739. void main(void)
  740. {
  741.  
  742. // Stuff removed for Usenet posting
  743.         
  744.     Ptr                ourAddress;
  745.  
  746. // Stuff removed for Usenet posting
  747.  
  748.     asm {
  749.         move.l    A4,-(sp)            ; save orig A4
  750.         bsr        __GetA4            ; get pointer to saved location
  751.         lea        main,A4            ; get our A4
  752.         move.l    A4,(A1)            ; save it so SetUpA4() will work
  753.         move.l    A4, ourAddress        ; for the RecoverHandle, later
  754.  
  755.         lea        @continue,A0        ; now, fix up the PC (Technote #245)
  756.         move.l    A0,D0
  757.         StripAddress
  758.         move.l    D0,A0
  759.         jmp        (A0)
  760.     @continue
  761.     }
  762.     
  763. // Stuff removed for Usenet posting
  764.  
  765.         gOldStandardFile = GetToolTrapAddress(_Pack3);
  766.         SetToolTrapAddress((long) MyPack3, _Pack3);
  767.  
  768. // Stuff removed for Usenet posting
  769.  
  770.     RestoreA4();
  771. }
  772.  
  773.  
  774. // Example of struct used in xOffsetToXXX records below:
  775.  
  776. typedef struct {
  777.     short                selector;
  778.     SFReply*            reply;
  779.     DlgHookProcPtr        dlgHook;
  780.     ConstStr255Param    origName;
  781.     ConstStr255Param    prompt;
  782.     Point                where;
  783. } SFPutFileParameters;
  784.  
  785.  
  786. // Example of offset record used below:
  787.  
  788. short                gOffsetToReply[] = {
  789.                         offsetof(SFPutFileParameters, reply),
  790.                         offsetof(SFGetFileParameters, reply),
  791.                         offsetof(SFPPutFileParameters, reply),
  792.                         offsetof(SFPGetFileParameters, reply),
  793.                         offsetof(StandardPutFileParameters, reply),
  794.                         offsetof(StandardGetFileParameters, reply),
  795.                         offsetof(CustomPutFileParameters, reply),
  796.                         offsetof(CustomGetFileParameters, reply)
  797.                     };
  798.  
  799.  
  800.  
  801. //---------------------------------------------------------------------------
  802. /*
  803.     This is the entry point to most of what Pointed Stick does. ItUs pretty
  804.     gnarly, so IUd better get this down while I can still figure it out.
  805.     
  806.     The idea behind this patch to Standard File is to do two things:
  807.         % Make sure everything is OK for me to hook in, and
  808.         % Hook me in.
  809.     
  810.     The first thing we do is set up our A4, strip off the return address
  811.     and save it for later, and take a look at the selector. If the selector
  812.     is not one that we know (from 1 to 8, inclusive), we just call the
  813.     standard Standard File without any funny stuff. ItUs called just as
  814.     if we didnUt exist (except that we are tail-patched, here).
  815.     
  816.     Next, we try to open our INITUs resource fork. WeUll need a lot of
  817.     things from it, like MENUs, ALRTs, etc. We open the resource fork
  818.     using MyOpenResFile, which opens the resource fork, shuffles the
  819.     resource chain so that my map appears just before the System resource
  820.     map and -- presumably -- after the applicationUs. If we canUt open
  821.     our resource fork, we blow out in the same way as if the selector
  822.     was out of range.
  823.     
  824.     At this point, we do one of two things. If the user had selected a
  825.     file from the hierarchical menu we attached to the Open menu item,
  826.     we are in the middle of puppet-stringing a response. If this is the
  827.     case, we call FakePack3, which fills in the reply record with something
  828.     appropriate, and then return to the caller just as if Standard File
  829.     had really interacted with the user. This is identical in concept
  830.     with what MultiFinder does with non-Apple Event aware applications.
  831.     
  832.     If we arenUt puppet-stringing, then itUs time for us to hook ourselves
  833.     in to Standard File. This consists of two phases. First, we can only
  834.     hook ourselves in properly if the caller makes one of those RSFPS or
  835.     RCustomS calls. If they didnUt, the first thing we do is convert
  836.     the parameters on the stack and change the selector so it looks to
  837.     Standard File like the caller _did_ make a custom call. Second, we
  838.     replace the dlgHook, filterProc, and modalFilter parameters with
  839.     pointers to our own procedures, saving the callerUs so that we can
  840.     chain to them when necessary.
  841.     
  842.     Now weUre almost ready to fall into Standard File. ThereUre only
  843.     a few things we still have to do. First, we put ourself into
  844.     a state that will cause us to munge the next dialog created so that
  845.     it has the menubar across the top. Second, we put ourself into a
  846.     state that will start the sequence of events that will find the
  847.     handle to the ListRecord holding the files and directories appearing
  848.     in the dialog (see the comments in GetItemList.c to see how this
  849.     happens). Third, we clear out the variables holding the previous
  850.     volume and directory we were in. These values are used for rebounding.
  851.     We set them to illegal values to force the rebound routines to
  852.     select the initial file. Finally, we turn off CEToolbox hotkeys so
  853.     that the user canUt bring up MiniFinder while weUre in Standard
  854.     File. If the user did that, Standard File would re-enter itself,
  855.     which is a Bad Thing.
  856.     
  857.     Finally, we chain to the original Standard File entry point. At
  858.     this point, the dialog appears and the user interacts with it. When
  859.     the user closes the dialog, it goes away, and Standard File returns
  860.     to us. All we have to do now is turn the CEToolbox hotkeys back on
  861.     and close our resource file. Once thatUs done, we return to the
  862.     caller.
  863. */
  864.  
  865. pascal void MyPack3()
  866. {
  867.     SetUpA4();
  868.     asm {
  869.         move.l    (sp)+,pSavedA4
  870.         move.l    (sp)+,pSavedReturnAddress
  871.         move.w    (sp),D0
  872.         beq        @NoFunnyStuff                ; skip if selector is zero
  873.         cmp.w    #customGetFile,D0
  874.         bhi        @NoFunnyStuff                ; skip if selector is too large
  875.         bsr        ControlKeyIsDown
  876.         tst.b    D0
  877.         bne        @NoFunnyStuff                ; skip if control key is down
  878.         
  879.         pea        pCloseIt
  880.         move.w    #fsRdPerm,-(sp)                ; push access priv for our resource file
  881.         lea        gMe,A0                        ; push name for our resource file
  882.         move.l    A0,-(sp)
  883.         jsr        MyOpenResFile                ; try to open it
  884.         add        #4+4+2,A7                    ; remove my parameters
  885.         moveq    #-1,D1                        ; see if we failed (check refNum == -1)
  886.         cmp.w    D1,D0
  887.         beq        @NoFunnyStuff                ; if failed, skip special effects
  888.         move.w    D0,gRefNum                    ; save refnum so we can close it later
  889.         
  890.         move.w    gStandardFileMode,D0
  891.         beq.s    @HookInMyProcs
  892.  
  893.         bsr        FakePack3                    ; do special effects
  894.         
  895.         lea        pParameterSizes,A0            ; pull off StdFile parameters. Get size
  896.         move.w    (sp),D0                        ; ...of parameters from table
  897.         add.w    D0,D0
  898.         move.w    -2(A0,D0.W),D0
  899.         add.w    D0,A7                        ; add size to stack pointer
  900.  
  901.         bra        @CloseUp
  902.     
  903.     @HookInMyProcs
  904.         move.w    (sp)+,D0                    ; put selector in D0
  905.         move.w    D0,pOrigSelector            ; save what the user passed in
  906.         sub.w    #1,D0                        ; make it zero based
  907.         btst    #1,D0                        ; is this a Custom or P routine?
  908.         bne.s    @NoConversionNeeded            ; yes, so donUt convert it
  909.  
  910.         move.w    D0,D1                        ; use D1 for table index
  911.         add.w    D1,D1                        ; double for 2 byte table entries
  912.  
  913.         lea        pDialogIDs,A0
  914.         move.w    (A0,D1.W),-(sp)                ; push on our dialog ID
  915.  
  916.         btst    #2,D0                        ; is this an old style routine?
  917.         beq.s    @HookInMyProcsOldStyle        ; yes, so donUt push mondo parms
  918.  
  919.         move.l    pZeroPoint,-(sp)            ; location
  920.         clr.l    -(sp)                        ; dialog hook
  921.         clr.l    -(sp)                        ; modal dialog filter
  922.         clr.l    -(sp)                        ; active list
  923.         clr.l    -(sp)                        ; activate proc
  924.  
  925.     @HookInMyProcsOldStyle
  926.         clr.l    -(sp)                        ; your data / modal dialog filter
  927.         add.w    #2,D0                        ; convert selector to Custom/P routine
  928.  
  929.     @NoConversionNeeded
  930.         move.w    D0,D1                        ; use D1 for table index
  931.         add.w    D1,D1                        ; double for 2 byte table entries
  932.  
  933.         add.w    #1,D0                        ; make selector 1-base again
  934.         move.w    D0,-(sp)                    ; put the possibly modified selector back
  935.  
  936.         move.w    D0,gSelector                ; remember selector
  937.  
  938.         move.l    A7,pParameters                ; remember pointer to all parameters
  939.                                             ; (including the selector)
  940.  
  941.         lea        pOffsetToDlgHook,A0            ; remember dlgHook
  942.         move.w    (A0,D1.W),D0
  943.         move.l    (A7,D0.W),pDlgHook
  944.         lea        DialogHookEntry,A0            ; put in my own
  945.         move.l    A0,(A7,D0.W)
  946.  
  947.         lea        pOffsetToFileFilter,A0        ; remember fileFilter
  948.         move.w    (A0,D1.W),D0
  949.         bmi.s    @DontSwapFileFilter            ; but only if itUs got one
  950.         move.l    (A7,D0.W),pFileFilter
  951.         tst.l    pFileFilter
  952.         beq.s    @DontSwapFileFilter            ; donUt supply one if he didnUt
  953.         lea        FileFilterEntry,A0            ; put in my own
  954.         move.l    A0,(A7,D0.W)
  955.  
  956.     @DontSwapFileFilter
  957.         lea        pOffsetToModalFilter,A0        ; remember modalFilter
  958.         move.w    (A0,D1.W),D0
  959.         move.l    (A7,D0.W),pModalFilter
  960.         lea        ModalFilterEntry,A0            ; put in my own
  961.         move.l    A0,(A7,D0.W)
  962.  
  963.         jsr        MungeNextDialog
  964.         jsr        StartLookingForList
  965.         clr.w    curVRefNum(A4)
  966.         clr.l    curDirID(A4)
  967.         move.w    #-1,prevCell(A4)
  968.  
  969.         pea        pOldValue                    ; Turn off hotkeys so we donUt
  970.         move.w    #-1,-(sp)                    ; re-enter ourselves by bringing
  971.         jsr        CETurnOnOff                    ; up the MiniFinder.
  972.         add.w    #6,sp
  973.  
  974.         move.l    gOldStandardFile,A0
  975.         jsr        (A0)
  976.  
  977.         pea        pOldValue
  978.         move.w    pOldValue,-(sp)
  979.         jsr        CETurnOnOff
  980.         add.w    #6,sp
  981.  
  982.     @CloseUp
  983.         tst.b    pCloseIt
  984.         beq.s    @continue
  985.  
  986.         move.w    gRefNum,-(sp)                ; close our resource file
  987.         CloseResFile
  988.         moveq    #-1,D1
  989.         move.w    D1,gRefNum
  990.  
  991.         bra.s    @continue
  992.  
  993.     @NoFunnyStuff
  994.         move.l    gOldStandardFile,A0            ; here if we are to call old StdFile with
  995.         jsr        (A0)                        ; ...no tricks.
  996.  
  997.     @continue
  998.         move.l    pSavedReturnAddress,-(sp)
  999.         move.l    pSavedA4,A4
  1000.     }
  1001. }
  1002.  
  1003.  
  1004. - --
  1005. Keith Rollin
  1006. Phantom Programmer
  1007. Taligent, Inc.
  1008.  
  1009. ---------------------------
  1010.  
  1011. From: Martin.Friedrich@arbi.informatik.uni-oldenburg.de (Martin Friedrich)
  1012. Subject: MacBinary format and empty forks
  1013. Organization: University of Oldenburg, Germany
  1014. Date: Fri, 29 May 1992 08:04:42 GMT
  1015.  
  1016. Hello, Netters !
  1017.  
  1018. The defintion of the macbinary format states, that for both the resource and
  1019. data fork of the transferred file, null characters are padded to the next
  1020. 128 byte boundary. But if (one of ) the fork(s) is/are empty, do you have
  1021. to insert 128 null characters before the next fork or end of the file,
  1022. respectively ?
  1023.  
  1024. Thanks in advance,
  1025. - -- 
  1026. LLaP
  1027.        Martin Friedrich
  1028.  
  1029. - -----------------------------------------------------------------------------
  1030.                          |"I never will understand
  1031. REAL      Martin Friedrich   (CS-Student)    | humans ..."
  1032. NICK      jupp                               | -- Spock, Patterns of Force
  1033. UUCP      friedrich@uniol                    --------------------------------
  1034. DOMAIN    Martin.Friedrich@arbi.informatik.uni-oldenburg.de
  1035. HOME      Straekweg 1 , 2986 Leezdorf
  1036.  
  1037.      Superior abilities breed superior ambitions
  1038. - -----------------------------------------------------------------------------
  1039.  
  1040. +++++++++++++++++++++++++++
  1041.  
  1042. From: jackb@mdd.comm.mot.com (Jack Brindle)
  1043. Date: 29 May 92 17:44:42 GMT
  1044. Organization: Motorola, Mobile Data Division - Seattle, WA
  1045.  
  1046. In article <1992May29.081310.1089@arbi.Informatik.Uni-Oldenburg.DE> Martin.Friedrich@arbi.informatik.uni-oldenburg.de (Martin Friedrich) writes:
  1047. >Hello, Netters !
  1048. >
  1049. >The defintion of the macbinary format states, that for both the resource and
  1050. >data fork of the transferred file, null characters are padded to the next
  1051. >128 byte boundary. But if (one of ) the fork(s) is/are empty, do you have
  1052. >to insert 128 null characters before the next fork or end of the file,
  1053. >respectively ?
  1054.  
  1055. No. Byte counting within the MacBinary format is done with modulo 128
  1056. arithmetic. Realizing that zero mod 128 is zero, no null bytes should
  1057. be placed either in place of a fork or at the end of a fork that is
  1058. a multiple of 128 bytes in length.
  1059.  
  1060. If you think about this, you will realize that adding a block of nulls
  1061. where the data fork would go would really mess up decoding. The reason
  1062. is that the data fork length information in the header indicates no
  1063. data. The decoder interprets this to be an actual length of zero, and
  1064. does not skip over the block, but procedes to decode the resource fork.
  1065. At this point everything is 128 bytes off.
  1066.  
  1067. The real reason for the pad nulls is to assure that the two forks start
  1068. on nice even boundaries, making things a bit easier when decoding data
  1069. coming in through transfer protocols such as XModem. The only catch was
  1070. that when Dennis originally defined the standard (MacBinary 1), he placed
  1071. the file name in an awkward position - it starts on an ODD byte. For
  1072. obvious compatibility reasons, it was not corrected when the MacBinary II
  1073. standard was developed.
  1074.  
  1075. Jack Brindle
  1076. ham radio: wa4fib
  1077. internet: jackb@mdd.comm.mot.com
  1078.  
  1079. ---------------------------
  1080.  
  1081. From: king@maui.cs.ucla.edu (Adam King)
  1082. Subject: REWARD OFFERED: Think C Multisegment Driver Problem
  1083. Date: 30 May 92 04:22:09 GMT
  1084. Organization: UCLA Computer Science Department
  1085.  
  1086. I'm looking for anybody who has successfully written a multi-segment
  1087. driver using ThinkC (5.02) that installs at init time.
  1088.  
  1089. The problem I am having with mine is a segment loader system error
  1090. when I return from closing the driver.
  1091.  
  1092. I have loaded this driver at INIT time using ThinkC's installRAMDriver
  1093. code and I am closing it with their removeRAMDriver code.  It crashes
  1094. durring the call to PBClose (the driver).
  1095.  
  1096. I suspect that the glue on the driver is trying to treat the docd
  1097. segments as resources and this is bogus because they have been
  1098. detatched.  Is this true?  Is it avoidable?
  1099.  
  1100. About the reward:
  1101.  
  1102. This has been driving my so insane that I will send a check for $10 to
  1103. the person who first sends me info that directly leads to the solution
  1104. of my problem.
  1105.  
  1106. Adam
  1107. - -- 
  1108. *****************************************************
  1109. * Looking for Castalia. Tell me if you've found it. *
  1110. *****************************************************
  1111.  
  1112. +++++++++++++++++++++++++++
  1113.  
  1114. From: resnick@cogsci.uiuc.edu (Pete Resnick)
  1115. Organization: University of Illinois at Urbana
  1116. Date: Sat, 30 May 1992 05:39:31 GMT
  1117.  
  1118. king@maui.cs.ucla.edu (Adam King) writes:
  1119.  
  1120. >I have loaded this driver at INIT time using ThinkC's installRAMDriver
  1121. >code and I am closing it with their removeRAMDriver code.  It crashes
  1122. >durring the call to PBClose (the driver).
  1123.  
  1124. Eeek!! The code to which you are referring (InstallRAMDriver,
  1125. RemoveRAMDriver) was written by me, and quite poorly I might add; it
  1126. has some major bugs. It will certainly fail for multi-segment drivers.
  1127. I have discovered the problem and made *oodles* of changes to how the
  1128. code works works. I would be glad to send you (and other's) new and
  1129. working code. If I get enough response, I will post it to an FTP
  1130. archive.
  1131.  
  1132. Sorry for the trouble you are having.
  1133.  
  1134. pr
  1135. - --
  1136. Pete Resnick             (...so what is a mojo, and why would one be rising?)
  1137. Graduate assistant - Philosophy Department, Gregory Hall, UIUC
  1138. System manager - Cognitive Science Group, Beckman Institute, UIUC
  1139. Internet: resnick@cogsci.uiuc.edu
  1140.  
  1141. ---------------------------
  1142.  
  1143. End of C.S.M.P. Digest
  1144. **********************
  1145.