Update gb.h

This commit is contained in:
Ginger Bill
2017-07-31 12:17:53 +01:00
parent 4d14b3bcb4
commit e4a93619db
2 changed files with 13 additions and 12 deletions
+6 -5
View File
@@ -1,4 +1,4 @@
/* gb.h - v0.30 - Ginger Bill's C Helper Library - public domain
/* gb.h - v0.31 - Ginger Bill's C Helper Library - public domain
- no warranty implied; use at your own risk
This is a single header file with a bunch of useful stuff
@@ -58,6 +58,7 @@ TODOS
- More date & time functions
VERSION HISTORY
0.31 - Add gb_file_remove
0.30 - Changes to gbThread (and gbMutex on Windows)
0.29 - Add extras for gbString
0.28 - Handle UCS2 correctly in Win32 part
@@ -2056,7 +2057,7 @@ GB_DEF b32 gb_file_exists (char const *filepath);
GB_DEF gbFileTime gb_file_last_write_time(char const *filepath);
GB_DEF b32 gb_file_copy (char const *existing_filename, char const *new_filename, b32 fail_if_exists);
GB_DEF b32 gb_file_move (char const *existing_filename, char const *new_filename);
GB_DEF b32 gb_file_delete (char const *filename);
GB_DEF b32 gb_file_remove (char const *filename);
#ifndef GB_PATH_SEPARATOR
@@ -7978,7 +7979,7 @@ gb_inline b32 gb_file_move(char const *existing_filename, char const *new_filena
return result;
}
b32 gb_file_delete(char const *filename) {
b32 gb_file_remove(char const *filename) {
wchar_t *w_filename = NULL;
gbAllocator a = gb_heap_allocator();
b32 result = false;
@@ -8036,8 +8037,8 @@ gb_inline b32 gb_file_move(char const *existing_filename, char const *new_filena
return false;
}
b32 gb_file_delete(char const *filename) {
return unlink(filename) != -1;
b32 gb_file_remove(char const *filename) {
return remove(filename) == 0;
}