#include <stdlib.h>
#include <stdio.h>
#include <string.h>

char ReduceOut[2048];

char *ReducePath(char *full, char *alliance)
{
char	fullpath[2048];
char	all[2048];
int	i=0;
int	k=0;

strncpy(fullpath,full,2047);
strncpy(all,alliance,2047);

while ( 1 )
   {
   if ( fullpath[i] == all[k] )
      {
      i++;
      k++;
      while ( fullpath[i] == all[k] )
         {
         i++;
         k++;
         }
      if ( all[k] == 0 )
         break;
      k=0;
      }
   i++;
   if (( i > 2048 ) || ( fullpath[i] == 0 ))
      return "";
   }

k=0;
i++;

/* Copy string into out */
while ( fullpath[i] != 0 )
   {
   ReduceOut[k] = fullpath[i];
   k++;
   i++;
   }

ReduceOut[k] = 0;

return ReduceOut;
}
