# HG changeset patch # User jwe # Date 1176743589 0 # Node ID b3e973d63c1c66b38525236de4d8cc831de05190 # Parent 2a04f026ef54c7c9ce23e8f4bd86ec7086f95fd4 [project @ 2007-04-16 17:13:08 by jwe] diff -r 2a04f026ef54 -r b3e973d63c1c scripts/ChangeLog --- a/scripts/ChangeLog Mon Apr 16 16:54:09 2007 +0000 +++ b/scripts/ChangeLog Mon Apr 16 17:13:09 2007 +0000 @@ -1,5 +1,9 @@ 2007-04-16 John W. Eaton + * gethelp.cc (looks_like_octave_copyright): Use same logic as in + looks_like_copyright in src/help.cc. + From Søren Hauberg . + * plot/__go_draw_axes__.m: For log plots, omit zero values too. 2007-04-13 John W. Eaton @@ -363,7 +367,7 @@ * miscellaneous/cast.m: Use feval and strcmp with cell to check arg instead of switch statement. - From Søren Hauberg + From Søren Hauberg . 2007-03-12 John W. Eaton diff -r 2a04f026ef54 -r b3e973d63c1c scripts/gethelp.cc --- a/scripts/gethelp.cc Mon Apr 16 16:54:09 2007 +0000 +++ b/scripts/gethelp.cc Mon Apr 16 17:13:09 2007 +0000 @@ -12,32 +12,10 @@ static bool looks_like_octave_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); + // Perhaps someday we will want to do more here, so leave this as a + // separate function. - 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; + return (s.substr (0, 9) == "Copyright"); } // Eat whitespace and comments from FFILE, returning the text of the