]> git.sesse.net Git - vlc/blobdiff - vlc-api.pl
Look for Byte Order Mark (UTF-8 only) while loading config file.
[vlc] / vlc-api.pl
index 247a815cbf38dcfc4e7a6cf1fdab22a365ac2e2b..dc8056f0eb6a52044f4954cc84ebfd515a57b32a 100755 (executable)
@@ -31,20 +31,24 @@ my $srcdir = $ENV{'top_srcdir'};
 # Reads to-be exported APIs
 #
 my %new_APIs;
+my $new_sym = IO::Handle->new();
+open $new_sym, '> libvlc.sym' or die "libvlc.sym: $!\n";
 
 while (<STDIN>)
 {
        if (/VLC_EXPORT\(\s*(\w.*\S)\s*,\s*(\w*)\s*,\s*\(\s*(\w.*\S)\s*\)\s*\)[^)]*$/)
        {
                $new_APIs{$2} = [ ( $1, $3 ) ];
+               print { $new_sym } "$2\n";
        } 
 }
 
+close $new_sym;
+
 #
 # Write header's header
 #
-my $new_sym=IO::Handle->new();
-open $new_sym, '> vlc_symbols.h.new' or die "$!";
+open $new_sym, '> vlc_symbols.h.new' or die "vlc_symbols.h.new: $!\n";
 print { $new_sym }
        "/*\n".
        " * This file is automatically generated. DO NOT EDIT!\n".