Ptype - TYPE TO THE PRINTER Used with AMIGA, MSDOS, and UNIX to: - Print a source program with line numbers and page headings - Type a letter or a documentation file - Convert tabs in a file to spaces - Print many copies such as postcards See the documentation pages at the front of the source file "Ptype.c" for details on usage, the latest changes, etc. COMMAND FORMAT Enter the commamd "ptype ?" from the Amiga CLI or MSDOS, "ptype \?" from Amiga C shell or UNIX for a complete description of the command. If you just enter "ptype" it takes input from stdin. Exit by typing the end-of-file char ("ctl-\" for Amiga) or "ctl-C", "". FILES INCLUDED FOR AMIGA (most have ".info" files also) Readme This file Ptype.c The source program Ptype The executable program compile.doc The compile and link commands for the Amiga File_Print Print from the workbench, using the ARP file requester Install_Ptype Copies Ptype to the system disk (see below) CHANGES FOR PTYPE VERSION 2.0 - An un-printable binary character in the file is no longer converted to a space but is now expanded to two characters, such as "^C". - New option "-e" (no escapes) causes all control chars except newline, formfeed, and tab, to print expanded, such as "^H". This allows files with strange escapes sequences to be printed with out messing up the printer. (Note that by default the tab expands to spaces.) - New option "-x" (no extended chars) causes the extended characters (above 80 hex) to be expanded, such as "\^C" or "\A". - New option "-f" allows the ARP file requestor to be used when no input files are specified. USE FROM WORKBENCH A new icon, File_Print, can be used to print files from the workbench. Double clicking on the icon will bring up a small output message window and an ARP File Requester to allow selection of the file to be printed. It uses the AmigaDos command "IconX" to execute a small script file named "File_Print". This file can be edited to change the options for printing (such as adding line numbers). This is a little primitive, but someday maybe I'll have time to make a full workbench interface with TOOL TYPES and gadgets for specifing the print options. KNOWN PROBLEMS When used from the workbench, the print can't be aborted with ctl-C. It is a limitation (or maybe a bug) in the AmigaDOS command "IconX". If used from the CLI, then ctl-C may be used to abort printing. The program does not check the version of "arp.library" when the File Requester is used. The documentation that I have does not state which older versions of the library support the File Requester. The testing was done using ARP v1.3 (library version 39). If it does strange things, try upgrading the ARP library to a newer version. INSTALLING PTYPE For use from the CLI, copy Ptype to a directory in your path (eg. c:). For use from the WORKBENCH, double click on "Install_Ptype", which will copy the program "Ptype" to the c directory of your system disk (the one you booted from). Then copy "File_Print" to the desired window by draging its icon (See your manual "Introduction to the Commodore Amiga xxxx", xxxx = 500, 1000, 2000 etc.) If you have moved "c:" to somewhere other than "sys:c" then you will need to insure that Ptype is also copied to "c:" or change "File_Print". REQUIREMENTS - AmigaDos 1.3 (the IconX command) only if using the workbench icons. - Library "arp.library" if using icon "File_Print" or the "-f" option from the CLI. (See known problems above.) - The program uses only about 60K bytes when it is running. RESIDENT The program is pure and can be made resident on the Amiga as follows: resident c:Ptype add PIPES & WILD CARDS If you are using MSDOS, UNIX (sh or csh), or Matthew Dillon's C shell on the Amiga, try the following: dir | ptype -n dir | ptype -n -w120 -hDirectory_List ptype -d *.c (not for MSDOS) Note: A command line with too many arguments generated by wild cards, such as "*.c" can be truncated (the ending files will be lost). Test it using: ptype -v *.c Bob Alston 26-Nov-89 805 Chapel Street Stratford, CT 06497