Collective Pretty Printing C/C++
Join the DZone community and get the full member experience.
Join For FreePretty Print all C/C++ and headers into ONE file each.
#!/bin/sh -
echo 'Pretty Print Script v0.2 by s tayefeh (2004)'
echo 'collects all .C .cc .cpp and .h from a ./.'
echo 'and create a PRETTY_C.ps file with the C-sources'
echo 'and a PRETTY_h.ps file with the header-sources'
ls -lq *.C *.cc *.cpp \
| awk '{printf "%s ", $8}' \
> clist.temp
ls -lq *.h \
| awk '{printf "%s ", $8}' \
> hlist.temp
a2ps --prologue=color -Ec++ -o PRETTY_C.ps \
`cat clist.temp` $1 $2 $3 $4
a2ps --prologue=color -Ec++ -o PRETTY_h.ps \
`cat hlist.temp` $1 $2 $3 $4
rm hlist.temp clist.temp
Printing
Opinions expressed by DZone contributors are their own.
Comments