#!/usr/bin/perl open(APIW,"./apiw.index") or die "Can't find ./apiw.index"; while() { ($func,$link)=split /:/; chop $link; $link=~m/(\d*)/; $apiw{$func}="http://www.willows.com/apiw/chapter$1/p$link.html"; } close(APIW); open(WINDOWS,"../include/windows.h") or die "Can't find ../include/windows.h"; while() { add_func($_) if /AccessResource/../wvsprintf/; } close(WINDOWS); open(TOOLHELP,"../include/toolhelp.h") or die "Can't find ../include/toolhelp.h"; while() { add_func($_) if /GlobalInfo/../MemoryWrite/; } close(TOOLHELP); open(COMMDLG,"../include/commdlg.h") or die "Can't find ../include/commdlg.h"; while() { add_func($_) if /ChooseColor/../ReplaceText/; } close(COMMDLG); print "\n"; print "

Windows API Functions

\n"; print "The following API functions were found by searching windows.h,\n"; print "toolhelp.h, and commdlg.h. Where possible, help links pointing\n"; print "to www.willows.com are included.

\n"; print "\n"; print "\n"; foreach $func (sort(keys %funcs)) { $funcs{$func}=~m/(.*) +(\w*)(\(.*)/; print "\n\n"; print "\n"; print "\n"; print "\n"; print "\n"; } print "
Help-linkFunction
"; if($apiw{$2}) { print "
APIW
"; $impl{$2}=1; $impl++; } $numfuncs++; print "
$1$2$3

\n"; print "(Approximately ",sprintf("%3.1f",$impl/(1.0*$numfuncs)*100.0), "% of the functions above are in the APIW standard.)

\n"; print "


\n"; print "

Unimplemented APIW functions

\n"; print "Here's a list of the API functions in the APIW standard which were not found\n"; print "in windows.h, commdlg.h, or toolhelp.h:

\n"; foreach $func (sort (keys %apiw)) { if(!$impl{$func}) { print "$func\n"; $unimpl++; } $numapiw++; } print "

(This comprises approximately ",sprintf("%3.1f",$unimpl/(1.0*$numapiw)*100.0), "% of the APIW.)\n"; print "\n"; sub add_func { $line=shift; chop $line; $line=~s/\s+/ /g; ($func)=$line=~m/ (\w*)\(/; if($func) { while($funcs{$func}) { $func.=" "; } $funcs{$func}=$line; } }