summaryrefslogtreecommitdiff
path: root/lib9p/core_generated.c
diff options
context:
space:
mode:
authorLuke T. Shumaker <lukeshu@lukeshu.com>2025-05-17 03:20:11 -0600
committerLuke T. Shumaker <lukeshu@lukeshu.com>2025-05-17 12:57:08 -0600
commitab9103440ade87509a1a3bd1eaad0b5396a89d1e (patch)
tree423673909d0af66d4ef5e260ce58b4b554bf2024 /lib9p/core_generated.c
parentd505a998aafe5af8b02a2b2c2acf7e708812c3fc (diff)
Pull UTF-8 decoding into libmisc/utf8.c
Diffstat (limited to 'lib9p/core_generated.c')
-rw-r--r--lib9p/core_generated.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib9p/core_generated.c b/lib9p/core_generated.c
index 81ace7d..e19f6e6 100644
--- a/lib9p/core_generated.c
+++ b/lib9p/core_generated.c
@@ -6,11 +6,11 @@
#include <libmisc/assert.h>
#include <libmisc/endian.h>
+#include <libmisc/utf8.h>
#include <lib9p/core.h>
#include "core_tables.h"
-#include "core_utf8.h"
/* utilities ******************************************************************/
#if CONFIG_9P_ENABLE_9P2000
@@ -234,7 +234,7 @@ static const lib9p_lock_flags_t lock_flags_masks[LIB9P_VER_NUM] = {
{ \
size_t len = n; \
VALIDATE_NET_BYTES(len); \
- if (!is_valid_utf8_without_nul(&net_bytes[net_offset-len], len)) \
+ if (!utf8_is_valid_without_nul(&net_bytes[net_offset-len], len)) \
return lib9p_error(ctx, LIB9P_ERRNO_L_EBADMSG, "message contains invalid UTF-8"); \
}
#define RESERVE_HOST_BYTES(n) \
@@ -6507,7 +6507,7 @@ static bool marshal_Rswrite(struct lib9p_ctx *ctx, struct lib9p_msg_Rswrite *val
fmt_print_tag(w, ctx, &self->tag);
fmt_print_str(w, " count=");
fmt_print_base10(w, self->count);
- if (is_valid_utf8_without_nul((uint8_t *)self->data, (size_t)self->count)) {
+ if (utf8_is_valid_without_nul((uint8_t *)self->data, (size_t)self->count)) {
fmt_print_str(w, " data=");
fmt_print_qmem(w, self->data, self->count < 50 ? self->count : 50);
if (self->count > 50)
@@ -6528,7 +6528,7 @@ static bool marshal_Rswrite(struct lib9p_ctx *ctx, struct lib9p_msg_Rswrite *val
fmt_print_base10(w, self->offset);
fmt_print_str(w, " count=");
fmt_print_base10(w, self->count);
- if (is_valid_utf8_without_nul((uint8_t *)self->data, (size_t)self->count)) {
+ if (utf8_is_valid_without_nul((uint8_t *)self->data, (size_t)self->count)) {
fmt_print_str(w, " data=");
fmt_print_qmem(w, self->data, self->count < 50 ? self->count : 50);
if (self->count > 50)
@@ -6763,7 +6763,7 @@ static bool marshal_Rswrite(struct lib9p_ctx *ctx, struct lib9p_msg_Rswrite *val
fmt_print_tag(w, ctx, &self->tag);
fmt_print_str(w, " count=");
fmt_print_base10(w, self->count);
- if (is_valid_utf8_without_nul((uint8_t *)self->data, (size_t)self->count)) {
+ if (utf8_is_valid_without_nul((uint8_t *)self->data, (size_t)self->count)) {
fmt_print_str(w, " data=");
fmt_print_qmem(w, self->data, self->count < 50 ? self->count : 50);
if (self->count > 50)
@@ -6846,7 +6846,7 @@ static bool marshal_Rswrite(struct lib9p_ctx *ctx, struct lib9p_msg_Rswrite *val
fmt_print_tag(w, ctx, &self->tag);
fmt_print_str(w, " count=");
fmt_print_base10(w, self->count);
- if (is_valid_utf8_without_nul((uint8_t *)self->data, (size_t)self->count)) {
+ if (utf8_is_valid_without_nul((uint8_t *)self->data, (size_t)self->count)) {
fmt_print_str(w, " data=");
fmt_print_qmem(w, self->data, self->count < 50 ? self->count : 50);
if (self->count > 50)
@@ -7445,7 +7445,7 @@ static bool marshal_Rswrite(struct lib9p_ctx *ctx, struct lib9p_msg_Rswrite *val
fmt_print_str(w, " ]");
fmt_print_str(w, " count=");
fmt_print_base10(w, self->count);
- if (is_valid_utf8_without_nul((uint8_t *)self->data, (size_t)self->count)) {
+ if (utf8_is_valid_without_nul((uint8_t *)self->data, (size_t)self->count)) {
fmt_print_str(w, " data=");
fmt_print_qmem(w, self->data, self->count < 50 ? self->count : 50);
if (self->count > 50)