Language: C

#include<stdio.h>

#define MAX 501
#define BLOCK '*'
#define DOT '.'

void input( char cel[][ MAX ], short H, short W );
void search( char cel[][ MAX ], short up, short down, short left, short right, long *Sp );
void judge( long S[] );
void output( long S );


int main()
{
	short H = 0;
	short W = 0;
	
	while(1)
	{
		long S = 0;
		char cel[ MAX ][ MAX ] = {0};
		
		scanf("%hd %hd", &H, &W );
		
		switch( H )
		{
			case 0:
				return 0;
		}
		
		input( cel, H, W );
		
		search( cel, 0, H - 1, 0, W - 1, &S );
		
		output( S );
	}
	
	return 0;
}

void input( char cel[][ MAX ], short H, short W )
{
	short num1 = 0;
	
	scanf(" ");
	for( num1 = 0; num1 < H; num1++ )
	{
		gets( cel[ num1 ] );
	}
	
	return;
}

void search( char cel[][ MAX ], short up, short down, short left, short right, long *Sp )
{
	short num1 = 0;
	short num2 = 0;
	short num3 = 0;
	short loop1 = 0;
	short loop2 = 0;
	long count = 0;
	
	long Sa = *Sp;
	long S[4] = {0};
	
	for( num1 = ( down + up + 1 ) / 2, loop1 = up; loop1 <= down; num1++, loop1++ )
	{
		if( num1 > down )
		{
			num1 = up;
		}
		
		for( num2 = ( right + left + 1 ) / 2, loop2 = left; loop2 <= right; num2++, loop2++ )
		{
			if( num2 > right )
			{
				num2 = left;
			}
			
			if( cel[ num1 ][ num2 ] == BLOCK )
			{
				S[0] = ( right - num2 ) * ( down - up + 1 );
				S[1] = ( right - left + 1 ) * ( down - num1 );
				S[2] = ( num2 - left ) * ( down - up + 1 );
				S[3] = ( right - left + 1 ) * ( num1 - up );
				
				judge( S );
				
				for( num3 = 0; num3 < 4; num3++ )
				{
					
					if( S[ num3 ] == ( right - num2 ) * ( down - up + 1 ))
					{
						if(( *Sp < S[ num3 ] ) && ( num2 + 1 <= right ))
						{
							search( cel, up, down, num2 + 1, right, Sp, Cp );
						}
					}
					
					if( S[ num3 ] == ( right - left + 1 ) * ( down - num1 ))
					{
						if(( *Sp < S[ num3 ] ) && ( num1 + 1 <= down ))
						{
							search( cel, num1 + 1, down, left, right, Sp, Cp );
						}
					}
					
					if( S[ num3 ] == ( num2 - left ) * ( down - up + 1 ))
					{
						if(( *Sp < S[ num3 ] ) && ( num2 - 1 >= left ))
						{
							search( cel, up, down, left, num2 - 1, Sp, Cp );
						}
					}
					
					if( S[ num3 ] == ( right - left + 1 ) * ( num1 - up ))
					{
						if(( *Sp < S[ num3 ] ) && ( num1 - 1 >= up ))
						{
							search( cel, up, num1 - 1, left, right, Sp, Cp );
						}
					}
				}
				
				return;
			}
			else if( cel[ num1 ][ num2 ] == DOT)
			{
				count++;
			}
		}
	}
	
	if( *Sp < count )
	{
		*Sp = count;
	}
	
	return;
}

void judge( long S[] )
{
	long temp = 0;
	short num1 = 0;
	short num2 = 0;
	
	for( num1 = 0; num1 < 4; num1++ )
	{
		for( num2 = 0 ; num2 < 3; num2++ )
		{
			if( S[ num2 ] > S[ num2 + 1] )
			{
				temp = S[ num2 ];
				S[ num2 ] = S[ num2 + 1 ];
				S[ num2 + 1 ] = temp;
			}
		}
	}
	
	return;
}

void output( long S )
{
	printf("%ld\n", S );
	
	return;
}

Compiler output:
main.c: In function 'input':
main.c:48:17: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
   48 |                 gets( cel[ num1 ] );
      |                 ^~~~
      |                 fgets
main.c: In function 'search':
main.c:96:101: error: 'Cp' undeclared (first use in this function); did you mean 'Sp'?
   96 |                                                         search( cel, up, down, num2 + 1, right, Sp, Cp );
      |                                                                                                     ^~
      |                                                                                                     Sp
main.c:96:101: note: each undeclared identifier is reported only once for each function it appears in
main.c:96:57: error: too many arguments to function 'search'
   96 |                                                         search( cel, up, down, num2 + 1, right, Sp, Cp );
      |                                                         ^~~~~~
main.c:54:6: note: declared here
   54 | void search( char cel[][ MAX ], short up, short down, short left, short right, long *Sp )
      |      ^~~~~~
main.c:104:57: error: too many arguments to function 'search'
  104 |                                                         search( cel, num1 + 1, down, left, right, Sp, Cp );
      |                                                         ^~~~~~
main.c:54:6: note: declared here
   54 | void search( char cel[][ MAX ], short up, short down, short left, short right, long *Sp )
      |      ^~~~~~
main.c:112:57: error: too many arguments to function 'search'
  112 |                                                         search( cel, up, down, left, num2 - 1, Sp, Cp );
      |                                                         ^~~~~~
main.c:54:6: note: declared here
   54 | void search( char cel[][ MAX ], short up, short down, short left, short right, long *Sp )
      |      ^~~~~~
main.c:120:57: error: too many arguments to function 'search'
  120 |                                                         search( cel, up, num1 - 1, left, right, Sp, Cp );
      |                                                         ^~~~~~
main.c:54:6: note: declared here
   54 | void search( char cel[][ MAX ], short up, short down, short left, short right, long *Sp )
      |      ^~~~~~