mirror of
				https://github.com/libsdl-org/SDL.git
				synced 2025-10-26 04:17:18 +00:00 
			
		
		
		
	wikiheaders: Deal with SDLMAIN_DECLSPEC functions.
This commit is contained in:
		| @@ -642,7 +642,7 @@ while (my $d = readdir(DH)) { | ||||
|             $ignoring_lines = 1; | ||||
|             push @contents, $_; | ||||
|             next; | ||||
|         } elsif (/\A\s*extern\s+(SDL_DEPRECATED\s+|)DECLSPEC/) {  # a function declaration without a doxygen comment? | ||||
|         } elsif (/\A\s*extern\s+(SDL_DEPRECATED\s+|)(SDLMAIN_)?DECLSPEC/) {  # a function declaration without a doxygen comment? | ||||
|             $symtype = 1;   # function declaration | ||||
|             @templines = (); | ||||
|             $decl = $_; | ||||
| @@ -689,7 +689,7 @@ while (my $d = readdir(DH)) { | ||||
|             $lineno++ if defined $decl; | ||||
|             $decl = '' if not defined $decl; | ||||
|             chomp($decl); | ||||
|             if ($decl =~ /\A\s*extern\s+(SDL_DEPRECATED\s+|)DECLSPEC/) { | ||||
|             if ($decl =~ /\A\s*extern\s+(SDL_DEPRECATED\s+|)(SDLMAIN_)?DECLSPEC/) { | ||||
|                 $symtype = 1;   # function declaration | ||||
|             } elsif ($decl =~ /\A\s*SDL_FORCE_INLINE/) { | ||||
|                 $symtype = 1;   # (forced-inline) function declaration | ||||
| @@ -749,8 +749,8 @@ while (my $d = readdir(DH)) { | ||||
|  | ||||
|             $decl =~ s/\s+\Z//; | ||||
|  | ||||
|             if (!$is_forced_inline && $decl =~ /\A\s*extern\s+(SDL_DEPRECATED\s+|)DECLSPEC\s+(const\s+|)(unsigned\s+|)(.*?)\s*(\*?)\s*SDLCALL\s+(.*?)\s*\((.*?)\);/) { | ||||
|                 $sym = $6; | ||||
|             if (!$is_forced_inline && $decl =~ /\A\s*extern\s+(SDL_DEPRECATED\s+|)(SDLMAIN_)?DECLSPEC\s+(const\s+|)(unsigned\s+|)(.*?)\s*(\*?)\s*SDLCALL\s+(.*?)\s*\((.*?)\);/) { | ||||
|                 $sym = $7; | ||||
|                 #$decl =~ s/\A\s*extern\s+DECLSPEC\s+(.*?)\s+SDLCALL/$1/; | ||||
|             } elsif ($is_forced_inline && $decl =~ /\A\s*SDL_FORCE_INLINE\s+(SDL_DEPRECATED\s+|)(const\s+|)(unsigned\s+|)(.*?)([\*\s]+)(.*?)\s*\((.*?)\);/) { | ||||
|                 $sym = $6; | ||||
| @@ -770,7 +770,7 @@ while (my $d = readdir(DH)) { | ||||
|                 foreach (@decllines) { | ||||
|                     if ($decl eq '') { | ||||
|                         $decl = $_; | ||||
|                         $decl =~ s/\Aextern\s+(SDL_DEPRECATED\s+|)DECLSPEC\s+(.*?)\s+(\*?)SDLCALL\s+/$2$3 /; | ||||
|                         $decl =~ s/\Aextern\s+(SDL_DEPRECATED\s+|)(SDLMAIN_)?DECLSPEC\s+(.*?)\s+(\*?)SDLCALL\s+/$3$4 /; | ||||
|                     } else { | ||||
|                         my $trimmed = $_; | ||||
|                         # !!! FIXME: trim space for SDL_DEPRECATED if it was used, too. | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Ryan C. Gordon
					Ryan C. Gordon