On 06/ott/08, at 19:54, Søren Hauberg wrote:

> man, 06 10 2008 kl. 19:42 +0100, skrev Carlo de Falco:
>>> It seems your function get_first_help_sentence still gets confused
>>> when the function definition is split over more than one line.
>
> Ahh, I hadn't seen that syntax before. Thanks for bringing it up.
>
>>> As an example have a look at the short description for the function
>>> "TSTbweuler" from the ocs package on the OF website
>>> http://octave.sourceforge.net/doc/funref_ocs.html
>>> and compare with the one produced by generate_html.
>>> I think one solution could be to remove all occurrences of the
>>> string "@\n" from the help text before doing any further processing.
>
> Yes, you are right. I've made a change that's similar to the one you
> proposed. A new package has been uploaded.
>
> Thanks a lot for looking into this,
> Søren
>

Currently if a pakage is installed but not loaded  
generate_package_html marks all its functions as not implemented.
with the patch below it loads the package if it was not loaded.
c.

-----------------8<-----------------

--- generate_package_html.m     2008-10-06 20:13:48.000000000 +0100
+++ generate_package_html.m.bak 2008-10-06 20:15:13.000000000 +0100
@@ -51,23 +51,14 @@

  function generate_package_html (name, outdir = ".", options = struct  
())
    if (ischar (name))
-    [desclist, isllist] = pkg ("describe", name);
-    desc = desclist{1};
-    isloaded = isllist{1};
+    desc = pkg ("describe", name){1};
    elseif (isstruct (name))
-    [desc, isloaded] = pkg ("describe", name.name);
-    desc = desclist{1};
-    isloaded = isllist{1};
+    desc = name;
    else
      error (["generate_package_html: first input must either be the  
name of a ",
              "package, or a structure giving its description."]);
    endif

-  ## Check whether the package is loaded
-  if (!strcmpi(isloaded, "loaded"))
-    pkg("load", desc.name);
-  endif
-
    ## Create output directory if needed
    if (!exist (outdir, "dir"))
      mkdir (outdir);


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Octave-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/octave-dev

Reply via email to