Lines Matching refs:func
105 my $func;
152 $func = $fn;
153 $func =~ s,^(?:.*/)?([^/]+)\.c$,$1,;
154 if ($source !~ m,\n \* ([\S ]+)\n \*/\n\n([\S ]+)\n$func\((.*?)\)\n\{,s) {
155 warn("$fn: can't find $func\n");
295 s/\s*=($func)\b\s*/\n.Fn $1\n/gs;
331 $FUNCTIONS{$func} = {
334 'name' => $func,
347 $FUNCTIONS{$func}->{nodoc} = 1;
350 $FUNCTIONS{$func}->{openpam} = 1;
352 expand_errors($FUNCTIONS{$func});
353 return $FUNCTIONS{$func};
358 my $func = shift; # Ref to function hash
364 if (defined($$func{recursed})) {
365 warn("$$func{name}(): loop in error spec\n");
368 $$func{recursed} = 1;
370 foreach (keys %{$$func{errors}}) {
373 warn("$$func{name}(): unrecognized error: $1\n");
376 $errors{$1} = $$func{errors}->{$_};
382 $fn = $$func{source};
383 $fn =~ s/$$func{name}/$ref/;
387 warn("$$func{name}(): reference to unknown $ref()\n");
394 warn("$$func{name}(): invalid error specification: $_\n");
397 foreach (keys %{$$func{errors}}) {
402 delete($$func{recursed});
403 $$func{errors} = \%errors;
432 my $func = shift; # Ref to function hash
439 return if defined($$func{nodoc});
441 $$func{source} =~ m/([^\/]+)$/;
443 if ($$func{version}) {
444 $mdoc .= ".\\\" $$func{version}\n";
447 .Dt " . uc($$func{name}) . " 3
450 .Nm $$func{name}
451 .Nd $$func{descr}
453 if ($func =~ m/^(?:open)?pam_/) {
461 if ($$func{args} =~ m/\bFILE \*\b/) {
464 if ($$func{name} =~ m/^(?:open)?pam/) {
468 if ($$func{name} =~ m/_sm_/) {
471 if ($$func{name} =~ m/openpam/) {
474 $mdoc .= ".Ft \"$$func{type}\"
475 .Fn $$func{name} $$func{args}
478 if (defined($$func{deprecated})) {
482 if ($$func{deprecated}) {
483 $mdoc .= "The\n.Fn $$func{deprecated}\nfunction " .
488 if ($$func{experimental}) {
494 $mdoc .= "$$func{man}\n";
495 %errors = %{$$func{errors}};
496 if ($$func{customrv}) {
498 } elsif ($$func{type} eq "int" && %errors) {
501 .Fn $$func{name}
512 } elsif ($$func{type} eq "int") {
515 .Fn $$func{name}
518 } elsif ($$func{type} =~ m/\*$/) {
521 .Fn $$func{name}
526 } elsif ($$func{type} ne "void") {
527 warn("$$func{name}(): no error specification\n");
529 $mdoc .= ".Sh SEE ALSO\n" . genxref($$func{xref});
531 if ($$func{openpam}) {
533 .Fn $$func{name}
545 .Fn $$func{name}
547 $mdoc .= $AUTHORS{$$func{author} // 'THINKSEC_DARPA'} . "\n";
548 $fn = "$$func{name}.3";
561 my %func;
567 $func{Nm} = $func{Nm} || $1;
569 $func{Ft} = $func{Ft} || $1;
571 $func{Fn} = $func{Fn} || $1;
575 if ($func{Nm}) {
576 $FUNCTIONS{$func{Nm}} = \%func;
587 my $func;
602 while ($func = shift(@funcs)) {
603 print FILE ".Nm $FUNCTIONS{$func}->{Nm}";
617 foreach $func (sort(keys(%FUNCTIONS))) {
618 print FILE ".Ft $FUNCTIONS{$func}->{Ft}\n";
619 print FILE ".Fn $FUNCTIONS{$func}->{Fn}\n";
644 foreach $func (keys(%FUNCTIONS)) {
645 ++$xref{3}->{$func};
683 my $func = parse_source($fn);
684 gendoc($func)
685 if (defined($func));