Match guy naming convention

This commit is contained in:
2024-10-10 20:30:35 -04:00
parent 884b52b397
commit 26ecf29a3f
11 changed files with 156 additions and 156 deletions
+3 -3
View File
@@ -11,10 +11,10 @@ typedef struct CommandBuf {
} CommandBuf;
/* Try to consume a string literal. */
bool cmd_match_str(CommandBuf *cmd, const char *str);
bool cmdMatchStr(CommandBuf *cmd, const char *str);
/* Try to consume a base-16 number, and return the value. */
bool cmd_match_hex_number(CommandBuf *cmd, uint32_t *value);
bool cmdMatchHexNumber(CommandBuf *cmd, uint32_t *value);
/* Try to consume a hex-encoded list of bytes, and return the value. */
bool cmd_match_hex_bytes(CommandBuf *cmd, const uint32_t count, uint8_t *value);
bool cmdMatchHexBytes(CommandBuf *cmd, const uint32_t count, uint8_t *value);
#endif
+1 -1
View File
@@ -3,6 +3,6 @@
#include <stdbool.h>
bool parse_hex_digit(char digit, char *out);
bool parseHexDigit(char digit, char *out);
#endif
+4 -4
View File
@@ -35,9 +35,9 @@ typedef struct RdbRequest {
char chk;
} RdbRequest;
void rdb_request_init(RdbRequest *req, int connfd, char *buf, size_t buflen);
void rdb_request_reset(RdbRequest *req);
void rdb_request_set_blocking(RdbRequest *req, bool blocking);
rdb_read_result_t rdb_request_read(RdbRequest *req, CommandBuf *cmd);
void rdbRequestInit(RdbRequest *req, int connfd, char *buf, size_t buflen);
void rdbRequestReset(RdbRequest *req);
void rdbRequestSetBlocking(RdbRequest *req, bool blocking);
rdb_read_result_t rdbRequestRead(RdbRequest *req, CommandBuf *cmd);
#endif
+7 -7
View File
@@ -15,12 +15,12 @@ typedef struct RdbResponse {
bool should_ack;
} RdbResponse;
void rdb_response_init(RdbResponse *self, int connfd, char *buf, size_t buflen);
void rdb_response_begin_packet(RdbResponse *self);
bool rdb_response_write_str(RdbResponse *self, const char *str);
bool rdb_response_write_str_hex(RdbResponse *self, const char *str);
bool rdb_response_write_i8_hex(RdbResponse *self, uint8_t value);
bool rdb_response_write_i32_hex(RdbResponse *self, uint32_t value);
int rdb_response_send_packet(RdbResponse *self);
void rdbResponseInit(RdbResponse *self, int connfd, char *buf, size_t buflen);
void rdbResponseBeginPacket(RdbResponse *self);
bool rdbResponseWriteStr(RdbResponse *self, const char *str);
bool rdbResponseWriteStrHex(RdbResponse *self, const char *str);
bool rdbResponseWriteI8Hex(RdbResponse *self, uint8_t value);
bool rdbResponseWriteI32Hex(RdbResponse *self, uint32_t value);
int rdbResponseSendPacket(RdbResponse *self);
#endif
+3 -3
View File
@@ -11,8 +11,8 @@ typedef struct RdbServer {
bool running;
} RdbServer;
void rdb_server_init(RdbServer *srv, VB *sim);
int rdb_server_handle_command(RdbServer *srv, CommandBuf *cmd, RdbResponse *res);
int rdb_server_break(RdbServer *srv, RdbResponse *res);
void rdbServerInit(RdbServer *srv, VB *sim);
int rdbServerHandleCommand(RdbServer *srv, CommandBuf *cmd, RdbResponse *res);
int rdbServerBreak(RdbServer *srv, RdbResponse *res);
#endif