summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-08-10dev: Add some more test code for testing `create_pull_request_branch()`devmrb0nk500
2022-08-10dev: Change output of `log()` to `stderr`mrb0nk500
2022-08-10dev: Remove commented `log()` macromrb0nk500
2022-08-10dev: Update arguments for `create_pull_request_dir()`, andmrb0nk500
`get_pull_request()` in `main_loop()`
2022-08-10dev: Cleanup `new_pr`mrb0nk500
2022-08-10dev: Add some more test codemrb0nk500
2022-08-10Add some testing code.mrb0nk500
2022-08-10rt_struct: Account for packed structs in `create_rts()`mrb0nk500
2022-08-09rt_struct: Create an offset table if none was supplied in `create_rts()`mrb0nk500
2022-08-09rt_struct: Account for member arrays in `create_rts()`mrb0nk500
Now, when the member is a fixed array, we multiply the type size by the size of each dimension.
2022-08-09rt_struct: Account for member pointers in `create_rts()`mrb0nk500
2022-08-09rt_struct: Make members have a member type, and use a single dimensionmrb0nk500
count, rather than having seperate dimension counts for pointers, and arrays
2022-08-09rt_struct: Add `ssize_t` to list of root typesmrb0nk500
2022-08-09rt_struct: Create `rt_struct.{c,h}`, and add `create_rts()`mrb0nk500
This is a simple implementation of runtime structs, which was taken from lavignes' librts, and modified to make it alot easier to work with. Link to librts: https://github.com/lavignes/librts
2022-08-08macros: Add `min()`, and `max()` macrosmrb0nk500
These macros help with finding the minimum, and maximum of two values.
2022-08-06git: Make use of `create_key_value_file()` in `create_info_file()`mrb0nk500
This greatly simplifies the code for it, and helps make the codebase more generic.
2022-08-06keyword, git: Update error checking for every function that usesmrb0nk500
`get_keyword_offset_ptr()`
2022-08-06keyword: Fix a major issue with `get_keyword_offset_ptr()` adding themrb0nk500
offset before dereferencing `ret`, and also check if the dereferenced return pointer is NULL
2022-08-06git: Fix an issue with `get_patch_list()` not properly adding whitespacemrb0nk500
2022-08-06keyword: Check validity of keyword value in `create_key_value_file()`mrb0nk500
This needs to be done, in case we get a string that's `NULL`.
2022-08-06git: Add `get_pr_type()` keyword getter callbackmrb0nk500
This callback is needed because `pr_type` is a `uint8_t`, but the keyword type is `TYPE_INT` which assumes that the type is an `int`.
2022-08-06keyword: Make use of `delimiter` struct in `create_key_value_file()`,mrb0nk500
and `create_key_value_str()`
2022-08-06keyword: Add `delimiter` structmrb0nk500
This can be used to help with `create_key_value_file()`, and `create_key_value_str()`.
2022-08-05keyword: Add `get_keyword()`, `create_key_value_str()`, andmrb0nk500
`create_key_value_file()` These functions will help in making the creation of key-value files more generic. There still needs to be some more work done on it, but that can be done later.
2022-08-05git: Add `get_keyword_cb` getter callbacksmrb0nk500
2022-08-05keyword: Add `get_keyword_cb`, and add `get_callback` to `struct keyword`mrb0nk500
This will be used for creating a getter callback for keywords. I also renamed `keyword_cb` to `set_keyword_cb`, aswell as renamed `callback` to `set_callback` in `struct keyword`.
2022-08-05git: Don't return an error when the patch file array is NULL inmrb0nk500
`create_pull_request_dir()` This is because we won't be creating patch files for remote branches.
2022-08-05git: Don't check if `pr->branch->name` isn't empty inmrb0nk500
`create_pull_request_branch()` We don't need to do this anymore, since `dir_path_name()` now does that.
2022-08-05git: Make use of `format_len()` in `dir_path_name()`mrb0nk500
2022-08-05misc: Make `dir_path_name()` actually do some error checkingmrb0nk500
2022-08-05git: Add `create_pull_request_branch()`mrb0nk500
This takes in the PR, the index of that PR, and the repo the PR is for, and will create a branch for that PR in the given repo. Currently it only supports working with remote branches, but eventually it'll support patch files too.
2022-08-05git: Add `get_repo()`mrb0nk500
This function takes a null-terminated `git_repo` array, and the name of the repo to get, and will return said repo if found, and NULL if not.
2022-08-05misc: Fixed a major issue with `mkdirp()`mrb0nk500
It was basically not properly skipping over to the next forward slash. The solution was to have it get the span of the forward slashes, and checking if we hit the null terminator after trying to find the next forward slash. If we do hit the null terminator, we add the forward slash span to the cursor.
2022-08-04git: Use `is_empty()`, and `find_delm(),` rather than doing it manuallymrb0nk500
in `parse_dsv_str()`
2022-08-04log: Add priority name to log outputmrb0nk500
2022-08-04git: Make use of `remove_trailing_whitespace()` inmrb0nk500
`parse_key_value_file()` This is a much better way of doing it than what was done previously.
2022-08-04misc: Add a little optimization to `remove_trailing_whitespace()`mrb0nk500
This also cleans it up a bit.
2022-08-04misc: Add `remove_trailing_whitespace()`mrb0nk500
This function removes any whitespace found at the end of the supplied string. This can be useful when you have a string with whitespace throughout it, but only want the whitespace at the end removed.
2022-08-03network: Add some more logging output for the errors in `create_socket()`mrb0nk500
2022-08-03network: Save the address string made by `addr_to_str()` to `addr_str`mrb0nk500
in `create_socket()`
2022-08-03log, macros: Make `stdout`, and `stderr` logging more colourfulmrb0nk500
This is designed to make it more readable when printing the logs to a terminal, or terminal emulator.
2022-08-03macros: Add `const_strlen()` macromrb0nk500
2022-08-03macros: Use `printlog()`, rather than hardcoding `syslog()` in themrb0nk500
`log()` macro
2022-08-03log: Add `printlog()`mrb0nk500
This works exactly like `printlog()`, except it uses variadic arguments.
2022-08-03log: Create `log.{c,h}`, and add `vprintlog()`mrb0nk500
`vprintlog()` prints out the provided string to either syslog, stderr, or stdout depending on the output type.
2022-08-03misc: Add `vformat_len_copy()`mrb0nk500
This works the same as `vformat_len()`, except that it copies `args` into a temporary `va_list`. This can be useful when you're already using a `va_list`, and thus need to copy the list already.
2022-08-03misc: Use of `vformat_len()`, rather than doing it manually inmrb0nk500
`format_len()`
2022-08-03misc: Add `vformat_len()`mrb0nk500
This works exactly like `format_len()`, except that it uses `va_list` rather than variadic arguments.
2022-08-02pullreqd: Add support for multiple sockets for all resolved addressesmrb0nk500
This get's rid of a long standing TODO.
2022-08-02pullreqd: Use `socket_create()`, rather than doing it manuallymrb0nk500