summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
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.
2022-07-31git: Make use of both `is_dir()`, and `mkdirp()` inmrb0nk500
`create_pull_request_dir()`
2022-07-31misc: Add `is_dir()`, and `mkdirp()`mrb0nk500
`is_dir()` checks if the supplied path is a directory, and returns 1 if it's a directory, 0 if it isn't a directory, and -1 if it doesn't exist. `mkdirp()` works like `mkdir()` except that it also creates parent directories if needed.
2022-07-31misc: Make sure that `s` starts at the character before the delimiter inmrb0nk500
`find_delm()` Also `s` doesn't get incremented when checking if the current character is a backslash now.
2022-07-31git: Use `format_len()` instead of `strlen()` when creating the repomrb0nk500
path in `init_git()`
2022-07-31pullreqd, git: Replace every current instance of `git_repository` with ↵mrb0nk500
`git_repo` This is done in order to make it easier to get the name of the repo.
2022-07-31git: Use `linked_list_to_array()` to add create the repo table, rathermrb0nk500
than doing it manually in `init_git`
2022-07-31git: Add `git_repo` structmrb0nk500
This will be used to replace most instances of `git_repository`.
2022-07-30git: Add `cleanup_pull_request()`mrb0nk500