summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile1
-rw-r--r--int-bios.h2
-rw-r--r--inttypes.h14
-rw-r--r--mpq-bios.h2
-rw-r--r--mpq-file.h10
-rw-r--r--mpq-fs.c2
-rw-r--r--mpq-fs.h18
-rw-r--r--mpq-misc.h2
8 files changed, 33 insertions, 18 deletions
diff --git a/Makefile b/Makefile
index 5d0c962..8479930 100644
--- a/Makefile
+++ b/Makefile
@@ -12,6 +12,7 @@ extract.c \
mpq-bios.c \
mpq-errors.c \
mpq-file.c \
+mpq-fs.c \
mpq-misc.c \
diff --git a/int-bios.h b/int-bios.h
index c0b437b..1508218 100644
--- a/int-bios.h
+++ b/int-bios.h
@@ -1,7 +1,7 @@
#ifndef __INT_BIOS_H__
#define __INT_BIOS_H__
-#include "mpq-bios.h"
+#include <mpq-bios.h>
int __mpqlib_seek(struct mpq_archive_t *, uint64_t);
int __mpqlib_read(struct mpq_archive_t *, void *, uint32_t);
diff --git a/inttypes.h b/inttypes.h
deleted file mode 100644
index 09944ee..0000000
--- a/inttypes.h
+++ /dev/null
@@ -1,14 +0,0 @@
-#ifndef __INTTYPES_H__
-#define __INTTYPES_H__
-
-typedef unsigned char uint8_t;
-typedef unsigned short uint16_t;
-typedef unsigned int uint32_t;
-typedef unsigned long long uint64_t;
-
-typedef signed char int8_t;
-typedef signed short int16_t;
-typedef signed int int32_t;
-typedef signed long long int64_t;
-
-#endif
diff --git a/mpq-bios.h b/mpq-bios.h
index 84f64ae..3ce553e 100644
--- a/mpq-bios.h
+++ b/mpq-bios.h
@@ -1,7 +1,7 @@
#ifndef __MPQ_BIOS_H__
#define __MPQ_BIOS_H__
-#include "inttypes.h"
+#include <stdint.h>
struct mpq_archive_t;
diff --git a/mpq-file.h b/mpq-file.h
index f9b17db..1cec05d 100644
--- a/mpq-file.h
+++ b/mpq-file.h
@@ -1,7 +1,7 @@
#ifndef __MPQ_FILE_H__
#define __MPQ_FILE_H__
-#include "inttypes.h"
+#include <stdint.h>
struct mpq_file_t;
@@ -11,10 +11,18 @@ enum mpqlib_file_seek_t {
MPQLIB_SEEK_END,
};
+#ifdef __cplusplus
+extern "C" {
+#endif
+
struct mpq_file_t * mpqlib_open_file(struct mpq_archive_t * mpq_a, int entry);
struct mpq_file_t * mpqlib_open_filename(struct mpq_archive_t * mpq_a, const char * fname);
void mpqlib_close(struct mpq_file_t * mpq_f);
uint32_t mpqlib_read(struct mpq_file_t * mpq_f, void * buffer, uint32_t size);
uint32_t mpqlib_seek(struct mpq_file_t * mpq_f, int32_t offset, enum mpqlib_file_seek_t);
+#ifdef __cplusplus
+}
+#endif
+
#endif
diff --git a/mpq-fs.c b/mpq-fs.c
new file mode 100644
index 0000000..87901a0
--- /dev/null
+++ b/mpq-fs.c
@@ -0,0 +1,2 @@
+#include "mpq-fs.h"
+
diff --git a/mpq-fs.h b/mpq-fs.h
new file mode 100644
index 0000000..9d65269
--- /dev/null
+++ b/mpq-fs.h
@@ -0,0 +1,18 @@
+#ifndef __MPQ_FS_H__
+#define __MPQ_FS_H__
+
+#include <mpq-bios.h>
+#include <mpq-file.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void mpqlib_fs_add_archive(struct mpq_archive_t *);
+void mpqlib_fs_attach_listfile(struct mpq_archive_t *, const char *);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/mpq-misc.h b/mpq-misc.h
index f4fe6f2..714d6de 100644
--- a/mpq-misc.h
+++ b/mpq-misc.h
@@ -1,7 +1,7 @@
#ifndef __MPQ_MISC_H__
#define __MPQ_MISC_H__
-#include <inttypes.h>
+#include <stdint.h>
#ifdef __cplusplus
extern "C" {