X-Git-Url: https://git.draconx.ca/gitweb/upkg.git/blobdiff_plain/fdfd7c7a49a780dedf2d8f0225d710b521ae87e3..382855dd3f69cdce3e3b4eb6da392f881e7825da:/src/upkg.h diff --git a/src/upkg.h b/src/upkg.h index ef6363e..2e92e85 100644 --- a/src/upkg.h +++ b/src/upkg.h @@ -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,8 @@ struct upkg { }; struct upkg_file { + const char *name; + struct upkg *pkg; unsigned long base, offset, len; }; @@ -63,6 +66,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