diff options
author | pixel <pixel> | 2007-07-10 09:28:10 +0000 |
---|---|---|
committer | pixel <pixel> | 2007-07-10 09:28:10 +0000 |
commit | a3e08df7a6655e7baf3505edeed3a1c0dff5bbf8 (patch) | |
tree | c80f10b9a90268f209e5593544824e2d1a72b970 | |
parent | 8feb553794efc2a328f8ce2beed5eeacc43238f4 (diff) |
Adding first prototypes for mpq-fs, and harmonization of the headers.
-rw-r--r-- | Makefile | 1 | ||||
-rw-r--r-- | int-bios.h | 2 | ||||
-rw-r--r-- | inttypes.h | 14 | ||||
-rw-r--r-- | mpq-bios.h | 2 | ||||
-rw-r--r-- | mpq-file.h | 10 | ||||
-rw-r--r-- | mpq-fs.c | 2 | ||||
-rw-r--r-- | mpq-fs.h | 18 | ||||
-rw-r--r-- | mpq-misc.h | 2 |
8 files changed, 33 insertions, 18 deletions
@@ -12,6 +12,7 @@ extract.c \ mpq-bios.c \ mpq-errors.c \ mpq-file.c \ +mpq-fs.c \ mpq-misc.c \ @@ -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 @@ -1,7 +1,7 @@ #ifndef __MPQ_BIOS_H__ #define __MPQ_BIOS_H__ -#include "inttypes.h" +#include <stdint.h> struct mpq_archive_t; @@ -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 @@ -1,7 +1,7 @@ #ifndef __MPQ_MISC_H__ #define __MPQ_MISC_H__ -#include <inttypes.h> +#include <stdint.h> #ifdef __cplusplus extern "C" { |