Perl script c++2ps

c++2ps is a PERL script for converting Cpp source code into pretty printable postscript files.

The use of c++2ps is simple, type

  c++2ps [options] file1 file2 ...

and the file

  file1.ps file2.ps ...

are produced. Type c++2ps --help to have a look of possible options:

  Usage: c++2ps [options] file1 file1 ...

     --help             print this message
     --verbose          more messages
     --silent           no messages
     --2                two column formatting
     --r                pages in reverse order
     --tab=i            tab length
     --tex              do not remove generated tex file

     --XXX_color=COLOR
     --XXX_font=FONT

  XXX   = comment, keyword, function, preprocess, number, string,
          class, alias, braket, macro
  COLOR = black, gray, maroon, purple, green, olive, navy, teal,
          silver, white, red, fuchsia, lime, yellow, blue, aqua.
  FONT  = textrm, textsf, texttt, textmd, textbf, textup, textit,
          textsl, testsc, emph

  by Enrico Bertolazzi (c)

For example some source codes of the CALC package are converted as follows

Original source Converted
calc.hh calc.hh.ps
calc.test.cc calc.test.cc.ps

Important:

c++2ps uses LaTeX and dvips, so you need that packages.

Download: here

Back to top