shithub: choc

Download patch

ref: 681783578112d3cd48bd69fa0b5aee7b74a2581c
parent: f3706e77c29b68c74388a44456859506df7d163b
author: Turo Lamminen <turol@iki.fi>
date: Wed Sep 7 09:42:54 EDT 2022

wad: Move wad_file_class_t extern declarations to w_file.h

--- a/src/w_file.c
+++ b/src/w_file.c
@@ -25,15 +25,6 @@
 
 #include "w_file.h"
 
-extern wad_file_class_t stdc_wad_file;
-
-#ifdef _WIN32
-extern wad_file_class_t win32_wad_file;
-#endif
-
-#ifdef HAVE_MMAP
-extern wad_file_class_t posix_wad_file;
-#endif 
 
 static wad_file_class_t *wad_file_classes[] = 
 {
--- a/src/w_file.h
+++ b/src/w_file.h
@@ -39,6 +39,18 @@
                    void *buffer, size_t buffer_len);
 } wad_file_class_t;
 
+
+extern wad_file_class_t stdc_wad_file;
+
+#ifdef _WIN32
+extern wad_file_class_t win32_wad_file;
+#endif
+
+#ifdef HAVE_MMAP
+extern wad_file_class_t posix_wad_file;
+#endif
+
+
 struct _wad_file_s
 {
     // Class of this file.
--- a/src/w_file_posix.c
+++ b/src/w_file_posix.c
@@ -36,7 +36,6 @@
     int handle;
 } posix_wad_file_t;
 
-extern wad_file_class_t posix_wad_file;
 
 static void MapFile(posix_wad_file_t *wad, const char *filename)
 {
--- a/src/w_file_stdc.c
+++ b/src/w_file_stdc.c
@@ -28,7 +28,6 @@
     FILE *fstream;
 } stdc_wad_file_t;
 
-extern wad_file_class_t stdc_wad_file;
 
 static wad_file_t *W_StdC_OpenFile(const char *path)
 {
--- a/src/w_file_win32.c
+++ b/src/w_file_win32.c
@@ -43,7 +43,6 @@
     HANDLE handle_map;
 } win32_wad_file_t;
 
-extern wad_file_class_t win32_wad_file;
 
 static void MapFile(win32_wad_file_t *wad, const char *filename)
 {