diff src/toplev.h @ 7877:59031cfe331b

lasterror fixes
author John W. Eaton <jwe@octave.org>
date Mon, 09 Jun 2008 14:47:25 -0400
parents 6b521b1e3631
children 73ef513855e7
line wrap: on
line diff
--- a/src/toplev.h	Fri Jun 06 15:04:12 2008 -0400
+++ b/src/toplev.h	Mon Jun 09 14:47:25 2008 -0400
@@ -122,13 +122,25 @@
   // Current line in current function.
   static int current_line (void)
   {
-    return instance_ok () ? instance->do_current_line () : 0;
+    return instance_ok () ? instance->do_current_line () : -1;
   }
 
   // Current column in current function.
   static int current_column (void)
   {
-    return instance_ok () ? instance->do_current_column () : 0;
+    return instance_ok () ? instance->do_current_column () : -1;
+  }
+
+  // Line in user code caller.
+  static int caller_user_code_line (difference_type q = 0)
+  {
+    return instance_ok () ? instance->do_caller_user_code_line (q) : -1;
+  }
+
+  // Column in user code caller.
+  static int caller_user_code_column (difference_type q = 0)
+  {
+    return instance_ok () ? instance->do_caller_user_code_column (q) : -1;
   }
 
   // Caller function, may be built-in.
@@ -237,6 +249,10 @@
 
   int do_current_column (void) const;
 
+  int do_caller_user_code_line (difference_type q = 0) const;
+
+  int do_caller_user_code_column (difference_type q = 0) const;
+
   size_t do_current_frame (void) { return curr_frame; }
 
   octave_function *do_element (size_t n)