/[projet1]/public/pc/tools/osdk/main/makedisk/Floppy.cpp
Defence Force logotype

Diff of /public/pc/tools/osdk/main/makedisk/Floppy.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1012 by dbug, Wed Dec 11 20:11:41 2013 UTC revision 1013 by dbug, Thu Dec 12 19:35:12 2013 UTC
# Line 180  void Floppy::WriteSector(int track,int s Line 180  void Floppy::WriteSector(int track,int s
180    {    {
181      if (bufferSize>256)      if (bufferSize>256)
182      {      {
183        printf("File for sector is too large. %d bytes (%d too many)",bufferSize,bufferSize-256);        ShowError("File for sector is too large. %d bytes (%d too many)",bufferSize,bufferSize-256);
       exit(1);  
184      }      }
185    
186      unsigned int bootSectorOffset=ComputeOffset(track,sector);      unsigned int bootSectorOffset=ComputeOffset(track,sector);
# Line 193  void Floppy::WriteSector(int track,int s Line 192  void Floppy::WriteSector(int track,int s
192    }    }
193    else    else
194    {    {
195      printf("%s",filteredFileName.c_str());      ShowError("Boot Sector file '%s' not found",filteredFileName.c_str());
     ShowError("Boot Sector file not found");  
196    }    }
197  }  }
198    
# Line 231  int Floppy::WriteFile(const char *fileNa Line 229  int Floppy::WriteFile(const char *fileNa
229    size_t     fileSize;    size_t     fileSize;
230    if (!LoadFile(fileName,fileBuffer,fileSize))    if (!LoadFile(fileName,fileBuffer,fileSize))
231    {    {
232      printf("FloppyBuilder: Error can't open %s\n",fileName);      ShowError("Error can't open file '%s'\n",fileName);
     exit(1);  
233    }    }
234    
235    int nb_sectors_by_files=(fileSize+255)/256;    int nb_sectors_by_files=(fileSize+255)/256;
# Line 350  bool Floppy::SaveDescription(const char* Line 347  bool Floppy::SaveDescription(const char*
347    
348    if (!SaveFile(fileName,layoutInfo.str().c_str(),layoutInfo.str().length()))    if (!SaveFile(fileName,layoutInfo.str().c_str(),layoutInfo.str().length()))
349    {    {
350      printf("FloppyBuilder: Can't save '%s'\n",fileName);      ShowError("Can't save '%s'\n",fileName);
     exit(1);  
351    }    }
352    
353    return true;    return true;

Legend:
Removed from v.1012  
changed lines
  Added in v.1013

  ViewVC Help
Powered by ViewVC 1.1.26