summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
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
2022-08-02network: Add `get_sock_addr()`mrb0nk500
Much like with `create_socket()`, this just makes it easier to get the sockaddr from a socket descriptor, without having to duplicate everything over, and over again.
2022-08-02network: Add `create_socket()`mrb0nk500
This function makes makes it easier to create sockets, without having to duplicate code.
2022-08-02network: Add `addr_to_str()`mrb0nk500
This function takes a `sockaddr`, along with the length of the `sockaddr`, and creates a string from that address.
2022-08-02keyword: Revert commit 5589b9898b0bd9bbdfdf3c78c532e9bb104d5c41mrb0nk500
keyword: Remove trailing whitespace from the right hand side in `parse_key_value_file()` I didn't realize this would create a parsing bug.
2022-08-01keyword: Remove trailing whitespace from the right hand side inmrb0nk500
`parse_key_value_file()`
2022-08-01keyword: Replace `*delm`, with `*tmp` in `parse_keyword_value_file()`mrb0nk500
This was a mistake that I didn't even notice until now, lol.
2022-08-01config: Use `parse_key_value_file()`, rather than doing it manually inmrb0nk500
`parse_config()` This greatly simplifies the code, and makes it more readable.
2022-08-01git: Make sure `pr->merge_branch` uses `free()` instead ofmrb0nk500
`free_git_branch()` Forgot to commit this when changing `merge_branch` to a string.
2022-08-01git, keyword: Move `parse_key_value_file()` to `keyword.{c,h}`mrb0nk500
2022-08-01git: Make `parse_key_value_file()` externally accessablemrb0nk500
2022-08-01git: Replace all uses of `parse_colon_key_value_file()` withmrb0nk500
`parse_key_value_file()`
2022-08-01git: Rename `parse_colon_key_value_file()` to `parse_key_value_file()`,mrb0nk500
and make it more generic This will allow us to parse pretty much anything with a key, value pair seperated by some delimiter(s).
2022-08-01git: Add `merge-branch` keyword to list of info file keywordsmrb0nk500
2022-08-01git: Make `merge_branch` a string instead of a `git_branch *`mrb0nk500
2022-08-01git: Add `parse_remote_branch()` callbackmrb0nk500
This needs to be done in order to properly allocate the remote branch before setting it's members.
2022-07-31git: Add support for specifying the name of a repo when getting, andmrb0nk500
creating PRs This allows for repos to have their own set of PRs, rather than only having a global set of PRs. Although, if you leave the repo name empty, then it will treat it as a global PR, rather than a repo specific PR.