next up previous 211
Next: About this document ...
Up: Description of tools
Previous: cmp-xxx - Compare filtered source with original for unwanted changes


do-xxx - Apply source code filter xxx to a set of files

Description:
This is a driver script to run one of the filter programs in the EXTREME package which modifies source code. It should be invoked under the name `do-xxx' to run the filter `xxx'.

The available filters xxx are:

  • inscnf - Wrap %VAL invocations in CNF_PVAL calls

  • crepint - Change int type to INT_BIG in C

  • frepint - Change INTEGER to INTEGER * 8 in Fortran


For each of its command line arguments (files) it:
  • Runs the filter xxx.

  • Writes a line to the file ./xxx.log saying how many lines were changed.

  • If and only if changes were made, it writes the modified file under the same name into the directory ./xxx.changed.

  • If the filter wrote any warnings to standard error, these are summarised to standard output.

  • Checks that the input file and output file don't look different in any unexpected ways, and writes a warning if they do.

  • For Fortran files, checks that no lines have been extended beyond 72 characters (this should not be possible, it's just an extra precaution).


It then writes a short summary of the run, including a report of whether any files gained new dependencies on include files. Thus anything which the filter or this script thinks may require human attention is written to standard output while modified files are written to a new directory.

As part of its checking, it invokes a script called cmp-xxx on each pair of (original, changed) files; these scripts are crude checks that the changes made have not done anything to the source code to change its intention other than what should have been done. They have been written in a fairly quick and dirty way however, and may well turn up false positives or false negatives.


Usage:
do-xxx files



next up previous 211
Next: About this document ...
Up: Description of tools
Previous: cmp-xxx - Compare filtered source with original for unwanted changes


Starlink System Note 73
Mark Taylor
13 August 2001
E-mail:ussc@star.rl.ac.uk

Copyright © 2001 Council for the Central Laboratory of the Research Councils