Diff for /xmil/palm/m68k.c between versions 1.1 and 1.2

version 1.1, 2005/02/07 16:56:32 version 1.2, 2005/02/26 03:59:50
Line 1 Line 1
 /**********  
  * Copyright (c) 2004 Greg Parker.  All rights reserved.  
  *  
  * Redistribution and use in source and binary forms, with or without  
  * modification, are permitted provided that the following conditions  
  * are met:  
  * 1. Redistributions of source code must retain the above copyright  
  *    notice, this list of conditions and the following disclaimer.  
  * 2. Redistributions in binary form must reproduce the above copyright  
  *    notice, this list of conditions and the following disclaimer in the  
  *    documentation and/or other materials provided with the distribution.  
  *  
  * THIS SOFTWARE IS PROVIDED BY GREG PARKER ``AS IS'' AND ANY EXPRESS OR  
  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES  
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  
  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,  
  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT  
  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,  
  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY  
  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT  
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF  
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
  **********/  
   
 #include <PalmOS.h>  #include <PalmOS.h>
 #include <PalmCompatibility.h>  #include <PalmCompatibility.h>
 #include <PalmOSGlue.h>  #include <PalmOSGlue.h>
Line 41 Line 17
 ((((unsigned long) n) >> 8) & 0x0000FF00) | \  ((((unsigned long) n) >> 8) & 0x0000FF00) | \
 ((((unsigned long) n) >> 24) & 0x000000FF) )  ((((unsigned long) n) >> 24) & 0x000000FF) )
   
 static  UInt16 volRefNum;  static  UInt16 volRefNum = vfsInvalidVolRef;
 enum {  enum {
         SEEK_SET        = 0,          SEEK_SET        = 0,
         SEEK_CUR        = 1,          SEEK_CUR        = 1,
Line 81  void unload(PealModule *m) Line 57  void unload(PealModule *m)
     PealUnload(m);      PealUnload(m);
 }  }
   
   static void disp_error(const char* msg, const char* data) {
   
           char str[256];
           MemSet(str, 255, 0);
           StrCat(str, msg);
           StrCat(str, data);
   
           FrmCustomAlert(IDD_ALERT, str, NULL, NULL);
   }
   
           
 static BOOL checkHR(void) {  static BOOL checkHR(void) {
   
 // HighDensity機能の有無をチェック  // HighDensity機能の有無をチェック
Line 195  FileRef file_open_68k(void* path) { Line 182  FileRef file_open_68k(void* path) {
         if (!error) {          if (!error) {
                 return(ref);                  return(ref);
         }          }
           
           disp_error("cannot open this file: ", path);
         return(FILEH_INVALID);          return(FILEH_INVALID);
 }  }
   
Line 214  FileRef file_create_68k(void *path) { Line 203  FileRef file_create_68k(void *path) {
                         }                          }
                 }                  }
         }          }
           disp_error("cannot create this file: ", path);
         return(FILEH_INVALID);          return(FILEH_INVALID);
 }  }
   
Line 328  short file_dircreate_68k(const void *pat Line 318  short file_dircreate_68k(const void *pat
                 return(0);                  return(0);
         }          }
   
           disp_error("cannot create this dir: ", path);
         return(-1);          return(-1);
 }  }
   
Line 622  UInt32 PilotMain(UInt16 cmd, void *cmdPB Line 613  UInt32 PilotMain(UInt16 cmd, void *cmdPB
 {  {
     PealModule *m;      PealModule *m;
         UInt32 volIterator = vfsIteratorStart;          UInt32 volIterator = vfsIteratorStart;
           UInt16  vRef = vfsInvalidVolRef;
     FormType *frmP;      FormType *frmP;
         Err err;          Err err;
         int     ret;          int     ret;
Line 634  UInt32 PilotMain(UInt16 cmd, void *cmdPB Line 626  UInt32 PilotMain(UInt16 cmd, void *cmdPB
                 FrmCustomAlert(IDD_ALERT, "cannot run under this device.", NULL, NULL);                  FrmCustomAlert(IDD_ALERT, "cannot run under this device.", NULL, NULL);
                 return 0;                  return 0;
         }          }
           
         FrmGotoForm(IDD_MAIN);          FrmGotoForm(IDD_MAIN);
         frmP = FrmInitForm(IDD_MAIN);          frmP = FrmInitForm(IDD_MAIN);
         FrmSetActiveForm(frmP);          FrmSetActiveForm(frmP);
Line 643  UInt32 PilotMain(UInt16 cmd, void *cmdPB Line 636  UInt32 PilotMain(UInt16 cmd, void *cmdPB
         while (volIterator != vfsIteratorStop) {          while (volIterator != vfsIteratorStop) {
                 err = VFSVolumeEnumerate(&volRefNum, &volIterator);                  err = VFSVolumeEnumerate(&volRefNum, &volIterator);
                 if (err == errNone) {                  if (err == errNone) {
                         break;                          vRef = volRefNum;
                 }                  }
         }          }
           if ((volRefNum != vRef) && (vRef != vfsInvalidVolRef)) {
                   volRefNum = vRef;
           }
                   
         m = load();          m = load();
         ret = setup(m);          ret = setup(m);

Removed from v.1.1  
changed lines
  Added in v.1.2


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