diff --git a/src/libguac/audio.c b/src/libguac/audio.c index f4bb44fd..923ab969 100644 --- a/src/libguac/audio.c +++ b/src/libguac/audio.c @@ -22,20 +22,19 @@ #include "config.h" -#include "wav_encoder.h" +#ifdef ENABLE_OGG +#include "ogg_encoder.h" +#endif -#include -#include -#include +#include "wav_encoder.h" #include #include #include #include -#ifdef ENABLE_OGG -#include "ogg_encoder.h" -#endif +#include +#include guac_audio_stream* guac_audio_stream_alloc(guac_client* client, guac_audio_encoder* encoder) { diff --git a/src/libguac/client-handlers.c b/src/libguac/client-handlers.c index a92ddf1d..819a45ab 100644 --- a/src/libguac/client-handlers.c +++ b/src/libguac/client-handlers.c @@ -24,10 +24,13 @@ #include "client.h" #include "client-handlers.h" +#include "instruction.h" #include "protocol.h" #include "stream.h" +#include "timestamp.h" #include +#include #include /* Guacamole instruction handler map */ diff --git a/src/libguac/client.c b/src/libguac/client.c index f7b3dc36..c5d30560 100644 --- a/src/libguac/client.c +++ b/src/libguac/client.c @@ -25,14 +25,15 @@ #include "client.h" #include "client-handlers.h" #include "error.h" +#include "instruction.h" #include "layer.h" -#include "plugin.h" #include "pool.h" #include "protocol.h" #include "socket.h" #include "stream.h" #include "timestamp.h" +#include #include #include #include diff --git a/src/libguac/hash.c b/src/libguac/hash.c index baaa4fb7..6fe3b455 100644 --- a/src/libguac/hash.c +++ b/src/libguac/hash.c @@ -22,11 +22,11 @@ #include "config.h" +#include + #include #include -#include - /* * Arbitrary hash function whhich maps ALL 32-bit numbers onto 24-bit numbers * evenly, while guaranteeing that all 24-bit numbers are mapped onto diff --git a/src/libguac/instruction.c b/src/libguac/instruction.c index 52f21b47..d5f16070 100644 --- a/src/libguac/instruction.c +++ b/src/libguac/instruction.c @@ -24,7 +24,6 @@ #include "error.h" #include "instruction.h" -#include "protocol.h" #include "socket.h" #include "unicode.h" diff --git a/src/libguac/ogg_encoder.c b/src/libguac/ogg_encoder.c index fe418068..32bf69e8 100644 --- a/src/libguac/ogg_encoder.c +++ b/src/libguac/ogg_encoder.c @@ -22,15 +22,13 @@ #include "config.h" +#include "audio.h" #include "ogg_encoder.h" -#include - -#include -#include -#include #include +#include + void ogg_encoder_begin_handler(guac_audio_stream* audio) { /* Allocate stream state */ @@ -45,7 +43,7 @@ void ogg_encoder_begin_handler(guac_audio_stream* audio) { vorbis_block_init(&(state->vorbis_state), &(state->vorbis_block)); vorbis_comment_init(&(state->comment)); - vorbis_comment_add_tag(&(state->comment), "ENCODER", "libguac-client-rdp"); + vorbis_comment_add_tag(&(state->comment), "ENCODER", "libguac"); ogg_stream_init(&(state->ogg_state), rand()); diff --git a/src/libguac/ogg_encoder.h b/src/libguac/ogg_encoder.h index 52b9e269..ccb7233c 100644 --- a/src/libguac/ogg_encoder.h +++ b/src/libguac/ogg_encoder.h @@ -26,7 +26,8 @@ #include "config.h" -#include +#include "audio.h" + #include typedef struct ogg_encoder_state { diff --git a/src/libguac/palette.c b/src/libguac/palette.c index b7374f80..e3676cbf 100644 --- a/src/libguac/palette.c +++ b/src/libguac/palette.c @@ -24,15 +24,13 @@ #include "palette.h" -#include +#include + #include #include #include #include -#include -#include - guac_palette* guac_palette_alloc(cairo_surface_t* surface) { int x, y; diff --git a/src/libguac/plugin.c b/src/libguac/plugin.c index cfbc1235..37070dfb 100644 --- a/src/libguac/plugin.c +++ b/src/libguac/plugin.c @@ -23,12 +23,8 @@ #include "config.h" #include "client.h" -#include "client-handlers.h" #include "error.h" #include "plugin.h" -#include "protocol.h" -#include "socket.h" -#include "time.h" #include #include diff --git a/src/libguac/pool.c b/src/libguac/pool.c index fc9177dd..37984e5a 100644 --- a/src/libguac/pool.c +++ b/src/libguac/pool.c @@ -25,7 +25,6 @@ #include "pool.h" #include -#include guac_pool* guac_pool_alloc(int size) { diff --git a/src/libguac/protocol.c b/src/libguac/protocol.c index d625eb81..27ecf8d1 100644 --- a/src/libguac/protocol.c +++ b/src/libguac/protocol.c @@ -30,15 +30,6 @@ #include "stream.h" #include "unicode.h" -#include -#include -#include -#include -#include -#include -#include -#include - #include #include @@ -46,6 +37,15 @@ #include #endif +#include +#include +#include +#include +#include +#include +#include +#include + /* Output formatting functions */ ssize_t __guac_socket_write_length_string(guac_socket* socket, const char* str) { diff --git a/src/libguac/socket-fd.c b/src/libguac/socket-fd.c index f92719ad..710c6cbc 100644 --- a/src/libguac/socket-fd.c +++ b/src/libguac/socket-fd.c @@ -25,14 +25,10 @@ #include "error.h" #include "socket.h" -#include -#include -#include +#include #include #include -#include #include -#include #include #ifdef __MINGW32__ diff --git a/src/libguac/socket-nest.c b/src/libguac/socket-nest.c index ffff7c35..3b3b313f 100644 --- a/src/libguac/socket-nest.c +++ b/src/libguac/socket-nest.c @@ -22,27 +22,14 @@ #include "config.h" -#include "error.h" #include "protocol.h" #include "socket.h" #include "unicode.h" -#include -#include -#include -#include +#include #include -#include -#include -#include #include -#ifdef __MINGW32__ -#include -#else -#include -#endif - #define GUAC_SOCKET_NEST_BUFFER_SIZE 8192 typedef struct __guac_socket_nest_data { diff --git a/src/libguac/socket.c b/src/libguac/socket.c index e4db48b2..e6f77929 100644 --- a/src/libguac/socket.c +++ b/src/libguac/socket.c @@ -27,23 +27,15 @@ #include "socket.h" #include "timestamp.h" -#include #include #include +#include #include #include #include -#include -#include #include #include -#ifdef __MINGW32__ -#include -#else -#include -#endif - char __guac_socket_BASE64_CHARACTERS[64] = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', diff --git a/src/libguac/timestamp.c b/src/libguac/timestamp.c index 5210ff65..1e1d9652 100644 --- a/src/libguac/timestamp.c +++ b/src/libguac/timestamp.c @@ -24,9 +24,7 @@ #include "timestamp.h" -#ifndef HAVE_CLOCK_GETTIME #include -#endif #if defined(HAVE_CLOCK_GETTIME) || defined(HAVE_NANOSLEEP) #include diff --git a/src/libguac/wav_encoder.c b/src/libguac/wav_encoder.c index 86050865..a389374c 100644 --- a/src/libguac/wav_encoder.c +++ b/src/libguac/wav_encoder.c @@ -22,15 +22,12 @@ #include "config.h" +#include "audio.h" #include "wav_encoder.h" #include #include -#include -#include -#include - #define WAV_BUFFER_SIZE 0x4000 void wav_encoder_begin_handler(guac_audio_stream* audio) { diff --git a/src/libguac/wav_encoder.h b/src/libguac/wav_encoder.h index 7068f134..13f9ef0f 100644 --- a/src/libguac/wav_encoder.h +++ b/src/libguac/wav_encoder.h @@ -26,7 +26,7 @@ #include "config.h" -#include +#include "audio.h" typedef struct wav_encoder_riff_header {