source file of the LilyPond music typesetter
- (c) 1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+ (c) 1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
*/
#include <iostream.h>
-#include "proto.hh"
+#include "flower-proto.hh"
#include "input.hh"
#include "string.hh"
#include "source.hh"
}
/*
- Produce almost GNU-compliant error message. Lily used to be rather
- GNU-compliant in this too, but correcting mudela is such a breeze if
- you('re edidor) know(s) the error column too (there's no GNU standard
- on columns, is there?).
-
+ Produce GNU-compliant error message. Correcting lilypond source is
+ such a breeze if you ('re edidor) know (s) the error column too
+
Format:
[file:line:column:][warning:]message
void
Input::non_fatal_error (String s) const
{
- message (_ ("Non fatal error: ") + s);
+ message (_ ("non fatal error: ") + s);
}
String
Input::location_str () const
if (source_file_l_)
return source_file_l_->file_line_column_str (defined_ch_C_);
else
- return "(" + _ ("position unknown") + ")";
+ return " (" + _ ("position unknown") + ")";
}
String
else
return "?";
}
+
+String
+Input::file_str () const
+{
+ if (source_file_l_)
+ return source_file_l_->name_str ();
+ else
+ return "";
+}
+
+
+int
+Input::line_number () const
+{
+ if (source_file_l_)
+ return source_file_l_->line_i (defined_ch_C_);
+ else
+ return 0;
+
+}
+
+int
+Input::column_number () const
+{
+ if (source_file_l_)
+ return source_file_l_->column_i (defined_ch_C_);
+ else
+ return 0;
+
+}