diff options
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"; +} |
