From 3fd43cd5fcb22bb65bf2a92a25d95d801b11c9e0 Mon Sep 17 00:00:00 2001 From: Scott Gasch Date: Wed, 1 Jun 2016 18:58:58 -0700 Subject: Initial checkin for typhoon chess engine. --- src/dox-comments.pl | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100755 src/dox-comments.pl (limited to 'src/dox-comments.pl') 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 () + { + s#^/\*\+\+#/\*\*#g; + s#^\-\-\*/#\*\*/#g; + print OUT; + } + close(FILE); + close(OUT); + print "processed $file\n"; + + system "/bin/mv -f $file.$$ $file"; +} -- cgit v1.3