summaryrefslogtreecommitdiff
path: root/bin/dsp2dsp.pl
diff options
context:
space:
mode:
authornanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-05-12 06:59:41 +0000
committernanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-05-12 06:59:41 +0000
commitc90ac52651f4166cb0fba57ca32b51c9482debaa (patch)
tree55e14228cd49c69baec20adc63e416caebb6ca64 /bin/dsp2dsp.pl
parentf1e0270ff1fc759867d810cf887b9fc58e06b86a (diff)
downloadATCD-c90ac52651f4166cb0fba57ca32b51c9482debaa.tar.gz
*** empty log message ***
Diffstat (limited to 'bin/dsp2dsp.pl')
-rwxr-xr-xbin/dsp2dsp.pl28
1 files changed, 28 insertions, 0 deletions
diff --git a/bin/dsp2dsp.pl b/bin/dsp2dsp.pl
new file mode 100755
index 00000000000..de552a6b445
--- /dev/null
+++ b/bin/dsp2dsp.pl
@@ -0,0 +1,28 @@
+# File: dsp2dsp.pl
+# Description: This perl script is used to "create" new dsp files
+# by modifying an existing dsp file.
+# Requirement: perl for Win32.
+# Usage: perl dsp2dsp.pl Basic_Types_Test Atomic_Op_Test
+# This will create Atomic_Op_Test.dsp by using
+# Basic_Types_Test.dsp as a template.
+#
+# Author: Nanbor Wang <nanbor@cs.wustl.edu>
+
+die "$0 requires two arguments.\n" if $#ARGV < 1;
+$TOFILE="$ARGV[1].dsp" ;
+die "$TOFILE already exists. Remove it first.\n" if -e $TOFILE;
+
+$FROM = $ARGV[0];
+$TO = $ARGV[1];
+
+open (FROM, "<$FROM.dsp");
+open (TO, ">$TO.dsp");
+
+while (<FROM>)
+{
+ s/$FROM/$TO/g;
+ print TO ;
+}
+
+close (TO);
+