From 291442cd6c620ab7f9362da182fb0b473040935d Mon Sep 17 00:00:00 2001 From: David Reid Date: Thu, 17 Jul 2025 15:08:29 +1000 Subject: [PATCH] Update external/fs. --- external/fs/fs.c | 4 ++-- external/fs/fs.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/external/fs/fs.c b/external/fs/fs.c index 28429155..63bfd8cb 100644 --- a/external/fs/fs.c +++ b/external/fs/fs.c @@ -1359,13 +1359,13 @@ struct fs fs_uint32 refCount; /* Incremented when a file is opened, decremented when a file is closed. */ }; -typedef struct fs_file +struct fs_file { fs_stream stream; /* Files are streams. This must be the first member so it can be cast. */ fs* pFS; fs_stream* pStreamForBackend; /* The stream for use by the backend. Different to `stream`. This is a duplicate of the stream used by `pFS` so the backend can do reading. */ size_t backendDataSize; -} fs_file; +}; typedef enum fs_mount_priority { diff --git a/external/fs/fs.h b/external/fs/fs.h index 9c180c67..ebfbf48e 100644 --- a/external/fs/fs.h +++ b/external/fs/fs.h @@ -1172,7 +1172,7 @@ FS_API fs_config fs_config_init_default(void); FS_API fs_config fs_config_init(const fs_backend* pBackend, void* pBackendConfig, fs_stream* pStream); -typedef struct fs_backend +struct fs_backend { size_t (* alloc_size )(const void* pBackendConfig); fs_result (* init )(fs* pFS, const void* pBackendConfig, fs_stream* pStream); /* Return 0 on success or an errno result code on error. pBackendConfig is a pointer to a backend-specific struct. The documentation for your backend will tell you how to use this. You can usually pass in NULL for this. */ @@ -1196,7 +1196,7 @@ typedef struct fs_backend fs_iterator* (* first )(fs* pFS, const char* pDirectoryPath, size_t directoryPathLen); fs_iterator* (* next )(fs_iterator* pIterator); /* <-- Must return null when there are no more files. In this case, free_iterator must be called internally. */ void (* free_iterator )(fs_iterator* pIterator); /* <-- Free the `fs_iterator` object here since `first` and `next` were the ones who allocated it. Also do any uninitialization routines. */ -} fs_backend; +}; FS_API fs_result fs_init(const fs_config* pConfig, fs** ppFS); FS_API void fs_uninit(fs* pFS);