Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- my $h = "include/curl/curl.h";
- open H_IN, "-|", "cpp", $h;
- while ( <H_IN> ) {
- if ( /enum\s+(\S+\s+)?{/ .. /}/ ) {
- s/^\s+//;
- next unless /^CURL/;
- chomp;
- s/[,\s].*//;
- push @syms, $_;
- }
- }
- close H_IN;
- open H, "<$h";
- while(<H>) {
- if (/^#define (CURL[A-Za-z0-9_]*)/) {
- push @syms, $1;
- }
- }
- close H;
- for my $e (sort @syms) {
- if($e =~ /(OBSOLETE|^CURL_EXTERN|^CURL_SOCKET_BAD|_LAST\z)/) {
- next;
- }
- print $e."\n";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement