home *** CD-ROM | disk | FTP | other *** search
-
- MACIFY v1.3
-
- By: Donald Burr
- INTERNET: dburr@ocf.berkeley.edu, 72540.3071@compuserve.COM
- Compu$erve: 72540,3071 America Online: DonaldBurr
-
- released into the public domain
-
- PURPOSE:
-
- I was getting sick and tired of getting corrupted ASCII downloads,
- using Zmodem. White Knight has an odd way of downloading, no matter what
- protocol you're using (X, Y, or Zmodem). I couldn't find a comparable
- program on the Macintosh that does UNIX newline -> Mac CR translations, so
- I wrote one for UNIX. This will convert both from UNIX -> Mac and also
- Mac -> UNIX, so you can upload text from your machine as well. If used in
- a shell script or a shell alias, this, combined with zmodem, can, in one
- fell swoop, convert and download files.
-
- COMPILING:
-
- I wrote this in fairly standard C, so it should compile on even
- non-ANSI systems. There are no system variables to change at all! Just
- type "cc -O macify.c -o macify" and you're set. If you don't want the
- output file stripped of debugging info, symbol table, etc. then eliminate
- the "-O" flag. Of course, you'll get a larger codefile, but.. if you're
- one of those paranoid folk that think every program will coredump on them,
- then this is for you. :)
-
- You must edit the "Makefile", to set up things specific for your
- system, like what directory to install the binaries and man pages in,
- etc. It is self-explanatory; just read the comments, and follow what
- they have to say.
-
- You must also edit "macify.c" and "convert.c". The only line
- you'll probably have to change is the line that #include's the string
- handling header file. It is currently set up for a SysV machine, which
- uses <string.h>. If you are compiling on BSD, change this to <strings.h>.
- If you're compiling on another system (MsDos, Mac, etc.), find out what
- header file you use for strings, and substitute its name in the brackets.
-
- Then, all you have to do is type "make", and you're set! The pro-
- gram will compile in the current directory; this is so that you can test
- it out to see if it works. Once you're satisfied that it works, typing
- "make install" will move the binary and man page to the directories you
- specified. Typing "make clean" will erase any extraneous files (.o files,
- etc.).
-
- USAGE:
-
- Running the program with no arguments will print out how to use it.
- But here is how to use it anyways.
-
- MACIFY (tm) v1.3, (c)1991 Donald Burr
- Usage: macify [um or mu] [inputfile or -] [outputfile or -]
- um = UNIX -> Macintosh
- mu = Macintosh -> UNIX
- inputfile = file to convert FROM, - for stdin
- outputfile = file to convert TO, - for stdout
-
- MACIFY takes three arguments.
-
- The first is a switch -- it lets the program know whether you want
- to do UNIX -> Mac, or Mac -> UNIX translation. This is done by
- giving it either "mu" (Mac -> UNIX), or "um" (UNIX -> Mac).
-
- The second argument is the filename you wish to use as INPUT.
- It can be a file on disk, or if you supply "-" (a hyphen),
- input will be taken from stdin. This is helpful for rediretion.
-
- The third argument is the filename you wish to use as OUTPUT.
- It can be a file on disk; if this file already exists, it will be
- overwritten. If you supply a hyphen (-), output will be sent
- to stdout. This is useful with redirection.
-
- CONCLUSION:
-
- Well, that's about it. I'm working on a port of this to Macintosh,
- so you can convert files on the Mac end. This will probably be distributed
- with the next version.
-
- If you have any bug reports, suggestions, questions, etc. about this
- program, please contact me via one of the E-Mail addresses listed at the
- beginning of this document.
-
- Enjoy!
-