Marked a bunch of things as "FIXME-3.0" that I want resolved before 3.0 ships.

This commit is contained in:
Ryan C. Gordon 2017-08-06 15:54:44 -04:00
parent 0287160f3c
commit f0eb5c0db9
11 changed files with 27 additions and 22 deletions

View File

@ -28,7 +28,7 @@
*/
/* I'm not screwing around with stricmp vs. strcasecmp... */
/* !!! FIXME: this will NOT work with UTF-8 strings in physfs2.0 */
/* !!! FIXME-3.0: this will NOT work with UTF-8 strings in physfs2.0 */
static int caseInsensitiveStringCompare(const char *x, const char *y)
{
int ux, uy;

View File

@ -974,7 +974,7 @@ static int sanitizePlatformIndependentPath(const char *src, char *dst)
*/
static int partOfMountPoint(DirHandle *h, char *fname)
{
/* !!! FIXME: This code feels gross. */
/* !!! FIXME-3.0: This code feels gross. */
int rc;
size_t len, mntpntlen;
@ -1661,7 +1661,7 @@ int PHYSFS_setWriteDir(const char *newDir)
if (newDir != NULL)
{
/* !!! FIXME: PHYSFS_Io shouldn't be NULL */
/* !!! FIXME-3.0: PHYSFS_Io shouldn't be NULL */
writeDir = createDirHandle(NULL, newDir, NULL, 1);
retval = (writeDir != NULL);
} /* if */
@ -2295,7 +2295,7 @@ typedef struct SymlinkFilterData
DirHandle *dirhandle;
} SymlinkFilterData;
/* !!! FIXME: broken if in a virtual mountpoint (stat call fails). */
/* !!! FIXME-3.0: broken if in a virtual mountpoint (stat call fails). */
static void enumCallbackFilterSymLinks(void *_data, const char *origdir,
const char *fname)
{
@ -2322,7 +2322,7 @@ static void enumCallbackFilterSymLinks(void *_data, const char *origdir,
} /* enumCallbackFilterSymLinks */
/* !!! FIXME: this should report error conditions. */
/* !!! FIXME-3.0: this should report error conditions. */
void PHYSFS_enumerateFilesCallback(const char *_fname,
PHYSFS_EnumFilesCallback callback,
void *data)
@ -2695,6 +2695,7 @@ static PHYSFS_sint64 doBufferedWrite(PHYSFS_File *handle, const void *buffer,
} /* if */
/* would overflow buffer. Flush and then write the new objects, too. */
/* !!! FIXME-3.0: this should refill the buffer, not flush everything down. */
BAIL_IF_ERRPASS(!PHYSFS_flush(handle), -1);
return fh->io->write(fh->io, buffer, len);
} /* doBufferedWrite */
@ -2909,7 +2910,7 @@ int PHYSFS_stat(const char *_fname, PHYSFS_Stat *stat)
} /* if */
else if (verifyPath(i, &arcfname, 0))
{
/* !!! FIXME: this test is wrong and should be elsewhere. */
/* !!! FIXME-3.0: this test is wrong and should be elsewhere. */
stat->readonly = !(writeDir &&
(strcmp(writeDir->dirName, i->dirName) == 0));
retval = i->funcs->stat(i->opaque, arcfname, stat);

View File

@ -2364,7 +2364,7 @@ PHYSFS_DECL void PHYSFS_getSearchPathCallback(PHYSFS_StringCallback c, void *d);
* PHYSFS_enumerateFilesCallback("/some/path", printDir, NULL);
* \endcode
*
* !!! FIXME: enumerateFiles() does not promise alphabetical sorting by
* !!! FIXME-3.0: enumerateFiles() does not promise alphabetical sorting by
* !!! FIXME: case-sensitivity in the code, and doesn't promise sorting at
* !!! FIXME: all in the above docs.
*
@ -2900,7 +2900,7 @@ typedef struct PHYSFS_Io
/**
* \brief Duplicate this i/o instance.
*
* // !!! FIXME: write me.
* // !!! FIXME-3.0: write me.
*
* \param io The i/o instance to duplicate.
* \return A new value for a stream's (opaque) field, or NULL on error.
@ -3372,7 +3372,7 @@ typedef struct PHYSFS_Archiver
*/
PHYSFS_ArchiveInfo info;
// !!! FIXME: documentation: \brief?
// !!! FIXME-3.0: documentation: \brief?
/**
* \brief
*
@ -3385,7 +3385,7 @@ typedef struct PHYSFS_Archiver
* element of the search path.
* Return NULL on failure. We ignore any error code you set here;
* when PHYSFS_mount() returns, the error will be PHYSFS_ERR_UNSUPPORTED
* (no Archivers could handle this data). // !!! FIXME: yeah?
* (no Archivers could handle this data). // !!! FIXME-3.0: yeah?
* Returns non-NULL on success. The pointer returned will be
* passed as the "opaque" parameter for later calls.
*/
@ -3482,7 +3482,7 @@ typedef struct PHYSFS_Archiver
* \fn int PHYSFS_registerArchiver(const PHYSFS_Archiver *archiver)
* \brief Add a new archiver to the system.
*
* !!! FIXME: write me.
* !!! FIXME-3.0: write me.
*
* You may not have two archivers that handle the same extension. If you are
* going to have a clash, you can deregister the other archiver (including
@ -3503,7 +3503,7 @@ PHYSFS_DECL int PHYSFS_registerArchiver(const PHYSFS_Archiver *archiver);
* \fn int PHYSFS_deregisterArchiver(const char *ext)
* \brief Remove an archiver from the system.
*
* !!! FIXME: write me.
* !!! FIXME-3.0: write me.
*
* This fails if there are any archives still open that use this archiver.
*

View File

@ -217,7 +217,7 @@ static void *SZIP_openArchive(PHYSFS_Io *io, const char *name, int forWriting)
SZIPinfo *info = NULL;
SRes rc;
/* !!! FIXME: this is a race condition; we need a global init method that gets called when registering new archivers. */
/* !!! FIXME-3.0: this is a race condition; we need a global init method that gets called when registering new archivers. */
static int generatedTable = 0;
if (!generatedTable)
{

View File

@ -88,7 +88,7 @@ static int iso9660AddEntry(PHYSFS_Io *io, const int joliet, const int isdir,
} /* if */
else
{
/* !!! FIXME: we assume the filenames are low-ASCII; if they use
/* !!! FIXME-3.0: we assume the filenames are low-ASCII; if they use
any high-ASCII chars, they will be invalid UTF-8. */
memcpy(fnamecpy, fname, fnamelen);
fnamecpy[fnamelen] = '\0';

View File

@ -78,7 +78,7 @@ static int vdfLoadEntries(PHYSFS_Io *io, const PHYSFS_uint32 count,
BAIL_IF(!name[0], PHYSFS_ERR_CORRUPT, 0);
/* !!! FIXME: we assume the filenames are low-ASCII; if they use
/* !!! FIXME-3.0: we assume the filenames are low-ASCII; if they use
any high-ASCII chars, they will be invalid UTF-8. */
BAIL_IF_ERRPASS(!UNPK_addEntry(arc, name, 0, ts, ts, jump, size), 0);

View File

@ -384,7 +384,7 @@ int UNPK_stat(void *opaque, const char *fn, PHYSFS_Stat *st);
/* Optional API many archivers use this to manage their directory tree. */
/* !!! FIXME: document this better. */
/* !!! FIXME-3.0: document this better. */
typedef struct __PHYSFS_DirTreeEntry
{
@ -572,7 +572,7 @@ PHYSFS_sint64 __PHYSFS_platformFileLength(void *handle);
/*
* !!! FIXME: comment me.
* !!! FIXME-3.0: comment me.
*/
int __PHYSFS_platformStat(const char *fn, PHYSFS_Stat *stat);

View File

@ -202,7 +202,7 @@ char *__PHYSFS_platformCalcBaseDir(const char *argv0)
char *__PHYSFS_platformCalcPrefDir(const char *org, const char *app)
{
/* !!! FIXME: there's a real API to determine this */
/* !!! FIXME-3.0: there's a real API to determine this */
const char *userdir = __PHYSFS_getUserDir();
const char *append = "Library/Application Support/";
const size_t len = strlen(userdir) + strlen(append) + strlen(app) + 2;

View File

@ -382,13 +382,13 @@ char *__PHYSFS_platformCalcBaseDir(const char *argv0)
char *__PHYSFS_platformCalcUserDir(void)
{
return __PHYSFS_platformCalcBaseDir(NULL); /* !!! FIXME: ? */
return __PHYSFS_platformCalcBaseDir(NULL); /* !!! FIXME-3.0: ? */
} /* __PHYSFS_platformCalcUserDir */
char *__PHYSFS_platformCalcPrefDir(const char *org, const char *app)
{
return __PHYSFS_platformCalcBaseDir(NULL); /* !!! FIXME: ? */
}
return __PHYSFS_platformCalcBaseDir(NULL); /* !!! FIXME-3.0: ? */
} /* __PHYSFS_platformCalcPrefDir */
void __PHYSFS_platformEnumerateFiles(const char *dirname,
PHYSFS_EnumFilesCallback callback,

View File

@ -69,7 +69,7 @@
# define PHYSFS_PLATFORM_UNIX 1
# define PHYSFS_PLATFORM_POSIX 1
#elif defined(__QNX__)
# define PHYSFS_NO_CDROM_SUPPORT 1 /* !!! FIXME? */
# define PHYSFS_NO_CDROM_SUPPORT 1 /* !!! FIXME-3.0? */
# define PHYSFS_PLATFORM_QNX 1
# define PHYSFS_PLATFORM_UNIX 1
# define PHYSFS_PLATFORM_POSIX 1

View File

@ -444,6 +444,10 @@ static void locate_case_fold_mapping(const PHYSFS_uint32 from,
} /* locate_case_fold_mapping */
/* !!! FIXME-3.0: this doesn't actually work (for example, it folds the German Eszett
into 's' 's', but if you have two 'S' chars in a row, it'll fail on the first one,
since it'll fold into a single 's'. This needs to be able to lurch along with a
variable number of codepoints at a time. */
static int utf8codepointcmp(const PHYSFS_uint32 cp1, const PHYSFS_uint32 cp2)
{
PHYSFS_uint32 folded1[3], folded2[3];