Downloading ManualWDBNMSWD6 E„ E„„ž4)3€°3€°4040404>4>4>4>4>:4xF4¾4¾,4ź4ź(=ą/Š  ŠB’’ Macintosh Transfers by Chris Borton U.C.S.D. Micro Computer Support Group Introduction Just as many of the micro computer users predecessing the Macintosh found, there is a need to be able to transfer files composed of 8-bit bytes over communication lines that only support 7-bits. Most of these lines deal with main- frames and other `older' machines, where there was only a need to transfer text. For this a 7-bit line is sufficient, but doesn't work for 8-bit `binary' (as opposed to text) data. To handle this need, many conversion protocols have been established; the standard for the Macintosh is called `BinHex.' This document will describe the process of converting a hex file on a mainframe (presumed to be running Unix) and transferring it to a Macintosh in a usable form. The first portion will describe the `traditional' method, which requires one of the commercial programs MacTerminal, Versa- Term, SmartCom][, or MicroPhone. Several programs to cir- cumvent this and to simplify some of the processes will be discussed afterward. The Unix programs to be discussed are: macput, macget, xbin, macbin, and unpit. The principal programs on the Mac discussed are: BinHex, MacTerminal, and PackIt. BINHEX The key to most of this discussion is a program called BinHex for the Macintosh. Since programs and documents (other than text files) on the Mac are made up of 8-bit bytes, and many communications channels only support 7-bit bytes, there was a need to be able to convert 8-bit material to 7-bits for transfer, and convert it back once transferred. BinHex is the program on the Mac that does this conversion, in both directions. It traditionally pro- duces .hqx as the BinHex version of . MACPUT It is fairly simple to do the BinHex conversion on the Macintosh, and then transfer the file via `traditional' means such as umodem/xmodem or kermit. The program MacTer- minal came out early with the Mac, however, and provided a feature for transferring files between two Macs hooked up together. When configured for two Macs running MacTerminal and using the XMODEM protocol, the `Receive File...' menu item is disabled. If one Mac sends a file, the other automatically receives it without any action on the part of the user. Dave Johnson of Brown University wrote the pro- grams macput and macget for Unix to `mimic' the actions of MacTerminal. This allows Unix to transfer files to the Macintosh in a relatively painless fashion. The program macput makes Unix act as a Mac, running MacTerminal, that has chosen `Send File...' from the `File' menu. Given a filename, it sends that Unix file to the Macintosh. It has several options, the most important of which is `-u.' The command macput -u will send to the Macintosh as a text file, doing the neces- sary conversions along the way. The command macput looks for three files: .rsrc, .data, and .info. These correspond to the resource and data fork on the Mac, as well as the Finder info. Knowledge of how these `sections' work is not neces- sary to use these programs effectively. MACSEND macsend is a shellscript for Unix that will generate multiple macput's. The use of this is in transferring many files with MacTerminal, where the command macsend ... will transfer all those files without any action on the part of the user. This is particularly useful with wildcards, since all the files to be downloaded can be `collected' into one directory and macsend * will download all of them. MACGET As a nice complement to macput, the program macget does the opposite: act as a MacTerminal waiting to receive a file. Although MacTerminal is constantly in this `wait for a download' state, Unix is not. Hence, macget is necessary to put Unix in that state. The command macget is suffi- cient; it is unnecessary to give it a filename since the MacTerminal sending the file informs the `MacTerminal on the other side' (macget in this case) of the name of the file. This is the name of the file that appears on the Mac screen in the box giving the name, size and percentage transferred. If given a filename, however, macget will discard the Mac filename in favor of the one given it. This program has the same set of options as macput; they work basically in reverse. One note: macget -u will take the file transferred as a text file, converting it, and will add the suffix .text to the filename. Given no options, macget will create three files: .rsrc, .data, and .info. These can be sent the other direction using macput . XBIN Although the two programs macput and macget provide an nice method of tranferring files between Unix and MacTermi- nal, the next step is avoiding the BinHex process on the Macintosh. The Unix program xbin does the conversion from BinHex format to 8-bit format on Unix. Given a file (the .hqx suffix is presumed but not neces- sary), xbin will produce .rsrc, .data, and .info. These are perfect for macput to download to the Mac. In the the case of an appli- cation program, once downloaded it is ready to run. NET.SOURCES.MAC One of the primary uses of this xbin/macput procedure is to take advantage of the programs and information posted to net.sources.mac. This article assumes basic knowledge of the news system. The procedure is fairly simple: 1. Save the program to your own directory from the news program. (`s ' using rn) This is neces- sary since xbin produces files in the current direc- tory; so write permission on the directory is neces- sary. An alternative to this is to use xbin /usr/spool/news/net/sources/mac/???? while in the directory you wish the files to be in. 2. xbin This will produce three files with the suffixes .rsrc, .data, and .info. Use `ls' to check what the name is, since xbin restores the name used by the `creator' of the file. 3. macput , where is the name before the suffixes mentioned above. i.e., .rsrc, .data, and .info should all exist. If the file is a text file, use macput -u to transfer it. 4. MacTerminal will put up a window showing the name of the file, the size, and what percentage has been transferred. This will disappear when completed; if there is an error, MacTerminal will alert that `File Transfer Unsuccessful!' 5. Once successfully completed, the files on Unix may be deleted, if so desired, and upon quitting MacTer- minal the programs and/or files transferred will show up on the disk, `ready to run.' MacTerminal places the files downloaded on the disk holding the MacTer- minal document that was opened. Other programs vary-see the next section on `Other Programs For Mac- Terminal Transfers.' Other Programs For MacTerminal Transfers There are several commercial terminal programs for the Macintosh that have included `MacTerminal Transfers' in their reportoire of file transfer protocols. Currently (June 1986) those known are: VersaTerm, VersaTerm Pro, SmartCom ][, and MicroPhone. VersaTerm and VersaTerm Pro handle the transfers similarly to MacTerminal. VersaTerm 1.52 downloads files onto the disk it was run from; Versa- Term 2.0 and VersaTerm Pro allow the user to specify the `Receive Volume' from the `About VersaTerm' menu. SmartCom ][ forces you to give the file a name, and does not accept the transfer `automatically'-the user must specify that a file is to be received. MicroPhone has not been tested here, but is believed to work in the same fashion as MacTer- minal. PackIt and unpit PackIt is a program to put several files together into one for easy transfer. This can greatly facilitate moving many small files, since only one must be transferred. This makes it easier to transfer, but requires that the file be `packed' and `unpacked', thus adding steps to the process. There is a newer version, called PackIt II, that does some compression of the file as well. Use of this format on Usenet is presently controversial since it is shareware, not public domain. Just as xbin does the job of BinHex, unpit does the job of `unpacking' files on Unix. The normal procedure is to xbin , and then `unpit .data.' This will create all the original files, each with the appropri- ate .rsrc, .data, and .info. These may then be downloaded with macput. MacBinary and macbin MacBinary is an 8-bit format developed for Bulletin Board Systems and commercial services such as CompuServe. It is not useful for transfer between most mainframes, since those connections are limited to 7 bits. As a popular format that is included in many Macintosh communications programs, however, its structure is similar to the .rsrc, .data, and .info files created by xbin. Since they are similar, Jim Budler wrote the program macbin, that takes the three files created by xbin and creates one file, .bin, which can be transferred as a MacBinary file. This is primarily to allow people to use programs other than the commercial ones such as MacTerminal for transfers. Currently (June 1986) the public domain and shareware programs known to support this are Red Ryder 5.0 - 9.2 (shareware) and FreeTerm 1.7/1.8. Commercial programs that support it are: MacTerminal 2.0, VersaTerm and VersaTerm Pro, SmartCom ][ 2.1D, MicroPhone, InTouch 2.0, and undoubtedly some others as well. 9ŠChD8E8m¶Ūm¶Ūm¶Ūm¶Ūm¶Ūm¶Ūm¶Ūm¶Ūm¶Ūm¶Ūm¶Ūm¶Ūm¶Ūm¶Ūm¶Ūm¶Ūm¶Ūm¶Ūm¶Ūm¶Ūm¶Ūm¶Ūm¶Ūm¶Ūm¶Ūm¶Ūm¶Ūm¶Ūm¶Ūm¶Ūm¶Ūm¶Ūm¶Ūm¶Ūm¶Ūm¶Ūm¶PYf /6 Ÿ „ Ŗ ° Q W P V W Y [ypypypypypypypypypypy [ c ė ń ó ū " & 3 7 H LY`¶½ĄÄvpvpvpvpvpvpvpvpvpvpvÄĘĒŹĪŠŃŲÜŻŽ¬³ŌŚł’ ¼Āśypypypypypypypypypypyś–œ\bŅŲ w{ ¦ĖĻŻįvpvpvpvpvpvpvpvpvpvpvįōų,24<@Dekpv »æĀĪėļüypypypypypypypypypypyü.4 ÆŌųFIKS‘•™¤ØÜąvpvpvpvpvpvpvpvpvpvpvą(.04  -!Q!a!i!o"ø"Į#i#m#†ypypypypypypypypypypy#†#‹#Ö#Ś#ó#ų$$ $„$«$®$Ā&>&B&O&S&d&h&}&&¹&ævpvpvpvpvpvpvpvpvpvpv&æ&ź&ī'')))ypypyj@*PQRSTUVWXYxxxxxxlllbbbbbbbbb p pYfg¤į[˜ÕOŒ–—˜ÕOŒÉslllllllllllllllllll pCXY–Ó  I†Ć=z·ō./67t±īxxxxxxxxxxxxxxxxxxxxxxxī + h „ ā  \ ™ Ö  ? @ } ŗ ÷ 4 q ® ė ( e ¢ ßxxxxxxxxxxxxxxxxxxxxxxxOŒÉC€½ÓŪÜV“Š J‡Äxxxxxxxxxxxxxxxxxxxxxxx>{øõ2o¬é&?@EFƒĄż:w“ń.kŸxxxxxxxxxxxxxxxxxxxxxxxŸ °±²ļ,i›œŁSĶ <=z·ō ]xxxxxxxxxxxxxxxxxxxxxxx]š×()f£ą<=z·ō1n«č./0xxxxxxxxxxxxxxxxxxxxxxx0mŖē$ažŪ  U ’ Ļ! !I!P!Q!b!c!d!”!Ž""X"•xxxxxxxxxxxxxxxxxxxxxxx"•"Ņ##L#[#™#Ö$$P$$­$®$Ć$Ä$Å%%?%|%¹%ö&3&p&­&źxxxxxxxxxxxxxxxxxxxxxxx&ź'''d'”'Ž((X(•(Ņ))xxxxxxxxxx ’’’’’’’’’’’’’’@’’’’’’’’’’’@’’’Q īšxļšx’’’’’õ öŠż0’’’’’’ żšx’’h’óōöŽ() [Äśįüą#†&æ)STUVWXYZ[YīŸ]0"•&ź)\]^_`abcdef €ųłśūü