aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/command.h
diff options
context:
space:
mode:
authorEgor Tensin <egor@tensin.name>2026-06-12 17:20:08 +0200
committerEgor Tensin <egor@tensin.name>2026-06-12 17:20:08 +0200
commit1160cdb21e0b667269299853cb47a4aa88948dc3 (patch)
treeb6828fc587bf0f868d9eb7a54518a46a9afc1a32 /src/command.h
parentdependabot: fix a typo (diff)
downloadcimple-1160cdb21e0b667269299853cb47a4aa88948dc3.tar.gz
cimple-1160cdb21e0b667269299853cb47a4aa88948dc3.zip
unify my .clang-format files
Diffstat (limited to 'src/command.h')
-rw-r--r--src/command.h23
1 files changed, 12 insertions, 11 deletions
diff --git a/src/command.h b/src/command.h
index be8b97a..fea3118 100644
--- a/src/command.h
+++ b/src/command.h
@@ -13,32 +13,33 @@
#include <stddef.h>
-typedef int (*cmd_handler)(const struct jsonrpc_request *request,
- struct jsonrpc_response **response, void *ctx);
+typedef int (*cmd_handler)(const struct jsonrpc_request* request,
+ struct jsonrpc_response** response,
+ void* ctx);
struct cmd_desc {
- char *name;
+ char* name;
cmd_handler handler;
};
struct cmd_dispatcher;
-int cmd_dispatcher_create(struct cmd_dispatcher **, struct cmd_desc *, size_t numof_defs,
- void *ctx);
-void cmd_dispatcher_destroy(struct cmd_dispatcher *);
+int cmd_dispatcher_create(struct cmd_dispatcher**, struct cmd_desc*, size_t numof_defs, void* ctx);
+void cmd_dispatcher_destroy(struct cmd_dispatcher*);
-int cmd_dispatcher_handle(const struct cmd_dispatcher *, const struct jsonrpc_request *command,
- struct jsonrpc_response **response);
+int cmd_dispatcher_handle(const struct cmd_dispatcher*,
+ const struct jsonrpc_request* command,
+ struct jsonrpc_response** response);
struct cmd_conn_ctx {
int fd;
- void *arg;
+ void* arg;
};
/* This is supposed to be used as an argument to tcp_server_accept. */
-int cmd_dispatcher_handle_conn(int conn_fd, void *dispatcher);
+int cmd_dispatcher_handle_conn(int conn_fd, void* dispatcher);
/* This is supposed to be used as an argument to event_loop_add. */
-int cmd_dispatcher_handle_event(struct event_loop *, int fd, short revents, void *arg);
+int cmd_dispatcher_handle_event(struct event_loop*, int fd, short revents, void* arg);
#endif