]> git.draconx.ca Git - upkg.git/blobdiff - src/upkg.h
Fix pointer signedness issues in libupkg.
[upkg.git] / src / upkg.h
index ef6363ec0fc1378ab7037e4c0ef4fd4eb9215210..7ef55d74e5fe0f2cfe2b9350dd7dfd12cde6dbb8 100644 (file)
@@ -44,6 +44,7 @@
 
 struct upkg {
        unsigned version, license;
+       unsigned char guid[16];
        unsigned long flags;
 
        unsigned long name_count, export_count, import_count;
@@ -52,6 +53,10 @@ struct upkg {
 };
 
 struct upkg_file {
+       const char *name;
+
+       int eof;
+
        struct upkg *pkg;
        unsigned long base, offset, len;
 };
@@ -63,6 +68,10 @@ const char *upkg_get_name(struct upkg *pkg, unsigned long idx);
 
 struct upkg_file *upkg_export_open(struct upkg *pkg, unsigned long idx);
 size_t upkg_export_read(struct upkg_file *f, void *buf, size_t n);
-void upkg_export_close(struct upkg_file *f);
+int    upkg_export_seek(struct upkg_file *f, long offset, int whence);
+long   upkg_export_tell(struct upkg_file *f);
+void   upkg_export_close(struct upkg_file *f);
+
+size_t upkg_decode_index(long *val, unsigned char *bytes, size_t n);
 
 #endif