gendoc.pl (95908) | gendoc.pl (97241) |
---|---|
1#!/usr/bin/perl -w 2#- 3# Copyright (c) 2002 Networks Associates Technology, Inc. 4# All rights reserved. 5# 6# This software was developed for the FreeBSD Project by ThinkSec AS and 7# NAI Labs, the Security Research Division of Network Associates, Inc. 8# under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the --- 18 unchanged lines hidden (view full) --- 27# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 28# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 29# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33# SUCH DAMAGE. 34# | 1#!/usr/bin/perl -w 2#- 3# Copyright (c) 2002 Networks Associates Technology, Inc. 4# All rights reserved. 5# 6# This software was developed for the FreeBSD Project by ThinkSec AS and 7# NAI Labs, the Security Research Division of Network Associates, Inc. 8# under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the --- 18 unchanged lines hidden (view full) --- 27# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 28# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 29# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33# SUCH DAMAGE. 34# |
35# $P4: //depot/projects/openpam/misc/gendoc.pl#13 $ | 35# $P4: //depot/projects/openpam/misc/gendoc.pl#14 $ |
36# 37 38use strict; 39use Fcntl; 40use POSIX qw(strftime); 41use vars qw($COPYRIGHT $TODAY %FUNCTIONS %PAMERR); 42 43%PAMERR = ( --- 152 unchanged lines hidden (view full) --- 196 $man .= ".Bd -literal\n"; 197 $inliteral = 1; 198 $man .= "$_\n"; 199 next; 200 } 201 s/\s*=$func\b\s*/\n.Nm\n/gs; 202 s/\s*=$argnames\b\s*/\n.Va $1\n/gs; 203 s/\s*=(struct \w+(?: \*)?)\b\s*/\n.Vt $1\n/gs; | 36# 37 38use strict; 39use Fcntl; 40use POSIX qw(strftime); 41use vars qw($COPYRIGHT $TODAY %FUNCTIONS %PAMERR); 42 43%PAMERR = ( --- 152 unchanged lines hidden (view full) --- 196 $man .= ".Bd -literal\n"; 197 $inliteral = 1; 198 $man .= "$_\n"; 199 next; 200 } 201 s/\s*=$func\b\s*/\n.Nm\n/gs; 202 s/\s*=$argnames\b\s*/\n.Va $1\n/gs; 203 s/\s*=(struct \w+(?: \*)?)\b\s*/\n.Vt $1\n/gs; |
204 s/\s*:([a-z_]+)\b\s*/\n.Va $1\n/gs; 205 s/\s*;([a-z_]+)\b\s*/\n.Dv $1\n/gs; |
|
204 if (s/\s*=([a-z_]+)\b\s*/\n.Xr $1 3\n/gs) { 205 ++$xref{"$1 3"}; 206 } 207 s/\s*\"(?=\w)/\n.Do\n/gs; 208 s/\"(?!\w)\s*/\n.Dc\n/gs; 209 s/\s*=([A-Z][A-Z_]+)\b\s*(?![\.,:;])/\n.Dv $1\n/gs; 210 s/\s*=([A-Z][A-Z_]+)\b([\.,:;]+)\s*/\n.Dv $1 $2\n/gs; 211 s/\s*{([A-Z][a-z] .*?)}\s*/\n.$1\n/gs; --- 161 unchanged lines hidden (view full) --- 373by ThinkSec AS and NAI Labs, the Security Research Division of Network 374Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035 375.Pq Dq CBOSS , 376as part of the DARPA CHATS research program. 377"; 378 379 $fn = "$func->{'name'}.3"; 380 if (sysopen(FILE, $fn, O_RDWR|O_CREAT|O_TRUNC)) { | 206 if (s/\s*=([a-z_]+)\b\s*/\n.Xr $1 3\n/gs) { 207 ++$xref{"$1 3"}; 208 } 209 s/\s*\"(?=\w)/\n.Do\n/gs; 210 s/\"(?!\w)\s*/\n.Dc\n/gs; 211 s/\s*=([A-Z][A-Z_]+)\b\s*(?![\.,:;])/\n.Dv $1\n/gs; 212 s/\s*=([A-Z][A-Z_]+)\b([\.,:;]+)\s*/\n.Dv $1 $2\n/gs; 213 s/\s*{([A-Z][a-z] .*?)}\s*/\n.$1\n/gs; --- 161 unchanged lines hidden (view full) --- 375by ThinkSec AS and NAI Labs, the Security Research Division of Network 376Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035 377.Pq Dq CBOSS , 378as part of the DARPA CHATS research program. 379"; 380 381 $fn = "$func->{'name'}.3"; 382 if (sysopen(FILE, $fn, O_RDWR|O_CREAT|O_TRUNC)) { |
381 print(FILE $mdoc); 382 close(FILE); | 383 print(FILE $mdoc); 384 close(FILE); |
383 } else { 384 warn("$fn: open(): $!\n"); 385 } 386} 387 388sub gensummary() { 389 390 my $func; --- 67 unchanged lines hidden --- | 385 } else { 386 warn("$fn: open(): $!\n"); 387 } 388} 389 390sub gensummary() { 391 392 my $func; --- 67 unchanged lines hidden --- |