summaryrefslogtreecommitdiff
path: root/git.h
diff options
context:
space:
mode:
authormrb0nk500 <b0nk@b0nk.xyz>2022-07-28 20:01:03 -0300
committermrb0nk500 <b0nk@b0nk.xyz>2022-07-28 20:42:46 -0300
commitd98868fa4d03659aad9ad2d858ee51e414d54ce4 (patch)
tree7e1ce8604cb6dad2949065dfe50bf4cfe80dd2e3 /git.h
parent052e06fd16f5ef161a10fc7880e32827c814bea2 (diff)
everywhere: Fix compiler errors, compiler warnings, and correct typos
Diffstat (limited to 'git.h')
-rw-r--r--git.h36
1 files changed, 18 insertions, 18 deletions
diff --git a/git.h b/git.h
index 29fec4b..17b3658 100644
--- a/git.h
+++ b/git.h
@@ -47,32 +47,32 @@ struct pull_request {
extern void cleanup_git(git_repository **repos);
extern git_repository **init_git(config *cfg);
extern int add_comment(comment *comment, const char *pr_root);
-extern int create_pull_request_dir(pull_request *pr, index *idx, const char *root);
+extern int create_pull_request_dir(pull_request *pr, index_t *idx, const char *root);
-void parse_patch_list(void *ctx, void *ret, const keyword *key, keyword_val val);
-void parse_comment_reply(void *ctx, void *ret, const keyword *key, keyword_val val);
+int parse_patch_list(void *ctx, void *ret, const keyword *key, keyword_val val);
+int parse_comment_reply(void *ctx, void *ret, const keyword *key, keyword_val val);
#define offset_list(...) (size_t []){__VA_ARGS__, -1}
static const keyword *info_keywords[] = {
- &(const keyword *){"title", "Title of Pull Request.", NULL, TYPE_STRING, offset_list(offsetof(pull_request, title)), NULL},
- &(const keyword *){"author", "Author of Pull Request.", NULL, TYPE_STRING, offset_list(offsetof(pull_request, author)), NULL},
- &(const keyword *){"date", "Date of Pull Request's creation.", "%a %b %e %H:%M:%S %Y %z", TYPE_TIME, offset_list(offsetof(pull_request, date)), NULL},
- &(const keyword *){"description", "Description of Pull Request.", NULL, TYPE_STRING, offset_list(offsetof(pull_request, desc)), NULL},
- &(const keyword *){"type", "Type of Pull Request (0 = patch files, 1 = remote repo).", NULL, TYPE_INT, offset_list(offsetof(pull_request, pr_type)), NULL},
- &(const keyword *){"branch", "Branch of remote repo.", NULL, TYPE_STRING, offset_list(offsetof(pull_request, branch), offsetof(git_branch, name)), NULL},
- &(const keyword *){"repo", "URL of remote repo.", NULL, TYPE_STRING, offset_list(offsetof(pull_request, branch), offsetof(git_branch, repo)), NULL},
- &(const keyword *){"patches", "Patch file(s) of Pull Request.", NULL, TYPE_STRING, offset_list(offsetof(pull_request, patches), offsetof(file, name)), parse_patch_list},
+ &(const keyword){"title", "Title of Pull Request.", NULL, TYPE_STRING, offset_list(offsetof(pull_request, title)), NULL},
+ &(const keyword){"author", "Author of Pull Request.", NULL, TYPE_STRING, offset_list(offsetof(pull_request, author)), NULL},
+ &(const keyword){"date", "Date of Pull Request's creation.", "%a %b %e %H:%M:%S %Y %z", TYPE_TIME, offset_list(offsetof(pull_request, date)), NULL},
+ &(const keyword){"description", "Description of Pull Request.", NULL, TYPE_STRING, offset_list(offsetof(pull_request, desc)), NULL},
+ &(const keyword){"type", "Type of Pull Request (0 = patch files, 1 = remote repo).", NULL, TYPE_INT, offset_list(offsetof(pull_request, pr_type)), NULL},
+ &(const keyword){"branch", "Branch of remote repo.", NULL, TYPE_STRING, offset_list(offsetof(pull_request, branch), offsetof(git_branch, name)), NULL},
+ &(const keyword){"repo", "URL of remote repo.", NULL, TYPE_STRING, offset_list(offsetof(pull_request, branch), offsetof(git_branch, repo)), NULL},
+ &(const keyword){"patches", "Patch file(s) of Pull Request.", NULL, TYPE_STRING, offset_list(offsetof(pull_request, patches), offsetof(file, name)), parse_patch_list},
NULL,
};
static const keyword *comment_keywords[] = {
- &(const keyword *){"id", "ID of Comment.", NULL, TYPE_INT, offset_list(offsetof(comment, id)), NULL},
- &(const keyword *){"author", "Author of Comment.", NULL, TYPE_STRING, offset_list(offsetof(comment, author)), NULL},
- &(const keyword *){"date", "Date of Comment's creation.", "%a %b %e %H:%M:%S %Y %z", TYPE_TIME, offset_list(offsetof(comment, date)), NULL},
- &(const keyword *){"reply-to", "ID of replied Comment.", NULL, TYPE_INT, offset_list(offsetof(comment, reply), offsetof(comment, id)), parse_comment_reply},
- &(const keyword *){"reply-author", "Author of replied Comment.", NULL, TYPE_STRING, offset_list(offsetof(comment, reply), offsetof(comment, author)), parse_comment_reply},
- &(const keyword *){"reply-date", "Date of replied Comment's creation", "%a %b %e %H:%M:%S %Y %z", TYPE_TIME, offset_list(offsetof(comment, reply), offsetof(comment, date)), parse_comment_reply},
- &(const keyword *){"description", "Message of Comment.", NULL, TYPE_STRING, offset_list(offsetof(comment, desc)), NULL},
+ &(const keyword){"id", "ID of Comment.", NULL, TYPE_INT, offset_list(offsetof(comment, id)), NULL},
+ &(const keyword){"author", "Author of Comment.", NULL, TYPE_STRING, offset_list(offsetof(comment, author)), NULL},
+ &(const keyword){"date", "Date of Comment's creation.", "%a %b %e %H:%M:%S %Y %z", TYPE_TIME, offset_list(offsetof(comment, date)), NULL},
+ &(const keyword){"reply-to", "ID of replied Comment.", NULL, TYPE_INT, offset_list(offsetof(comment, reply), offsetof(comment, id)), parse_comment_reply},
+ &(const keyword){"reply-author", "Author of replied Comment.", NULL, TYPE_STRING, offset_list(offsetof(comment, reply), offsetof(comment, author)), parse_comment_reply},
+ &(const keyword){"reply-date", "Date of replied Comment's creation", "%a %b %e %H:%M:%S %Y %z", TYPE_TIME, offset_list(offsetof(comment, reply), offsetof(comment, date)), parse_comment_reply},
+ &(const keyword){"description", "Message of Comment.", NULL, TYPE_STRING, offset_list(offsetof(comment, desc)), NULL},
NULL,
};
#undef offset_list