diff liboctave/util/kpse.cc @ 19410:95c533ed464b

use warning IDs for all warnings in liboctave * CSparse.cc, MatrixType.cc, Sparse.cc, dSparse.cc, dbleQR.cc, eigs-base.cc, lo-specfun.cc, cmd-hist.cc, data-conv.cc, kpse.cc, lo-regexp.cc, oct-locbuf.cc, oct-shlib.cc, sparse-util.cc: Use current_liboctave_warning_with_id_handler and provide warning IDs for all warnings in liboctave code. * unwinddemo.cc: Also preserve and restore warning_wit_id_handler.
author John W. Eaton <jwe@octave.org>
date Thu, 18 Dec 2014 10:50:09 -0500
parents 8e056300994b
children 4197fc428c7d
line wrap: on
line diff
--- a/liboctave/util/kpse.cc	Thu Dec 18 07:57:58 2014 -0500
+++ b/liboctave/util/kpse.cc	Thu Dec 18 10:50:09 2014 -0500
@@ -1549,8 +1549,9 @@
       /* What if there isn't a matching close brace? */
       if (! c)
         {
-          (*current_liboctave_warning_handler)
-            ("%s: Unmatched {", text.c_str ());
+          (*current_liboctave_warning_with_id_handler)
+            ("Octave:pathsearch-syntax",
+             "%s: Unmatched {", text.c_str ());
 
           result = string_vector (text);
         }
@@ -2545,8 +2546,9 @@
 {
   if (expanding_p (var))
     {
-      (*current_liboctave_warning_handler)
-        ("kpathsea: variable '%s' references itself (eventually)",
+      (*current_liboctave_warning_with_id_handler)
+        ("Octave:pathsearch-syntax",
+         "kpathsea: variable '%s' references itself (eventually)",
          var.c_str ());
     }
   else
@@ -2623,8 +2625,9 @@
 
               if (var_end == src_len)
                 {
-                  (*current_liboctave_warning_handler)
-                    ("%s: No matching } for ${", src.c_str ());
+                  (*current_liboctave_warning_with_id_handler)
+                    ("Octave:pathsearch-syntax",
+                     "%s: No matching } for ${", src.c_str ());
                   i = var_end - 1; /* will incr to eos at top of loop */
                 }
               else
@@ -2636,8 +2639,9 @@
           else
             {
               /* $<something-else>: error.  */
-              (*current_liboctave_warning_handler)
-                ("%s: Unrecognized variable construct '$%c'",
+              (*current_liboctave_warning_with_id_handler)
+                ("Octave:pathsearch-syntax",
+                 "%s: Unrecognized variable construct '$%c'",
                  src.c_str (), src[i]);
 
               /* Just ignore those chars and keep going.  */