summaryrefslogtreecommitdiff
path: root/tools/gbagfx/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/gbagfx/util.c')
-rw-r--r--tools/gbagfx/util.c42
1 files changed, 0 insertions, 42 deletions
diff --git a/tools/gbagfx/util.c b/tools/gbagfx/util.c
index 180b93d9b..5af380184 100644
--- a/tools/gbagfx/util.c
+++ b/tools/gbagfx/util.c
@@ -58,48 +58,6 @@ char *GetFileExtension(char *path)
return extension;
}
-void ExpectFileExtension(char *path, char *expectedExtension)
-{
- char *extension = GetFileExtension(path);
-
- if (extension == NULL)
- FATAL_ERROR("\"%s\" has no file extension.\n", path);
-
- if (strcmp(extension, expectedExtension) != 0)
- FATAL_ERROR("Unexpected file extension \"%s\". Expected \"%s\".\n", extension, expectedExtension);
-}
-
-void AddFileExtension(char *path, char *extension)
-{
- int pathLength = strlen(path);
- int extensionLength = strlen(extension);
-
- if (pathLength + 1 + extensionLength > GBAGFX_MAX_PATH)
- FATAL_ERROR("\"%s\" is too long a path to add the extension \"%s\".\n", path, extension);
-
- path[pathLength] = '.';
- memcpy(path + pathLength + 1, extension, extensionLength);
- path[pathLength + 1 + extensionLength] = 0;
-}
-
-void RemoveFileExtension(char *path)
-{
- char *extension = GetFileExtension(path);
-
- if (extension == NULL)
- FATAL_ERROR("\"%s\" doesn't have a file extension.\n", path);
-
- extension--;
-
- *extension = 0;
-}
-
-void ChangeFileExtension(char *path, char *extension)
-{
- RemoveFileExtension(path);
- AddFileExtension(path, extension);
-}
-
unsigned char *ReadWholeFile(char *path, int *size)
{
FILE *fp = fopen(path, "rb");