Moderators.Jon.Pugh;Dwayne.Virnau;Lance.Nakata@SUMEX-AIM.STANFORD.EDU (05/01/88)
INFO-MAC Digest Sunday, 1 May 1988 Volume 6 : Issue 44 Today's Topics: MPW&LSC Program examples RE: Getting Full Pathames Calling Hypercard Hooks from Pascal query Re: Power supply problems. Hello there RE: Postscript from quickdraw DRAWIMP Flex, good but too speedy Fast number crunching. Help with Relax MacMate 20 wanted Downloading files ---------------------------------------------------------------------- Date: Sun, 24 Apr 88 11:29:10 LCL From: "Tony S. Dahbura" <DAHBURA%SUVM.BITNET@forsythe.stanford.edu> Does anyone out there know how I can get a moving marquee selection box like MACPAINT has. I.E. When you select something it leaves a scrolling box around the selected area. I assume there might be a routine in the MAC to do this instead of having to code it myself. Someone mentioned checking Inside Macintosh book 4, but I have been unable to locate any information on the subject. Any help would be greatly appreciated. /thanks /Tony Dahbura Reply Via : DAHBURA@SUVM (BITNET) US Mail : 262 Small Road Syracuse, NY 13210 U.S.A. Phone : 315-476-0989 ------------------------------ Date: Tue, 26 Apr 88 00:20 CDT From: JEFF SMITH <CS_JSMITH@uta.edu> Subject: MPW&LSC Program examples I made it!!!! I have finally developed my first reasonably sized C program on the mac. I used the shell provided in the MPW C. Is there anyone who has a PD event loop which takes care of scrolling and splitting windows? How about some plotting routines? I have Mac Express but am not using it. I have developed a Neural Network Simulator and its pretty fast on my MacII. I am using it for NN based robotic control research. I'm not a weathered mac-programmer, though and would like samples of code you have developed to keep my efforts moving. Thanks... Jeff Smith University of Texas at Arlington Bitnet:B609CSE@UTARLG CS.NET:CS_JSMITH@UTA.EDU ------------------------------ Date: Tue, 26 Apr 88 12:24:03 PDT From: eastman@Csa4.LBL.Gov (Jack Eastman) Subject: RE: Getting Full Pathames In info-mac V6 #38 Chris Sterritt asks > I would like to know if anyone can mail me some code that does the >following. I would like to hand the user the standard SFGetfile box, which >I can easily do, and return to the calling function a string that has the >entire pathname (i.e., the volume name:any intervening folders:filename). > I can't seem to get anything more (easily) than the volume name >and the filename. I'd like to be able to get all the intervening folders >as a good way to store the path to the file. > Any ideas? First point: you gotta be careful when you ask for a string containing a full pathname. Whereas each file or directory name is limited to 31 characters in length, full pathnames can be of unlimited length because there's no limit on the depth of HFS directory trees. Therefore the Pascal Str255 is a poor choice of variable type in which to pass these things around. A better choice is either a StringHandle, which, though formally declared to be ^^Str255, actually points to a block of variable length containing a pascal-style (i.e. length-byte-prefixed) string; or a handle to a C-style null-terminated string, where you keep track of the end and stuff the null in yourself when appropriate. In order to construct a full pathname, you have to use (brrrrrr) low-level paramBlock HFS calls. I don't have my Mac in front of me right now to test all the steps, but here's a rough idea of one way to do it. SFGetFile returns a record of type SFReply. This record was fixed in length back before HFS was invented, so although it has room for a volume reference number and a file name, it doesn't have room to pass the dirID of the directory containing the file. Standard file instead uses the vRefNum slot to return a working directory ID, which refers to a system-wide pool of working directory records containing both volume and directory information. Now, I know that the file manager calls accept working directory id's almost anywhere they ask for a vRefNum, but I prefer to keep things pure and pass dirID's where dirID's are asked for and vRefNum's where vRefNum's are asked for. I stay less confused that way. You can use the low-level call PBGetWDInfo to get the vRefNum and dirID corresponding to the working directory ID returned by standard file, but there's an easier way to get at this information. Standard file maintains two low-memory globals between calls, and you can look there for the relevant information. You can get the directory id of the last directory that SF opened from the longint at the low-memory location CurDirStore ($398). The NEGATIVE of the corresponding vRefNum is saved in the word at SFSaveDisk ($214). Now, armed with a vRefNum and a dirID, you can reconstruct a pathname by repeated calls to the low-level routine PBGetCatInfo. Declare a variable of type CInfoPBRec and a Str255 to hold the directory name that PBGetCatInfo will return: var params:CInfoPBRec; dirName:Str255; Make your SFGetFile call. Then for the first HFS call fill the fields of the paramBlock like this: dirName:=''; with params do begin ioCompletion := nil; {assuming synchronous calls} ioVRefNum := - wordIFoundInSFSaveDisk; ifFDirIndex := -1; {anything < 0 to make the call use ioDrDirID} ioNamePtr := @dirName; {the directory name gets returned here} ioDrDirID := LongIFoundInCurDirStore; end; Make the call: err := PBGetCatInfo( @params, false ); Upon return you'll find the name of the directory containing your file in dirName. Prefix it to the selected filename with a colon in between, in whatever string structure you've decided to use to keep your full pathname. The dirID of the parent directory of the one we're in is returned in params.ioDrParID. Now you can just call PBGetCatInfo iteratively, putting the ioDrParID returned in each call into ioDrDirID for the next, and building up the pathname as you go, until you get to the root. (Remember that the dirID of the root directory on any volume is 2.) Hope this helps you out- Jack Eastman Physics Division Lawrence Berkeley Laboratory eastman@lbl.gov ------------------------------ Date: Fri, 29 Apr 88 21:52 CST From: THE VALEYARD =*= <CLAY@NTSUVAX> Subject: Calling Hypercard Hooks from Pascal Hello MacUsers: I am attempting to write a hypercard stack that uses an XCMD written with LS Pascal. The XCMD will sort data in a Hypercard Field. However, I cannot find any documentation on how to hook the XCMD into Hypercard for a case similar to this since the XCMD actually modifies the stack data. I have Goodman's Hypercard book. Can anyone help with this problem or direct me to a pubs that would help? Thanks! The Valeyard Clay Luther clay@ntsuvax ------------------------------ Date: Wed, 27 Apr 88 11:12 N From: <KRAALING%HWALHW50.BITNET@forsythe.stanford.edu> Subject: query Could someone report the status of MPW-FORTRAN. I am relatively new to the Mac scene and I want to run FORTRAN applications on a Mac II. Specific questions are: 1) is it already for sale, 2) true 77, 3) language extensions, 4) symbolic debugger, 5) 68881 support, 6) dynamic linking, 7) integrated programming environment, 8) run time errors, 9) interface to quickdraw routines. Any information is highly appreciated, Daniel van Kraalingen (bitnet: KRAALINGEN@HWALHW50) Dept. of Theoretical Production Ecology Agricultural University, Wageningen ------------------------------ Date: Mon, 25 Apr 88 16:29 PDT From: Danger Mouse <DM%MAX.ACS.WASHINGTON.EDU@forsythe.stanford.edu> Subject: Re: Power supply problems. To the person having problems with their screen, and was wanting an alternative to spending $150 for a new power supply. Get your hands on the July '87 issue of MacTutor, (either July or August, I'm pretty sure it's July), and look in the section of reprinted posts from Rusty Hodge's MouseHole BBS. What you may have is a cold solder that's screwing things up, and if the symptoms are the same and you have the electrical savvy, you may well be able to get your problem fixed for a fraction of the $150. (Or you could direct a technician to follow the instructions -- either way.) I read that issue right after having had a power supply swap done. I kicked myself all the way home. -- Danger Mouse ------------------------------ Date: Sun 24 Apr 88 15:33:08-PDT From: MANSFIELD%SPRLC.SPAN@STAR.STANFORD.EDU (Used furniture dealer From: and Subject: Hello there Is this the correct address for submitting stuff for the mac digests and for archiving on sumex? I have a couple of questions to ask of the net and I'm not connected to the usenet news as I am on a VMS machine (my Sun hasnt arrived yet!) I need to know if: a. anyone has a ray traing program for the mac. b. whether anyone has found an init or other method of putting the menubar on one screen and the disk and trash icons on another with multiple monio sorry monitors on the Mac II. Sure I can drag them there but it would be nice to have them come up thsorry that way excuse the messy message the emulator is playing up. c. has anyone tried the MPW Forran? I also want to return a fun icon that I downloaded and modified to work with the new systems. Am I writing to the right address? Cheers Jfm. ------------------------------ Date: Mon, 25 Apr 1988 12:11 PDT From: SHIPLEY <SPHERE%UWACDC.ACS.WASHINGTON.EDU@forsythe.stanford.edu> Subject: RE: Postscript from quickdraw If you have a Pict file, the easiest way to make PostScript from it would be to paste it into a blank document of any commercial drawing program, and then select print to laserwriter, and use wiggle-K to print the postscript to disk. -William Shipley ------------------------------ Date: Wed, 27 Apr 88 08:52:04 PST From: Peter Scott <PJS@grouch.JPL.NASA.GOV> Subject: DRAWIMP I have a program called DRAWIMP, written by Alan Weber of USC, which converts MacDraw files to imPRESS code and uses TeX fonts. Unfortunately, it only works with PXL font files, which have been superseded by more efficient GF and PK formats. Has anyone got a version of this program that supports these font formats? Please reply directly - I'm not on this list. Peter Scott (pjs%grouch@jpl-mil.jpl.nasa.gov) ------------------------------ Date: Wed, 27 Apr 88 16:38 EST From: <BELSLEY%BCVMS.BITNET@forsythe.stanford.edu> (DAVID A. BELSLEY) Subject: Flex, good but too speedy I just downloaded the Flex INIT/cdev and like it in all respects but its speed; it moves too fast. Ben, can you slow it down so that it runs at a stately pace on the Mac II? If there is a machine-dependency problem, perhaps you could include a speed control in the cdev? thanks for a nice product, david a. belsley boston college belsley@bcvax3.bitnet ------------------------------ Date: Fri, 29 Apr 88 18:59:48 IST From: Ami Zakai <RPR1ZAK%TECHNION.BITNET@forsythe.stanford.edu> Subject: Fast number crunching. The decision has been made in my institute to purchase a few machines dedicated to number crunching, we are considering Mac SE/II with accelerator boards/cards or array processors. I am interested in any information, addresses or personal experience with such machines and how it compares to other options in computing power/price. Please address all info to me and I will summarize or send to this new group with a copy to me. thanks Dr. Ami Zakai LifeSci project, Telecommunication. Rappaport Institute for Medical Research, P.O.B. 9697, Haifa 31096 ISRAEL Phone -972-4-512265 Fax -972-4-521296 attn Zakai Email RPR1ZAK@TECHNION.BITNET RPR1ZAK@TECHNION.TECH.AC.IL RPR1ZAK%TECHNION.BITNET@CUNYVM.CUNY.EDU ------------------------------ Date: 30 APR 88 03:44-N From: CZYCHI%CSGHSG52.BITNET@CUNYVM.CUNY.EDU Subject: Help with Relax MacMate 20 wanted Hello, I have medium size problem with my Relax MacMate 20 Harddisk. - It is the one which makes twice as noise as my old SE itself... Somebody threw the original installation and utilities SW away, and Apple's HD Setup won't work anymore (it worked before!). Suddenly it stuck while formatting the drive. It is a Seagate ST-225N. So I am asking you out there if you could probably help me. The best thing what could happen to me were if somebody could kindly send me the original Relax SW. But please do send me a note if you have any idea. Thanks a lot. Gary Gary T. Czychi University of St.Gallen, Switzerland CZYCHI@CSGHSG52.BITNET (also: CSGHSG53) Tel.: --41 / 71 / 27 52 68 --49 / 211 / 46 01 23 ------------------------------ Date: Sun, 24 Apr 88 17:18:40 PDT From: <GA0095%SIUCVMB.BITNET@forsythe.stanford.edu> Date: 24 April 1988, 19:05:49 CST From: Robert J. Brenstein (618) 453-5721 x 227 GA0095 at SIUCVMB To: INFO-MAC%SUMEX-AIM.STANFORD.EDU at STANFORD Re: unpacking multi-part stacks Joe I have been frequently downloading stacks and Macintosh programs coming in a few parts from MacServe. I found that it is the best to pre-process them on your IBM mainframe or VAX or whatever you use to communicate over BITNet. Univ of Toledo is listed to use IBM/CMS. If that is correct, use Xedit and/or COPY command to combine all parts into one large file and then download it to your Macintosh. This way you will have a single HQX file to deal with on Macintosh and no problems with APPENDing etc. Make sure to remove mail headers if they are present in other parts than the first one (usually they ain't there but it is worth checking). Robert <GA0095@SIUCVMB.BITNET> ------------------------------ Date: Mon, 25 Apr 88 09:02:47 CDT From: "James N.Bradley" <ACSH%UHUPVM1.BITNET@forsythe.stanford.edu> Subject: Downloading files Joe Feustle commented that he had a problem appending multiple sections of a file he downloaded from PUCC. I normally receive mail in CMS and if I get a multipart file, I use the GET command and combine it before I download it. It takes a little longer to KERMIT them down, but I get a file that's already in one piece. JNB ------------------------------ End of INFO-MAC Digest **********************