From 18c23b96d716f33e659e39d337a1516a1f6638cb Mon Sep 17 00:00:00 2001 From: allen Date: Thu, 1 Jul 1999 15:24:21 +0000 Subject: 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 --- lib/sbin/create_c_stuff.pl | 37 ++++++++++++++++++++++++++++++++----- 1 file changed, 32 insertions(+), 5 deletions(-) (limited to 'lib/sbin/create_c_stuff.pl') 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;" ; -- cgit v1.2.3