summaryrefslogtreecommitdiff
path: root/lib/sbin/create_c_stuff.pl
diff options
context:
space:
mode:
authorallen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac>1999-07-01 15:24:21 +0000
committerallen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac>1999-07-01 15:24:21 +0000
commit18c23b96d716f33e659e39d337a1516a1f6638cb (patch)
tree54e438db7870a51d33d0779fa0b78893e1545af6 /lib/sbin/create_c_stuff.pl
parent08c3f083ce31e5e4ced7792d0cdcdd67512ea998 (diff)
Added all datatypes to parsers (but they don't work with pugh yet).
NOTE THAT INTEGER -> INT in param.ccl and interface.ccl In the param.ccl and interface.ccl you can have one optional cctk_ in front of each datatype. I'll be checking in changes for all thorns now ... you will have to go the realclean thing I would guess after updating git-svn-id: http://svn.cactuscode.org/flesh/trunk@610 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/sbin/create_c_stuff.pl')
-rw-r--r--lib/sbin/create_c_stuff.pl37
1 files changed, 32 insertions, 5 deletions
diff --git a/lib/sbin/create_c_stuff.pl b/lib/sbin/create_c_stuff.pl
index aec9e6c2..9203b4e7 100644
--- a/lib/sbin/create_c_stuff.pl
+++ b/lib/sbin/create_c_stuff.pl
@@ -196,7 +196,7 @@ sub set_parameter_code
{
$line = " retval = CCTK_SetKeywordInRangeList(\&($structure.$parameter), value, $n_ranges" ;
}
- elsif($type eq "INTEGER")
+ elsif($type eq "INT")
{
$line = " retval = CCTK_SetIntInRangeList(\&($structure.$parameter),value, $n_ranges" ;
}
@@ -331,15 +331,42 @@ sub get_c_type_string
{
$type_string = "char *";
}
- elsif($type eq "LOGICAL" ||
- $type eq "INTEGER")
+ elsif($type eq "LOGICAL")
{
$type_string = "int ";
+ }
+ elsif($type eq "INT")
+ {
+ $type_string = "CCTK_INT ";
+ }
+ elsif($type eq "INT2")
+ {
+ $type_string = "CCTK_INT2 ";
+ }
+ elsif($type eq "INT4")
+ {
+ $type_string = "CCTK_INT4 ";
+ }
+ elsif($type eq "INT8")
+ {
+ $type_string = "CCTK_INT8 ";
}
elsif($type eq "REAL")
{
$type_string = "CCTK_REAL ";
}
+ elsif($type eq "REAL4")
+ {
+ $type_string = "CCTK_REAL4 ";
+ }
+ elsif($type eq "REAL8")
+ {
+ $type_string = "CCTK_REAL8 ";
+ }
+ elsif($type eq "REAL16")
+ {
+ $type_string = "CCTK_REAL16 ";
+ }
else
{
die("Unknown parameter type '$type'");
@@ -460,7 +487,7 @@ sub order_params
push(@string_params, $parameter);
}
elsif($type eq "LOGICAL" ||
- $type eq "INTEGER")
+ $type eq "INT")
{
push(@int_params, $parameter);
}
@@ -505,7 +532,7 @@ sub get_parameter_code
$line = " *value = $structure.$parameter;\n" ;
$line .= " retval = PARAMETER_SENTENCE;" ;
}
- elsif($type eq "INTEGER")
+ elsif($type eq "INT")
{
$line = " *value = \&($structure.$parameter);\n" ;
$line .= " retval = PARAMETER_INTEGER;" ;