summaryrefslogtreecommitdiff
path: root/lib/sbin/c_file_processor.pl
diff options
context:
space:
mode:
authorschnetter <schnetter@17b73243-c579-4c4c-a9d2-2d5706c11dac>2004-01-19 14:50:51 +0000
committerschnetter <schnetter@17b73243-c579-4c4c-a9d2-2d5706c11dac>2004-01-19 14:50:51 +0000
commit1fd1c9e06006a4a96e97afca588dd73e02bdd314 (patch)
treeab011183c22c83cdaa962b29bf3a4cee076d0da5 /lib/sbin/c_file_processor.pl
parent6b159579c63e41bcc1ed9e34b91efe753886060c (diff)
Make error messages and debug information point to the real source
file instead of the preprocessed file. The options C_LINE_DIRECTIVES and F_LINE_DIRECTIVES control this behaviour. git-svn-id: http://svn.cactuscode.org/flesh/trunk@3527 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/sbin/c_file_processor.pl')
-rw-r--r--lib/sbin/c_file_processor.pl11
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/sbin/c_file_processor.pl b/lib/sbin/c_file_processor.pl
index d0577f25..e4b11500 100644
--- a/lib/sbin/c_file_processor.pl
+++ b/lib/sbin/c_file_processor.pl
@@ -16,6 +16,9 @@
$home = shift(@ARGV);
+# Do we want line directives?
+$line_directives = $line_directives eq 'yes';
+
$fortran_name_file = "$home/fortran_name.pl";
if (! -e "$fortran_name_file" )
@@ -25,10 +28,10 @@ if (! -e "$fortran_name_file" )
require "$fortran_name_file";
-#if($source_file_name)
-#{
-# print "# 1 $source_file_name\n";
-#}
+if($source_file_name)
+{
+ print "# 1 \"$source_file_name\"\n" if ($line_directives);
+}
$closing_brackets = '';
$routine = '';