Commit Graph

77 Commits (b6d97df1bc7ebc3f79326cc8b967ce834fc6ad83)

Author SHA1 Message Date
GreekStapler b6d97df1bc refactor: Hashing function now streams data into hasher instead of doing it in one go. 2023-03-09 22:35:03 +00:00
GreekStapler 4c9b429eaa refactor: Package archive parser now returns meaningful error enums in case of failure. 2023-03-09 22:35:03 +00:00
GreekStapler c7c4043108 fix: Using snprintf while ignoring its return value could lead to valid inputs getting truncated. 2023-03-09 22:35:03 +00:00
GreekStapler 9211bc3351 fix: Initialise array pointers to 0 before performing check on them. 2023-03-09 22:35:03 +00:00
GreekStapler bcae64e023 chore: Also renamed structs to follow naming conventions. 2023-03-09 22:35:03 +00:00
GreekStapler 03bae82569 refactor: Added free function for package struct.
While going through with the renaming, I saw that I actually forgot to implement that part.
2023-03-09 22:35:03 +00:00
GreekStapler 76e4adae92 chore: Package module now follows the naming and structure conventions of libvieter. 2023-03-09 22:35:03 +00:00
GreekStapler 1ccd4101af refactor: Subsituted old hash generation with a proper implementation. 2023-03-09 22:35:03 +00:00
GreekStapler bbdc2fbd6e fix: strcat can not be used on uninitialised strings in non-musl environments. 2023-03-09 22:35:03 +00:00
Jef Roosens d11a9d3638 chore: fix merge marker in makefile 2023-03-09 22:35:03 +00:00
GreekStapler d0914adbb5 fix: Somehow, test file changed line endings to CRLF. Changed it back to LF. 2023-03-09 22:35:03 +00:00
GreekStapler fbbc15cf73 chore: Rebase to dev branch with binomial heap PR. 2023-03-09 22:35:03 +00:00
GreekStapler 660e711b17 refactor: Added SHA256 to package description file. 2023-03-09 22:35:03 +00:00
GreekStapler 7561a74793 refactor: Decided to not return char** in function that creates the package description after all, now returns char*.
The method I was trying started to irk me when I thought of creating a test unit for it. Also fixed some other issues I found in the package_to_description function (SHA256SUM section still missing).
2023-03-09 22:35:03 +00:00
GreekStapler 01688fd546 fix: Took a very long time finding a very annyoing bug because realloc is the devil. 2023-03-09 22:35:03 +00:00
GreekStapler edca243331 refactor: Created function that will return the char ** (originally char *) that will be used to make the description file. Also removed free that was resulting in a crash. 2023-03-09 22:35:03 +00:00
GreekStapler 4309ad8cc5 refactor: Modified .PKGINFO parser not to rely on gotos and continues. Parser is now optimistic and assumes .PKGINFO file is valid.
After my changes to the macros, they still feel a bit hacky, but I'm content with them. I also changed the parser to assume the .PKGINFO files are always valid because they are automatically generated. The parser also assumes the same fields will always appear in the same fixed order. I made this change after checking how makepkg generated this file.
2023-03-09 22:35:03 +00:00
GreekStapler c2313fe0be refactor: Add original .c package files by Jef. 2023-03-09 22:35:03 +00:00
Jef Roosens f376aedaee Merge pull request 'Red-black tree' (#5) from Chewing_Bever/libvieter:red-black-tree into dev
ci/woodpecker/push/lint Pipeline is pending Details
ci/woodpecker/push/test-mem Pipeline is pending Details
ci/woodpecker/push/test Pipeline is pending Details
Reviewed-on: #5
2023-03-07 12:08:49 +01:00
Jef Roosens 38e84afd1d
fix: also lint internal header files
ci/woodpecker/pr/lint Pipeline was successful Details
ci/woodpecker/pr/test Pipeline was successful Details
ci/woodpecker/pr/test-mem Pipeline was successful Details
2023-02-23 10:13:58 +01:00
Jef Roosens d9402ced54 test(tree): add random insert test
ci/woodpecker/pr/lint Pipeline was successful Details
ci/woodpecker/pr/test Pipeline was successful Details
ci/woodpecker/pr/test-mem Pipeline was successful Details
2023-02-02 15:52:59 +01:00
Jef Roosens a6ed89d8cd
feat(tree): add tree iterator
ci/woodpecker/pr/lint Pipeline was successful Details
ci/woodpecker/pr/test Pipeline was successful Details
ci/woodpecker/pr/test-mem Pipeline was successful Details
2023-02-02 14:10:35 +01:00
Jef Roosens ef5037f941
chore(tree): some small cleanups
ci/woodpecker/pr/lint Pipeline failed Details
ci/woodpecker/pr/test Pipeline was successful Details
ci/woodpecker/pr/test-mem Pipeline was successful Details
2023-02-01 23:24:22 +01:00
Jef Roosens bee520a781
fix(tree): working balanced remove
ci/woodpecker/pr/lint Pipeline was successful Details
ci/woodpecker/pr/test Pipeline was successful Details
ci/woodpecker/pr/test-mem Pipeline was successful Details
2023-02-01 23:04:35 +01:00
Jef Roosens 70217bee21
fix(tree): fix wrong rotation function 2023-02-01 22:12:34 +01:00
Jef Roosens 17c2e15385 feat(tree): first attempt at wikipedia pseudo code
ci/woodpecker/pr/lint Pipeline is pending Details
ci/woodpecker/pr/test-mem Pipeline is pending Details
ci/woodpecker/pr/test Pipeline is pending Details
2023-01-30 12:28:08 +01:00
Jef Roosens 1d458c68a4
feat(tree): start of balanced removal
ci/woodpecker/pr/lint Pipeline is pending Details
ci/woodpecker/pr/test-mem Pipeline is pending Details
ci/woodpecker/pr/test Pipeline is pending Details
2023-01-29 21:34:44 +01:00
Jef Roosens b74a4e9326
refactor(tree): bit more cleanup
ci/woodpecker/pr/lint Pipeline is pending Details
ci/woodpecker/pr/test-mem Pipeline is pending Details
ci/woodpecker/pr/test Pipeline is pending Details
2023-01-29 21:08:17 +01:00
Jef Roosens e5130a6383
feat(tree): bit flag so children know which child they are 2023-01-29 20:57:08 +01:00
Jef Roosens 193fc4b454
refactor(tree): store children as static array instead 2023-01-29 20:33:11 +01:00
Jef Roosens 06fca6f5ae
refactor(tree): better testing code 2023-01-29 17:32:27 +01:00
Jef Roosens 3fb027715c
test(tree): validation function to use in testing
ci/woodpecker/pr/lint Pipeline was successful Details
ci/woodpecker/pr/test Pipeline failed Details
ci/woodpecker/pr/test-mem unknown status Details
2023-01-28 19:28:35 +01:00
Jef Roosens 89d1c9cdca chore: add license
ci/woodpecker/pr/lint Pipeline is pending Details
ci/woodpecker/pr/test-mem Pipeline is pending Details
ci/woodpecker/pr/test Pipeline is pending Details
2023-01-28 12:02:52 +01:00
Jef Roosens 3bf3150b4a
test: rename some stuff; separate cron part tests
ci/woodpecker/pr/lint Pipeline was successful Details
ci/woodpecker/pr/test Pipeline was successful Details
ci/woodpecker/pr/test-mem Pipeline was successful Details
2023-01-28 09:30:35 +01:00
Jef Roosens adfdca18da
docs(tree): add function docstrings
ci/woodpecker/pr/lint Pipeline is pending Details
ci/woodpecker/pr/test-mem Pipeline is pending Details
ci/woodpecker/pr/test Pipeline is pending Details
2023-01-28 09:09:17 +01:00
Jef Roosens e4e92b3e57
refactor(tree): proper filenames
ci/woodpecker/pr/lint Pipeline was successful Details
ci/woodpecker/pr/test Pipeline was successful Details
ci/woodpecker/pr/test-mem Pipeline was successful Details
2023-01-27 22:37:57 +01:00
Jef Roosens 1ce3b47edf
feat(tree): remove works 2023-01-27 22:37:57 +01:00
Jef Roosens 1c591ac423
feat(tree): first attempt at balanced inserts 2023-01-27 22:37:55 +01:00
Jef Roosens 41bc6516fa
feat(tree): add node bit flags support 2023-01-27 22:37:24 +01:00
Jef Roosens 910d7bc3bb
feat(tree): implement free function 2023-01-27 22:37:24 +01:00
Jef Roosens 935a610b7e
feat(tree): initially working binary tree 2023-01-27 22:37:23 +01:00
Jef Roosens 98f158e1f5
feat(tree): started standard binary tree 2023-01-27 22:35:06 +01:00
Jef Roosens df50f96983
feat: begin binary tree implementation 2023-01-27 22:34:16 +01:00
Jef Roosens 379a05a7b6 Merge pull request 'Binomial heap' (#4) from Chewing_Bever/libvieter:min-heap into dev
ci/woodpecker/push/lint Pipeline is pending Details
ci/woodpecker/push/test-mem Pipeline is pending Details
ci/woodpecker/push/test Pipeline is pending Details
Reviewed-on: #4
2023-01-27 22:32:02 +01:00
Jef Roosens 167611e6fa
test(heap): test insert after every pop just in case
ci/woodpecker/pr/lint Pipeline was successful Details
ci/woodpecker/pr/test Pipeline was successful Details
ci/woodpecker/pr/test-mem Pipeline was successful Details
2023-01-27 21:59:09 +01:00
Jef Roosens 5b2ce6acaa
feat(heap): thread-safety features
ci/woodpecker/pr/lint Pipeline is pending Details
ci/woodpecker/pr/test-mem Pipeline is pending Details
ci/woodpecker/pr/test Pipeline is pending Details
2023-01-27 21:23:32 +01:00
Jef Roosens d77b3e4fee
chore: some nitpicking 2023-01-27 20:50:23 +01:00
Jef Roosens ab418e57b3
test: also test with -O3 which can produce extra errors
ci/woodpecker/pr/lint Pipeline was successful Details
ci/woodpecker/pr/test Pipeline was successful Details
ci/woodpecker/pr/test-mem Pipeline was successful Details
2023-01-26 12:24:34 +01:00
Jef Roosens a6bdd39776
docs(heap): add readme
ci/woodpecker/pr/lint Pipeline is pending Details
ci/woodpecker/pr/test-mem Pipeline is pending Details
ci/woodpecker/pr/test Pipeline is pending Details
2023-01-26 11:03:41 +01:00
Jef Roosens 05b96d1fd6
fix(heap): finally fixed that pop bug
ci/woodpecker/pr/lint Pipeline was successful Details
ci/woodpecker/pr/test Pipeline was successful Details
ci/woodpecker/pr/test-mem Pipeline was successful Details
2023-01-26 10:21:30 +01:00