diff --git a/src/guacenc/encode.c b/src/guacenc/encode.c index ba4050c7..5c2820c6 100644 --- a/src/guacenc/encode.c +++ b/src/guacenc/encode.c @@ -60,8 +60,7 @@ static int guacenc_read_instructions(const char* path, guac_socket* socket) { /* Continuously read and handle all instructions */ while (!guac_parser_read(parser, socket, -1)) { - guacenc_handle_instruction(parser->opcode, parser->argc, - (const char**) parser->argv); + guacenc_handle_instruction(parser->opcode, parser->argc, parser->argv); } /* Fail on read/parse error */ diff --git a/src/guacenc/instruction-blob.c b/src/guacenc/instruction-blob.c index e69fe491..10270e23 100644 --- a/src/guacenc/instruction-blob.c +++ b/src/guacenc/instruction-blob.c @@ -28,7 +28,7 @@ #include #include -int guacenc_handle_blob(int argc, const char** argv) { +int guacenc_handle_blob(int argc, char** argv) { /* Verify argument count */ if (argc < 2) { @@ -38,7 +38,7 @@ int guacenc_handle_blob(int argc, const char** argv) { /* Parse arguments */ int index = atoi(argv[0]); - const char* data = argv[1]; + char* data = argv[1]; /* STUB */ guacenc_log(GUAC_LOG_DEBUG, "blob: stream=%i data=[%i chars]", diff --git a/src/guacenc/instruction-cfill.c b/src/guacenc/instruction-cfill.c index 2042173c..ff35f756 100644 --- a/src/guacenc/instruction-cfill.c +++ b/src/guacenc/instruction-cfill.c @@ -27,7 +27,7 @@ #include -int guacenc_handle_cfill(int argc, const char** argv) { +int guacenc_handle_cfill(int argc, char** argv) { /* Verify argument count */ if (argc < 6) { diff --git a/src/guacenc/instruction-copy.c b/src/guacenc/instruction-copy.c index ce82e82b..56f90fa2 100644 --- a/src/guacenc/instruction-copy.c +++ b/src/guacenc/instruction-copy.c @@ -27,7 +27,7 @@ #include -int guacenc_handle_copy(int argc, const char** argv) { +int guacenc_handle_copy(int argc, char** argv) { /* Verify argument count */ if (argc < 9) { diff --git a/src/guacenc/instruction-cursor.c b/src/guacenc/instruction-cursor.c index 8d3a5b34..2b237a25 100644 --- a/src/guacenc/instruction-cursor.c +++ b/src/guacenc/instruction-cursor.c @@ -27,7 +27,7 @@ #include -int guacenc_handle_cursor(int argc, const char** argv) { +int guacenc_handle_cursor(int argc, char** argv) { /* Verify argument count */ if (argc < 7) { diff --git a/src/guacenc/instruction-dispose.c b/src/guacenc/instruction-dispose.c index 0b280a0f..17bf320e 100644 --- a/src/guacenc/instruction-dispose.c +++ b/src/guacenc/instruction-dispose.c @@ -27,7 +27,7 @@ #include -int guacenc_handle_dispose(int argc, const char** argv) { +int guacenc_handle_dispose(int argc, char** argv) { /* Verify argument count */ if (argc < 1) { diff --git a/src/guacenc/instruction-end.c b/src/guacenc/instruction-end.c index a99a0e45..55e11a39 100644 --- a/src/guacenc/instruction-end.c +++ b/src/guacenc/instruction-end.c @@ -27,7 +27,7 @@ #include -int guacenc_handle_end(int argc, const char** argv) { +int guacenc_handle_end(int argc, char** argv) { /* Verify argument count */ if (argc < 1) { diff --git a/src/guacenc/instruction-img.c b/src/guacenc/instruction-img.c index 9e2dd312..5cf2c884 100644 --- a/src/guacenc/instruction-img.c +++ b/src/guacenc/instruction-img.c @@ -27,7 +27,7 @@ #include -int guacenc_handle_img(int argc, const char** argv) { +int guacenc_handle_img(int argc, char** argv) { /* Verify argument count */ if (argc < 6) { @@ -39,7 +39,7 @@ int guacenc_handle_img(int argc, const char** argv) { int stream_index = atoi(argv[0]); int mask = atoi(argv[1]); int layer_index = atoi(argv[2]); - const char* mimetype = argv[3]; + char* mimetype = argv[3]; int x = atoi(argv[4]); int y = atoi(argv[5]); diff --git a/src/guacenc/instruction-move.c b/src/guacenc/instruction-move.c index 2e916929..5472361b 100644 --- a/src/guacenc/instruction-move.c +++ b/src/guacenc/instruction-move.c @@ -27,7 +27,7 @@ #include -int guacenc_handle_move(int argc, const char** argv) { +int guacenc_handle_move(int argc, char** argv) { /* Verify argument count */ if (argc < 5) { diff --git a/src/guacenc/instruction-rect.c b/src/guacenc/instruction-rect.c index 85e229f0..f9609ab7 100644 --- a/src/guacenc/instruction-rect.c +++ b/src/guacenc/instruction-rect.c @@ -27,7 +27,7 @@ #include -int guacenc_handle_rect(int argc, const char** argv) { +int guacenc_handle_rect(int argc, char** argv) { /* Verify argument count */ if (argc < 5) { diff --git a/src/guacenc/instruction-shade.c b/src/guacenc/instruction-shade.c index 48e6d7aa..f796c064 100644 --- a/src/guacenc/instruction-shade.c +++ b/src/guacenc/instruction-shade.c @@ -27,7 +27,7 @@ #include -int guacenc_handle_shade(int argc, const char** argv) { +int guacenc_handle_shade(int argc, char** argv) { /* Verify argument count */ if (argc < 2) { diff --git a/src/guacenc/instruction-size.c b/src/guacenc/instruction-size.c index 7057bcc4..1817bfb1 100644 --- a/src/guacenc/instruction-size.c +++ b/src/guacenc/instruction-size.c @@ -27,7 +27,7 @@ #include -int guacenc_handle_size(int argc, const char** argv) { +int guacenc_handle_size(int argc, char** argv) { /* Verify argument count */ if (argc < 3) { diff --git a/src/guacenc/instruction-transfer.c b/src/guacenc/instruction-transfer.c index ae0f4ea7..ff37d282 100644 --- a/src/guacenc/instruction-transfer.c +++ b/src/guacenc/instruction-transfer.c @@ -27,7 +27,7 @@ #include -int guacenc_handle_transfer(int argc, const char** argv) { +int guacenc_handle_transfer(int argc, char** argv) { /* Verify argument count */ if (argc < 9) { diff --git a/src/guacenc/instructions.c b/src/guacenc/instructions.c index 015ed929..81329cf2 100644 --- a/src/guacenc/instructions.c +++ b/src/guacenc/instructions.c @@ -45,7 +45,7 @@ guacenc_instruction_handler_mapping guacenc_instruction_handler_map[] = { }; int guacenc_handle_instruction(const char* opcode, - int argc, const char** argv) { + int argc, char** argv) { /* Search through mapping for instruction handler having given opcode */ guacenc_instruction_handler_mapping* current = guacenc_instruction_handler_map; diff --git a/src/guacenc/instructions.h b/src/guacenc/instructions.h index 0f7951d6..5f8d6728 100644 --- a/src/guacenc/instructions.h +++ b/src/guacenc/instructions.h @@ -44,7 +44,7 @@ * Zero if the instruction was handled successfully, non-zero if an error * occurs. */ -typedef int guacenc_instruction_handler(int argc, const char** argv); +typedef int guacenc_instruction_handler(int argc, char** argv); /** * Mapping of instruction opcode to corresponding handler function. @@ -91,8 +91,7 @@ extern guacenc_instruction_handler_mapping guacenc_instruction_handler_map[]; * Zero if the instruction was handled successfully, non-zero if an error * occurs. */ -int guacenc_handle_instruction(const char* opcode, int argc, - const char** argv); +int guacenc_handle_instruction(const char* opcode, int argc, char** argv); /** * Handler for the Guacamole "blob" instruction.