protoverse

A metaverse protocol
git clone git://jb55.com/protoverse
Log | Files | Refs | README | LICENSE

commit bd7682d7bf0dd95f930386d2b94b28248534b9a5
parent 9c105a9d400be45a8c1229fc1643ad86d9560b5f
Author: William Casarin <jb55@jb55.com>
Date:   Mon, 31 Aug 2020 19:22:26 -0700

fix build osx

Signed-off-by: William Casarin <jb55@jb55.com>

Diffstat:
Mnet.c | 2+-
Mparse.c | 6+++++-
Mprotoverse.c | 2++
3 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/net.c b/net.c @@ -47,7 +47,7 @@ int send_packet(int sockfd, struct sockaddr *to_addr, int to_addr_len, struct pa len = push_packet(buf, sizeof(buf), packet); if (!len) return 0; - ok = sendto(sockfd, buf, len, MSG_CONFIRM, to_addr, to_addr_len); + ok = sendto(sockfd, buf, len, 0, to_addr, to_addr_len); if (ok != len) { printf("sendto: sent %d != packet_len %d\n", ok, len); diff --git a/parse.c b/parse.c @@ -39,6 +39,7 @@ union token { }; +/* static const char *attr_type_str(enum attribute_type type) { switch (type) { @@ -57,6 +58,7 @@ static const char *attr_type_str(enum attribute_type type) return "unknown"; } +*/ static const char *token_error_string(enum token_error err) { @@ -95,6 +97,7 @@ struct attribute *get_attr(struct cursor *attributes, u16 index) sizeof(struct attribute)); } +/* static const char *shape_str(enum shape shape) { switch (shape) { @@ -106,6 +109,7 @@ static const char *shape_str(enum shape shape) return "unknown"; } + static void print_attribute(struct attribute *attr) { printf("%s ", attr_type_str(attr->type)); @@ -119,7 +123,6 @@ static void print_attribute(struct attribute *attr) break; default: break; - /* TODO: finish print_attribute */ } } @@ -137,6 +140,7 @@ static void print_attributes(struct cursor *attributes, struct cell *cell) print_attribute(attr); } } +*/ void print_cell(struct cursor *attributes, struct cell *cell) { diff --git a/protoverse.c b/protoverse.c @@ -10,6 +10,7 @@ #define streq(a, b) strcmp(a,b) == 0 +/* static void print_all_cells(struct parser *parser) { struct cell *cell; @@ -30,6 +31,7 @@ static void print_all_cells(struct parser *parser) } } } +*/ static int print_cell_tree(struct parser *parser, u16 root, int depth) {