void GetDescription(char d[])
{
    strcpy(d,"Backup not patched SKI file to: <SkiManFolder>\\Backups");
}

int GetPriority()
{
    return 0;
}

void PatchSKI()
{
   char dir[1024], skin_name[100], file[1024], fc[70], line[1000];
   int i, count, h;
   
   GetSkinName(skin_name);
   GetBackupDir(dir);


   i = 0;
   do 
   {
     ltoa(i,fc,10);
     strcpy(file,dir);
     strcat(file,skin_name);
     strcat(file,".");
     strcat(file,fc);
     i++;
   } while (access(file,0x00) == 0);
     


/*
   GetDateTimeStr(fc);
   count = strlen(fc);
   for (h = 0; h < count; h++)
   {
      if (fc[h] == '.') fc[h] = '_';
      if (fc[h] == ':') fc[h] = '_';
   } 
   strcpy(file,dir);
   strcat(file,skin_name);
   strcat(file,".");
   strcat(file,fc);
*/

   count = GetLinesCount();
   
   h = open(file, O_CREAT + O_RDWR + O_TRUNC, S_IWRITE + S_IREAD);   // Same as "OR" in this case :)
   if (h == -1) return;
   for (i = 0; i < count; i++)
   {
      GetLineByNum(i,line);
      write(h,line,strlen(line));
      write(h,"\x0A",1);
   }
   close(h);
}