Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 19468
b: refs/heads/master
c: d28bee0
h: refs/heads/master
v: v3
  • Loading branch information
Randy Dunlap authored and Linus Torvalds committed Feb 1, 2006
1 parent 3311ce2 commit ce42d11
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7045f37b17ffa6e85435ca980122b46a74caa7e4
refs/heads/master: d28bee0c0a9c6abddf1d14c69f188400e994eb5a
39 changes: 34 additions & 5 deletions trunk/Documentation/kernel-doc-nano-HOWTO.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ How to extract the documentation

If you just want to read the ready-made books on the various
subsystems (see Documentation/DocBook/*.tmpl), just type 'make
psdocs', or 'make pdfdocs', or 'make htmldocs', depending on your
preference. If you would rather read a different format, you can type
'make sgmldocs' and then use DocBook tools to convert
Documentation/DocBook/*.sgml to a format of your choice (for example,
psdocs', or 'make pdfdocs', or 'make htmldocs', depending on your
preference. If you would rather read a different format, you can type
'make sgmldocs' and then use DocBook tools to convert
Documentation/DocBook/*.sgml to a format of your choice (for example,
'db2html ...' if 'make htmldocs' was not defined).

If you want to see man pages instead, you can do this:
Expand Down Expand Up @@ -124,6 +124,36 @@ patterns, which are highlighted appropriately.
Take a look around the source tree for examples.


kernel-doc for structs, unions, enums, and typedefs
---------------------------------------------------

Beside functions you can also write documentation for structs, unions,
enums and typedefs. Instead of the function name you must write the name
of the declaration; the struct/union/enum/typedef must always precede
the name. Nesting of declarations is not supported.
Use the argument mechanism to document members or constants.

Inside a struct description, you can use the "private:" and "public:"
comment tags. Structure fields that are inside a "private:" area
are not listed in the generated output documentation.

Example:

/**
* struct my_struct - short description
* @a: first member
* @b: second member
*
* Longer description
*/
struct my_struct {
int a;
int b;
/* private: */
int c;
};


How to make new SGML template files
-----------------------------------

Expand All @@ -147,4 +177,3 @@ documentation, in <filename>, for the functions listed.

Tim.
*/ <twaugh@redhat.com>

6 changes: 3 additions & 3 deletions trunk/scripts/kernel-doc
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ use strict;
# Note: This only supports 'c'.

# usage:
# kerneldoc [ -docbook | -html | -text | -man ]
# kernel-doc [ -docbook | -html | -text | -man ]
# [ -function funcname [ -function funcname ...] ] c file(s)s > outputfile
# or
# [ -nofunction funcname [ -function funcname ...] ] c file(s)s > outputfile
Expand All @@ -59,7 +59,7 @@ use strict;
# -nofunction funcname
# If set, then only generate documentation for the other function(s). All
# other functions are ignored. Cannot be used with -function together
# (yes thats a bug - perl hackers can fix it 8))
# (yes, that's a bug -- perl hackers can fix it 8))
#
# c files - list of 'c' files to process
#
Expand Down Expand Up @@ -434,7 +434,7 @@ sub output_enum_html(%) {
print "<hr>\n";
}

# output tyepdef in html
# output typedef in html
sub output_typedef_html(%) {
my %args = %{$_[0]};
my ($parameter);
Expand Down

0 comments on commit ce42d11

Please sign in to comment.