Use Callout table instead of direct GetProcAddress.
[wine/multimedia.git] / tools / make_authors
blob26536465c23fa1523f834f5adcb5b446683143c9
1 #! /usr/bin/perl
3 # Generate AUTHORS and include/authors.h
5 open(AUTHORS,"<AUTHORS") or die "Can't open AUTHORS";
6 open(NEWAUTHORS,">AUTHORS.new");
7 while(<AUTHORS>)
9 print NEWAUTHORS;
10 last if /^Wine is/;
12 while(<AUTHORS>)
14 chop;
15 s/^and //;
16 s/[,.]$//;
17 push @authors, $_;
20 # Sort them
21 sub cmpnames
23 @anames = split(" ",$a);
24 @bnames = split(" ",$b);
25 $ret = $anames[-1] cmp $bnames[-1];
26 $ret = $anames[0] cmp $bnames[0] unless $ret;
27 return $ret;
29 @authors = sort cmpnames @authors;
31 # Print authors
32 for ($i = 0; $i < $#authors; $i++)
34 print NEWAUTHORS "$authors[$i],\n";
36 print NEWAUTHORS "and $authors[$#authors].\n";
37 print "Created AUTHORS.new\n";
39 # Build authors.h file
40 open(NEWAUTHORS_H,">include/authors.h");
42 print NEWAUTHORS_H <<EOF;
43 #ifndef __WINE_AUTHORS_H
44 #define __WINE_AUTHORS_H
46 static const char * const SHELL_People[] =
48 EOF
50 # Print authors
51 for ($i = 0; $i <= $#authors; $i++)
53 print NEWAUTHORS_H " \"$authors[$i]\",\n";
55 print NEWAUTHORS_H " NULL\n};\n";
56 print NEWAUTHORS_H "\n#endif /* __WINE_AUTHORS_H */\n";
58 print "Created include/authors.h\n";