Changeset 596 in openpam


Ignore:
Timestamp:
Apr 14, 2012, 2:52:40 PM (9 years ago)
Author:
Dag-Erling Smørgrav
Message:

Add support for marking a function as deprecated or experimental.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/openpam_get_feature.c

    r594 r596  
    6464
    6565/**
     66 * EXPERIMENTAL
     67 *
    6668 * The =openpam_get_feature function stores the current state of the
    6769 * specified feature in the variable pointed to by its =onoff argument.
     
    7072 *
    7173 *      =OPENPAM_FEATURE_RESTRICT_SERVICE_NAME:
    72  
    73  *              Restrict service names to sequences of characters from the
     74 *              Disallow path separators in service names.
     75 *              Disabling this feature allows the application
     76 Restrict service names to sequences of characters from the
    7477 *              POSIX portable filename character set, not including the
    7578 *              path separator.
    7679 
    77  *              If this feature is disabled, the service name parameter
     80 *              If this feature is disabled, the application can specifyservice name parameter
    7881 *              can be used to specify a policy file directly.
    7982 
  • trunk/lib/openpam_readline.c

    r588 r596  
    112112
    113113/**
     114 * DEPRECATED openpam_readlinev
     115 *
    114116 * The =openpam_readline function reads a line from a file, and returns it
    115117 * in a NUL-terminated buffer allocated with =!malloc.
  • trunk/lib/openpam_set_feature.c

    r594 r596  
    6464
    6565/**
    66  * The =openpam_set_feature function
     66 * EXPERIMENTAL
     67 *
     68 * The =openpam_set_feature function sets the state of the specified
     69 * feature to the value specified by the =onoff argument.
     70 * See =openpam_get_feature for a list of recognized features.
    6771 *
    6872 * >openpam_get_feature
  • trunk/misc/gendoc.pl

    r575 r596  
    141141    my $inliteral;
    142142    my $customrv;
     143    my $deprecated;
     144    my $experimental;
    143145    my %xref;
    144146    my @errors;
     
    159161
    160162    $author = 'THINKSEC';
    161     if ($source =~ s/^ \* AUTHOR\s+(.*?)\s*$//m) {
     163    if ($source =~ s/^ \* AUTHOR\s+(\w*)\s*$//m) {
    162164        $author = $1;
     165    }
     166
     167    if ($source =~ s/^ \* DEPRECATED\s*(\w*)\s*$//m) {
     168        $deprecated = $1 // 0;
     169    }
     170
     171    if ($source =~ s/^ \* EXPERIMENTAL\s*$//m) {
     172        $experimental = 1;
    163173    }
    164174
     
    353363        'author'        => $author,
    354364        'customrv'      => $customrv,
     365        'deprecated'    => $deprecated,
     366        'experimental'  => $experimental,
    355367    };
    356368    if ($source =~ m/^ \* NODOC\s*$/m) {
     
    474486.Fn $func->{'name'} $func->{'args'}
    475487.Sh DESCRIPTION
    476 $func->{'man'}
    477 ";
     488";
     489    if (defined($func->{'deprecated'})) {
     490        $mdoc .= ".Bf Em\n" .
     491            "This function is deprecated and may be removed " .
     492            "in a future release without further warning.\n";
     493        if ($func->{'deprecated'}) {
     494            $mdoc .= "The\n.Fn $func->{'deprecated'}\nfunction " .
     495                "may be used to achieve similar results.\n";
     496        }
     497        $mdoc .= ".Ef\n.Pp\n";
     498    }
     499    if ($func->{'experimental'}) {
     500        $mdoc .= ".Bf Em\n" .
     501            "This function is experimental and may be modified or removed" .
     502            "in a future release without further warning.\n";
     503        $mdoc .= ".Ef\n.Pp\n";
     504    }
     505    $mdoc .= "$func->{'man'}\n";
    478506    my @errors = @{$func->{'errors'}};
    479507    if ($func->{'customrv'}) {
Note: See TracChangeset for help on using the changeset viewer.