diff options
author | tradke <tradke@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2006-03-07 09:24:20 +0000 |
---|---|---|
committer | tradke <tradke@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2006-03-07 09:24:20 +0000 |
commit | 8546d803fcf8d8e323e2bffc9414b625ffe189c8 (patch) | |
tree | 7ae0943c8322e59c873f7f0c3c991eb4f428f3f6 /lib/sbin/interface_parser.pl | |
parent | 62cfc02574507d4856f56eaee9d1c0be669cd6ee (diff) |
Check the language specification in alias function definitions.
The language must be either 'C' or 'Fortran', allow for case-independence.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4265 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/sbin/interface_parser.pl')
-rw-r--r-- | lib/sbin/interface_parser.pl | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/sbin/interface_parser.pl b/lib/sbin/interface_parser.pl index 5cdb9b7e..2161124b 100644 --- a/lib/sbin/interface_parser.pl +++ b/lib/sbin/interface_parser.pl @@ -812,7 +812,18 @@ sub parse_interface_ccl if($provided_by =~ m/(.*)\s*LANGUAGE\s*(.+)/i) { $provided_by = $1; - $provided_by_language = $2; + $provided_by_language = "\U$2"; + if ($provided_by_language eq 'FORTRAN') + { + $provided_by_language = 'Fortran'; + } + elsif ($provided_by_language ne 'C') + { + my $message = "The providing function $provided_by in thorn $thorn " . + "has an invalid language specification."; + my $hint = "Language must be either C or Fortran."; + &CST_error(0, $message, $hint, __LINE__, __FILE__); + } } else { |