mirror of
git://git.sv.gnu.org/autoconf
synced 2025-02-17 14:01:27 +08:00
* bin/autoscan.in (%c_keywords): Remove.
(&used): Keep only track of the words we might be interested in. (&output_kind): It is no longer needed to look for non active checks.
This commit is contained in:
parent
3bf99f5ce0
commit
a670d9bc40
@ -1,3 +1,10 @@
|
||||
2002-09-28 Akim Demaille <akim@epita.fr>
|
||||
|
||||
* bin/autoscan.in (%c_keywords): Remove.
|
||||
(&used): Keep only track of the words we might be interested in.
|
||||
(&output_kind): It is no longer needed to look for non active
|
||||
checks.
|
||||
|
||||
2002-09-27 Akim Demaille <akim@epita.fr>
|
||||
|
||||
* lib/autoconf/functions.m4 (AC_FUNC_MBRTOWC): New, stolen from
|
||||
|
@ -37,12 +37,7 @@ use strict;
|
||||
|
||||
use vars qw(@cfiles @makefiles @shfiles %printed);
|
||||
|
||||
# The list of C keywords.
|
||||
my %c_keywords = map { $_ => 1}
|
||||
qw (int char float double struct union long short unsigned
|
||||
auto extern register typedef static goto return sizeof break
|
||||
continue if else for do while switch case default);
|
||||
|
||||
# The kind of the words we are looking for.
|
||||
my @kinds = qw (functions headers identifiers programs
|
||||
makevars libraries);
|
||||
|
||||
@ -202,24 +197,35 @@ sub init_tables ()
|
||||
}
|
||||
|
||||
|
||||
# used($KIND, $WORD, [$WHERE])
|
||||
# ----------------------------
|
||||
# used ($KIND, $WORD, [$WHERE])
|
||||
# -----------------------------
|
||||
# $WORD is used as a $KIND.
|
||||
sub used ($$;$)
|
||||
{
|
||||
my ($kind, $word, $where) = @_;
|
||||
$where ||= "$File::Find::name:$.";
|
||||
push (@{$used{$kind}{$word}}, $where);
|
||||
if (
|
||||
# Check for all the libraries. But `-links' is certainly a
|
||||
# `find' argument, and `-le', a `test' argument.
|
||||
($kind eq 'libraries' && $word !~ /^e|inks$/)
|
||||
# Other than libraries are to be checked only if listed in
|
||||
# the Autoscan library files.
|
||||
|| defined $macro{$kind}{$word}
|
||||
)
|
||||
{
|
||||
push (@{$used{$kind}{$word}}, $where);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
## ----------------------- ##
|
||||
## Scanning source files. ##
|
||||
## ----------------------- ##
|
||||
|
||||
|
||||
# scan_c_file($FILENAME)
|
||||
# ----------------------
|
||||
# scan_c_file ($FILENAME)
|
||||
# -----------------------
|
||||
sub scan_c_file ($)
|
||||
{
|
||||
my ($filename) = @_;
|
||||
@ -275,13 +281,11 @@ sub scan_c_file ($)
|
||||
# Maybe we should ignore function definitions (in column 0)?
|
||||
while (s/\b([a-zA-Z_]\w*)\s*\(/ /)
|
||||
{
|
||||
used ('functions', $1)
|
||||
if !$c_keywords{$1};
|
||||
used ('functions', $1);
|
||||
}
|
||||
while (s/\b([a-zA-Z_]\w*)\b/ /)
|
||||
{
|
||||
used ('identifiers', $1)
|
||||
if !$c_keywords{$1};
|
||||
used ('identifiers', $1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -440,11 +444,6 @@ sub output_kind ($$)
|
||||
if exists $kind_comment{$kind};
|
||||
foreach my $word (sort keys %{$used{$kind}})
|
||||
{
|
||||
# Words that were caught, but not to be checked according to the
|
||||
# autoscan library files.
|
||||
next
|
||||
if ! exists $macro{$kind}{$word};
|
||||
|
||||
# Output the needed macro invocations in $configure_scan if not
|
||||
# already printed, and remember these macros are needed.
|
||||
foreach my $macro (@{$macro{$kind}{$word}})
|
||||
@ -626,3 +625,20 @@ if ($configure_ac)
|
||||
# at END. It results in a truncated file.
|
||||
$log->close;
|
||||
exit 0;
|
||||
|
||||
### Setup "GNU" style for perl-mode and cperl-mode.
|
||||
## Local Variables:
|
||||
## perl-indent-level: 2
|
||||
## perl-continued-statement-offset: 2
|
||||
## perl-continued-brace-offset: 0
|
||||
## perl-brace-offset: 0
|
||||
## perl-brace-imaginary-offset: 0
|
||||
## perl-label-offset: -2
|
||||
## cperl-indent-level: 2
|
||||
## cperl-brace-offset: 0
|
||||
## cperl-continued-brace-offset: 0
|
||||
## cperl-label-offset: -2
|
||||
## cperl-extra-newline-before-brace: t
|
||||
## cperl-merge-trailing-else: nil
|
||||
## cperl-continued-statement-offset: 2
|
||||
## End:
|
||||
|
@ -1,11 +1,12 @@
|
||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.29.
|
||||
.TH AUTOSCAN "1" "September 2002" "autoscan 2.54a" "User Commands"
|
||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.013.
|
||||
.TH AUTOSCAN "1" "September 2002" "GNU Autoconf 2.54a" FSF
|
||||
.SH NAME
|
||||
autoscan \- Generate a preliminary configure.in
|
||||
autoscan \- manual page for autoscan 2.54a
|
||||
.SH SYNOPSIS
|
||||
.B autoscan
|
||||
[\fIOPTION\fR] ... [\fISRCDIR\fR]
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
Examine source files in the directory tree rooted at SRCDIR, or the
|
||||
current directory if none is given. Search the source files for
|
||||
common portability problems, check for incompleteness of
|
||||
@ -29,12 +30,6 @@ prepend directory DIR to search path
|
||||
.TP
|
||||
\fB\-I\fR, \fB\-\-include\fR=\fIDIR\fR
|
||||
append directory DIR to search path
|
||||
.SH AUTHOR
|
||||
Written by David J. MacKenzie and Akim Demaille.
|
||||
.PP
|
||||
Copyright 2002 Free Software Foundation, Inc.
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
.SH "REPORTING BUGS"
|
||||
Report bugs to <bug-autoconf@gnu.org>.
|
||||
.SH "SEE ALSO"
|
||||
@ -60,3 +55,8 @@ programs are properly installed at your site, the command
|
||||
.B info autoscan
|
||||
.PP
|
||||
should give you access to the complete manual.
|
||||
.PP
|
||||
Copyright 2002 Free Software Foundation, Inc.
|
||||
.br
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
Loading…
Reference in New Issue
Block a user