Marked a bunch of things as "FIXME-3.0" that I want resolved before 3.0 ships.
authorRyan C. Gordon <icculus@icculus.org>
Sun, 06 Aug 2017 15:54:44 -0400
changeset 1544 7f6020ee746c
parent 1543 210b82b60730
child 1545 92b9cd76255d
Marked a bunch of things as "FIXME-3.0" that I want resolved before 3.0 ships.
extras/ignorecase.c
src/physfs.c
src/physfs.h
src/physfs_archiver_7z.c
src/physfs_archiver_iso9660.c
src/physfs_archiver_vdf.c
src/physfs_internal.h
src/physfs_platform_macos.c
src/physfs_platform_os2.c
src/physfs_platforms.h
src/physfs_unicode.c
--- a/extras/ignorecase.c	Sun Aug 06 13:56:45 2017 -0400
+++ b/extras/ignorecase.c	Sun Aug 06 15:54:44 2017 -0400
@@ -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;
--- a/src/physfs.c	Sun Aug 06 13:56:45 2017 -0400
+++ b/src/physfs.c	Sun Aug 06 15:54:44 2017 -0400
@@ -974,7 +974,7 @@
  */
 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 @@
 
     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 @@
     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 @@
 } /* 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 @@
     } /* 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 @@
                 } /* 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);
--- a/src/physfs.h	Sun Aug 06 13:56:45 2017 -0400
+++ b/src/physfs.h	Sun Aug 06 15:54:44 2017 -0400
@@ -2364,7 +2364,7 @@
  * 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 @@
     /**
      * \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 @@
      */
     PHYSFS_ArchiveInfo info;
 
-// !!! FIXME: documentation: \brief?
+// !!! FIXME-3.0: documentation: \brief?
     /**
      * \brief
      *
@@ -3385,7 +3385,7 @@
      *  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 @@
  * \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 @@
  * \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.
  *
--- a/src/physfs_archiver_7z.c	Sun Aug 06 13:56:45 2017 -0400
+++ b/src/physfs_archiver_7z.c	Sun Aug 06 15:54:44 2017 -0400
@@ -217,7 +217,7 @@
     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)
     {
--- a/src/physfs_archiver_iso9660.c	Sun Aug 06 13:56:45 2017 -0400
+++ b/src/physfs_archiver_iso9660.c	Sun Aug 06 15:54:44 2017 -0400
@@ -88,7 +88,7 @@
     } /* 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';
--- a/src/physfs_archiver_vdf.c	Sun Aug 06 13:56:45 2017 -0400
+++ b/src/physfs_archiver_vdf.c	Sun Aug 06 15:54:44 2017 -0400
@@ -78,7 +78,7 @@
 
         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);
--- a/src/physfs_internal.h	Sun Aug 06 13:56:45 2017 -0400
+++ b/src/physfs_internal.h	Sun Aug 06 15:54:44 2017 -0400
@@ -384,7 +384,7 @@
 
 
 /* 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 @@
 
 
 /*
- * !!! FIXME: comment me.
+ * !!! FIXME-3.0: comment me.
  */
 int __PHYSFS_platformStat(const char *fn, PHYSFS_Stat *stat);
 
--- a/src/physfs_platform_macos.c	Sun Aug 06 13:56:45 2017 -0400
+++ b/src/physfs_platform_macos.c	Sun Aug 06 15:54:44 2017 -0400
@@ -202,7 +202,7 @@
 
 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;
--- a/src/physfs_platform_os2.c	Sun Aug 06 13:56:45 2017 -0400
+++ b/src/physfs_platform_os2.c	Sun Aug 06 15:54:44 2017 -0400
@@ -382,13 +382,13 @@
 
 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,
--- a/src/physfs_platforms.h	Sun Aug 06 13:56:45 2017 -0400
+++ b/src/physfs_platforms.h	Sun Aug 06 15:54:44 2017 -0400
@@ -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
--- a/src/physfs_unicode.c	Sun Aug 06 13:56:45 2017 -0400
+++ b/src/physfs_unicode.c	Sun Aug 06 15:54:44 2017 -0400
@@ -444,6 +444,10 @@
 } /* 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];