Add two functions to retrieve more file data#230
Open
ScaledLizard wants to merge 1 commit intotwogood:mainfrom
Open
Add two functions to retrieve more file data#230ScaledLizard wants to merge 1 commit intotwogood:mainfrom
ScaledLizard wants to merge 1 commit intotwogood:mainfrom
Conversation
…ressed, unshield_file_flags_raw
kratz00
reviewed
Apr 8, 2026
| UNSHIELD_API int unshield_file_directory (Unshield* unshield, int index); | ||
| UNSHIELD_API size_t unshield_file_size (Unshield* unshield, int index); | ||
| UNSHIELD_API uint64_t unshield_file_size_compressed(Unshield* unshield, int index); | ||
| UNSHIELD_API uint16_t unshield_file_flags_raw (Unshield* unshield, int index); |
Contributor
There was a problem hiding this comment.
Would it not make sense to also expose https://github.com/twogood/unshield/blob/main/lib/cabfile.h#L60-L63
otherwise nobody knows what the magic uint16 means?
Owner
There was a problem hiding this comment.
Yes, the flags also need to be moved or copied to the public header.
| return 0; | ||
| }/*}}}*/ | ||
|
|
||
| UNSHIELD_API uint64_t unshield_file_size_compressed(Unshield* unshield, int index)/*{{{*/ |
Contributor
There was a problem hiding this comment.
Suggested change
| UNSHIELD_API uint64_t unshield_file_size_compressed(Unshield* unshield, int index)/*{{{*/ | |
| uint64_t unshield_file_size_compressed(Unshield* unshield, int index)/*{{{*/ |
It still think this is not needed for function definitions
| return 0; | ||
| }/*}}}*/ | ||
|
|
||
| UNSHIELD_API uint16_t unshield_file_flags_raw(Unshield* unshield, int index)/*{{{*/ |
Contributor
There was a problem hiding this comment.
Suggested change
| UNSHIELD_API uint16_t unshield_file_flags_raw(Unshield* unshield, int index)/*{{{*/ | |
| uint16_t unshield_file_flags_raw(Unshield* unshield, int index)/*{{{*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add two functions to retrieve more file data: unshield_file_size_compressed, unshield_file_flags_raw.
Since the functions return uint64_t and uint16_t, we should also add this:
#include <stdint.h>