#! /bin/csh -f # # Filename: cformat2 # # Programmer: Br. David Carlson # # Date: March 26, 1994 # # This C shell program nicely formats the C program given as the # first command line parameter and places the formatted output in # the file given as the second command line parameter. # # The formatting is done by the c beautifier and a homemade program # that expands each tab to 3 spaces. # # File needed: # You must copy the file tabclear along with cformat2. # # Example of use: # To format the temp.c file and place the formatted version in a file # called temp2.c use: cformat2 temp.c temp2.c # if ($#argv != 2) then echo "Two parameters needed: the file to format and the destination file" else cb "$argv[1]" | tabclear > "$argv[2]" endif