Skip to content

Cleaned up main.c & Refactored MAGIC detection logic - #1

Merged
sharp-less merged 7 commits into
sharp-less:mainfrom
JohnAlexINL:main
Sep 7, 2026
Merged

Cleaned up main.c & Refactored MAGIC detection logic#1
sharp-less merged 7 commits into
sharp-less:mainfrom
JohnAlexINL:main

Conversation

@JohnAlexINL

Copy link
Copy Markdown
Contributor

The main.c file now mainly just shows the overall control-flow logic and #includes.

The header-MAGIC detection now iterates over a table so that adding or removing types in the future is simpler, and the detection logic itself is much simpler, less spaghettified, and able to handle things like WAVE files now, too.

While I was at refactoring it, I also added a bunch more file formats.

@JohnAlexINL

Copy link
Copy Markdown
Contributor Author

hope you find my patches helpful! <3 Cheers

@sharp-less
sharp-less merged commit c81e5be into sharp-less:main Sep 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants