# HG changeset patch # User jwe # Date 1109785112 0 # Node ID 7a25bb94ef65a65dc9a3fb578264a774904ac26b # Parent 4515ad040dc7409cf3fdff867c25b796e6723324 [project @ 2005-03-02 17:38:32 by jwe] diff -r 4515ad040dc7 -r 7a25bb94ef65 src/ChangeLog --- 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 + + * parse.y (looks_like_copyright): + Rename from looks_like_octave_copyright. Change all uses. + Simply match "Copyright". + 2005-03-01 John W. Eaton * DLD-FUNCTIONS/odessa.cc: Delete. diff -r 4515ad040dc7 -r 7a25bb94ef65 src/parse.y --- 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);