summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorcoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-01-01 18:23:56 +0000
committercoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-01-01 18:23:56 +0000
commite482c9c365405224e815f80a90195a27412d9c39 (patch)
tree3e46d65e35ccf2cb72f18f31ea5e18e084367133 /bin
parent727bcdff72653b049969b12c441956a2df3bec46 (diff)
downloadATCD-e482c9c365405224e815f80a90195a27412d9c39.tar.gz
ChangeLogTag:Fri Jan 1 12:22:14 1999 Carlos O'Ryan <coryan@cs.wustl.edu>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/Array.pl31
-rwxr-xr-xbin/Array_Helper16
-rwxr-xr-xbin/count_lines8
3 files changed, 51 insertions, 4 deletions
diff --git a/bin/Array.pl b/bin/Array.pl
new file mode 100755
index 00000000000..7f9bf393e15
--- /dev/null
+++ b/bin/Array.pl
@@ -0,0 +1,31 @@
+#!/bin/sh -- # -*- perl -*-
+eval 'exec perl -pi.Array.$$ -S $0 ${1+"$@"}'
+ if 0;
+
+# $Id$
+
+#
+# After the 4.6.10 release the template instantiations for ACE_Array
+# have changed, the class is implemented in terms of ACE_Array_Base;
+# this script fixes the template instantiations if needed.
+#
+# It changes instantiations of:
+#
+# ACE_Array<T>
+#
+# into:
+#
+# ACE_Array<T>
+# ACE_Array_Base<T>
+#
+
+# Notice the use of the -pi options: the while(<>) loop is implicit,
+# printing the current line is also implicit as well as fixing the
+# file in place.
+
+if (m/template class\s+ACE_Array\s*<(.*)>\s*;\s*/) {
+ print "template class ACE_Array_Base<", $1, ">;\n";
+} elsif (m/#pragma instantiate\s+ACE_Array\s*<(.*)>\s*$/) {
+ print "#pragma instantiate ACE_Array_Base<", $1, ">\n";
+}
+
diff --git a/bin/Array_Helper b/bin/Array_Helper
new file mode 100755
index 00000000000..6ffce3b799e
--- /dev/null
+++ b/bin/Array_Helper
@@ -0,0 +1,16 @@
+#! /bin/sh
+#
+# $Id$
+#
+
+# Finds all files that instantiate ACE_Array and runs the Array.pl
+# perl script on them, please check $ACE_ROOT/bin/Array.pl for more
+# details.
+
+find $* -type f -a \( -name '*.h' \
+ -o -name '*.i' \
+ -o -name '*.cpp' \) |
+ xargs egrep -l 'template[ \t]*class[ \t]*ACE_Array[ \t]*\<' |
+ xargs perl -pi $ACE_ROOT/bin/Hash_Map_Manager.pl
+
+
diff --git a/bin/count_lines b/bin/count_lines
index def948ae00c..ed6f2d21375 100755
--- a/bin/count_lines
+++ b/bin/count_lines
@@ -1,11 +1,11 @@
-# -*- perl -*-
-# $Id$
-#
-
eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
& eval 'exec perl -S $0 $argv:q'
if 0;
+# -*- perl -*-
+# $Id$
+#
+
use File::Basename;
$cmd= basename($0);