changeset 5175:7a25bb94ef65

[project @ 2005-03-02 17:38:32 by jwe]
author jwe
date Wed, 02 Mar 2005 17:38:32 +0000
parents 4515ad040dc7
children 10172b519695
files src/ChangeLog src/parse.y
diffstat 2 files changed, 12 insertions(+), 28 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Wed Mar 02 05:35:48 2005 +0000
+++ b/src/ChangeLog	Wed Mar 02 17:38:32 2005 +0000
@@ -1,3 +1,9 @@
+2005-03-02  John W. Eaton  <jwe@octave.org>
+
+	* parse.y (looks_like_copyright):
+	Rename from looks_like_octave_copyright.  Change all uses.
+	Simply match "Copyright".
+
 2005-03-01  John W. Eaton  <jwe@octave.org>
 
 	* DLD-FUNCTIONS/odessa.cc: Delete.
--- a/src/parse.y	Wed Mar 02 05:35:48 2005 +0000
+++ b/src/parse.y	Wed Mar 02 17:38:32 2005 +0000
@@ -2969,34 +2969,12 @@
 }
 
 static bool
-looks_like_octave_copyright (const std::string& s)
+looks_like_copyright (const std::string& s)
 {
-  bool retval = false;
-
-  std::string t = s.substr (0, 14);
-
-  if (t == "Copyright (C) ")
-    {
-      size_t pos = s.find ('\n');
-
-      if (pos != NPOS)
-	{
-	  pos = s.find ('\n', pos + 1);
-
-	  if (pos != NPOS)
-	    {
-	      pos++;
-
-	      t = s.substr (pos, 28);
-
-	      if (t == "This file is part of Octave."
-		  || t == "This program is free softwar")
-		retval = true;
-	    }
-	}
-    }
-
-  return retval;
+  // Perhaps someday we will want to do more here, so leave this as a
+  // separate function.
+
+  return (s.substr (0, 14) == "Copyright");
 }
 
 static int
@@ -3146,7 +3124,7 @@
 
   if (! help_txt.empty ())
     {
-      if (looks_like_octave_copyright (help_txt))
+      if (looks_like_copyright (help_txt))
 	{
 	  if (save_copyright)
 	    octave_comment_buffer::append (help_txt);