Diff for /np2/win9x/dialog/d_disk.cpp between versions 1.1.1.1 and 1.4

version 1.1.1.1, 2003/10/16 17:59:03 version 1.4, 2003/10/29 21:35:58
Line 1 Line 1
 #include        "compiler.h"  #include        "compiler.h"
 #include        "resource.h"  
 #include        "strres.h"  #include        "strres.h"
   #include        "resource.h"
 #include        "np2.h"  #include        "np2.h"
 #include        "dosio.h"  #include        "dosio.h"
   #include        "sysmng.h"
   #include        "toolwin.h"
 #include        "dialog.h"  #include        "dialog.h"
 #include        "dialogs.h"  #include        "dialogs.h"
 #include        "pccore.h"  #include        "pccore.h"
 #include        "fddfile.h"  
 #include        "diskdrv.h"  #include        "diskdrv.h"
   #include        "fddfile.h"
 #include        "newdisk.h"  #include        "newdisk.h"
   
   
Line 46  static const FILESEL newdiskui = {newdis Line 48  static const FILESEL newdiskui = {newdis
   
 void dialog_changefdd(HWND hWnd, BYTE drv) {  void dialog_changefdd(HWND hWnd, BYTE drv) {
   
 const char      *p;          char    path[MAX_PATH];
         int             readonly;          int             readonly;
   
         if (drv < 4) {          if (drv < 4) {
                 p = dlgs_selectfile(hWnd, &fddui, fdd_diskname(drv),                  file_cpyname(path, fdd_diskname(drv), sizeof(path));
                                                                         fddfolder, sizeof(fddfolder), &readonly);                  if (dlgs_selectfile(hWnd, &fddui, path, sizeof(path), &readonly)) {
                 if (p != NULL) {                          file_cpyname(fddfolder, path, sizeof(fddfolder));
                         diskdrv_setfdd(drv, p, readonly);                          sysmng_update(SYS_UPDATEOSCFG);
                           diskdrv_setfdd(drv, path, readonly);
                           toolwin_setfdd(drv, path);
                 }                  }
         }          }
 }  }
   
 void dialog_changehdd(HWND hWnd, BYTE drv) {  void dialog_changehdd(HWND hWnd, BYTE drv) {
   
 const char *p;          char    path[MAX_PATH];
   
         if (drv < 2) {          if (drv < 2) {
                 p = dlgs_selectfile(hWnd, &hddui, np2cfg.hddfile[drv],                  file_cpyname(path, np2cfg.hddfile[drv], sizeof(path));
                                                                         hddfolder, sizeof(hddfolder), NULL);                  if (dlgs_selectfile(hWnd, &hddui, path, sizeof(path), NULL)) {
                 if (p != NULL) {                          file_cpyname(hddfolder, path, sizeof(hddfolder));
                         diskdrv_sethdd(drv, p);                          sysmng_update(SYS_UPDATEOSCFG);
                           diskdrv_sethdd(drv, path);
                 }                  }
         }          }
 }  }
Line 194  static LRESULT CALLBACK NewdiskDlgProc(H Line 199  static LRESULT CALLBACK NewdiskDlgProc(H
 void dialog_newdisk(HWND hWnd) {  void dialog_newdisk(HWND hWnd) {
   
         char            path[MAX_PATH];          char            path[MAX_PATH];
 const char              *p;  
         HINSTANCE       hinst;          HINSTANCE       hinst;
   
         file_cpyname(path, fddfolder, sizeof(path));          file_cpyname(path, fddfolder, sizeof(path));
         file_cutname(path);          file_cutname(path);
         file_catname(path, str_newdisk, sizeof(path));          file_catname(path, str_newdisk, sizeof(path));
   
         p = dlgs_selectwritefile(hWnd, &newdiskui, path, NULL, 0);          if (!dlgs_selectwritefile(hWnd, &newdiskui, path, sizeof(path))) {
         if (p == NULL) {  
                 return;                  return;
         }          }
         hinst = (HINSTANCE)GetWindowLong(hWnd, GWL_HINSTANCE);          hinst = (HINSTANCE)GetWindowLong(hWnd, GWL_HINSTANCE);
         if (!file_cmpname(file_getext((char *)p), str_thd)) {          if (!file_cmpname(file_getext(path), str_thd)) {
                 hddsize = 0;                  hddsize = 0;
                 if (DialogBox(hinst, MAKEINTRESOURCE(IDD_NEWHDDDISK),                  if (DialogBox(hinst, MAKEINTRESOURCE(IDD_NEWHDDDISK),
                                                                         hWnd, (DLGPROC)NewHddDlgProc) == IDOK) {                                                                          hWnd, (DLGPROC)NewHddDlgProc) == IDOK) {
                         newdisk_hdd(p, hddsize);        // (hddsize < 5) || (hddsize > 256)                          newdisk_hdd(path, hddsize);     // (hddsize < 5) || (hddsize > 256)
                 }                  }
         }          }
         else {          else {
                 if (DialogBox(hinst,                  if (DialogBox(hinst,
                                 MAKEINTRESOURCE(np2cfg.usefd144?IDD_NEWDISK2:IDD_NEWDISK),                                  MAKEINTRESOURCE(np2cfg.usefd144?IDD_NEWDISK2:IDD_NEWDISK),
                                                                         hWnd, (DLGPROC)NewdiskDlgProc) == IDOK) {                                                                          hWnd, (DLGPROC)NewdiskDlgProc) == IDOK) {
                         newdisk_fdd(p, makefdtype, disklabel);                          newdisk_fdd(path, makefdtype, disklabel);
                 }                  }
         }          }
 }  }

Removed from v.1.1.1.1  
changed lines
  Added in v.1.4


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