changeset 5492:179096e8e57f

[project @ 2005-10-13 16:58:23 by jwe]
author jwe
date Thu, 13 Oct 2005 16:58:23 +0000
parents eacb3f5cfb99
children b2e882e8b68b
files src/ChangeLog src/DLD-FUNCTIONS/gplot.l
diffstat 2 files changed, 28 insertions(+), 67 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Thu Oct 13 16:51:04 2005 +0000
+++ b/src/ChangeLog	Thu Oct 13 16:58:23 2005 +0000
@@ -1,3 +1,8 @@
+2005-10-13  John W. Eaton  <jwe@octave.org>
+
+	* DLD-FUNCTIONS/gplot.l (F__gnuplot_raw__):
+	Call print_usage with correct function name.
+
 2005-10-12  John W. Eaton  <jwe@octave.org>
 
 	* DLD-FUNCTIONS/gplot.l: Major cleanup.
--- a/src/DLD-FUNCTIONS/gplot.l	Thu Oct 13 16:51:04 2005 +0000
+++ b/src/DLD-FUNCTIONS/gplot.l	Thu Oct 13 16:58:23 2005 +0000
@@ -1,3 +1,26 @@
+/*
+
+Copyright (C) 2004 John W. Eaton and Teemu Ikonen
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 2, or (at your option) any
+later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octavee; see the file COPYING.  If not, write to the Free
+Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301, USA.
+
+*/
+
 %option prefix="gpt"
 %option noyywrap
 
@@ -285,73 +308,6 @@
     return 0;
 }
 
-// This is used to handle single-quote delimited strings.  Kludge alert.
-
-static int
-handle_string (char delim)
-{
-  static char *buf = 0;
-
-  int c;
-  bool escape_pending = false;
-
-  std::string strbuf (1, static_cast<char> (delim));
-
-  while ((c = yyinput ()) != EOF)
-    {
-      if (c == '\\')
-	{
-	  if (escape_pending)
-	    {
-	      strbuf += static_cast<char> (c);
-	      escape_pending = false;
-	    }
-	  else
-	    {
-		strbuf += static_cast<char> (c);
-		escape_pending = true;
-	    }
-	  continue;
-	}
-      else if (c == '\n')
-	{
-	  error ("unterminated string constant");
-	  break;
-	}
-      else if (c == delim)
-	{
-	  if (escape_pending)
-	    strbuf += static_cast<char> (c);
-	  else
-	    {
-	      c = yyinput ();
-
-	      if (c == delim)
-		{
-		  strbuf += static_cast<char> (c);
-		  strbuf += static_cast<char> (c);
-		}
-	      else
-		{
-		  yyunput (c, yytext);
-		  strbuf += static_cast<char> (delim);
-		  delete [] buf;
-		  yytext = strsave (strbuf.c_str ());
-		  return STRING;
-		}
-	    }
-	}
-      else
-	strbuf += static_cast<char> (c);
-
-      escape_pending = false;
-    }
-
-  throw gpt_parse_error ("unterminated string");
-
-  return 0;
-}
-
 // (Probably not necessesary, but current Matlab style plot functions
 // break without this (they emit too short gnuplot commands))