diff options
| author | Scott Gasch <[email protected]> | 2016-06-01 18:58:58 -0700 |
|---|---|---|
| committer | Scott Gasch <[email protected]> | 2016-06-01 18:58:58 -0700 |
| commit | 3fd43cd5fcb22bb65bf2a92a25d95d801b11c9e0 (patch) | |
| tree | 9b6443235d16ba17f094a1a1c7ae53d2bcb9267b /src/dox-comments.pl | |
Initial checkin for typhoon chess engine.
Diffstat (limited to 'src/dox-comments.pl')
| -rwxr-xr-x | src/dox-comments.pl | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/dox-comments.pl b/src/dox-comments.pl new file mode 100755 index 0000000..2850928 --- /dev/null +++ b/src/dox-comments.pl @@ -0,0 +1,36 @@ +#!/usr/bin/perl + +for $file (@ARGV) +{ + print "$file\n"; + + if (!open(FILE, $file)) + { + print "Cannot open $file: $!\n"; + next; + } + + if (-e "$file.$$") + { + print "$file.$$ already exists, I will not klobber.\n"; + next; + } + + if (!open(OUT, ">$file.$$")) + { + print "Cannot open $file.$$: $!\n"; + next; + } + + while (<FILE>) + { + s#^/\*\+\+#/\*\*#g; + s#^\-\-\*/#\*\*/#g; + print OUT; + } + close(FILE); + close(OUT); + print "processed $file\n"; + + system "/bin/mv -f $file.$$ $file"; +} |
