summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorJani Nikula <jani.nikula@intel.com>2016-05-26 13:57:18 +0300
committerJani Nikula <jani.nikula@intel.com>2016-05-30 13:38:57 +0300
commit47ae7aed34ee9017e9eeb2ad066786239456a90f (patch)
treec30c5c37460b2be913f867de706df825528fcb1e /scripts
parenta7291e7e03f8b45a4b028a410063dc94f9bff8c0 (diff)
downloadlinux-47ae7aed34ee9017e9eeb2ad066786239456a90f.tar.gz
linux-47ae7aed34ee9017e9eeb2ad066786239456a90f.tar.bz2
linux-47ae7aed34ee9017e9eeb2ad066786239456a90f.zip
kernel-doc/rst: add support for &union foo and &typedef foo references
Let the user use "&union foo" and "&typedef foo" to reference foo. The difference to using "union &foo", "typedef &foo", or just "&foo" (which are valid too) is that "union" and "typedef" become part of the link text. Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/kernel-doc4
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/kernel-doc b/scripts/kernel-doc
index e7aa792e7f1b..446c0912395e 100755
--- a/scripts/kernel-doc
+++ b/scripts/kernel-doc
@@ -212,6 +212,8 @@ my $type_struct_xml = '\\&amp;((struct\s*)*[_\w]+)';
my $type_env = '(\$\w+)';
my $type_enum_full = '\&(enum)\s*([_\w]+)';
my $type_struct_full = '\&(struct)\s*([_\w]+)';
+my $type_typedef_full = '\&(typedef)\s*([_\w]+)';
+my $type_union_full = '\&(union)\s*([_\w]+)';
# Output conversion substitutions.
# One for each output format
@@ -283,6 +285,8 @@ my @highlights_rst = (
[$type_func, "\\:c\\:func\\:`\$1()`"],
[$type_struct_full, "\\:c\\:type\\:`\$1 \$2 <\$2>`"],
[$type_enum_full, "\\:c\\:type\\:`\$1 \$2 <\$2>`"],
+ [$type_typedef_full, "\\:c\\:type\\:`\$1 \$2 <\$2>`"],
+ [$type_union_full, "\\:c\\:type\\:`\$1 \$2 <\$2>`"],
# in rst this can refer to any type
[$type_struct, "\\:c\\:type\\:`\$1`"],
[$type_param, "**\$1**"]