Mercurial > hg > octave-lyh
changeset 6528:b3e973d63c1c
[project @ 2007-04-16 17:13:08 by jwe]
author | jwe |
---|---|
date | Mon, 16 Apr 2007 17:13:09 +0000 |
parents | 2a04f026ef54 |
children | 853f99e292ec |
files | scripts/ChangeLog scripts/gethelp.cc |
diffstat | 2 files changed, 8 insertions(+), 26 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,5 +1,9 @@ 2007-04-16 John W. Eaton <jwe@octave.org> + * gethelp.cc (looks_like_octave_copyright): Use same logic as in + looks_like_copyright in src/help.cc. + From Søren Hauberg <soren@hauberg.org>. + * plot/__go_draw_axes__.m: For log plots, omit zero values too. 2007-04-13 John W. Eaton <jwe@octave.org> @@ -363,7 +367,7 @@ * miscellaneous/cast.m: Use feval and strcmp with cell to check arg instead of switch statement. - From Søren Hauberg <soren@hauberg.org> + From Søren Hauberg <soren@hauberg.org>. 2007-03-12 John W. Eaton <jwe@octave.org>
--- a/scripts/gethelp.cc +++ b/scripts/gethelp.cc @@ -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