Diff for /np2/fdd/newdisk.c between versions 1.9 and 1.12

version 1.9, 2004/03/19 00:30:00 version 1.12, 2005/02/12 12:13:57
Line 1 Line 1
 #include        "compiler.h"  #include        "compiler.h"
   #if defined(OSLANG_UTF8) || defined(OSLANG_UCS2)
   #include        "oemtext.h"
   #endif
 #include        "dosio.h"  #include        "dosio.h"
 #include        "newdisk.h"  #include        "newdisk.h"
 #include        "fddfile.h"  #include        "fddfile.h"
Line 8 Line 11
   
 // ---- fdd  // ---- fdd
   
 void newdisk_fdd(const char *fname, REG8 type, const char *label) {  void newdisk_fdd(const OEMCHAR *fname, REG8 type, const OEMCHAR *label) {
   
         _D88HEAD        d88head;          _D88HEAD        d88head;
         FILEH           fh;          FILEH           fh;
   
         ZeroMemory(&d88head, sizeof(d88head));          ZeroMemory(&d88head, sizeof(d88head));
         STOREINTELDWORD(d88head.fd_size, sizeof(d88head));          STOREINTELDWORD(d88head.fd_size, sizeof(d88head));
   #if defined(OSLANG_UTF8) || defined(OSLANG_UCS2)
           oemtext_oemtosjis((char *)d88head.fd_name, sizeof(d88head.fd_name),
                                                                                                                           label, (UINT)-1);
   #else
         milstr_ncpy((char *)d88head.fd_name, label, sizeof(d88head.fd_name));          milstr_ncpy((char *)d88head.fd_name, label, sizeof(d88head.fd_name));
   #endif
         d88head.fd_type = type;          d88head.fd_type = type;
         fh = file_create(fname);          fh = file_create(fname);
         if (fh != FILEH_INVALID) {          if (fh != FILEH_INVALID) {
Line 29  void newdisk_fdd(const char *fname, REG8 Line 37  void newdisk_fdd(const char *fname, REG8
   
 static BOOL writezero(FILEH fh, UINT size) {  static BOOL writezero(FILEH fh, UINT size) {
   
         BYTE    work[256];          UINT8   work[256];
         UINT    wsize;          UINT    wsize;
   
         ZeroMemory(work, sizeof(work));          ZeroMemory(work, sizeof(work));
Line 45  static BOOL writezero(FILEH fh, UINT siz Line 53  static BOOL writezero(FILEH fh, UINT siz
   
 static BOOL writehddipl(FILEH fh, UINT ssize, UINT32 tsize) {  static BOOL writehddipl(FILEH fh, UINT ssize, UINT32 tsize) {
   
         BYTE    work[1024];          UINT8   work[1024];
         UINT    size;          UINT    size;
   
         ZeroMemory(work, sizeof(work));          ZeroMemory(work, sizeof(work));
Line 71  static BOOL writehddipl(FILEH fh, UINT s Line 79  static BOOL writehddipl(FILEH fh, UINT s
         return(SUCCESS);          return(SUCCESS);
 }  }
   
 void newdisk_thd(const char *fname, UINT hddsize) {  void newdisk_thd(const OEMCHAR *fname, UINT hddsize) {
   
         FILEH   fh;          FILEH   fh;
         BYTE    work[256];          UINT8   work[256];
         UINT    size;          UINT    size;
         BOOL    r;          BOOL    r;
   
Line 99  ndthd_err: Line 107  ndthd_err:
         return;          return;
 }  }
   
 void newdisk_nhd(const char *fname, UINT hddsize) {  void newdisk_nhd(const OEMCHAR *fname, UINT hddsize) {
   
         FILEH   fh;          FILEH   fh;
         NHDHDR  nhd;          NHDHDR  nhd;
Line 133  ndnhd_err: Line 141  ndnhd_err:
 }  }
   
 // hddtype = 0:5MB / 1:10MB / 2:15MB / 3:20MB / 5:30MB / 6:40MB  // hddtype = 0:5MB / 1:10MB / 2:15MB / 3:20MB / 5:30MB / 6:40MB
 void newdisk_hdi(const char *fname, UINT hddtype) {  void newdisk_hdi(const OEMCHAR *fname, UINT hddtype) {
   
 const SASIHDD   *sasi;  const SASIHDD   *sasi;
         FILEH           fh;          FILEH           fh;
Line 171  ndhdi_err: Line 179  ndhdi_err:
         return;          return;
 }  }
   
 void newdisk_vhd(const char *fname, UINT hddsize) {  void newdisk_vhd(const OEMCHAR *fname, UINT hddsize) {
   
         FILEH   fh;          FILEH   fh;
         VHDHDR  vhd;          VHDHDR  vhd;

Removed from v.1.9  
changed lines
  Added in v.1.12


RetroPC.NET-CVS <cvs@retropc.net>