Commit Graph

11 Commits

Author SHA1 Message Date
GravisZro
f7ae658fe2 Modernize struct/enum/unions type declarations 2024-05-30 03:35:17 -04:00
Azamat H. Hackimov
b84678de96 Move HOG2 magic check into hogfile
Remove unused cf_ReadHogFileEntry() function.
2024-05-16 19:18:31 +03:00
Jason Yundt
e042925001 Stop using hard coded value for HOG2 id length
Before this change, cf_OpenLibrary() was inconsistent. Sometimes, it
would refer to the size of a HOG2 id using the literal 4. Other times it
would refer to the size of a HOG2 id using strlen(HOG_TAG_STR). There
was a good reason for this. Some compilers allow you to do this:

  char id[strlen(HOG_TAG_STR)];

Other compilers throw an error if you try to do that [1].

This commit makes cf_OpenLibrary() more consistent. It makes it so that
cf_OpenLibrary() always uses the same constant expression when referring
to HOG_TAG_STR’s length.

[1]: <https://devblogs.microsoft.com/oldnewthing/20221114-00/?p=107393>
2024-05-12 20:38:32 -04:00
JeodC
a4ab78192c Join license header with historical commentrs
Join the license header with historical comments using a separator so IDEs can correctly parse the initial header.

Also use .gitattributes to ensure all files are LF.
2024-05-08 14:41:19 -04:00
Azamat H. Hackimov
096cd84991 Cleanup hogfile code
Remove unused code related to old HogUtils executable, now superseded by HogMaker.
Stricter checks for hog header and hog file entry (check fread() sizes).
2024-05-06 22:50:07 +03:00
Azamat H. Hackimov
c275d359c7 Reapply "Cfile module update"
This reverts commit 066b436fd9.
2024-04-24 00:40:39 +03:00
Edu Garcia
066b436fd9
Revert "Cfile module update" 2024-04-19 13:57:55 +01:00
Azamat H. Hackimov
5b88526752 Rename WRITE_FILE_ENTRY() to WriteHogEntry hogfile
Rename for consistency.
2024-04-19 00:17:15 +03:00
Azamat H. Hackimov
906a9258a7 Remove duplicated code in hogfile
NewHogFile() and CreateNewHogFile() are practically identical.
2024-04-19 00:17:15 +03:00
Azamat H. Hackimov
7bfea728b8 Minor fixes to cfile code
Formatting, fixes minor warnings.
2024-04-19 00:17:15 +03:00
Azamat H. Hackimov
9b45091633 Rename/move cfile related files
Rename to lowercase and move headers to own directory.
2024-04-19 00:17:15 +03:00