Dec 092017
Convert Readmacs to work with WP 5.0.
File DECAP.ZIP from The Programmer’s Corner in
Category DeskTop Publishing
Convert Readmacs to work with WP 5.0.
File Name File Size Zip Size Zip Type
DECAP.C 1312 513 deflated
DECAP.DOC 4410 2058 deflated
DECAP.EXE 5196 3222 deflated

Download File DECAP.ZIP Here

Contents of the DECAP.DOC file

DECAP 1.0 26/05/88


DECAP, which stands for "decapitate," removes the MacBinary header
usually found on Macintosh files. This is particularly useful for
MacPaint files, since they're used extensively on PC machines.
Although most programs expect the header, some programs do not.
DECAP was written specifically to allow WordPerfect 5.0 and its
conversion utility, GRAPHCNV, to read MacPaint files without reporting
a "Bad Format" error.


Assuming you're using GRAPHCNV, try converting the MacPaint file as is.
If it works, fine. If it gives you an error, try DECAP as follows:

decap oldname newname

Most MacPaint files have a .MAC extension in their name. For the new
file name, use the old name and change the extension to .PNT
(i.e., decap borders.mac borders.pnt). GRAPHCNV recognizes graphic
formats by the file's contents, not by the extension.

If all goes well, you'll have two versions of the same file on disk. If
all doesn't go well, you'll see an error message and the program will stop.


"Couldn't open input file -- aborting": you probably gave DECAP
the wrong file name. Check the name and try again.

"Output file already exists -- aborting": you already have a
file on disk with the new name. Try again with another name.

"Bad input file -- aborting": After removing (or attempting to
remove) the header, DECAP reached the end of the file. It
probably wasn't a MacPaint file.

In addition, DECAP returns an ERRORLEVEL (for techies only!):

0 means all's well
1 means wrong usage
2 means open error on input
3 means open error on output
4 means premature EOF


The DECAP program and documentation file are released free of any charge.
You are allowed and encouraged to distribute DECAP as long as no fee is
charged for the program.


The source code for DECAP is included. It is written in Manx Aztec C,
although it should be usable with any standard C compiler.

DECAP works by doing fseek() on the input file, with an offset of 128
to skip the header, then copies the rest of the file.

Possible improvement: wildcard expansion to convert multiple files
(hint, hint!).


There are many clip-art files available on EDUCOMP Macintosh disks.
They're often called EDUxxx.PIT (or .SIT) on bulletin boards. GEnie
has many clip-art files and other artwork in its Macintosh area.
CompuServe has much artwork in its PICS area. When downloading single
files, give them a name that ends with .MAC. By naming all MacPaint
files .MAC, and all DECAPitated files .PNT, you'll always know which
is which at a glance; you'll also get into the habit of DECAPitating
.MAC files only.

.PIT and .SIT files are the Mac's equivalent of our .ARC files.
Look for UNPACKIT.ARC (or UNPIT.ARC) and UNSIT2.ARC for extraction
utilities. When extracting a file, these programs ask you for a
file name; always use an extension of .MAC. Some programs can
remove the MacBinary header while extracting the file, but you may
not always want to do that. More on that later.

It's a good idea to use a MacPaint viewer to see the image before
converting it. There are many such programs around; some just show
you the image, while others allow you to modify the image in several
ways (THEGRIN, OPTIKS, etc). I suggest you get one of the latter,
so that you can modify an image before GRABbing it. If your image
is a little longer than one screen, you can compress it vertically
until it fits, then use GRAB.

Since some image viewers expect a MacBinary header, you may want
to leave the header on the file. View or modify the picture first,
then DECAPitate it.

All we need now is a .WPG file viewer/editor. Anybody out there
want to do it?


If you have any questions, comments, etc., you can reach me:

on CompuServe (GO WPSG): 72477,326
on GEnie (IBM RoundTable): A.FRAILICH
on Canada Remote Systems (IBM area): Ariel Frailich

Have fun!

Ariel Frailich
35 Candle Liteway
Willowdale, Ont.
M2R 3J5

(416) 665-0290

 December 9, 2017  Add comments

Leave a Reply