Remove include/file.h

It was an outdated duplicate of system4/file.h.
This commit is contained in:
kichikuou
2022-03-21 21:23:20 +09:00
parent f53fcf4bf9
commit fc41239175
7 changed files with 5 additions and 38 deletions
-29
View File
@@ -1,29 +0,0 @@
/* Copyright (C) 2019 Nunuhara Cabbage <nunuhara@haniwa.technology>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://gnu.org/licenses/>.
*/
#ifndef SYSTEM4_FILE_H
#define SYSTEM4_FILE_H
#include <stddef.h>
#include <stdbool.h>
#include <stdio.h>
FILE *file_open_utf8(const char *path, const char *mode);
void *file_read(const char *path, size_t *len_out);
bool file_exists(const char *path);
int mkdir_p(const char *path);
#endif /* SYSTEM4_FILE_H */
+2 -4
View File
@@ -22,10 +22,10 @@
#include <sys/stat.h>
#include "system4.h"
#include "system4/file.h"
#include "system4/string.h"
#include "hll.h"
#include "file.h"
#include "savedata.h"
#include "vm/heap.h"
#include "vm/page.h"
@@ -33,7 +33,6 @@
static FILE *current_file = NULL;
static char *file_contents = NULL;
static size_t file_size = 0;
static size_t file_cursor = 0;
static int File_Open(struct string *filename, int type)
@@ -72,7 +71,6 @@ static int File_Close(void)
if (file_contents)
free(file_contents);
file_contents = NULL;
file_size = 0;
file_cursor = 0;
return r;
}
@@ -91,7 +89,7 @@ static int File_Read(struct page **_page)
// read file inton memory if needed
if (!file_contents) {
fseek(current_file, 0, SEEK_END);
file_size = ftell(current_file);
size_t file_size = ftell(current_file);
fseek(current_file, 0, SEEK_SET);
file_contents = xmalloc(file_size + 1);
+1 -1
View File
@@ -21,10 +21,10 @@
#include "system4.h"
#include "system4/ain.h"
#include "system4/file.h"
#include "system4/string.h"
#include "system4/utfsjis.h"
#include "file.h"
#include "vm.h"
#include "xsystem4.h"
+1 -1
View File
@@ -23,9 +23,9 @@
#include "cJSON.h"
#include "system4.h"
#include "system4/file.h"
#include "system4/string.h"
#include "file.h"
#include "savedata.h"
#include "vm.h"
#include "vm/heap.h"
-1
View File
@@ -36,7 +36,6 @@
#include "xsystem4.h"
#include "asset_manager.h"
#include "debugger.h"
#include "file.h"
#include "gfx/gfx.h"
#include "little_endian.h"
#include "vm.h"
+1 -1
View File
@@ -24,11 +24,11 @@
#include "system4.h"
#include "system4/cg.h"
#include "system4/file.h"
#include "system4/utfsjis.h"
#include "gfx/gfx.h"
#include "gfx/private.h"
#include "file.h"
#include "xsystem4.h"
struct sdl_private sdl;
-1
View File
@@ -32,7 +32,6 @@
#include "system4/utfsjis.h"
#include "debugger.h"
#include "file.h"
#include "little_endian.h"
#include "savedata.h"
#include "vm.h"