Artistic Style can format C, C++, and Java source code. Since I like
it's default format, I generally run the command
astyle *.{c,h,cc,java}
in a directory. This copies all the original files to *.orig and
formats everything!
Use astyle -h for the help page and style options.
Works with many source code formats, such as C, C++, Java, Lisp, yacc, sql, octave, html, perl, tcsh, sh, lex, mail, make, maple, matlab, modula, oberon, objc, ocaml, oracle, pascal, ada, awk, eiffel, verilog, vhdl, vrml, sed, haskel, fortran, tex, and a few others :).
I usually use one of the following:
a2ps -r --columns=1 -T 4 -f 10 -C -s 2 --toc -o x.ps *.{whatever} a2ps -R --columns=1 -T 4 -f 10 -C -s 2 --toc -o x.ps *.{whatever} a2ps -T 4 -C -s 2 --toc -o x.ps *.{whatever}
I usually use something like this:
c2ps -t 4 -f 8 -d 0.3 -o x.ps *.{c,cc,h}
A tool like Javadoc, but for C, C++, IDL, and Java! It generates both TeX and HTML.
I have the HTML manual on-line.
Prints javadoc to LaTeX. Very handy.
javadoc -private -classpath $X -docletpath doclet.jar -doclet
com.c2_tech.doclets.TexDoclet $SRC/*.java -output $DST/x.tex
I have found that for Letter paper, I need to modify the documentclass to use "letterpaper" and set "\topmargin -.4in".