diff options
author | Přemysl Janouch <p.janouch@gmail.com> | 2015-03-29 03:56:25 +0200 |
---|---|---|
committer | Přemysl Janouch <p.janouch@gmail.com> | 2015-03-29 03:56:25 +0200 |
commit | 1a13b7b1b8042c3ae7be0a08d3ea42c65dc5da57 (patch) | |
tree | af570c8314ac6857f7b905d576e10cb8ccbfc981 | |
parent | c1d64fd3b28777c91c8895bb99ede81b5e2f6c6e (diff) | |
download | neetdraw-1a13b7b1b8042c3ae7be0a08d3ea42c65dc5da57.tar.gz neetdraw-1a13b7b1b8042c3ae7be0a08d3ea42c65dc5da57.tar.xz neetdraw-1a13b7b1b8042c3ae7be0a08d3ea42c65dc5da57.zip |
Bump liberty
-rw-r--r-- | autistdraw.c | 44 | ||||
m--------- | liberty | 0 |
2 files changed, 22 insertions, 22 deletions
diff --git a/autistdraw.c b/autistdraw.c index 3034174..82a3746 100644 --- a/autistdraw.c +++ b/autistdraw.c @@ -223,10 +223,10 @@ send_draw_point_response (client_t *client, int x, int y, uint8_t color) { struct msg_writer writer; msg_writer_init (&writer); - msg_writer_u8 (&writer, MESSAGE_PUT_POINT); - msg_writer_i32 (&writer, x); - msg_writer_i32 (&writer, y); - msg_writer_u8 (&writer, color); + str_pack_u8 (&writer.buf, MESSAGE_PUT_POINT); + str_pack_i32 (&writer.buf, x); + str_pack_i32 (&writer.buf, y); + str_pack_u8 (&writer.buf, color); flush_writer_to_client (&writer, client); } @@ -236,10 +236,10 @@ send_draw_point_request (app_context_t *app, int x, int y, uint8_t color) { struct msg_writer writer; msg_writer_init (&writer); - msg_writer_u8 (&writer, MESSAGE_PUT_POINT); - msg_writer_i32 (&writer, x); - msg_writer_i32 (&writer, y); - msg_writer_u8 (&writer, color); + str_pack_u8 (&writer.buf, MESSAGE_PUT_POINT); + str_pack_i32 (&writer.buf, x); + str_pack_i32 (&writer.buf, y); + str_pack_u8 (&writer.buf, color); flush_writer_to_server (&writer, app); } @@ -249,8 +249,8 @@ send_hello_request (app_context_t *app) { struct msg_writer writer; msg_writer_init (&writer); - msg_writer_u8 (&writer, MESSAGE_HELLO); - msg_writer_u8 (&writer, PROTOCOL_VERSION); + str_pack_u8 (&writer.buf, MESSAGE_HELLO); + str_pack_u8 (&writer.buf, PROTOCOL_VERSION); flush_writer_to_server (&writer, app); } @@ -260,8 +260,8 @@ send_hello_response (client_t *client) { struct msg_writer writer; msg_writer_init (&writer); - msg_writer_u8 (&writer, MESSAGE_HELLO); - msg_writer_u8 (&writer, PROTOCOL_VERSION); + str_pack_u8 (&writer.buf, MESSAGE_HELLO); + str_pack_u8 (&writer.buf, PROTOCOL_VERSION); flush_writer_to_client (&writer, client); } @@ -271,7 +271,7 @@ send_get_bitmap_request (app_context_t *app) { struct msg_writer writer; msg_writer_init (&writer); - msg_writer_u8 (&writer, MESSAGE_GET_BITMAP); + str_pack_u8 (&writer.buf, MESSAGE_GET_BITMAP); flush_writer_to_server (&writer, app); } @@ -281,11 +281,11 @@ send_get_bitmap_response (client_t *client, app_context_t *app) { struct msg_writer writer; msg_writer_init (&writer); - msg_writer_u8 (&writer, MESSAGE_GET_BITMAP); - msg_writer_i32 (&writer, app->bitmap_x); - msg_writer_i32 (&writer, app->bitmap_y); - msg_writer_u64 (&writer, app->bitmap_w); - msg_writer_u64 (&writer, app->bitmap_h); + str_pack_u8 (&writer.buf, MESSAGE_GET_BITMAP); + str_pack_i32 (&writer.buf, app->bitmap_x); + str_pack_i32 (&writer.buf, app->bitmap_y); + str_pack_u64 (&writer.buf, app->bitmap_w); + str_pack_u64 (&writer.buf, app->bitmap_h); // Simple RLE compression size_t size = app->bitmap_w * app->bitmap_h; @@ -295,8 +295,8 @@ send_get_bitmap_response (client_t *client, app_context_t *app) uint8_t value = app->bitmap[i]; if ((count && value != last_value) || count == 0xFF) { - msg_writer_u8 (&writer, count); - msg_writer_u8 (&writer, last_value); + str_pack_u8 (&writer.buf, count); + str_pack_u8 (&writer.buf, last_value); count = 0; } count++; @@ -304,8 +304,8 @@ send_get_bitmap_response (client_t *client, app_context_t *app) } if (count) { - msg_writer_u8 (&writer, count); - msg_writer_u8 (&writer, last_value); + str_pack_u8 (&writer.buf, count); + str_pack_u8 (&writer.buf, last_value); } flush_writer_to_client (&writer, client); diff --git a/liberty b/liberty -Subproject 087645848baec5e59e4296817850bd5dd240cbb +Subproject 8c6d18757d2d4135963f3dbab6d2d5ec8c8b6af |