summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TAO/TAO_IDL/be/be_visitor_array/array_ci.cpp184
-rwxr-xr-xbin/make_release2
2 files changed, 93 insertions, 93 deletions
diff --git a/TAO/TAO_IDL/be/be_visitor_array/array_ci.cpp b/TAO/TAO_IDL/be/be_visitor_array/array_ci.cpp
index 44c6785a2b7..821748d1328 100644
--- a/TAO/TAO_IDL/be/be_visitor_array/array_ci.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_array/array_ci.cpp
@@ -173,8 +173,9 @@ int be_visitor_array_ci::visit_array (be_array *node)
}
char buf[NAMEBUFSIZE];
+ unsigned long i;
- for (unsigned long i = 0; i < node->n_dims (); ++i)
+ for (i = 0; i < node->n_dims (); ++i)
{
ACE_OS::memset (buf,
'\0',
@@ -230,118 +231,117 @@ int be_visitor_array_ci::visit_array (be_array *node)
<< ")" << be_uidt_nl
<< "{" << be_idt_nl;
- unsigned long i;
- unsigned long ndims = node->n_dims ();
- be_array *primitive_type = 0;
+ unsigned long ndims = node->n_dims ();
+ be_array *primitive_type = 0;
- if (bt->node_type () == AST_Decl::NT_typedef)
- {
- // Base type of the array node is a typedef. We need to make sure that
- // this typedef is not to another array type. If it is, then we cannot
- // assign an array to another. We will have to invoke the underlying
- // array type's copy method for every array dimension.
+ if (bt->node_type () == AST_Decl::NT_typedef)
+ {
+ // Base type of the array node is a typedef. We need to make sure that
+ // this typedef is not to another array type. If it is, then we cannot
+ // assign an array to another. We will have to invoke the underlying
+ // array type's copy method for every array dimension.
- // There may be more than one level of typedef.
- be_type *tmp = bt;
+ // There may be more than one level of typedef.
+ be_type *tmp = bt;
- while (tmp->node_type () == AST_Decl::NT_typedef)
- {
- be_typedef *tdef = be_typedef::narrow_from_decl (tmp);
- tmp = be_type::narrow_from_decl (tdef->base_type ());
- }
+ while (tmp->node_type () == AST_Decl::NT_typedef)
+ {
+ be_typedef *tdef = be_typedef::narrow_from_decl (tmp);
+ tmp = be_type::narrow_from_decl (tdef->base_type ());
+ }
- primitive_type = be_array::narrow_from_decl (tmp);
- }
+ primitive_type = be_array::narrow_from_decl (tmp);
+ }
- *os << "// Zero each individual element." << be_nl;
+ *os << "// Zero each individual element." << be_nl;
- // Generate nested loops for as many dimensions as there are.
- for (i = 0; i < ndims; ++i)
- {
- // Retrieve the ith dimension value.
- AST_Expression *expr = node->dims ()[i];
+ // Generate nested loops for as many dimensions as there are.
+ for (i = 0; i < ndims; ++i)
+ {
+ // Retrieve the ith dimension value.
+ AST_Expression *expr = node->dims ()[i];
- if ((expr == 0) || ((expr != 0) && (expr->ev () == 0)))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_array_cs::"
- "visit_array - "
- "bad array dimension\n"),
- -1);
- }
+ if ((expr == 0) || ((expr != 0) && (expr->ev () == 0)))
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "(%N:%l) be_visitor_array_cs::"
+ "visit_array - "
+ "bad array dimension\n"),
+ -1);
+ }
- if (expr->ev ()->et == AST_Expression::EV_ulong)
- {
- // Generate a loop for each dimension.
- *os << "for ( ::CORBA::ULong i" << i << " = 0; i" << i << " < "
- << expr->ev ()->u.ulval << "; ++i" << i << ")" << be_idt_nl
- << "{" << be_idt_nl;
- }
- else
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_array_cs::"
- "visit_array - "
- "bad array dimension value\n"),
- -1);
- }
- }
+ if (expr->ev ()->et == AST_Expression::EV_ulong)
+ {
+ // Generate a loop for each dimension.
+ *os << "for ( ::CORBA::ULong i" << i << " = 0; i" << i << " < "
+ << expr->ev ()->u.ulval << "; ++i" << i << ")" << be_idt_nl
+ << "{" << be_idt_nl;
+ }
+ else
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "(%N:%l) be_visitor_array_cs::"
+ "visit_array - "
+ "bad array dimension value\n"),
+ -1);
+ }
+ }
- if (primitive_type)
- {
- // The base type is a typedef to another array type, so
- // we use the base type's copy method.
- *os << "// call the underlying _zero" << be_nl;
+ if (primitive_type)
+ {
+ // The base type is a typedef to another array type, so
+ // we use the base type's copy method.
+ *os << "// call the underlying _zero" << be_nl;
- * os << "TAO::Array_Traits< ";
+ * os << "TAO::Array_Traits< ";
- if (bt->accept (this) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_array_cs::"
- "visit_array - "
- "base type decl failed\n"),
- -1);
- }
+ if (bt->accept (this) == -1)
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "be_visitor_array_cs::"
+ "visit_array - "
+ "base type decl failed\n"),
+ -1);
+ }
- * os << "_forany";
+ * os << "_forany";
- * os << ">::";
+ * os << ">::";
- *os << "zero (_tao_slice";
+ *os << "zero (_tao_slice";
- for (i = 0; i < ndims; ++i)
- {
- *os << "[i" << i << "]";
- }
+ for (i = 0; i < ndims; ++i)
+ {
+ *os << "[i" << i << "]";
+ }
- *os << ");";
- }
- else
- {
- // The base type is not a typedef to possibly another array type. In
- // such a case, assign each element.
+ *os << ");";
+ }
+ else
+ {
+ // The base type is not a typedef to possibly another array type. In
+ // such a case, assign each element.
- *os << "_tao_slice";
+ *os << "_tao_slice";
- for (i = 0; i < ndims; ++i)
- {
- *os << "[i" << i << "]";
- }
+ for (i = 0; i < ndims; ++i)
+ {
+ *os << "[i" << i << "]";
+ }
- *os << " = ";
+ *os << " = ";
- if (bt->accept (this) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_array_ch::"
- "visit_array - "
- "base type decl failed\n"),
- -1);
- }
+ if (bt->accept (this) == -1)
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "be_visitor_array_ch::"
+ "visit_array - "
+ "base type decl failed\n"),
+ -1);
+ }
- *os << " ();";
- }
+ *os << " ();";
+ }
for (i = 0; i < ndims; ++i)
{
diff --git a/bin/make_release b/bin/make_release
index 5126de53d4f..7a26f449deb 100755
--- a/bin/make_release
+++ b/bin/make_release
@@ -64,7 +64,7 @@ $ENV{'CVSROOT'} ||
die "$0: must set your CVSROOT environment variable\n";
$ENV{'ACE_ROOT'} ||
- die "$0: must set your CVSROOT environment variable\n";
+ die "$0: must set your ACE_ROOT environment variable\n";
########
######## Configuration parameters.