ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/cvsroot/Mozilla-Plugin/ns4/genconst.c.PL
Revision: 1.2
Committed: Sun Feb 25 23:31:26 2001 UTC (25 years, 7 months ago) by root
Content type: text/plain
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
Log Message:
*** empty log message ***

File Contents

# User Rev Content
1 root 1.1 #!/usr/bin/perl
2    
3     open NPAPI, "<SDK/Include/npapi.h" or die "SDK/Include/npapi.h: $!";
4     open GENCONST, ">genconst.c" or die "genconst.c: $!";
5    
6     my @words = do { local $/; <NPAPI> =~ /(\w+)/g };
7    
8     print GENCONST "#include \"SDK/Include/npapi.h\"\nint main(void) {\n";
9 root 1.2 for ( grep !/NP_NOERR|NP_EINVAL|NP_EABORT|NP_LOADDS|NPERR_BASE|NP_SETWINDOW|NP_Port|NP_PRINT/,
10 root 1.1 grep /NPERR_|NP_|NPVERS_/,
11     @words ) {
12     print GENCONST " printf (\"sub $_ (){ %d }\\n\", $_);\n";
13     }
14    
15     print GENCONST " return 0;\n}";
16    
17     close GENCONST;
18     close NPAPI;