aboutsummaryrefslogtreecommitdiff
path: root/lib/io/src/win32
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2023-06-12 20:14:44 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2023-06-15 13:38:25 +0200
commite811851deba9c45f3d9b3c5b4ad5eaa7945382d5 (patch)
tree4a5084324ab2a76d3c205f34bb0871de58ac192a /lib/io/src/win32
parent2694532a5479d157903b6c600d9b1d5c145a4e4c (diff)
Mass rename istream_t/ostream_t with sqfs_ prefix
istream_t becomes sqfs_istream_t and ostream_t becomes sqfs_ostream_t Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib/io/src/win32')
-rw-r--r--lib/io/src/win32/dir_iterator.c2
-rw-r--r--lib/io/src/win32/istream.c20
-rw-r--r--lib/io/src/win32/ostream.c18
3 files changed, 20 insertions, 20 deletions
diff --git a/lib/io/src/win32/dir_iterator.c b/lib/io/src/win32/dir_iterator.c
index b1045f1..c99fd64 100644
--- a/lib/io/src/win32/dir_iterator.c
+++ b/lib/io/src/win32/dir_iterator.c
@@ -115,7 +115,7 @@ static void dir_iterator_ignore_subdir(dir_iterator_t *it)
(void)it;
}
-static int dir_iterator_open_file_ro(dir_iterator_t *it, istream_t **out)
+static int dir_iterator_open_file_ro(dir_iterator_t *it, sqfs_istream_t **out)
{
(void)it;
*out = NULL;
diff --git a/lib/io/src/win32/istream.c b/lib/io/src/win32/istream.c
index d140142..223b20d 100644
--- a/lib/io/src/win32/istream.c
+++ b/lib/io/src/win32/istream.c
@@ -10,7 +10,7 @@
#include <windows.h>
typedef struct {
- istream_t base;
+ sqfs_istream_t base;
char *path;
HANDLE hnd;
@@ -20,7 +20,7 @@ typedef struct {
sqfs_u8 buffer[BUFSZ];
} file_istream_t;
-static int precache(istream_t *strm)
+static int precache(sqfs_istream_t *strm)
{
file_istream_t *file = (file_istream_t *)strm;
DWORD diff, actual;
@@ -66,7 +66,7 @@ static int precache(istream_t *strm)
return 0;
}
-static int file_get_buffered_data(istream_t *strm, const sqfs_u8 **out,
+static int file_get_buffered_data(sqfs_istream_t *strm, const sqfs_u8 **out,
size_t *size, size_t want)
{
file_istream_t *file = (file_istream_t *)strm;
@@ -86,7 +86,7 @@ static int file_get_buffered_data(istream_t *strm, const sqfs_u8 **out,
return (file->eof && *size == 0) ? 1 : 0;
}
-static void file_advance_buffer(istream_t *strm, size_t count)
+static void file_advance_buffer(sqfs_istream_t *strm, size_t count)
{
file_istream_t *file = (file_istream_t *)strm;
@@ -97,7 +97,7 @@ static void file_advance_buffer(istream_t *strm, size_t count)
assert(file->buffer_offset <= file->buffer_used);
}
-static const char *file_get_filename(istream_t *strm)
+static const char *file_get_filename(sqfs_istream_t *strm)
{
return ((file_istream_t *)strm)->path;
}
@@ -111,10 +111,10 @@ static void file_destroy(sqfs_object_t *obj)
free(file);
}
-istream_t *istream_open_handle(const char *path, HANDLE hnd)
+sqfs_istream_t *istream_open_handle(const char *path, HANDLE hnd)
{
file_istream_t *file = calloc(1, sizeof(*file));
- istream_t *strm = (istream_t *)file;
+ sqfs_istream_t *strm = (sqfs_istream_t *)file;
BOOL ret;
if (file == NULL) {
@@ -151,10 +151,10 @@ fail_free:
return NULL;
}
-istream_t *istream_open_file(const char *path)
+sqfs_istream_t *istream_open_file(const char *path)
{
WCHAR *wpath = NULL;
- istream_t *out;
+ sqfs_istream_t *out;
HANDLE hnd;
wpath = path_to_windows(path);
@@ -179,7 +179,7 @@ istream_t *istream_open_file(const char *path)
return out;
}
-istream_t *istream_open_stdin(void)
+sqfs_istream_t *istream_open_stdin(void)
{
HANDLE hnd = GetStdHandle(STD_INPUT_HANDLE);
diff --git a/lib/io/src/win32/ostream.c b/lib/io/src/win32/ostream.c
index 26d6f96..5b099a4 100644
--- a/lib/io/src/win32/ostream.c
+++ b/lib/io/src/win32/ostream.c
@@ -11,7 +11,7 @@
#include <windows.h>
typedef struct {
- ostream_t base;
+ sqfs_ostream_t base;
sqfs_u64 sparse_count;
char *path;
HANDLE hnd;
@@ -84,7 +84,7 @@ fail:
return -1;
}
-static int file_append(ostream_t *strm, const void *data, size_t size)
+static int file_append(sqfs_ostream_t *strm, const void *data, size_t size)
{
file_ostream_t *file = (file_ostream_t *)strm;
@@ -102,7 +102,7 @@ static int file_append(ostream_t *strm, const void *data, size_t size)
return write_data(file, data, size);
}
-static int file_flush(ostream_t *strm)
+static int file_flush(sqfs_ostream_t *strm)
{
file_ostream_t *file = (file_ostream_t *)strm;
@@ -126,17 +126,17 @@ static void file_destroy(sqfs_object_t *obj)
free(file);
}
-static const char *file_get_filename(ostream_t *strm)
+static const char *file_get_filename(sqfs_ostream_t *strm)
{
file_ostream_t *file = (file_ostream_t *)strm;
return file->path;
}
-ostream_t *ostream_open_handle(const char *path, HANDLE hnd, int flags)
+sqfs_ostream_t *ostream_open_handle(const char *path, HANDLE hnd, int flags)
{
file_ostream_t *file = calloc(1, sizeof(*file));
- ostream_t *strm = (ostream_t *)file;
+ sqfs_ostream_t *strm = (sqfs_ostream_t *)file;
BOOL ret;
if (file == NULL) {
@@ -174,11 +174,11 @@ fail_free:
return NULL;
}
-ostream_t *ostream_open_file(const char *path, int flags)
+sqfs_ostream_t *ostream_open_file(const char *path, int flags)
{
int access_flags, creation_mode;
WCHAR *wpath = NULL;
- ostream_t *out;
+ sqfs_ostream_t *out;
HANDLE hnd;
access_flags = GENERIC_WRITE;
@@ -216,7 +216,7 @@ ostream_t *ostream_open_file(const char *path, int flags)
return out;
}
-ostream_t *ostream_open_stdout(void)
+sqfs_ostream_t *ostream_open_stdout(void)
{
HANDLE hnd = GetStdHandle(STD_OUTPUT_HANDLE);