unix.c
author Ryan C. Gordon <icculus@icculus.org>
Fri, 06 Jul 2001 02:33:21 +0000
changeset 10 45bd486c0224
parent 4 b8107374195a
child 11 677e01f5109e
permissions -rw-r--r--
Added stricmp stuff and included physfs_internal.h ...
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4
b8107374195a Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     1
/*
b8107374195a Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     2
 * Unix support routines for PhysicsFS.
b8107374195a Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     3
 *
b8107374195a Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     4
 * Please see the file LICENSE in the source's root directory.
b8107374195a Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     5
 *
b8107374195a Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     6
 *  This file written by Ryan C. Gordon.
b8107374195a Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     7
 */
b8107374195a Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     8
b8107374195a Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     9
#include <stdio.h>
b8107374195a Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    10
#include <stdlib.h>
b8107374195a Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    11
#include <pthread.h>
b8107374195a Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    12
10
45bd486c0224 Added stricmp stuff and included physfs_internal.h ...
Ryan C. Gordon <icculus@icculus.org>
parents: 4
diff changeset
    13
#define __PHYSICSFS_INTERNAL__
45bd486c0224 Added stricmp stuff and included physfs_internal.h ...
Ryan C. Gordon <icculus@icculus.org>
parents: 4
diff changeset
    14
#include "physfs_internal.h"
45bd486c0224 Added stricmp stuff and included physfs_internal.h ...
Ryan C. Gordon <icculus@icculus.org>
parents: 4
diff changeset
    15
45bd486c0224 Added stricmp stuff and included physfs_internal.h ...
Ryan C. Gordon <icculus@icculus.org>
parents: 4
diff changeset
    16
4
b8107374195a Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    17
const char *__PHYSFS_PlatformDirSeparator = "/";
b8107374195a Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    18
b8107374195a Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    19
char **__PHYSFS_platformDetectAvailableCDs(void)
b8107374195a Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    20
{
b8107374195a Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    21
} /* __PHYSFS_detectAvailableCDs */
b8107374195a Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    22
b8107374195a Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    23
b8107374195a Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    24
char *__PHYSFS_platformCalcBaseDir(char *argv0)
b8107374195a Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    25
{
b8107374195a Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    26
    return(NULL);
b8107374195a Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    27
} /* __PHYSFS_platformCalcBaseDir */
b8107374195a Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    28
b8107374195a Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    29
b8107374195a Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    30
int __PHYSFS_platformGetThreadID(void)
b8107374195a Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    31
{
b8107374195a Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    32
    return((int) pthread_self());
b8107374195a Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    33
} /* __PHYSFS_platformGetThreadID */
b8107374195a Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    34
10
45bd486c0224 Added stricmp stuff and included physfs_internal.h ...
Ryan C. Gordon <icculus@icculus.org>
parents: 4
diff changeset
    35
45bd486c0224 Added stricmp stuff and included physfs_internal.h ...
Ryan C. Gordon <icculus@icculus.org>
parents: 4
diff changeset
    36
int __PHYSFS_platformStricmp(const char *str1, const char *str2)
45bd486c0224 Added stricmp stuff and included physfs_internal.h ...
Ryan C. Gordon <icculus@icculus.org>
parents: 4
diff changeset
    37
{
45bd486c0224 Added stricmp stuff and included physfs_internal.h ...
Ryan C. Gordon <icculus@icculus.org>
parents: 4
diff changeset
    38
    return(strcasecmp(str1, str2));
45bd486c0224 Added stricmp stuff and included physfs_internal.h ...
Ryan C. Gordon <icculus@icculus.org>
parents: 4
diff changeset
    39
} /* __PHYSFS_platformStricmp */
45bd486c0224 Added stricmp stuff and included physfs_internal.h ...
Ryan C. Gordon <icculus@icculus.org>
parents: 4
diff changeset
    40
4
b8107374195a Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    41
/* end of unix.c ... */
b8107374195a Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    42