diff libinterp/corefcn/variables.cc @ 23803:90689bdbe048

Use C++11 raw string literals to avoid escaping double quotes. * parser.cc, workspace-view.cc, __lin_interpn__.cc, cellfun.cc, colloc.cc, data.cc, dirfns.cc, eig.cc, file-io.cc, find.cc, gammainc.cc, gl2ps-print.cc, graphics.cc, graphics.in.h, help.cc, input.cc, load-path.cc, load-save.cc, oct-hist.cc, oct-stream.cc, pager.cc, pr-output.cc, spparms.cc, symtab.cc, toplev.cc, tril.cc, urlwrite.cc, utils.cc, variables.cc, chol.cc, qr.cc, symbfact.cc, ov-struct.cc, octave.cc, pt-id.h, version.cc, mkoctfile.in.cc: Replace regular strings containing "\"" patterns with R"(..."...)".
author Rik <rik@octave.org>
date Fri, 28 Jul 2017 10:34:33 -0700
parents 980f39c3ab90
children 01899bdd2a3a
line wrap: on
line diff
--- a/libinterp/corefcn/variables.cc	Thu Jul 27 21:39:19 2017 -0700
+++ b/libinterp/corefcn/variables.cc	Fri Jul 28 10:34:33 2017 -0700
@@ -383,7 +383,7 @@
 
   if (! (search_any || search_var || search_dir || search_file ||
          search_builtin || search_class))
-    error ("exist: unrecognized type argument \"%s\"", type.c_str ());
+    error (R"(exist: unrecognized type argument "%s")", type.c_str ());
 
   octave::symbol_table& symtab = interp.get_symbol_table ();
 
@@ -594,7 +594,7 @@
       std::string type = args(1).xstring_value ("exist: TYPE must be a string");
 
       if (type == "class")
-        warning ("exist: \"class\" type argument is not implemented");
+        warning (R"(exist: "class" type argument is not implemented)");
 
       return ovl (symbol_exist (interp, name, type));
     }
@@ -682,7 +682,7 @@
   if (nargin == 2)
     {
       if (! args(1).is_string () || args(1).string_value () != "local")
-        error_with_cfn ("second argument must be \"local\"");
+        error_with_cfn (R"(second argument must be "local")");
 
       nargin = 1;
       retval = true;
@@ -735,7 +735,7 @@
   if (wants_local_change (args, nargin))
     {
       if (! try_local_protect (var))
-        warning ("\"local\" has no effect outside a function");
+        warning (R"("local" has no effect outside a function)");
     }
 
   if (nargin > 1)
@@ -765,7 +765,7 @@
   if (wants_local_change (args, nargin))
     {
       if (! try_local_protect (var))
-        warning ("\"local\" has no effect outside a function");
+        warning (R"("local" has no effect outside a function)");
     }
 
   if (nargin > 1)
@@ -809,7 +809,7 @@
   if (wants_local_change (args, nargin))
     {
       if (! try_local_protect (var))
-        warning ("\"local\" has no effect outside a function");
+        warning (R"("local" has no effect outside a function)");
     }
 
   if (nargin > 1)
@@ -845,7 +845,7 @@
   if (wants_local_change (args, nargin))
     {
       if (! try_local_protect (var))
-        warning ("\"local\" has no effect outside a function");
+        warning (R"("local" has no effect outside a function)");
     }
 
   if (nargin > 1)
@@ -880,7 +880,7 @@
   if (wants_local_change (args, nargin))
     {
       if (! try_local_protect (var))
-        warning ("\"local\" has no effect outside a function");
+        warning (R"("local" has no effect outside a function)");
     }
 
   if (nargin > 1)
@@ -918,7 +918,7 @@
   if (wants_local_change (args, nargin))
     {
       if (! try_local_protect (var))
-        warning ("\"local\" has no effect outside a function");
+        warning (R"("local" has no effect outside a function)");
     }
 
   if (nargin > 1)
@@ -938,7 +938,7 @@
             }
         }
       if (i == nchoices)
-        error ("%s: value not allowed (\"%s\")", nm, sval.c_str ());
+        error (R"(%s: value not allowed ("%s"))", nm, sval.c_str ());
     }
 
   return retval;
@@ -961,7 +961,7 @@
   if (wants_local_change (args, nargin))
     {
       if (! try_local_protect (var))
-        warning ("\"local\" has no effect outside a function");
+        warning (R"("local" has no effect outside a function)");
     }
 
   if (nargin > 1)
@@ -981,7 +981,7 @@
             }
         }
       if (i == nchoices)
-        error ("%s: value not allowed (\"%s\")", nm, sval.c_str ());
+        error (R"(%s: value not allowed ("%s"))", nm, sval.c_str ());
     }
 
   return retval;