Removed inconsistent _t suffix from types.

This commit is contained in:
Michael Jumper 2011-11-16 15:43:28 -08:00
parent d61335b187
commit 4d6218560f
7 changed files with 28 additions and 28 deletions

View File

@ -169,13 +169,13 @@ struct guac_client {
* The time (in milliseconds) of receipt of the last sync message from * The time (in milliseconds) of receipt of the last sync message from
* the client. * the client.
*/ */
guac_timestamp_t last_received_timestamp; guac_timestamp last_received_timestamp;
/** /**
* The time (in milliseconds) that the last sync message was sent to the * The time (in milliseconds) that the last sync message was sent to the
* client. * client.
*/ */
guac_timestamp_t last_sent_timestamp; guac_timestamp last_sent_timestamp;
/** /**
* Reference to dlopen'd client plugin. * Reference to dlopen'd client plugin.

View File

@ -64,13 +64,13 @@
*/ */
#define GUAC_USEC_TIMEOUT (GUAC_TIMEOUT*1000) #define GUAC_USEC_TIMEOUT (GUAC_TIMEOUT*1000)
typedef int64_t guac_timestamp_t; typedef int64_t guac_timestamp;
/** /**
* Composite modes used by Guacamole draw instructions. Each * Composite modes used by Guacamole draw instructions. Each
* composite mode maps to a unique channel mask integer. * composite mode maps to a unique channel mask integer.
*/ */
typedef enum guac_composite_mode_t { typedef enum guac_composite_mode {
/* /*
* A: Source where destination transparent = S n D' * A: Source where destination transparent = S n D'
@ -102,7 +102,7 @@ typedef enum guac_composite_mode_t {
GUAC_COMP_RATOP = 0x9, /* 1001 */ GUAC_COMP_RATOP = 0x9, /* 1001 */
GUAC_COMP_SRC = 0xC /* 1100 */ GUAC_COMP_SRC = 0xC /* 1100 */
} guac_composite_mode_t; } guac_composite_mode;
typedef struct guac_layer guac_layer; typedef struct guac_layer guac_layer;
@ -197,7 +197,7 @@ int guac_send_name(GUACIO* io, const char* name);
* @param timestamp The current timestamp (in milliseconds). * @param timestamp The current timestamp (in milliseconds).
* @return Zero on success, non-zero on error. * @return Zero on success, non-zero on error.
*/ */
int guac_send_sync(GUACIO* io, guac_timestamp_t timestamp); int guac_send_sync(GUACIO* io, guac_timestamp timestamp);
/** /**
* Sends an error instruction over the given GUACIO connection. * Sends an error instruction over the given GUACIO connection.
@ -246,7 +246,7 @@ int guac_send_size(GUACIO* io, int w, int h);
*/ */
int guac_send_copy(GUACIO* io, int guac_send_copy(GUACIO* io,
const guac_layer* srcl, int srcx, int srcy, int w, int h, const guac_layer* srcl, int srcx, int srcy, int w, int h,
guac_composite_mode_t mode, const guac_layer* dstl, int dstx, int dsty); guac_composite_mode mode, const guac_layer* dstl, int dstx, int dsty);
/** /**
* Sends a rect instruction over the given GUACIO connection. * Sends a rect instruction over the given GUACIO connection.
@ -265,7 +265,7 @@ int guac_send_copy(GUACIO* io,
* @return Zero on success, non-zero on error. * @return Zero on success, non-zero on error.
*/ */
int guac_send_rect(GUACIO* io, int guac_send_rect(GUACIO* io,
guac_composite_mode_t mode, const guac_layer* layer, guac_composite_mode mode, const guac_layer* layer,
int x, int y, int width, int height, int x, int y, int width, int height,
int r, int g, int b, int a); int r, int g, int b, int a);
@ -295,7 +295,7 @@ int guac_send_clip(GUACIO* io, const guac_layer* layer,
* @param surface A cairo surface containing the image data to send. * @param surface A cairo surface containing the image data to send.
* @return Zero on success, non-zero on error. * @return Zero on success, non-zero on error.
*/ */
int guac_send_png(GUACIO* io, guac_composite_mode_t mode, int guac_send_png(GUACIO* io, guac_composite_mode mode,
const guac_layer* layer, int x, int y, cairo_surface_t* surface); const guac_layer* layer, int x, int y, cairo_surface_t* surface);
/** /**
@ -335,7 +335,7 @@ int guac_instructions_waiting(GUACIO* io);
*/ */
int guac_read_instruction(GUACIO* io, guac_instruction* parsed_instruction); int guac_read_instruction(GUACIO* io, guac_instruction* parsed_instruction);
guac_timestamp_t guac_current_timestamp(); guac_timestamp guac_current_timestamp();
void guac_sleep(int millis); void guac_sleep(int millis);
#endif #endif

View File

@ -47,17 +47,17 @@
#ifdef HAVE_LIBPTHREAD #ifdef HAVE_LIBPTHREAD
#include <pthread.h> #include <pthread.h>
typedef pthread_t guac_thread_t; typedef pthread_t guac_thread;
#elif defined(__MINGW32__) #elif defined(__MINGW32__)
#include <windows.h> #include <windows.h>
#include <process.h> #include <process.h>
typedef HANDLE guac_thread_t; typedef HANDLE guac_thread;
#endif #endif
int guac_thread_create(guac_thread_t* thread, void*(*function)(void*), void* data); int guac_thread_create(guac_thread* thread, void*(*function)(void*), void* data);
void guac_thread_join(guac_thread_t thread); void guac_thread_join(guac_thread thread);
#endif #endif

View File

@ -56,7 +56,7 @@ __guac_instruction_handler_mapping __guac_instruction_handler_map[] = {
/* Guacamole instruction handlers */ /* Guacamole instruction handlers */
int __guac_handle_sync(guac_client* client, guac_instruction* instruction) { int __guac_handle_sync(guac_client* client, guac_instruction* instruction) {
guac_timestamp_t timestamp = guac_parse_int(instruction->argv[0]); guac_timestamp timestamp = guac_parse_int(instruction->argv[0]);
/* Error if timestamp is in future */ /* Error if timestamp is in future */
if (timestamp > client->last_sent_timestamp) if (timestamp > client->last_sent_timestamp)

View File

@ -342,13 +342,13 @@ void* __guac_client_output_thread(void* data) {
guac_client* client = (guac_client*) data; guac_client* client = (guac_client*) data;
GUACIO* io = client->io; GUACIO* io = client->io;
guac_timestamp_t last_ping_timestamp = guac_current_timestamp(); guac_timestamp last_ping_timestamp = guac_current_timestamp();
/* Guacamole client output loop */ /* Guacamole client output loop */
while (client->state == RUNNING) { while (client->state == RUNNING) {
/* Occasionally ping client with repeat of last sync */ /* Occasionally ping client with repeat of last sync */
guac_timestamp_t timestamp = guac_current_timestamp(); guac_timestamp timestamp = guac_current_timestamp();
if (timestamp - last_ping_timestamp > GUAC_SYNC_FREQUENCY) { if (timestamp - last_ping_timestamp > GUAC_SYNC_FREQUENCY) {
last_ping_timestamp = timestamp; last_ping_timestamp = timestamp;
if ( if (
@ -444,7 +444,7 @@ void* __guac_client_input_thread(void* data) {
int guac_start_client(guac_client* client) { int guac_start_client(guac_client* client) {
guac_thread_t input_thread, output_thread; guac_thread input_thread, output_thread;
if (guac_thread_create(&output_thread, __guac_client_output_thread, (void*) client)) { if (guac_thread_create(&output_thread, __guac_client_output_thread, (void*) client)) {
return -1; return -1;

View File

@ -137,7 +137,7 @@ int guac_send_error(GUACIO* io, const char* error) {
|| guac_write_string(io, ";"); || guac_write_string(io, ";");
} }
int guac_send_sync(GUACIO* io, guac_timestamp_t timestamp) { int guac_send_sync(GUACIO* io, guac_timestamp timestamp) {
return return
guac_write_string(io, "4.sync,") guac_write_string(io, "4.sync,")
@ -148,7 +148,7 @@ int guac_send_sync(GUACIO* io, guac_timestamp_t timestamp) {
int guac_send_copy(GUACIO* io, int guac_send_copy(GUACIO* io,
const guac_layer* srcl, int srcx, int srcy, int w, int h, const guac_layer* srcl, int srcx, int srcy, int w, int h,
guac_composite_mode_t mode, const guac_layer* dstl, int dstx, int dsty) { guac_composite_mode mode, const guac_layer* dstl, int dstx, int dsty) {
return return
guac_write_string(io, "4.copy,") guac_write_string(io, "4.copy,")
@ -174,7 +174,7 @@ int guac_send_copy(GUACIO* io,
} }
int guac_send_rect(GUACIO* io, int guac_send_rect(GUACIO* io,
guac_composite_mode_t mode, const guac_layer* layer, guac_composite_mode mode, const guac_layer* layer,
int x, int y, int width, int height, int x, int y, int width, int height,
int r, int g, int b, int a) { int r, int g, int b, int a) {
@ -295,7 +295,7 @@ int __guac_write_length_png(GUACIO* io, cairo_surface_t* surface) {
} }
int guac_send_png(GUACIO* io, guac_composite_mode_t mode, int guac_send_png(GUACIO* io, guac_composite_mode mode,
const guac_layer* layer, int x, int y, cairo_surface_t* surface) { const guac_layer* layer, int x, int y, cairo_surface_t* surface) {
return return
@ -475,7 +475,7 @@ int guac_instructions_waiting(GUACIO* io) {
return guac_select(io, GUAC_USEC_TIMEOUT); return guac_select(io, GUAC_USEC_TIMEOUT);
} }
guac_timestamp_t guac_current_timestamp() { guac_timestamp guac_current_timestamp() {
#ifdef HAVE_CLOCK_GETTIME #ifdef HAVE_CLOCK_GETTIME
@ -485,7 +485,7 @@ guac_timestamp_t guac_current_timestamp() {
clock_gettime(CLOCK_REALTIME, &current); clock_gettime(CLOCK_REALTIME, &current);
/* Calculate milliseconds */ /* Calculate milliseconds */
return (guac_timestamp_t) current.tv_sec * 1000 + current.tv_nsec / 1000000; return (guac_timestamp) current.tv_sec * 1000 + current.tv_nsec / 1000000;
#else #else
@ -495,7 +495,7 @@ guac_timestamp_t guac_current_timestamp() {
gettimeofday(&current, NULL); gettimeofday(&current, NULL);
/* Calculate milliseconds */ /* Calculate milliseconds */
return (guac_timestamp_t) current.tv_sec * 1000 + current.tv_usec / 1000; return (guac_timestamp) current.tv_sec * 1000 + current.tv_usec / 1000;
#endif #endif

View File

@ -44,11 +44,11 @@
#include <process.h> #include <process.h>
#endif #endif
int guac_thread_create(guac_thread_t* thread, void*(*function)(void*), void* data) { int guac_thread_create(guac_thread* thread, void*(*function)(void*), void* data) {
#ifdef HAVE_LIBPTHREAD #ifdef HAVE_LIBPTHREAD
return pthread_create(thread, NULL, function, data); return pthread_create(thread, NULL, function, data);
#elif defined(__MINGW32__) #elif defined(__MINGW32__)
*thread = (guac_thread_t) _beginthreadex(NULL, 0, *thread = (guac_thread) _beginthreadex(NULL, 0,
(unsigned(__stdcall*)(void*)) function, data, (unsigned(__stdcall*)(void*)) function, data,
0 /* Create running */, NULL); 0 /* Create running */, NULL);
if (thread == 0) if (thread == 0)
@ -57,7 +57,7 @@ int guac_thread_create(guac_thread_t* thread, void*(*function)(void*), void* dat
#endif #endif
} }
void guac_thread_join(guac_thread_t thread) { void guac_thread_join(guac_thread thread) {
#ifdef HAVE_LIBPTHREAD #ifdef HAVE_LIBPTHREAD
pthread_join(thread, NULL); pthread_join(thread, NULL);
#elif defined(__MINGW32__) #elif defined(__MINGW32__)