Cprint 1.0 - a utility to convert C source files into Tex formatted files

Copyright (C) 1992  Tim Nali

-----------------------------------------------------------------------------
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
----------------------------------------------------------------------------

  Cprint is a small utility that can apply Tex formatting to ordinary C source
files.  Cprint takes in a plain ascii text file and produces a TeX file that 
can be pumped through TeX and dvixxx to produce high quality hardcopy.  
While cprint can do some very basic formatting with any text file (see below), 
it is specifically designed to handle C source files.  Cprint can tell where 
comments and function bodies start and end, and apply different formatting 
styles to them.  Cprint also appends a user-specified TeX macro file to the 
top of the output-file, for added control of formatting.  


INSTALLATION

  In the Makefile, change  the following:
	LIBDIR to point to where cprint should store it's macro files.
	BINDIR to where the cprint binary will go. 
	MANLIB to the correct man directory. 
	DOCDIR to where the manual should go.

  In the file cprint.c change the following:
	DEFAULTDIR to where cprint should store it's macro files
		(this must be the same as LIBDIR above)

  Then just type "make" to install.


QUICK USER'S GUIDE.

  to print out C source files in the default style, type:

	"cprint filename"
 
  this will produce a file named `filename.tex'

  
  to put a headline at the top of each page showing the filename and page 
  number:

	"cprint -h filename"

  to use a different name for the output file:

	"cprint -o output-filename filename"

  to use an alternate typewriter style:

	"cprint -ttype -m ttypemac.tex filename"

  to TeX format cprint's manual:

	"cprint -ascii -m asciimac.tex -o cprintman.tex cprint.manual"

INCLUDED MACRO FILES

  There are three macro files include with this distribution:  romanmac.tex,
ttypemac.tex, and asciimac.tex

  Romanmac.tex uses the roman font family.  The headline prints the filename on
the left, dots in the middle, and page number on the right.  The headline is 
in a bold font cmbx12 magnified by 1.44 (magstep 2).  The rest of the document 
will be in 10 point.  Global declarations, variables, etc. will be in bold, 
comments in italics, and function bodies in regular roman font.

  Ttypemac.tex has the same headline as romanmac.tex.  All other sections are
in 10 point typewriter type (cmtt10).  I suggesting using the switch -ttype
with this macro file.

  Asciimac.tex is designed for non C source material, such as the manual for 
cprint.  It's headline has the filename in italics and the page number in bold
(both in 10 point).  No bold or italic fonts are used.

  Let me point out the CPRINT IS DESIGNED FOR C SOURCE CODE.  How well it works
with other material depends largely on the form of it.  In fact, you might get 
error messages from TeX.  It will work best if there is a blank line seperating
each paragraph and if every paragraph is indented.  If every line of text is 
terminated by a newline (like cprint's manual), use the -ascii switch.  If 
there are newlines only at end of paragraphs, then don't use the switch.  

  With that said, let me assure you that using cprint on the manual or this 
readme will work just fine.
