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.2,1.1.


From: Alexander Pipelka <address@hidden>
Subject: [paragui-cvs] CVS: paragui/src/physfs/platform macclassic.c,1.1.2.2,1.1.2.3 posix.c,1.1.2.2,1.1.2.3 unix.c,1.1.1.1.6.2,1.1.1.1.6.3 win32.c,1.1.1.1.6.9,1.1.1.1.6.10
Date: Mon, 01 Jul 2002 13:15:24 -0400

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

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



Index: macclassic.c
===================================================================
RCS file: /cvsroot/paragui/paragui/src/physfs/platform/macclassic.c,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -C2 -r1.1.2.2 -r1.1.2.3
*** macclassic.c        21 Jun 2002 20:07:53 -0000      1.1.2.2
--- macclassic.c        1 Jul 2002 17:15:22 -0000       1.1.2.3
***************
*** 120,124 ****
              if (PBHGetVInfoSync(&hpbr) == noErr)
              {
!                 char **tmp = realloc(retval, sizeof (char *) * cd_count + 1);
                  if (tmp)
                  {
--- 120,124 ----
              if (PBHGetVInfoSync(&hpbr) == noErr)
              {
!                 char **tmp = realloc(retval, sizeof (char *) * (cd_count + 
1));
                  if (tmp)
                  {

Index: posix.c
===================================================================
RCS file: /cvsroot/paragui/paragui/src/physfs/platform/posix.c,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -C2 -r1.1.2.2 -r1.1.2.3
*** posix.c     23 Jun 2002 09:11:48 -0000      1.1.2.2
--- posix.c     1 Jul 2002 17:15:22 -0000       1.1.2.3
***************
*** 11,14 ****
--- 11,16 ----
  #endif
  
+ #if (!defined WIN32)
+ 
  #if (defined __STRICT_ANSI__)
  #define __PHYSFS_DOING_STRICT_ANSI__
***************
*** 363,370 ****
  
      fd = open(filename, mode, S_IRUSR | S_IWUSR);
!     if (fd < 0) {
!         __PHYSFS_setError(strerror(errno));
!               return NULL;
!       }
  
      retval = (int *) malloc(sizeof (int));
--- 365,369 ----
  
      fd = open(filename, mode, S_IRUSR | S_IWUSR);
!     BAIL_IF_MACRO(fd < 0, strerror(errno), NULL);
  
      retval = (int *) malloc(sizeof (int));
***************
*** 515,518 ****
--- 514,519 ----
      return statbuf.st_mtime;
  } /* __PHYSFS_platformGetLastModTime */
+ 
+ #endif /* !defined WIN32 */
  
  /* end of posix.c ... */

Index: unix.c
===================================================================
RCS file: /cvsroot/paragui/paragui/src/physfs/platform/unix.c,v
retrieving revision 1.1.1.1.6.2
retrieving revision 1.1.1.1.6.3
diff -C2 -r1.1.1.1.6.2 -r1.1.1.1.6.3
*** unix.c      21 Jun 2002 20:07:53 -0000      1.1.1.1.6.2
--- unix.c      1 Jul 2002 17:15:22 -0000       1.1.1.1.6.3
***************
*** 13,16 ****
--- 13,20 ----
  #if (!defined __BEOS__) /* BeOS uses beos.cpp and posix.c ... */
  
+ #if (defined WIN32) /* cygwin/mingw32? */
+ #include "win32.c"  /* !!! FIXME: holy friggin' hack. */
+ #else
+ 
  #if ((defined __APPLE__) && (defined __MACH__))
  #  if (!defined __DARWIN__)
***************
*** 88,100 ****
          if (add_it)
          {
!             char **tmp = realloc(retval, sizeof (char *) * cd_count + 1);
              if (tmp)
              {
                  retval = tmp;
!                 retval[cd_count-1] = (char *)
!                                 malloc(strlen(mntbufp[ ii ].f_mntonname) + 1);
!                 if (retval[cd_count-1])
                  {
!                     strcpy(retval[cd_count-1], mntbufp[ ii ].f_mntonname);
                      cd_count++;
                  } /* if */
--- 92,104 ----
          if (add_it)
          {
!             char **tmp = realloc(retval, sizeof (char *) * (cd_count + 1));
              if (tmp)
              {
                  retval = tmp;
!                 retval[cd_count - 1] = (char *)
!                                 malloc(strlen(mntbufp[ii].f_mntonname) + 1);
!                 if (retval[cd_count - 1])
                  {
!                     strcpy(retval[cd_count - 1], mntbufp[ii].f_mntonname);
                      cd_count++;
                  } /* if */
***************
*** 134,145 ****
          if (add_it)
          {
!             char **tmp = realloc(retval, sizeof (char *) * cd_count + 1);
              if (tmp)
              {
                  retval = tmp;
                  retval[cd_count-1] = (char *) malloc(strlen(ent->mnt_dir) + 
1);
!                 if (retval[cd_count-1])
                  {
!                     strcpy(retval[cd_count-1], ent->mnt_dir);
                      cd_count++;
                  } /* if */
--- 138,149 ----
          if (add_it)
          {
!             char **tmp = realloc(retval, sizeof (char *) * (cd_count + 1));
              if (tmp)
              {
                  retval = tmp;
                  retval[cd_count-1] = (char *) malloc(strlen(ent->mnt_dir) + 
1);
!                 if (retval[cd_count - 1])
                  {
!                     strcpy(retval[cd_count - 1], ent->mnt_dir);
                      cd_count++;
                  } /* if */
***************
*** 302,305 ****
--- 306,311 ----
      pthread_mutex_unlock((pthread_mutex_t *) mutex);
  } /* __PHYSFS_platformReleaseMutex */
+ 
+ #endif /* win32 check. */
  
  #endif /* !defined __BEOS__ */

Index: win32.c
===================================================================
RCS file: /cvsroot/paragui/paragui/src/physfs/platform/win32.c,v
retrieving revision 1.1.1.1.6.9
retrieving revision 1.1.1.1.6.10
diff -C2 -r1.1.1.1.6.9 -r1.1.1.1.6.10
*** win32.c     21 Jun 2002 20:07:53 -0000      1.1.1.1.6.9
--- win32.c     1 Jul 2002 17:15:22 -0000       1.1.1.1.6.10
***************
*** 14,17 ****
--- 14,19 ----
  #include <stdio.h>
  #include <stdlib.h>
+ #include <string.h>
+ #include <errno.h>
  #include <ctype.h>
  #include <time.h>
***************
*** 21,40 ****
  #include "physfs_internal.h"
[...1309 lines suppressed...]
! 
!     /* GetFileTime() has been in the Win32 API since the start. */
!     if (retval == -1)  /* try a fallback... */
!     {
!         FILETIME ft;
!         BOOL rc;
!         const char *err;
!         win32file *f = (win32file *) __PHYSFS_platformOpenRead(fname);
!         BAIL_IF_MACRO(f == NULL, NULL, -1)
!         rc = GetFileTime(f->handle, NULL, NULL, &ft);
!         err = win32strerror();
!         CloseHandle(f->handle);
!         free(f);
!         BAIL_IF_MACRO(!rc, err, -1);
!         retval = FileTimeToPhysfsTime(&ft);
!     } /* if */
  
!     return(retval);
  } /* __PHYSFS_platformGetLastModTime */
  




reply via email to

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