Commit graph

30 commits

Author SHA1 Message Date
b098fd6d69 Error if "-C <dir>" where "dir" doesn't exist
All checks were successful
Run Unit Tests / build-and-run-unit-tests (push) Successful in 5s
2024-09-30 19:16:29 +09:00
bb574d2a2c Use stdint.h types instead of "int", "long", etc.
All checks were successful
Run Unit Tests / build-and-run-unit-tests (push) Successful in 7s
2024-09-20 21:40:35 +09:00
3408183b39 Refactor hash_map insert to use single ptr
All checks were successful
Run Unit Tests / build-and-run-unit-tests (push) Successful in 6s
Previous implementation used a double ptr for inserting into a hash map.
This refactoring allows for only needing to use a single ptr.

Fixes #17 .
2024-09-09 11:25:00 +09:00
425fa77900 Fixes related to compiler warnings
All checks were successful
Run Unit Tests / build-and-run-unit-tests (push) Successful in 4s
Fix integer mismatch usages/comparisons.

Use "size_t" instead of "unsigned int" for data structures.
2024-09-06 14:28:31 +09:00
aeb8eff350 Impl. hash_map iter, clang-format
All checks were successful
Run Unit Tests / build-and-run-unit-tests (push) Successful in 52s
2024-09-01 15:13:26 +09:00
2e46790ece Switch to ISC License
All checks were successful
Run Unit Tests / build-and-run-unit-tests (push) Successful in 52s
2024-08-30 11:36:11 +09:00
4f0fdfa602 Cleanup/refactorings
All checks were successful
Run Unit Tests / build-and-run-unit-tests (push) Successful in 5s
Moved common functions to helpers.h, and similar cleanup/refactorings.
2024-07-29 16:31:10 +09:00
4479fdce62 Add check if file(s) are readable when archiving
All checks were successful
Run Unit Tests / build-and-run-unit-tests (push) Successful in 52s
Also some minor changes like more error logs and refactorings.
2024-07-26 16:01:39 +09:00
40567d5a3a Fix "-C <dir>" usage
All checks were successful
Run Unit Tests / build-and-run-unit-tests (push) Successful in 5s
TODO:
    Merge re-used functions into "helpers".
2024-07-26 13:17:11 +09:00
d1609849a1 Impl. "-C <dir>", refactorings
All checks were successful
Run Unit Tests / build-and-run-unit-tests (push) Successful in 5s
2024-07-26 12:39:56 +09:00
0b63dd12ee Impl. being able to set dir for temporary files
All checks were successful
Run Unit Tests / build-and-run-unit-tests (push) Successful in 11s
2024-07-25 10:42:31 +09:00
c55864a51b Refactor parser, setup for different temp dir 2024-07-25 10:26:34 +09:00
a133b3a49d Minor help-text/doc fix
All checks were successful
Run Unit Tests / build-and-run-unit-tests (push) Successful in 5s
2024-07-24 15:27:05 +09:00
852c931d8b Comment out debug print
All checks were successful
Run Unit Tests / build-and-run-unit-tests (push) Successful in 5s
2024-07-24 15:05:01 +09:00
e9c327a62f Add "--no-abs-symlink" to not store absolute paths 2024-07-24 13:32:39 +09:00
dcff34e06b Support "-f -" to read/write archive stdin/stdout
All checks were successful
Run Unit Tests / build-and-run-unit-tests (push) Successful in 6s
2024-07-19 16:45:51 +09:00
da2a0f7b1c Implement extracting from archive
All checks were successful
Run Unit Tests / build-and-run-unit-tests (push) Successful in 5s
TODO:
    Storing file permissions to be extracted with same permissions.
    Archiving and extracting symbolic links.
2024-07-18 13:27:32 +09:00
58daa1130d Update parser flags to allow "checking" with "-t"
All checks were successful
Run Unit Tests / build-and-run-unit-tests (push) Successful in 3s
2024-07-17 12:13:33 +09:00
41fde43eed Impl. basic functionality "MVP"
All checks were successful
Run Unit Tests / build-and-run-unit-tests (push) Successful in 48s
"MinimumViableProduct", resolves #2 .

TODO:
  Support de/compressor cmds when creating archive.
  Support symbolic links when creating archive.
  Support extracting archive.
2024-07-16 16:16:58 +09:00
efffb8c147 Add "--overwrite-create"
All checks were successful
Run Unit Tests / build-and-run-unit-tests (push) Successful in 45s
Default behavior is now to NOT overwrite existing archive files for
storing output unless "--overwrite-create" is specified.
2024-07-11 16:56:23 +09:00
58269d751c Impl. handling symbolic links
All checks were successful
Run Unit Tests / build-and-run-unit-tests (push) Successful in 3s
2024-07-04 14:48:56 +09:00
20cb6cb3aa Remove unnecessary "TODO" in comment. 2024-07-04 13:50:32 +09:00
518ac3ebe1 parser: Enable existing codepath for OSX
All checks were successful
Run Unit Tests / build-and-run-unit-tests (push) Successful in 5s
The Unix functions/headers used in parser for getting files/dirs from
the given positional arguments are also available in OSX
(theoretically), so they are now enabled for OSX platforms.

TODO: Add getting files/dirs code for the Windows platform.
2024-07-04 11:54:15 +09:00
6ee347da12 Handle symbolic links separately
All checks were successful
Run Unit Tests / build-and-run-unit-tests (push) Successful in 4s
Previous implementation could loop forever following a symbolic link
that goes backwards. This commit makes symbolic links an "unhandled file
type" for now.
2024-07-03 20:25:42 +09:00
c9df661cd3 "platforms.h" include should be before its usage
All checks were successful
Run Unit Tests / build-and-run-unit-tests (push) Successful in 4s
2024-07-03 20:01:19 +09:00
e06e65e5e8 Impl. parser accepting files and dirs
All checks were successful
Run Unit Tests / build-and-run-unit-tests (push) Successful in 4s
Fix memory leak in hash_map.

Current "main" prints specified files and subfiles of specified
directories.

TODO: Handle symbolic links
2024-07-03 19:56:26 +09:00
3172920c9c Some work on arg parser
All checks were successful
Run Unit Tests / build-and-run-unit-tests (push) Successful in 7s
Also added unit tests for arg parser.
2024-07-01 15:13:06 +09:00
c1b914cb8e Remove unnecessary prints, clang-format 2024-06-27 13:30:18 +09:00
21752fb504 Fix invalid memory usage bug causing invalid free
realloc(...) was not used propertly. The number of items to be
reallocated was specified, but not the size of each item.
2024-06-27 13:28:53 +09:00
44080e85cc Impl. parser (TODO Fix invalid free crash)
During testing, having at least three positional args cause an invalid
free crash. Should be investigated and fixed.
2024-06-27 11:57:29 +09:00