paragui-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[paragui-cvs] CVS: paragui/src/physfs/platform macclassic.c,1.1.2.3,1.1.


From: Alexander Pipelka <address@hidden>
Subject: [paragui-cvs] CVS: paragui/src/physfs/platform macclassic.c,1.1.2.3,1.1.2.4 win32.c,1.1.1.1.6.11,1.1.1.1.6.12
Date: Mon, 15 Jul 2002 04:15:39 -0400

Update of /cvsroot/paragui/paragui/src/physfs/platform
In directory subversions:/tmp/cvs-serv31299/src/physfs/platform

Modified Files:
      Tag: devel-1-0
        macclassic.c win32.c 
Log Message:
synced with physfs



Index: macclassic.c
===================================================================
RCS file: /cvsroot/paragui/paragui/src/physfs/platform/macclassic.c,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.4
diff -C2 -r1.1.2.3 -r1.1.2.4
*** macclassic.c        1 Jul 2002 17:15:22 -0000       1.1.2.3
--- macclassic.c        15 Jul 2002 08:15:37 -0000      1.1.2.4
***************
*** 267,271 ****
      OSErr err;
      Str255 str255;
!     int needColon = (strchr(fname, ':')  == NULL);
      int len = strlen(fname) + ((needColon) ? 1 : 0);
      if (len > 255)
--- 267,271 ----
      OSErr err;
      Str255 str255;
!     int needColon = (strchr(fname, ':') == NULL);
      int len = strlen(fname) + ((needColon) ? 1 : 0);
      if (len > 255)
***************
*** 286,290 ****
  
  
- /* !!! FIXME: This code is pretty heinous. */
  static OSErr fnameToFSSpec(const char *fname, FSSpec *spec)
  {
--- 286,289 ----
***************
*** 314,317 ****
--- 313,317 ----
          ptr = strchr(start + 1, ':');
  
+         /* Now check each element of the path for aliases... */
          do
          {
***************
*** 323,327 ****
              infoPB.dirInfo.ioFDirIndex = 0;
              err = PBGetCatInfoSync(&infoPB);
!             if (err != noErr)  /* not an alias, really a bogus path. */
                  return(fnameToFSSpecNoAlias(fname, spec)); /* reset */
  
--- 323,327 ----
              infoPB.dirInfo.ioFDirIndex = 0;
              err = PBGetCatInfoSync(&infoPB);
!             if (err != noErr)  /* not an alias, really just a bogus path. */
                  return(fnameToFSSpecNoAlias(fname, spec)); /* reset */
  
***************
*** 329,334 ****
                  spec->parID = infoPB.dirInfo.ioDrDirID;
  
!             if (ptr != NULL)
                  *ptr = '\0';
              *start = strlen(start + 1);  /* make it a pstring. */
              err = FSMakeFSSpec(spec->vRefNum, spec->parID,
--- 329,335 ----
                  spec->parID = infoPB.dirInfo.ioDrDirID;
  
!             if (ptr != NULL)  /* terminate string after next element. */
                  *ptr = '\0';
+ 
              *start = strlen(start + 1);  /* make it a pstring. */
              err = FSMakeFSSpec(spec->vRefNum, spec->parID,
***************
*** 340,344 ****
              if (err != noErr)  /* not an alias, really a bogus path. */
                  return(fnameToFSSpecNoAlias(fname, spec)); /* reset */
!             start = ptr;
              if (ptr != NULL)
                  ptr = strchr(start + 1, ':');                
--- 341,346 ----
              if (err != noErr)  /* not an alias, really a bogus path. */
                  return(fnameToFSSpecNoAlias(fname, spec)); /* reset */
! 
!             start = ptr;  /* move to the next element. */
              if (ptr != NULL)
                  ptr = strchr(start + 1, ':');                

Index: win32.c
===================================================================
RCS file: /cvsroot/paragui/paragui/src/physfs/platform/win32.c,v
retrieving revision 1.1.1.1.6.11
retrieving revision 1.1.1.1.6.12
diff -C2 -r1.1.1.1.6.11 -r1.1.1.1.6.12
*** win32.c     11 Jul 2002 08:59:29 -0000      1.1.1.1.6.11
--- win32.c     15 Jul 2002 08:15:37 -0000      1.1.1.1.6.12
***************
*** 250,258 ****
  
  
! static BOOL mediaInDrive(const char *driveLetter)
  {
      UINT oldErrorMode;
!     DWORD dummyValue;
!     BOOL returnValue;
  
      /* Prevent windows warning message to appear when checking media size */
--- 250,258 ----
  
  
! static BOOL mediaInDrive(const char *drive)
  {
      UINT oldErrorMode;
!     DWORD tmp;
!     BOOL retval;
  
      /* Prevent windows warning message to appear when checking media size */
***************
*** 260,269 ****
      
      /* If this function succeeds, there's media in the drive */
!     returnValue = GetDiskFreeSpace(driveLetter, &dummyValue, &dummyValue, 
&dummyValue, &dummyValue);
  
      /* Revert back to old windows error handler */
      SetErrorMode(oldErrorMode);
  
!     return(returnValue);
  } /* mediaInDrive */
  
--- 260,269 ----
      
      /* If this function succeeds, there's media in the drive */
!     retval = GetVolumeInformation(drive, NULL, 0, NULL, NULL, &tmp, NULL, 0);
  
      /* Revert back to old windows error handler */
      SetErrorMode(oldErrorMode);
  
!     return(retval);
  } /* mediaInDrive */
  
***************
*** 786,790 ****
  
      /* Read data from the file */
!     /*!!! - uint32 might be a greater # than DWORD */
      if(!ReadFile(FileHandle, buffer, count * size, &CountOfBytesRead, NULL))
      {
--- 786,790 ----
  
      /* Read data from the file */
!     /* !!! FIXME: uint32 might be a greater # than DWORD */
      if(!ReadFile(FileHandle, buffer, count * size, &CountOfBytesRead, NULL))
      {
***************
*** 794,798 ****
      {
          /* Return the number of "objects" read. */
!         /* !!! - What if not the right amount of bytes was read to make an 
object? */
          retval = CountOfBytesRead / size;
      } /* else */
--- 794,798 ----
      {
          /* Return the number of "objects" read. */
!         /* !!! FIXME: What if not the right amount of bytes was read to make 
an object? */
          retval = CountOfBytesRead / size;
      } /* else */
***************
*** 810,814 ****
  
      /* Read data from the file */
!     /*!!! - uint32 might be a greater # than DWORD */
      if(!WriteFile(FileHandle, buffer, count * size, &CountOfBytesWritten, 
NULL))
      {
--- 810,814 ----
  
      /* Read data from the file */
!     /* !!! FIXME: uint32 might be a greater # than DWORD */
      if(!WriteFile(FileHandle, buffer, count * size, &CountOfBytesWritten, 
NULL))
      {
***************
*** 818,822 ****
      {
          /* Return the number of "objects" read. */
!         /*!!! - What if not the right number of bytes was written? */
          retval = CountOfBytesWritten / size;
      } /* else */
--- 818,822 ----
      {
          /* Return the number of "objects" read. */
!         /* !!! FIXME: What if not the right number of bytes was written? */
          retval = CountOfBytesWritten / size;
      } /* else */
***************
*** 835,839 ****
      HighOrderPos = HIGHORDER_UINT64(pos);
  
!     /*!!! SetFilePointer needs a signed 64-bit value. */
      /* Move pointer "pos" count from start of file */
      rc = SetFilePointer(FileHandle, LOWORDER_UINT64(pos),
--- 835,839 ----
      HighOrderPos = HIGHORDER_UINT64(pos);
  
!     /* !!! FIXME: SetFilePointer needs a signed 64-bit value. */
      /* Move pointer "pos" count from start of file */
      rc = SetFilePointer(FileHandle, LOWORDER_UINT64(pos),




reply via email to

[Prev in Thread] Current Thread [Next in Thread]