#!/usr/local/bin/perl ## ## make.list.syms -- make list.syms ## ## Copyright (c) 2000 William Setzer ## ## You may distribute under the terms of either the Artistic License ## or the GNU General Public License, as specified in the README file. use lib 'gen'; use Gen; open OUT, "> list.syms" or die "Can't open list.syms: $!\n"; process_DATA_chunk \&print_line; process_functions \&print_function; process_variables \&print_variable; process_typedefs \&print_typedef; close OUT; ### ## The helpers # sub print_line { print OUT @_ } sub print_function { my $fun = shift; return unless $fun->{DOIT}; return if $fun->{SPEC}{DUP}; return if $fun->{SPEC}{NOTEST}; my @argv = map { $_->{SPEC}{AMP} ? '&' . $_->{M_TEST} : $_->{M_TEST} } @{$fun->{ARGV}}; unshift @argv, "stdscr" if $fun->{UNI}; my $call = $fun->{W} . $fun->{NAME} . "(" . join(',', @argv) . ")"; print OUT "E $call\n"; print OUT "I $call\n" if $fun->{SPEC}{ITEST}; } sub print_variable { my $var = shift; return unless $var->{DOIT}; print OUT "V $var->{NAME}\n"; } sub print_typedef { my $typ = shift; return unless $typ->{DOIT}; print OUT "T $typ->{DECL}\n"; } __END__ ## This file is automatically generated; changes will be lost. ## ## V = variable existence check ## E = function existence check, ## I = function "returns int?" check ## T = typedef existence check