src/platform_beos.cpp
changeset 1240 22d4d1bd4e21
parent 1231 8206d0e4cf49
child 1242 1e6db80d2393
equal deleted inserted replaced
1239:a96d88b357bc 1240:22d4d1bd4e21
    38 #include <errno.h>
    38 #include <errno.h>
    39 #include <unistd.h>
    39 #include <unistd.h>
    40 
    40 
    41 #include "physfs_internal.h"
    41 #include "physfs_internal.h"
    42 
    42 
    43 
       
    44 int __PHYSFS_platformInit(void)
    43 int __PHYSFS_platformInit(void)
    45 {
    44 {
    46     return 1;  /* always succeed. */
    45     return 1;  /* always succeed. */
    47 } /* __PHYSFS_platformInit */
    46 } /* __PHYSFS_platformInit */
    48 
    47 
   176     rc = path.GetParent(&path); /* chop filename, keep directory. */
   175     rc = path.GetParent(&path); /* chop filename, keep directory. */
   177     assert(rc == B_OK);
   176     assert(rc == B_OK);
   178     const char *str = path.Path();
   177     const char *str = path.Path();
   179     assert(str != NULL);
   178     assert(str != NULL);
   180     char *retval = (char *) allocator.Malloc(strlen(str) + 1);
   179     char *retval = (char *) allocator.Malloc(strlen(str) + 1);
   181     BAIL_IF_MACRO(retval == NULL, ERR_OUT_OF_MEMORY, NULL);
   180     BAIL_IF_MACRO(!retval, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
   182     strcpy(retval, str);
   181     strcpy(retval, str);
   183     return retval;
   182     return retval;
   184 } /* __PHYSFS_platformCalcBaseDir */
   183 } /* __PHYSFS_platformCalcBaseDir */
   185 
   184 
   186 
   185