lkml.org 
[lkml]   [2006]   [Jun]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: Kernel API Reference Documentation
    hoi :)

    when I once experimented with doxygen, I used the following script to
    convert some kerneldoc comments to doxygen syntax:

    #!/usr/bin/perl -wpi

    use strict;

    BEGIN { $::state = 0; }

    if ($::state == 0) {
    $::state = 1 if /\/\*\*/;
    } elsif ($::state == 1) {
    s/(\*\s+)(struct\s+|enum\s+)?\S+ - /$1/;
    s/$/\./ unless /\.$/;
    $::state = 2;
    } elsif ($::state == 2) {
    s/(\*\s+)\@(\w+):\s+(.*)/$1\\param $2 $3./;
    s/(\s+)[%&\@](\S+)/$1$2/g;
    }
    s/\.\.$/./;

    $::state = 0 if /\*\//;


    --
    Martin Waitz
    [unhandled content-type:application/pgp-signature]
    \
     
     \ /
      Last update: 2006-06-28 14:08    [W:0.020 / U:29.828 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site