From: <car...@us...> - 2012-03-31 22:34:16
|
Revision: 10123 http://octave.svn.sourceforge.net/octave/?rev=10123&view=rev Author: carandraug Date: 2012-03-31 22:34:10 +0000 (Sat, 31 Mar 2012) Log Message: ----------- generate_package_html: bugfix when interpreting the information from autoload Modified Paths: -------------- trunk/octave-forge/extra/generate_html/NEWS trunk/octave-forge/extra/generate_html/inst/generate_package_html.m Modified: trunk/octave-forge/extra/generate_html/NEWS =================================================================== --- trunk/octave-forge/extra/generate_html/NEWS 2012-03-31 21:58:47 UTC (rev 10122) +++ trunk/octave-forge/extra/generate_html/NEWS 2012-03-31 22:34:10 UTC (rev 10123) @@ -5,5 +5,8 @@ package that the function belongs too and have a link for the package main page. + ** Autoload field when generating a package index.html page is now + correct. + ** keywords on the `See also:' will be interpreted properly (rather than just function names). Modified: trunk/octave-forge/extra/generate_html/inst/generate_package_html.m =================================================================== --- trunk/octave-forge/extra/generate_html/inst/generate_package_html.m 2012-03-31 21:58:47 UTC (rev 10122) +++ trunk/octave-forge/extra/generate_html/inst/generate_package_html.m 2012-03-31 22:34:10 UTC (rev 10123) @@ -1,4 +1,4 @@ -## Copyright (C) 2008 Soren Hauberg <so...@ha...> +## Copyright (C) 2008 Soren Hauberg <so...@ha...>a ## ## This program is free software; you can redistribute it and/or modify it ## under the terms of the GNU General Public License as published by @@ -371,15 +371,16 @@ if (isfield (list, "buildrequires")) fprintf (fid, " <tr><td>Build Dependencies:</td><td>%s</td></tr>\n", list.buildrequires); endif - - if (isfield (list, "autoload")) - if (list.autoload) - a = "Yes"; - else - a = "No"; - endif - fprintf (fid, " <tr><td>Autoload:</td><td>%s</td></tr>\n", a); + + ## if the package does not specify, then it is not autoloaded. Also, sometimes + ## the value is 1 (true) but other times the value is a string + if (isfield (list, "autoload") && (list.autoload == 1 || + any (strcmpi ({"yes", "on", "true"}, list.autoload)))) + a = "Yes"; + else + a = "No"; endif + fprintf (fid, " <tr><td>Autoload:</td><td>%s</td></tr>\n", a); fprintf (fid, " </table>\n\n"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |