summaryrefslogtreecommitdiff
path: root/tools/gbagfx/util.h
blob: 7802f1d217488ca1ebf10cf77d82eea69f36169a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// Copyright (c) 2015 YamaArashi

#ifndef UTIL_H
#define UTIL_H

#include <stdbool.h>

bool ParseNumber(char *s, char **end, int radix, int *intValue);
char *GetFileExtension(char *path);
char *GetFileExtensionAfterDot(char *path);
unsigned char *ReadWholeFile(char *path, int *size);
unsigned char *ReadWholeFileZeroPadded(char *path, int *size, int padAmount);
void WriteWholeFile(char *path, void *buffer, int bufferSize);

#endif // UTIL_H