changeset 20529:fbbdd14aa7ce

edit.m: Update C++ oct-file template to use texinfo docstring * edit.m: Update C++ oct-file template to use texinfo docstring to match Octave coding style.
author Mike Miller <mtmiller@octave.org>
date Mon, 21 Sep 2015 17:56:03 +0200
parents 3f01c585f54e
children bf6c4433ed5f
files scripts/miscellaneous/edit.m
diffstat 1 files changed, 9 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/miscellaneous/edit.m	Mon Sep 21 17:15:17 2015 +0200
+++ b/scripts/miscellaneous/edit.m	Mon Sep 21 17:56:03 2015 +0200
@@ -471,11 +471,15 @@
         else
           code = " ";
         endif
-        body = ["#include <octave/oct.h>\n\n",               ...
-                "DEFUN_DLD(" name ", args, nargout, \"\\\n", ...
-                name, "\\n\\\n\")\n{\n",                     ...
-                "  octave_value_list retval;\n",             ...
-                "  int nargin = args.length ();\n\n",        ...
+        body = ["#include <octave/oct.h>\n\n"             ...
+                "DEFUN_DLD(" name ", args, nargout,\n"    ...
+                "          \"-*- texinfo -*-\\n\\\n"      ...
+                "@deftypefn {Loadable Function} "         ...
+                "{@var{retval} =} " name                  ...
+                " (@var{input1}, @var{input2})\\n\\\n"    ...
+                "@seealso{}\\n\\\n@end deftypefn\")\n{\n" ...
+                "  octave_value_list retval;\n"           ...
+                "  int nargin = args.length ();\n\n"      ...
                 code, "\n  return retval;\n}\n"];
 
         text = [comment, body];