summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
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
2022-07-30git: Properly sanitize, and format the patch file name inmrb0nk500
`parse_patch_list()`
2022-07-30git: Make sure `f->name` is NULL before freeing `f` inmrb0nk500
`parse_{comments,info}_file_path`
2022-07-30git: Check if either `lhs`, or `buf` are empty inmrb0nk500
`parse_colon_key_value_file()`
2022-07-30git: Replace `filename` with `path` in `create_file()`mrb0nk500
2022-07-30keyword: Make sure `tm_isdst` is negative in `get_keyword_value()`mrb0nk500
This needs to be done in order to properly correct for DST.
2022-07-30config: Use string instead of int in `check_port()`mrb0nk500
oof, forgot that `config.port` is a string.
2022-07-30git: Add missing extern definition for `get_pull_request()`mrb0nk500
2022-07-28everywhere: Fix compiler errors, compiler warnings, and correct typosmrb0nk500
2022-07-28index: rename typedef `index` to `index_t`mrb0nk500
This had to be done because `index()` is a function in the standard library.
2022-07-28config: Make use of `keyword` for parsing config filesmrb0nk500
This get's rid of the old `config_opt` parser, which was way too specific for parsing config files.
2022-07-28keyword: Add `get_keyword_offset_ptr()`mrb0nk500
2022-07-28keyword: Make `keyword_cb`, and `set_keyword()` return an `int`mrb0nk500
`set_keyword()` now checks the return value of the callback to determine whether to return early, fallback to the default, or return an error if the callback returns true, false, and -1 respectivly.
2022-07-28git: Implement all of `get_pull_request()`mrb0nk500
`get_pull_request()` takes an index, and the main PR root, and returns the PR of the supplied index if it exists, or NULL if no PR with that index exists.
2022-07-28linked_list: Add `linked_list_to_array()`mrb0nk500
This function takes the given linked list, and creates a type generic pointer array from it.
2022-07-27misc: Actually return pointer to the first non-delimited character aftermrb0nk500
the end of the range in `get_str_delm_range()`
2022-07-27misc: Use `find_delm()` when finding the end of the range inmrb0nk500
`get_str_delm_range()`
2022-07-27misc: Make `find_delm()` account for escaped delimiters.mrb0nk500
2022-07-27misc: Add `find_delm()`, and `get_str_delm_range()`mrb0nk500
`find_delm()` finds the first matched delimiter of the supplied delimiter(s), and either returns the pointer to the first non-delimiter character after the match, or the match itself if `skip_delm` is true, or false respectivly. `get_str_delm_range()` finds, and returns the string in between the supplied starting, and ending delimiter(s). It also returns the pointer to the first non-delimiter character after the end of the range in `rhs`.
2022-07-27misc: Add `\r`, and `\n` to the list of whitespace thatmrb0nk500
`skip_whitespace()` can skip past.