X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=ginac%2Fstructure.pl;h=41989148a52c57e731ea77112a32cbee6be3543d;hp=223b8c70e2bf192c157a9560a4011a9e6b41ee8d;hb=1c288c22278ea56673eaf96c3c9885a7b5d854a8;hpb=dbb36db8d02b2c25af6bbfff8135112637936e1f diff --git a/ginac/structure.pl b/ginac/structure.pl index 223b8c70..41989148 100755 --- a/ginac/structure.pl +++ b/ginac/structure.pl @@ -32,7 +32,7 @@ while ($decl =~ /^ ?(\w+) ([\w \,]+)\; ?((\/\*.*?\*\/)?)(.*)$/) { } $member=$2; } - if ($member !~ /^\w$/) { + if ($member !~ /^\w+$/) { die "illegal struct, must match 'struct name { type var; /*comment*/ ...};': $input_structure"; } push @TYPES,$type; @@ -150,9 +150,9 @@ ${input_structure} #include "structure.h" -#ifndef NO_GINAC_NAMESPACE +#ifndef NO_NAMESPACE_GINAC namespace GiNaC { -#endif // ndef NO_GINAC_NAMESPACE +#endif // ndef NO_NAMESPACE_GINAC class ${STRUCTURE} : public structure { @@ -217,9 +217,9 @@ extern const unsigned tinfo_${STRUCTURE}; #define ex_to_${STRUCTURE}(X) (static_cast<${STRUCTURE} const &>(*(X).bp)) -#ifndef NO_GINAC_NAMESPACE +#ifndef NO_NAMESPACE_GINAC } // namespace GiNaC -#endif // ndef NO_GINAC_NAMESPACE +#endif // ndef NO_NAMESPACE_GINAC #endif // ndef _${STRUCTURE_UC}_H_ @@ -258,9 +258,9 @@ ${input_structure} #include "${STRUCTURE}.h" -#ifndef NO_GINAC_NAMESPACE +#ifndef NO_NAMESPACE_GINAC namespace GiNaC { -#endif // ndef NO_GINAC_NAMESPACE +#endif // ndef NO_NAMESPACE_GINAC ////////// // default constructor, destructor, copy constructor assignment operator and helpers @@ -514,9 +514,9 @@ const ${STRUCTURE} some_${STRUCTURE}; const type_info & typeid_${STRUCTURE}=typeid(some_${STRUCTURE}); const unsigned tinfo_${STRUCTURE}=structure::register_new("${STRUCTURE}"); -#ifndef NO_GINAC_NAMESPACE +#ifndef NO_NAMESPACE_GINAC } // namespace GiNaC -#endif // ndef NO_GINAC_NAMESPACE +#endif // ndef NO_NAMESPACE_GINAC END_OF_IMPLEMENTATION