diff options
122 files changed, 2034 insertions, 2047 deletions
diff --git a/common/arch.h b/common/arch.h index 873fd1d8..ce3137a7 100644 --- a/common/arch.h +++ b/common/arch.h @@ -96,14 +96,6 @@ typedef int bool_t; #define THREAD_CC #endif -#if defined(__BORLANDC__) || defined(_WIN32) -#define APP_CC __fastcall -#define DEFAULT_CC __cdecl -#else -#define APP_CC -#define DEFAULT_CC -#endif - #if defined(_WIN32) #if defined(__BORLANDC__) #define EXPORT_CC _export __cdecl diff --git a/common/fifo.c b/common/fifo.c index 61e30144..64e85f23 100644 --- a/common/fifo.c +++ b/common/fifo.c @@ -31,7 +31,7 @@ * @return pointer to new FIFO or NULL if system out of memory *****************************************************************************/ -FIFO * APP_CC +FIFO * fifo_create(void) { return (FIFO *) g_malloc(sizeof(FIFO), 1); @@ -41,7 +41,7 @@ fifo_create(void) * Delete specified FIFO *****************************************************************************/ -void APP_CC +void fifo_delete(FIFO *self) { USER_DATA *udp; @@ -91,7 +91,7 @@ fifo_delete(FIFO *self) * @return 0 on success, -1 on error *****************************************************************************/ -int APP_CC +int fifo_add_item(FIFO *self, void *item) { USER_DATA *udp; @@ -128,7 +128,7 @@ fifo_add_item(FIFO *self, void *item) * @return top item from FIFO or NULL if FIFO is empty *****************************************************************************/ -void * APP_CC +void * fifo_remove_item(FIFO *self) { void *item; @@ -163,7 +163,7 @@ fifo_remove_item(FIFO *self) * @return true if FIFO is empty, false otherwise *****************************************************************************/ -int APP_CC +int fifo_is_empty(FIFO *self) { if (!self) diff --git a/common/fifo.h b/common/fifo.h index 3d44c453..3a69e029 100644 --- a/common/fifo.h +++ b/common/fifo.h @@ -38,10 +38,10 @@ typedef struct fifo int auto_free; } FIFO; -FIFO * APP_CC fifo_create(void); -void APP_CC fifo_delete(FIFO *self); -int APP_CC fifo_add_item(FIFO *self, void *item); -void * APP_CC fifo_remove_item(FIFO *self); -int APP_CC fifo_is_empty(FIFO *self); +FIFO * fifo_create(void); +void fifo_delete(FIFO *self); +int fifo_add_item(FIFO *self, void *item); +void * fifo_remove_item(FIFO *self); +int fifo_is_empty(FIFO *self); #endif diff --git a/common/file.c b/common/file.c index 236ac3d8..16b8deee 100644 --- a/common/file.c +++ b/common/file.c @@ -30,14 +30,14 @@ #define FILE_MAX_LINE_BYTES 2048 -static int APP_CC +static int file_read_ini_line(struct stream *s, char *text, int text_bytes); /*****************************************************************************/ /* look up for a section name within str (i.e. pattern [section_name]) * if a section name is found, this function return 1 and copy the section * inplace of str. */ -static int APP_CC +static int line_lookup_for_section_name(char *str, int str_bytes) { int name_index_start; @@ -76,7 +76,7 @@ line_lookup_for_section_name(char *str, int str_bytes) /* returns error returns 0 if everything is ok returns 1 if problem reading file */ -static int APP_CC +static int l_file_read_sections(int fd, int max_file_size, struct list *names) { struct stream *s; @@ -117,7 +117,7 @@ l_file_read_sections(int fd, int max_file_size, struct list *names) * returns error * returns 0 if everything is ok * returns 1 if problem reading file */ -static int APP_CC +static int file_read_ini_line(struct stream *s, char *text, int text_bytes) { int i; @@ -195,7 +195,7 @@ file_read_ini_line(struct stream *s, char *text, int text_bytes) /*****************************************************************************/ /* returns error */ -static int APP_CC +static int file_split_name_value(char *text, char *name, char *value) { int len; @@ -238,7 +238,7 @@ file_split_name_value(char *text, char *name, char *value) /*****************************************************************************/ /* return error */ -static int APP_CC +static int l_file_read_section(int fd, int max_file_size, const char *section, struct list *names, struct list *values) { @@ -324,7 +324,7 @@ l_file_read_section(int fd, int max_file_size, const char *section, returns 0 if everything is ok returns 1 if problem reading file */ /* 32 K file size limit */ -int APP_CC +int file_read_sections(int fd, struct list *names) { return l_file_read_sections(fd, 32 * 1024, names); @@ -334,7 +334,7 @@ file_read_sections(int fd, struct list *names) /* return error */ /* this function should be preferred over file_read_sections because it can read any file size */ -int APP_CC +int file_by_name_read_sections(const char *file_name, struct list *names) { int fd; @@ -363,7 +363,7 @@ file_by_name_read_sections(const char *file_name, struct list *names) /*****************************************************************************/ /* return error */ /* 32 K file size limit */ -int APP_CC +int file_read_section(int fd, const char *section, struct list *names, struct list *values) { @@ -374,7 +374,7 @@ file_read_section(int fd, const char *section, /* return error */ /* this function should be preferred over file_read_section because it can read any file size */ -int APP_CC +int file_by_name_read_section(const char *file_name, const char *section, struct list *names, struct list *values) { diff --git a/common/file.h b/common/file.h index ec3bbcb1..8800e6a7 100644 --- a/common/file.h +++ b/common/file.h @@ -23,14 +23,14 @@ #include "arch.h" -int APP_CC +int file_read_sections(int fd, struct list* names); -int APP_CC +int file_by_name_read_sections(const char* file_name, struct list* names); -int APP_CC +int file_read_section(int fd, const char* section, struct list* names, struct list* values); -int APP_CC +int file_by_name_read_section(const char* file_name, const char* section, struct list* names, struct list* values); diff --git a/common/list.c b/common/list.c index 71f2d84a..8224c353 100644 --- a/common/list.c +++ b/common/list.c @@ -27,7 +27,7 @@ #include "list.h" /*****************************************************************************/ -struct list *APP_CC +struct list * list_create(void) { struct list *self; @@ -40,7 +40,7 @@ list_create(void) } /*****************************************************************************/ -void APP_CC +void list_delete(struct list *self) { int i; @@ -64,7 +64,7 @@ list_delete(struct list *self) } /*****************************************************************************/ -void APP_CC +void list_add_item(struct list *self, tbus item) { tbus *p; @@ -85,7 +85,7 @@ list_add_item(struct list *self, tbus item) } /*****************************************************************************/ -tbus APP_CC +tbus list_get_item(const struct list *self, int index) { if (index < 0 || index >= self->count) @@ -97,7 +97,7 @@ list_get_item(const struct list *self, int index) } /*****************************************************************************/ -void APP_CC +void list_clear(struct list *self) { int i; @@ -119,7 +119,7 @@ list_clear(struct list *self) } /*****************************************************************************/ -int APP_CC +int list_index_of(struct list *self, tbus item) { int i; @@ -136,7 +136,7 @@ list_index_of(struct list *self, tbus item) } /*****************************************************************************/ -void APP_CC +void list_remove_item(struct list *self, int index) { int i; @@ -159,7 +159,7 @@ list_remove_item(struct list *self, int index) } /*****************************************************************************/ -void APP_CC +void list_insert_item(struct list *self, int index, tbus item) { tbus *p; @@ -197,7 +197,7 @@ list_insert_item(struct list *self, int index, tbus item) /*****************************************************************************/ /* append one list to another using strdup for each item in the list */ /* begins copy at start_index, a zero based index on the source list */ -void APP_CC +void list_append_list_strdup(struct list *self, struct list *dest, int start_index) { int index; @@ -213,7 +213,7 @@ list_append_list_strdup(struct list *self, struct list *dest, int start_index) } /*****************************************************************************/ -void APP_CC +void list_dump_items(struct list *self) { int index; diff --git a/common/list.h b/common/list.h index 146aab11..b3c9ef13 100644 --- a/common/list.h +++ b/common/list.h @@ -33,25 +33,25 @@ struct list int auto_free; }; -struct list* APP_CC +struct list* list_create(void); -void APP_CC +void list_delete(struct list* self); -void APP_CC +void list_add_item(struct list* self, tintptr item); -tintptr APP_CC +tintptr list_get_item(const struct list *self, int index); -void APP_CC +void list_clear(struct list* self); -int APP_CC +int list_index_of(struct list* self, tintptr item); -void APP_CC +void list_remove_item(struct list* self, int index); -void APP_CC +void list_insert_item(struct list* self, int index, tintptr item); -void APP_CC +void list_append_list_strdup(struct list* self, struct list* dest, int start_index); -void APP_CC +void list_dump_items(struct list* self); #endif diff --git a/common/list16.c b/common/list16.c index 7ed4a169..8e548f71 100644 --- a/common/list16.c +++ b/common/list16.c @@ -27,7 +27,7 @@ #include "list16.h" /*****************************************************************************/ -struct list16 *APP_CC +struct list16 * list16_create(void) { struct list16 *self; @@ -38,7 +38,7 @@ list16_create(void) } /*****************************************************************************/ -void APP_CC +void list16_delete(struct list16 *self) { if (self == 0) @@ -51,7 +51,7 @@ list16_delete(struct list16 *self) } /*****************************************************************************/ -void APP_CC +void list16_init(struct list16* self) { g_memset(self, 0, sizeof(struct list16)); @@ -60,7 +60,7 @@ list16_init(struct list16* self) } /*****************************************************************************/ -void APP_CC +void list16_deinit(struct list16* self) { if (self->items != self->mitems) @@ -70,7 +70,7 @@ list16_deinit(struct list16* self) } /*****************************************************************************/ -void APP_CC +void list16_add_item(struct list16 *self, tui16 item) { tui16 *p; @@ -94,7 +94,7 @@ list16_add_item(struct list16 *self, tui16 item) } /*****************************************************************************/ -tui16 APP_CC +tui16 list16_get_item(struct list16 *self, int index) { if (index < 0 || index >= self->count) @@ -106,7 +106,7 @@ list16_get_item(struct list16 *self, int index) } /*****************************************************************************/ -void APP_CC +void list16_clear(struct list16 *self) { if (self->items != self->mitems) @@ -119,7 +119,7 @@ list16_clear(struct list16 *self) } /*****************************************************************************/ -int APP_CC +int list16_index_of(struct list16 *self, tui16 item) { int i; @@ -136,7 +136,7 @@ list16_index_of(struct list16 *self, tui16 item) } /*****************************************************************************/ -void APP_CC +void list16_remove_item(struct list16 *self, int index) { int i; @@ -153,7 +153,7 @@ list16_remove_item(struct list16 *self, int index) } /*****************************************************************************/ -void APP_CC +void list16_insert_item(struct list16 *self, int index, tui16 item) { tui16 *p; diff --git a/common/list16.h b/common/list16.h index 1a328ea7..fbe36e1d 100644 --- a/common/list16.h +++ b/common/list16.h @@ -32,25 +32,25 @@ struct list16 tui16 mitems[4]; }; -struct list16* APP_CC +struct list16* list16_create(void); -void APP_CC +void list16_delete(struct list16* self); -void APP_CC +void list16_init(struct list16* self); -void APP_CC +void list16_deinit(struct list16* self); -void APP_CC +void list16_add_item(struct list16* self, tui16 item); -tui16 APP_CC +tui16 list16_get_item(struct list16* self, int index); -void APP_CC +void list16_clear(struct list16* self); -int APP_CC +int list16_index_of(struct list16* self, tui16 item); -void APP_CC +void list16_remove_item(struct list16* self, int index); -void APP_CC +void list16_insert_item(struct list16* self, int index, tui16 item); #endif diff --git a/common/log.c b/common/log.c index e8e64f2f..29904fe5 100644 --- a/common/log.c +++ b/common/log.c @@ -52,7 +52,7 @@ static struct log_config *g_staticLogConfig = NULL; * @return see open(2) return values * */ -int DEFAULT_CC +int internal_log_file_open(const char *fname) { int ret = -1; @@ -80,7 +80,7 @@ internal_log_file_open(const char *fname) * @return syslog equivalent logging level * */ -int DEFAULT_CC +int internal_log_xrdp2syslog(const enum logLevels lvl) { switch (lvl) @@ -108,7 +108,7 @@ internal_log_xrdp2syslog(const enum logLevels lvl) * @return The log string in str pointer. * */ -void DEFAULT_CC +void internal_log_lvl2str(const enum logLevels lvl, char *str) { switch (lvl) @@ -135,7 +135,7 @@ internal_log_lvl2str(const enum logLevels lvl, char *str) } /******************************************************************************/ -enum logReturns DEFAULT_CC +enum logReturns internal_log_start(struct log_config *l_cfg) { enum logReturns ret = LOG_GENERAL_ERROR; @@ -183,7 +183,7 @@ internal_log_start(struct log_config *l_cfg) } /******************************************************************************/ -enum logReturns DEFAULT_CC +enum logReturns internal_log_end(struct log_config *l_cfg) { enum logReturns ret = LOG_GENERAL_ERROR; @@ -225,7 +225,7 @@ internal_log_end(struct log_config *l_cfg) * @param buf * @return */ -enum logLevels DEFAULT_CC +enum logLevels internal_log_text2level(const char *buf) { if (0 == g_strcasecmp(buf, "0") || @@ -259,7 +259,7 @@ internal_log_text2level(const char *buf) return LOG_LEVEL_DEBUG; } -enum logReturns DEFAULT_CC +enum logReturns internalReadConfiguration(const char *inFilename, const char *applicationName) { int fd; @@ -320,7 +320,7 @@ internalReadConfiguration(const char *inFilename, const char *applicationName) } /******************************************************************************/ -enum logReturns DEFAULT_CC +enum logReturns internal_config_read_logging(int file, struct log_config *lc, struct list *param_n, struct list *param_v, @@ -395,7 +395,7 @@ internal_config_read_logging(int file, struct log_config *lc, return LOG_STARTUP_OK; } -enum logReturns DEFAULT_CC +enum logReturns internalInitAndAllocStruct(void) { enum logReturns ret = LOG_GENERAL_ERROR; @@ -420,7 +420,7 @@ internalInitAndAllocStruct(void) * Here below the public functions */ -enum logReturns DEFAULT_CC +enum logReturns log_start_from_param(const struct log_config *iniParams) { enum logReturns ret = LOG_GENERAL_ERROR; @@ -479,7 +479,7 @@ log_start_from_param(const struct log_config *iniParams) * @param applicationName, the name that is used in the log for the running application * @return 0 on success */ -enum logReturns DEFAULT_CC +enum logReturns log_start(const char *iniFile, const char *applicationName) { enum logReturns ret = LOG_GENERAL_ERROR; @@ -520,7 +520,7 @@ log_start(const char *iniFile, const char *applicationName) * Function that terminates all logging * @return */ -enum logReturns DEFAULT_CC +enum logReturns log_end(void) { enum logReturns ret = LOG_GENERAL_ERROR; @@ -535,7 +535,7 @@ log_end(void) return ret; } -enum logReturns DEFAULT_CC +enum logReturns log_message(const enum logLevels lvl, const char *msg, ...) { char buff[LOG_BUFFER_SIZE + 31]; /* 19 (datetime) 4 (space+cr+lf+\0) */ @@ -631,7 +631,7 @@ log_message(const enum logLevels lvl, const char *msg, ...) * Return the configured log file name * @return */ -char *DEFAULT_CC +char * getLogFile(char *replybuf, int bufsize) { if (g_staticLogConfig) diff --git a/common/log.h b/common/log.h index d1552ccb..bd5852eb 100644 --- a/common/log.h +++ b/common/log.h @@ -85,7 +85,7 @@ struct log_config * @return * */ -enum logReturns DEFAULT_CC +enum logReturns internal_log_start(struct log_config *l_cfg); /** @@ -94,7 +94,7 @@ internal_log_start(struct log_config *l_cfg); * @param l_cfg pointer to the logging subsystem to stop * */ -enum logReturns DEFAULT_CC +enum logReturns internal_log_end(struct log_config *l_cfg); /** @@ -102,7 +102,7 @@ internal_log_end(struct log_config *l_cfg); * @param lvl, the loglevel * @param str pointer where the string will be stored. */ -void DEFAULT_CC +void internal_log_lvl2str(const enum logLevels lvl, char *str); /** @@ -112,7 +112,7 @@ internal_log_lvl2str(const enum logLevels lvl, char *str); * @return The corresponding level or LOG_LEVEL_DEBUG if error * */ -enum logLevels DEFAULT_CC +enum logLevels internal_log_text2level(const char *s); /** @@ -120,7 +120,7 @@ internal_log_text2level(const char *s); * also init its content. * @return LOG_STARTUP_OK or LOG_ERROR_MALLOC */ -enum logReturns DEFAULT_CC +enum logReturns internalInitAndAllocStruct(void); /** @@ -132,7 +132,7 @@ internalInitAndAllocStruct(void); * @param applicationName, the application name used in the log events. * @return */ -enum logReturns DEFAULT_CC +enum logReturns internal_config_read_logging(int file, struct log_config *lc, struct list *param_n, struct list *param_v, @@ -146,7 +146,7 @@ internal_config_read_logging(int file, struct log_config *lc, * @param applicationName, the name that is used in the log for the running application * @return LOG_STARTUP_OK on success */ -enum logReturns DEFAULT_CC +enum logReturns log_start(const char *iniFile, const char *applicationName); /** @@ -154,13 +154,13 @@ log_start(const char *iniFile, const char *applicationName); * @param iniParams * @return */ -enum logReturns DEFAULT_CC +enum logReturns log_start_from_param(const struct log_config *iniParams); /** * Function that terminates all logging * @return */ -enum logReturns DEFAULT_CC +enum logReturns log_end(void); /** @@ -170,7 +170,7 @@ log_end(void); * @param ... * @return */ -enum logReturns DEFAULT_CC +enum logReturns log_message(const enum logLevels lvl, const char *msg, ...) printflike(2, 3); /** diff --git a/common/os_calls.c b/common/os_calls.c index 76685a40..f85e5d2e 100644 --- a/common/os_calls.c +++ b/common/os_calls.c @@ -101,14 +101,14 @@ extern char **environ; #endif /*****************************************************************************/ -int APP_CC +int g_rm_temp_dir(void) { return 0; } /*****************************************************************************/ -int APP_CC +int g_mk_temp_dir(const char *app_name) { if (!g_directory_exist("/tmp/.xrdp")) @@ -128,7 +128,7 @@ g_mk_temp_dir(const char *app_name) } /*****************************************************************************/ -void APP_CC +void g_init(const char *app_name) { #if defined(_WIN32) @@ -155,7 +155,7 @@ g_init(const char *app_name) } /*****************************************************************************/ -void APP_CC +void g_deinit(void) { #if defined(_WIN32) @@ -167,7 +167,7 @@ g_deinit(void) /*****************************************************************************/ /* allocate memory, returns a pointer to it, size bytes are allocated, if zero is non zero, each byte will be set to zero */ -void *APP_CC +void * g_malloc(int size, int zero) { char *rv; @@ -187,7 +187,7 @@ g_malloc(int size, int zero) /*****************************************************************************/ /* free the memory pointed to by ptr, ptr can be zero */ -void APP_CC +void g_free(void *ptr) { if (ptr != 0) @@ -199,7 +199,7 @@ g_free(void *ptr) /*****************************************************************************/ /* output text to stdout, try to use g_write / g_writeln instead to avoid linux / windows EOL problems */ -void DEFAULT_CC +void g_printf(const char *format, ...) { va_list ap; @@ -210,7 +210,7 @@ g_printf(const char *format, ...) } /*****************************************************************************/ -void DEFAULT_CC +void g_sprintf(char *dest, const char *format, ...) { va_list ap; @@ -221,7 +221,7 @@ g_sprintf(char *dest, const char *format, ...) } /*****************************************************************************/ -int DEFAULT_CC +int g_snprintf(char *dest, int len, const char *format, ...) { int err; @@ -235,7 +235,7 @@ g_snprintf(char *dest, int len, const char *format, ...) } /*****************************************************************************/ -void DEFAULT_CC +void g_writeln(const char *format, ...) { va_list ap; @@ -251,7 +251,7 @@ g_writeln(const char *format, ...) } /*****************************************************************************/ -void DEFAULT_CC +void g_write(const char *format, ...) { va_list ap; @@ -263,7 +263,7 @@ g_write(const char *format, ...) /*****************************************************************************/ /* produce a hex dump */ -void APP_CC +void g_hexdump(const char *p, int len) { unsigned char *line; @@ -306,21 +306,21 @@ g_hexdump(const char *p, int len) } /*****************************************************************************/ -void APP_CC +void g_memset(void *ptr, int val, int size) { memset(ptr, val, size); } /*****************************************************************************/ -void APP_CC +void g_memcpy(void *d_ptr, const void *s_ptr, int size) { memcpy(d_ptr, s_ptr, size); } /*****************************************************************************/ -int APP_CC +int g_getchar(void) { return getchar(); @@ -328,7 +328,7 @@ g_getchar(void) /*****************************************************************************/ /*Returns 0 on success*/ -int APP_CC +int g_tcp_set_no_delay(int sck) { int ret = 1; /* error */ @@ -367,7 +367,7 @@ g_tcp_set_no_delay(int sck) /*****************************************************************************/ /*Returns 0 on success*/ -int APP_CC +int g_tcp_set_keepalive(int sck) { int ret = 1; /* error */ @@ -407,7 +407,7 @@ g_tcp_set_keepalive(int sck) /*****************************************************************************/ /* returns a newly created socket or -1 on error */ /* in win32 a socket is an unsigned int, in linux, it's an int */ -int APP_CC +int g_tcp_socket(void) { int rv; @@ -498,7 +498,7 @@ g_tcp_socket(void) /*****************************************************************************/ /* returns error */ -int APP_CC +int g_sck_set_send_buffer_bytes(int sck, int bytes) { int option_value; @@ -516,7 +516,7 @@ g_sck_set_send_buffer_bytes(int sck, int bytes) /*****************************************************************************/ /* returns error */ -int APP_CC +int g_sck_get_send_buffer_bytes(int sck, int *bytes) { int option_value; @@ -535,7 +535,7 @@ g_sck_get_send_buffer_bytes(int sck, int *bytes) /*****************************************************************************/ /* returns error */ -int APP_CC +int g_sck_set_recv_buffer_bytes(int sck, int bytes) { int option_value; @@ -553,7 +553,7 @@ g_sck_set_recv_buffer_bytes(int sck, int bytes) /*****************************************************************************/ /* returns error */ -int APP_CC +int g_sck_get_recv_buffer_bytes(int sck, int *bytes) { int option_value; @@ -571,7 +571,7 @@ g_sck_get_recv_buffer_bytes(int sck, int *bytes) } /*****************************************************************************/ -int APP_CC +int g_sck_local_socket(void) { #if defined(_WIN32) @@ -583,7 +583,7 @@ g_sck_local_socket(void) /*****************************************************************************/ /* returns error */ -int APP_CC +int g_sck_get_peer_cred(int sck, int *pid, int *uid, int *gid) { #if defined(SO_PEERCRED) @@ -641,7 +641,7 @@ g_sck_get_peer_cred(int sck, int *pid, int *uid, int *gid) } /*****************************************************************************/ -void APP_CC +void g_sck_close(int sck) { #if defined(_WIN32) @@ -729,7 +729,7 @@ g_sck_close(int sck) /*****************************************************************************/ /* returns error, zero is good */ #if defined(XRDP_ENABLE_IPV6) -int APP_CC +int g_tcp_connect(int sck, const char *address, const char *port) { int res = 0; @@ -789,7 +789,7 @@ g_tcp_connect(int sck, const char *address, const char *port) return res; } #else -int APP_CC +int g_tcp_connect(int sck, const char* address, const char* port) { struct sockaddr_in s; @@ -831,7 +831,7 @@ g_tcp_connect(int sck, const char* address, const char* port) /*****************************************************************************/ /* returns error, zero is good */ -int APP_CC +int g_sck_local_connect(int sck, const char *port) { #if defined(_WIN32) @@ -849,7 +849,7 @@ g_sck_local_connect(int sck, const char *port) } /*****************************************************************************/ -int APP_CC +int g_sck_set_non_blocking(int sck) { unsigned long i; @@ -871,7 +871,7 @@ g_sck_set_non_blocking(int sck) #if defined(XRDP_ENABLE_IPV6) /*****************************************************************************/ /* return boolean */ -static int APP_CC +static int address_match(const char *address, struct addrinfo *j) { struct sockaddr_in *ipv4_in; @@ -939,7 +939,7 @@ address_match(const char *address, struct addrinfo *j) #if defined(XRDP_ENABLE_IPV6) /*****************************************************************************/ /* returns error, zero is good */ -static int APP_CC +static int g_tcp_bind_flags(int sck, const char *port, const char *address, int flags) { int res; @@ -970,7 +970,7 @@ g_tcp_bind_flags(int sck, const char *port, const char *address, int flags) /*****************************************************************************/ /* returns error, zero is good */ -int APP_CC +int g_tcp_bind(int sck, const char *port) { int flags; @@ -979,7 +979,7 @@ g_tcp_bind(int sck, const char *port) return g_tcp_bind_flags(sck, port, 0, flags); } #else -int APP_CC +int g_tcp_bind(int sck, const char* port) { struct sockaddr_in s; @@ -993,7 +993,7 @@ g_tcp_bind(int sck, const char* port) #endif /*****************************************************************************/ -int APP_CC +int g_sck_local_bind(int sck, const char *port) { #if defined(_WIN32) @@ -1013,7 +1013,7 @@ g_sck_local_bind(int sck, const char *port) #if defined(XRDP_ENABLE_IPV6) /*****************************************************************************/ /* returns error, zero is good */ -int APP_CC +int g_tcp_bind_address(int sck, const char *port, const char *address) { int flags; @@ -1022,7 +1022,7 @@ g_tcp_bind_address(int sck, const char *port, const char *address) return g_tcp_bind_flags(sck, port, address, flags); } #else -int APP_CC +int g_tcp_bind_address(int sck, const char* port, const char* address) { struct sockaddr_in s; @@ -1041,14 +1041,14 @@ g_tcp_bind_address(int sck, const char* port, const char* address) /*****************************************************************************/ /* returns error, zero is good */ -int APP_CC +int g_sck_listen(int sck) { return listen(sck, 2); } /*****************************************************************************/ -int APP_CC +int g_tcp_accept(int sck) { int ret; @@ -1108,7 +1108,7 @@ g_tcp_accept(int sck) } /*****************************************************************************/ -int APP_CC +int g_sck_accept(int sck, char *addr, int addr_bytes, char *port, int port_bytes) { int ret; @@ -1175,7 +1175,7 @@ g_sck_accept(int sck, char *addr, int addr_bytes, char *port, int port_bytes) } /*****************************************************************************/ -void APP_CC +void g_write_ip_address(int rcv_sck, char *ip_address, int bytes) { struct sockaddr_in s; @@ -1209,7 +1209,7 @@ g_write_ip_address(int rcv_sck, char *ip_address, int bytes) } /*****************************************************************************/ -void APP_CC +void g_sleep(int msecs) { #if defined(_WIN32) @@ -1220,7 +1220,7 @@ g_sleep(int msecs) } /*****************************************************************************/ -int APP_CC +int g_sck_last_error_would_block(int sck) { #if defined(_WIN32) @@ -1231,7 +1231,7 @@ g_sck_last_error_would_block(int sck) } /*****************************************************************************/ -int APP_CC +int g_sck_recv(int sck, void *ptr, int len, int flags) { #if defined(_WIN32) @@ -1242,7 +1242,7 @@ g_sck_recv(int sck, void *ptr, int len, int flags) } /*****************************************************************************/ -int APP_CC +int g_sck_send(int sck, const void *ptr, int len, int flags) { #if defined(_WIN32) @@ -1254,7 +1254,7 @@ g_sck_send(int sck, const void *ptr, int len, int flags) /*****************************************************************************/ /* returns boolean */ -int APP_CC +int g_sck_socket_ok(int sck) { int opt; @@ -1276,7 +1276,7 @@ g_sck_socket_ok(int sck) /*****************************************************************************/ /* wait 'millis' milliseconds for the socket to be able to write */ /* returns boolean */ -int APP_CC +int g_sck_can_send(int sck, int millis) { fd_set wfds; @@ -1304,7 +1304,7 @@ g_sck_can_send(int sck, int millis) /*****************************************************************************/ /* wait 'millis' milliseconds for the socket to be able to receive */ /* returns boolean */ -int APP_CC +int g_sck_can_recv(int sck, int millis) { fd_set rfds; @@ -1331,7 +1331,7 @@ g_sck_can_recv(int sck, int millis) } /*****************************************************************************/ -int APP_CC +int g_sck_select(int sck1, int sck2) { fd_set rfds; @@ -1385,7 +1385,7 @@ g_sck_select(int sck1, int sck2) /*****************************************************************************/ /* returns boolean */ -static int APP_CC +static int g_fd_can_read(int fd) { fd_set rfds; @@ -1406,7 +1406,7 @@ g_fd_can_read(int fd) /*****************************************************************************/ /* returns error */ /* O_NONBLOCK = 0x00000800 */ -static int APP_CC +static int g_set_nonblock(int fd) { int error; @@ -1432,7 +1432,7 @@ g_set_nonblock(int fd) /*****************************************************************************/ /* returns 0 on error */ -tintptr APP_CC +tintptr g_create_wait_obj(const char *name) { #ifdef _WIN32 @@ -1467,7 +1467,7 @@ g_create_wait_obj(const char *name) /*****************************************************************************/ /* returns 0 on error */ -tintptr APP_CC +tintptr g_create_wait_obj_from_socket(tintptr socket, int write) { #ifdef _WIN32 @@ -1495,7 +1495,7 @@ g_create_wait_obj_from_socket(tintptr socket, int write) } /*****************************************************************************/ -void APP_CC +void g_delete_wait_obj_from_socket(tintptr wait_obj) { #ifdef _WIN32 @@ -1512,7 +1512,7 @@ g_delete_wait_obj_from_socket(tintptr wait_obj) /*****************************************************************************/ /* returns error */ -int APP_CC +int g_set_wait_obj(tintptr obj) { #ifdef _WIN32 @@ -1573,7 +1573,7 @@ g_set_wait_obj(tintptr obj) /*****************************************************************************/ /* returns error */ -int APP_CC +int g_reset_wait_obj(tintptr obj) { #ifdef _WIN32 @@ -1620,7 +1620,7 @@ g_reset_wait_obj(tintptr obj) /*****************************************************************************/ /* returns boolean */ -int APP_CC +int g_is_wait_obj_set(tintptr obj) { #ifdef _WIN32 @@ -1644,7 +1644,7 @@ g_is_wait_obj_set(tintptr obj) /*****************************************************************************/ /* returns error */ -int APP_CC +int g_delete_wait_obj(tintptr obj) { #ifdef _WIN32 @@ -1668,7 +1668,7 @@ g_delete_wait_obj(tintptr obj) /*****************************************************************************/ /* returns error */ -int APP_CC +int g_obj_wait(tintptr *read_objs, int rcount, tintptr *write_objs, int wcount, int mstimeout) { @@ -1799,7 +1799,7 @@ g_obj_wait(tintptr *read_objs, int rcount, tintptr *write_objs, int wcount, } /*****************************************************************************/ -void APP_CC +void g_random(char *data, int len) { #if defined(_WIN32) @@ -1837,14 +1837,14 @@ g_random(char *data, int len) } /*****************************************************************************/ -int APP_CC +int g_abs(int i) { return abs(i); } /*****************************************************************************/ -int APP_CC +int g_memcmp(const void *s1, const void *s2, int len) { return memcmp(s1, s2, len); @@ -1852,7 +1852,7 @@ g_memcmp(const void *s1, const void *s2, int len) /*****************************************************************************/ /* returns -1 on error, else return handle or file descriptor */ -int APP_CC +int g_file_open(const char *file_name) { #if defined(_WIN32) @@ -1876,7 +1876,7 @@ g_file_open(const char *file_name) /*****************************************************************************/ /* returns -1 on error, else return handle or file descriptor */ -int APP_CC +int g_file_open_ex(const char *file_name, int aread, int awrite, int acreate, int atrunc) { @@ -1914,7 +1914,7 @@ g_file_open_ex(const char *file_name, int aread, int awrite, /*****************************************************************************/ /* returns error, always 0 */ -int APP_CC +int g_file_close(int fd) { #if defined(_WIN32) @@ -1927,7 +1927,7 @@ g_file_close(int fd) /*****************************************************************************/ /* read from file, returns the number of bytes read or -1 on error */ -int APP_CC +int g_file_read(int fd, char *ptr, int len) { #if defined(_WIN32) @@ -1948,7 +1948,7 @@ g_file_read(int fd, char *ptr, int len) /*****************************************************************************/ /* write to file, returns the number of bytes written or -1 on error */ -int APP_CC +int g_file_write(int fd, const char *ptr, int len) { #if defined(_WIN32) @@ -1969,7 +1969,7 @@ g_file_write(int fd, const char *ptr, int len) /*****************************************************************************/ /* move file pointer, returns offset on success, -1 on failure */ -int APP_CC +int g_file_seek(int fd, int offset) { #if defined(_WIN32) @@ -1994,7 +1994,7 @@ g_file_seek(int fd, int offset) /*****************************************************************************/ /* do a write lock on a file */ /* return boolean */ -int APP_CC +int g_file_lock(int fd, int start, int len) { #if defined(_WIN32) @@ -2018,7 +2018,7 @@ g_file_lock(int fd, int start, int len) /*****************************************************************************/ /* returns error */ -int APP_CC +int g_chmod_hex(const char *filename, int flags) { #if defined(_WIN32) @@ -2045,7 +2045,7 @@ g_chmod_hex(const char *filename, int flags) /*****************************************************************************/ /* returns error, zero is ok */ -int APP_CC +int g_chown(const char *name, int uid, int gid) { return chown(name, uid, gid); @@ -2053,7 +2053,7 @@ g_chown(const char *name, int uid, int gid) /*****************************************************************************/ /* returns error, always zero */ -int APP_CC +int g_mkdir(const char *dirname) { #if defined(_WIN32) @@ -2067,7 +2067,7 @@ g_mkdir(const char *dirname) /* gets the current working directory and puts up to maxlen chars in dirname always returns 0 */ -char *APP_CC +char * g_get_current_dir(char *dirname, int maxlen) { #if defined(_WIN32) @@ -2085,7 +2085,7 @@ g_get_current_dir(char *dirname, int maxlen) /*****************************************************************************/ /* returns error, zero on success and -1 on failure */ -int APP_CC +int g_set_current_dir(const char *dirname) { #if defined(_WIN32) @@ -2106,7 +2106,7 @@ g_set_current_dir(const char *dirname) /*****************************************************************************/ /* returns boolean, non zero if the file exists */ -int APP_CC +int g_file_exist(const char *filename) { #if defined(_WIN32) @@ -2118,7 +2118,7 @@ g_file_exist(const char *filename) /*****************************************************************************/ /* returns boolean, non zero if the directory exists */ -int APP_CC +int g_directory_exist(const char *dirname) { #if defined(_WIN32) @@ -2141,7 +2141,7 @@ g_directory_exist(const char *dirname) /*****************************************************************************/ /* returns boolean */ -int APP_CC +int g_create_dir(const char *dirname) { #if defined(_WIN32) @@ -2155,7 +2155,7 @@ g_create_dir(const char *dirname) /* will try to create directories up to last / in name example /tmp/a/b/c/readme.txt will try to create /tmp/a/b/c returns boolean */ -int APP_CC +int g_create_path(const char *path) { char *pp; @@ -2196,7 +2196,7 @@ g_create_path(const char *path) /*****************************************************************************/ /* returns boolean */ -int APP_CC +int g_remove_dir(const char *dirname) { #if defined(_WIN32) @@ -2208,7 +2208,7 @@ g_remove_dir(const char *dirname) /*****************************************************************************/ /* returns non zero if the file was deleted */ -int APP_CC +int g_file_delete(const char *filename) { #if defined(_WIN32) @@ -2220,7 +2220,7 @@ g_file_delete(const char *filename) /*****************************************************************************/ /* returns file size, -1 on error */ -int APP_CC +int g_file_get_size(const char *filename) { #if defined(_WIN32) @@ -2242,7 +2242,7 @@ g_file_get_size(const char *filename) /*****************************************************************************/ /* returns length of text */ -int APP_CC +int g_strlen(const char *text) { if (text == NULL) @@ -2255,7 +2255,7 @@ g_strlen(const char *text) /*****************************************************************************/ /* locates char in text */ -const char *APP_CC +const char * g_strchr(const char* text, int c) { if (text == NULL) @@ -2268,7 +2268,7 @@ g_strchr(const char* text, int c) /*****************************************************************************/ /* returns dest */ -char *APP_CC +char * g_strcpy(char *dest, const char *src) { if (src == 0 && dest != 0) @@ -2287,7 +2287,7 @@ g_strcpy(char *dest, const char *src) /*****************************************************************************/ /* returns dest */ -char *APP_CC +char * g_strncpy(char *dest, const char *src, int len) { char *rv; @@ -2310,7 +2310,7 @@ g_strncpy(char *dest, const char *src, int len) /*****************************************************************************/ /* returns dest */ -char *APP_CC +char * g_strcat(char *dest, const char *src) { if (dest == 0 || src == 0) @@ -2323,7 +2323,7 @@ g_strcat(char *dest, const char *src) /*****************************************************************************/ /* if in = 0, return 0 else return newly alloced copy of in */ -char *APP_CC +char * g_strdup(const char *in) { int len; @@ -2349,7 +2349,7 @@ g_strdup(const char *in) /* if in = 0, return 0 else return newly alloced copy of input string * if the input string is larger than maxlen the returned string will be * truncated. All strings returned will include null termination*/ -char *APP_CC +char * g_strndup(const char *in, const unsigned int maxlen) { unsigned int len; @@ -2378,14 +2378,14 @@ g_strndup(const char *in, const unsigned int maxlen) } /*****************************************************************************/ -int APP_CC +int g_strcmp(const char *c1, const char *c2) { return strcmp(c1, c2); } /*****************************************************************************/ -int APP_CC +int g_strncmp(const char *c1, const char *c2, int len) { return strncmp(c1, c2, len); @@ -2393,7 +2393,7 @@ g_strncmp(const char *c1, const char *c2, int len) /*****************************************************************************/ /* compare up to delim */ -int APP_CC +int g_strncmp_d(const char *s1, const char *s2, const char delim, int n) { char c1; @@ -2415,7 +2415,7 @@ g_strncmp_d(const char *s1, const char *s2, const char delim, int n) } /*****************************************************************************/ -int APP_CC +int g_strcasecmp(const char *c1, const char *c2) { #if defined(_WIN32) @@ -2426,7 +2426,7 @@ g_strcasecmp(const char *c1, const char *c2) } /*****************************************************************************/ -int APP_CC +int g_strncasecmp(const char *c1, const char *c2, int len) { #if defined(_WIN32) @@ -2437,7 +2437,7 @@ g_strncasecmp(const char *c1, const char *c2, int len) } /*****************************************************************************/ -int APP_CC +int g_atoi(const char *str) { if (str == 0) @@ -2449,7 +2449,7 @@ g_atoi(const char *str) } /*****************************************************************************/ -int APP_CC +int g_htoi(char *str) { int len; @@ -2532,7 +2532,7 @@ g_htoi(char *str) /*****************************************************************************/ /* returns number of bytes copied into out_str */ -int APP_CC +int g_bytes_to_hexstr(const void *bytes, int num_bytes, char *out_str, int bytes_out_str) { @@ -2559,7 +2559,7 @@ g_bytes_to_hexstr(const void *bytes, int num_bytes, char *out_str, } /*****************************************************************************/ -int APP_CC +int g_pos(const char *str, const char *to_find) { const char *pp; @@ -2575,7 +2575,7 @@ g_pos(const char *str, const char *to_find) } /*****************************************************************************/ -int APP_CC +int g_mbstowcs(twchar *dest, const char *src, int n) { wchar_t *ldest; @@ -2587,7 +2587,7 @@ g_mbstowcs(twchar *dest, const char *src, int n) } /*****************************************************************************/ -int APP_CC +int g_wcstombs(char *dest, const twchar *src, int n) { const wchar_t *lsrc; @@ -2603,7 +2603,7 @@ g_wcstombs(char *dest, const twchar *src, int n) /* trim spaces and tabs, anything <= space */ /* trim_flags 1 trim left, 2 trim right, 3 trim both, 4 trim through */ /* this will always shorten the string or not change it */ -int APP_CC +int g_strtrim(char *str, int trim_flags) { int index; @@ -2734,7 +2734,7 @@ g_strtrim(char *str, int trim_flags) } /*****************************************************************************/ -long APP_CC +long g_load_library(char *in) { #if defined(_WIN32) @@ -2745,7 +2745,7 @@ g_load_library(char *in) } /*****************************************************************************/ -int APP_CC +int g_free_library(long lib) { if (lib == 0) @@ -2762,7 +2762,7 @@ g_free_library(long lib) /*****************************************************************************/ /* returns NULL if not found */ -void *APP_CC +void * g_get_proc_address(long lib, const char *name) { if (lib == 0) @@ -2779,7 +2779,7 @@ g_get_proc_address(long lib, const char *name) /*****************************************************************************/ /* does not work in win32 */ -int APP_CC +int g_system(char *aexec) { #if defined(_WIN32) @@ -2791,7 +2791,7 @@ g_system(char *aexec) /*****************************************************************************/ /* does not work in win32 */ -char *APP_CC +char * g_get_strerror(void) { #if defined(_WIN32) @@ -2802,7 +2802,7 @@ g_get_strerror(void) } /*****************************************************************************/ -int APP_CC +int g_get_errno(void) { #if defined(_WIN32) @@ -2814,7 +2814,7 @@ g_get_errno(void) /*****************************************************************************/ /* does not work in win32 */ -int APP_CC +int g_execvp(const char *p1, char *args[]) { #if defined(_WIN32) @@ -2831,7 +2831,7 @@ g_execvp(const char *p1, char *args[]) /*****************************************************************************/ /* does not work in win32 */ -int APP_CC +int g_execlp3(const char *a1, const char *a2, const char *a3) { #if defined(_WIN32) @@ -2848,7 +2848,7 @@ g_execlp3(const char *a1, const char *a2, const char *a3) /*****************************************************************************/ /* does not work in win32 */ -void APP_CC +void g_signal_child_stop(void (*func)(int)) { #if defined(_WIN32) @@ -2859,7 +2859,7 @@ g_signal_child_stop(void (*func)(int)) /*****************************************************************************/ -void APP_CC +void g_signal_segfault(void (*func)(int)) { #if defined(_WIN32) @@ -2870,7 +2870,7 @@ g_signal_segfault(void (*func)(int)) /*****************************************************************************/ /* does not work in win32 */ -void APP_CC +void g_signal_hang_up(void (*func)(int)) { #if defined(_WIN32) @@ -2881,7 +2881,7 @@ g_signal_hang_up(void (*func)(int)) /*****************************************************************************/ /* does not work in win32 */ -void APP_CC +void g_signal_user_interrupt(void (*func)(int)) { #if defined(_WIN32) @@ -2892,7 +2892,7 @@ g_signal_user_interrupt(void (*func)(int)) /*****************************************************************************/ /* does not work in win32 */ -void APP_CC +void g_signal_terminate(void (*func)(int)) { #if defined(_WIN32) @@ -2903,7 +2903,7 @@ g_signal_terminate(void (*func)(int)) /*****************************************************************************/ /* does not work in win32 */ -void APP_CC +void g_signal_pipe(void (*func)(int)) { #if defined(_WIN32) @@ -2914,7 +2914,7 @@ g_signal_pipe(void (*func)(int)) /*****************************************************************************/ /* does not work in win32 */ -void APP_CC +void g_signal_usr1(void (*func)(int)) { #if defined(_WIN32) @@ -2925,7 +2925,7 @@ g_signal_usr1(void (*func)(int)) /*****************************************************************************/ /* does not work in win32 */ -int APP_CC +int g_fork(void) { #if defined(_WIN32) @@ -2946,7 +2946,7 @@ g_fork(void) /*****************************************************************************/ /* does not work in win32 */ -int APP_CC +int g_setgid(int pid) { #if defined(_WIN32) @@ -2959,7 +2959,7 @@ g_setgid(int pid) /*****************************************************************************/ /* returns error, zero is success, non zero is error */ /* does not work in win32 */ -int APP_CC +int g_initgroups(const char *user, int gid) { #if defined(_WIN32) @@ -2972,7 +2972,7 @@ g_initgroups(const char *user, int gid) /*****************************************************************************/ /* does not work in win32 */ /* returns user id */ -int APP_CC +int g_getuid(void) { #if defined(_WIN32) @@ -2985,7 +2985,7 @@ g_getuid(void) /*****************************************************************************/ /* does not work in win32 */ /* returns user id */ -int APP_CC +int g_getgid(void) { #if defined(_WIN32) @@ -2998,7 +2998,7 @@ g_getgid(void) /*****************************************************************************/ /* does not work in win32 */ /* On success, zero is returned. On error, -1 is returned */ -int APP_CC +int g_setuid(int pid) { #if defined(_WIN32) @@ -3009,7 +3009,7 @@ g_setuid(int pid) } /*****************************************************************************/ -int APP_CC +int g_setsid(void) { #if defined(_WIN32) @@ -3020,7 +3020,7 @@ g_setsid(void) } /*****************************************************************************/ -int APP_CC +int g_setlogin(const char *name) { #ifdef BSD @@ -3033,7 +3033,7 @@ g_setlogin(const char *name) /*****************************************************************************/ /* does not work in win32 returns pid of process that exits or zero if signal occurred */ -int APP_CC +int g_waitchild(void) { #if defined(_WIN32) @@ -3059,7 +3059,7 @@ g_waitchild(void) /*****************************************************************************/ /* does not work in win32 returns pid of process that exits or zero if signal occurred */ -int APP_CC +int g_waitpid(int pid) { #if defined(_WIN32) @@ -3090,7 +3090,7 @@ g_waitpid(int pid) /*****************************************************************************/ /* does not work in win32 */ -void APP_CC +void g_clearenv(void) { #if defined(_WIN32) @@ -3105,7 +3105,7 @@ g_clearenv(void) /*****************************************************************************/ /* does not work in win32 */ -int APP_CC +int g_setenv(const char *name, const char *value, int rewrite) { #if defined(_WIN32) @@ -3117,7 +3117,7 @@ g_setenv(const char *name, const char *value, int rewrite) /*****************************************************************************/ /* does not work in win32 */ -char *APP_CC +char * g_getenv(const char *name) { #if defined(_WIN32) @@ -3128,7 +3128,7 @@ g_getenv(const char *name) } /*****************************************************************************/ -int APP_CC +int g_exit(int exit_code) { _exit(exit_code); @@ -3136,7 +3136,7 @@ g_exit(int exit_code) } /*****************************************************************************/ -int APP_CC +int g_getpid(void) { #if defined(_WIN32) @@ -3148,7 +3148,7 @@ g_getpid(void) /*****************************************************************************/ /* does not work in win32 */ -int APP_CC +int g_sigterm(int pid) { #if defined(_WIN32) @@ -3162,7 +3162,7 @@ g_sigterm(int pid) /* returns 0 if ok */ /* the caller is responsible to free the buffs */ /* does not work in win32 */ -int APP_CC +int g_getuser_info(const char *username, int *gid, int *uid, char **shell, char **dir, char **gecos) { @@ -3210,7 +3210,7 @@ g_getuser_info(const char *username, int *gid, int *uid, char **shell, /*****************************************************************************/ /* returns 0 if ok */ /* does not work in win32 */ -int APP_CC +int g_getgroup_info(const char *groupname, int *gid) { #if defined(_WIN32) @@ -3238,7 +3238,7 @@ g_getgroup_info(const char *groupname, int *gid) /* returns error */ /* if zero is returned, then ok is set */ /* does not work in win32 */ -int APP_CC +int g_check_user_in_group(const char *username, int gid, int *ok) { #if defined(_WIN32) @@ -3277,7 +3277,7 @@ g_check_user_in_group(const char *username, int gid, int *ok) measured in seconds. for windows, returns the number of seconds since the machine was started. */ -int APP_CC +int g_time1(void) { #if defined(_WIN32) @@ -3290,7 +3290,7 @@ g_time1(void) /*****************************************************************************/ /* returns the number of milliseconds since the machine was started. */ -int APP_CC +int g_time2(void) { #if defined(_WIN32) @@ -3307,7 +3307,7 @@ g_time2(void) /*****************************************************************************/ /* returns time in milliseconds, uses gettimeofday does not work in win32 */ -int APP_CC +int g_time3(void) { #if defined(_WIN32) @@ -3351,7 +3351,7 @@ struct dib_hdr }; /******************************************************************************/ -int APP_CC +int g_save_to_bmp(const char* filename, char* data, int stride_bytes, int width, int height, int depth, int bits_per_pixel) { @@ -3474,7 +3474,7 @@ g_save_to_bmp(const char* filename, char* data, int stride_bytes, /*****************************************************************************/ /* returns boolean */ -int APP_CC +int g_text2bool(const char *s) { if ( (g_atoi(s) != 0) || @@ -3489,7 +3489,7 @@ g_text2bool(const char *s) /*****************************************************************************/ /* returns pointer or nil on error */ -void * APP_CC +void * g_shmat(int shmid) { #if defined(_WIN32) @@ -3501,7 +3501,7 @@ g_shmat(int shmid) /*****************************************************************************/ /* returns -1 on error 0 on success */ -int APP_CC +int g_shmdt(const void *shmaddr) { #if defined(_WIN32) @@ -3513,7 +3513,7 @@ g_shmdt(const void *shmaddr) /*****************************************************************************/ /* returns -1 on error 0 on success */ -int APP_CC +int g_gethostname(char *name, int len) { return gethostname(name, len); @@ -3557,7 +3557,7 @@ static unsigned char g_reverse_byte[0x100] = /*****************************************************************************/ /* mirror each byte while copying */ -int APP_CC +int g_mirror_memcpy(void *dst, const void *src, int len) { tui8 *dst8; diff --git a/common/os_calls.h b/common/os_calls.h index 6232b63b..4e93558d 100644 --- a/common/os_calls.h +++ b/common/os_calls.h @@ -37,149 +37,149 @@ #define g_tcp_select g_sck_select #define g_close_wait_obj g_delete_wait_obj -int APP_CC g_rm_temp_dir(void); -int APP_CC g_mk_temp_dir(const char* app_name); -void APP_CC g_init(const char* app_name); -void APP_CC g_deinit(void); -void* APP_CC g_malloc(int size, int zero); -void APP_CC g_free(void* ptr); -void DEFAULT_CC g_printf(const char *format, ...) printflike(1, 2); -void DEFAULT_CC g_sprintf(char* dest, const char* format, ...) \ +int g_rm_temp_dir(void); +int g_mk_temp_dir(const char* app_name); +void g_init(const char* app_name); +void g_deinit(void); +void* g_malloc(int size, int zero); +void g_free(void* ptr); +void g_printf(const char *format, ...) printflike(1, 2); +void g_sprintf(char* dest, const char* format, ...) \ printflike(2, 3); -int DEFAULT_CC g_snprintf(char* dest, int len, const char* format, ...) \ +int g_snprintf(char* dest, int len, const char* format, ...) \ printflike(3, 4); -void DEFAULT_CC g_writeln(const char* format, ...) printflike(1, 2); -void DEFAULT_CC g_write(const char* format, ...) printflike(1, 2); -void APP_CC g_hexdump(const char *p, int len); -void APP_CC g_memset(void* ptr, int val, int size); -void APP_CC g_memcpy(void* d_ptr, const void* s_ptr, int size); -int APP_CC g_getchar(void); -int APP_CC g_tcp_set_no_delay(int sck); -int APP_CC g_tcp_set_keepalive(int sck); -int APP_CC g_tcp_socket(void); -int APP_CC g_sck_set_send_buffer_bytes(int sck, int bytes); -int APP_CC g_sck_get_send_buffer_bytes(int sck, int *bytes); -int APP_CC g_sck_set_recv_buffer_bytes(int sck, int bytes); -int APP_CC g_sck_get_recv_buffer_bytes(int sck, int *bytes); -int APP_CC g_sck_local_socket(void); -int APP_CC g_sck_get_peer_cred(int sck, int *pid, int *uid, int *gid); -void APP_CC g_sck_close(int sck); -int APP_CC g_tcp_connect(int sck, const char* address, const char* port); -int APP_CC g_sck_local_connect(int sck, const char* port); -int APP_CC g_sck_set_non_blocking(int sck); -int APP_CC g_tcp_bind(int sck, const char *port); -int APP_CC g_sck_local_bind(int sck, const char* port); -int APP_CC g_tcp_bind_address(int sck, const char* port, const char* address); -int APP_CC g_sck_listen(int sck); -int APP_CC g_tcp_accept(int sck); -int APP_CC g_sck_accept(int sck, char *addr, int addr_bytes, +void g_writeln(const char* format, ...) printflike(1, 2); +void g_write(const char* format, ...) printflike(1, 2); +void g_hexdump(const char *p, int len); +void g_memset(void* ptr, int val, int size); +void g_memcpy(void* d_ptr, const void* s_ptr, int size); +int g_getchar(void); +int g_tcp_set_no_delay(int sck); +int g_tcp_set_keepalive(int sck); +int g_tcp_socket(void); +int g_sck_set_send_buffer_bytes(int sck, int bytes); +int g_sck_get_send_buffer_bytes(int sck, int *bytes); +int g_sck_set_recv_buffer_bytes(int sck, int bytes); +int g_sck_get_recv_buffer_bytes(int sck, int *bytes); +int g_sck_local_socket(void); +int g_sck_get_peer_cred(int sck, int *pid, int *uid, int *gid); +void g_sck_close(int sck); +int g_tcp_connect(int sck, const char* address, const char* port); +int g_sck_local_connect(int sck, const char* port); +int g_sck_set_non_blocking(int sck); +int g_tcp_bind(int sck, const char *port); +int g_sck_local_bind(int sck, const char* port); +int g_tcp_bind_address(int sck, const char* port, const char* address); +int g_sck_listen(int sck); +int g_tcp_accept(int sck); +int g_sck_accept(int sck, char *addr, int addr_bytes, char *port, int port_bytes); -int APP_CC g_sck_recv(int sck, void* ptr, int len, int flags); -int APP_CC g_sck_send(int sck, const void* ptr, int len, int flags); -int APP_CC g_sck_last_error_would_block(int sck); -int APP_CC g_sck_socket_ok(int sck); -int APP_CC g_sck_can_send(int sck, int millis); -int APP_CC g_sck_can_recv(int sck, int millis); -int APP_CC g_sck_select(int sck1, int sck2); -void APP_CC g_write_ip_address(int rcv_sck, char* ip_address, int bytes); -void APP_CC g_sleep(int msecs); -tintptr APP_CC g_create_wait_obj(const char *name); -tintptr APP_CC g_create_wait_obj_from_socket(tintptr socket, int write); -void APP_CC g_delete_wait_obj_from_socket(tintptr wait_obj); -int APP_CC g_set_wait_obj(tintptr obj); -int APP_CC g_reset_wait_obj(tintptr obj); -int APP_CC g_is_wait_obj_set(tintptr obj); -int APP_CC g_delete_wait_obj(tintptr obj); -int APP_CC g_obj_wait(tintptr* read_objs, int rcount, tintptr* write_objs, +int g_sck_recv(int sck, void* ptr, int len, int flags); +int g_sck_send(int sck, const void* ptr, int len, int flags); +int g_sck_last_error_would_block(int sck); +int g_sck_socket_ok(int sck); +int g_sck_can_send(int sck, int millis); +int g_sck_can_recv(int sck, int millis); +int g_sck_select(int sck1, int sck2); +void g_write_ip_address(int rcv_sck, char* ip_address, int bytes); +void g_sleep(int msecs); +tintptr g_create_wait_obj(const char *name); +tintptr g_create_wait_obj_from_socket(tintptr socket, int write); +void g_delete_wait_obj_from_socket(tintptr wait_obj); +int g_set_wait_obj(tintptr obj); +int g_reset_wait_obj(tintptr obj); +int g_is_wait_obj_set(tintptr obj); +int g_delete_wait_obj(tintptr obj); +int g_obj_wait(tintptr* read_objs, int rcount, tintptr* write_objs, int wcount,int mstimeout); -void APP_CC g_random(char* data, int len); -int APP_CC g_abs(int i); -int APP_CC g_memcmp(const void* s1, const void* s2, int len); -int APP_CC g_file_open(const char* file_name); -int APP_CC g_file_open_ex(const char *file_name, int aread, int awrite, +void g_random(char* data, int len); +int g_abs(int i); +int g_memcmp(const void* s1, const void* s2, int len); +int g_file_open(const char* file_name); +int g_file_open_ex(const char *file_name, int aread, int awrite, int acreate, int atrunc); -int APP_CC g_file_close(int fd); -int APP_CC g_file_read(int fd, char* ptr, int len); -int APP_CC g_file_write(int fd, const char *ptr, int len); -int APP_CC g_file_seek(int fd, int offset); -int APP_CC g_file_lock(int fd, int start, int len); -int APP_CC g_chmod_hex(const char* filename, int flags); -int APP_CC g_chown(const char* name, int uid, int gid); -int APP_CC g_mkdir(const char* dirname); -char* APP_CC g_get_current_dir(char* dirname, int maxlen); -int APP_CC g_set_current_dir(const char *dirname); -int APP_CC g_file_exist(const char* filename); -int APP_CC g_directory_exist(const char* dirname); -int APP_CC g_create_dir(const char* dirname); -int APP_CC g_create_path(const char* path); -int APP_CC g_remove_dir(const char* dirname); -int APP_CC g_file_delete(const char* filename); -int APP_CC g_file_get_size(const char* filename); -int APP_CC g_strlen(const char* text); -const char *APP_CC g_strchr(const char *text, int c); -char* APP_CC g_strcpy(char* dest, const char* src); -char* APP_CC g_strncpy(char* dest, const char* src, int len); -char* APP_CC g_strcat(char* dest, const char* src); -char* APP_CC g_strdup(const char* in); -char* APP_CC g_strndup(const char* in, const unsigned int maxlen); -int APP_CC g_strcmp(const char* c1, const char* c2); -int APP_CC g_strncmp(const char* c1, const char* c2, int len); -int APP_CC g_strncmp_d(const char* c1, const char* c2, const char delim, int len); -int APP_CC g_strcasecmp(const char* c1, const char* c2); -int APP_CC g_strncasecmp(const char* c1, const char* c2, int len); -int APP_CC g_atoi(const char* str); -int APP_CC g_htoi(char* str); -int APP_CC g_bytes_to_hexstr(const void *bytes, int num_bytes, char *out_str, +int g_file_close(int fd); +int g_file_read(int fd, char* ptr, int len); +int g_file_write(int fd, const char *ptr, int len); +int g_file_seek(int fd, int offset); +int g_file_lock(int fd, int start, int len); +int g_chmod_hex(const char* filename, int flags); +int g_chown(const char* name, int uid, int gid); +int g_mkdir(const char* dirname); +char* g_get_current_dir(char* dirname, int maxlen); +int g_set_current_dir(const char *dirname); +int g_file_exist(const char* filename); +int g_directory_exist(const char* dirname); +int g_create_dir(const char* dirname); +int g_create_path(const char* path); +int g_remove_dir(const char* dirname); +int g_file_delete(const char* filename); +int g_file_get_size(const char* filename); +int g_strlen(const char* text); +const char *g_strchr(const char *text, int c); +char* g_strcpy(char* dest, const char* src); +char* g_strncpy(char* dest, const char* src, int len); +char* g_strcat(char* dest, const char* src); +char* g_strdup(const char* in); +char* g_strndup(const char* in, const unsigned int maxlen); +int g_strcmp(const char* c1, const char* c2); +int g_strncmp(const char* c1, const char* c2, int len); +int g_strncmp_d(const char* c1, const char* c2, const char delim, int len); +int g_strcasecmp(const char* c1, const char* c2); +int g_strncasecmp(const char* c1, const char* c2, int len); +int g_atoi(const char* str); +int g_htoi(char* str); +int g_bytes_to_hexstr(const void *bytes, int num_bytes, char *out_str, int bytes_out_str); -int APP_CC g_pos(const char* str, const char* to_find); -int APP_CC g_mbstowcs(twchar* dest, const char* src, int n); -int APP_CC g_wcstombs(char* dest, const twchar* src, int n); -int APP_CC g_strtrim(char* str, int trim_flags); -long APP_CC g_load_library(char* in); -int APP_CC g_free_library(long lib); -void* APP_CC g_get_proc_address(long lib, const char* name); -int APP_CC g_system(char* aexec); -char* APP_CC g_get_strerror(void); -int APP_CC g_get_errno(void); -int APP_CC g_execvp(const char* p1, char* args[]); -int APP_CC g_execlp3(const char* a1, const char* a2, const char* a3); -void APP_CC g_signal_child_stop(void (*func)(int)); -void APP_CC g_signal_segfault(void (*func)(int)); -void APP_CC g_signal_hang_up(void (*func)(int)); -void APP_CC g_signal_user_interrupt(void (*func)(int)); -void APP_CC g_signal_terminate(void (*func)(int)); -void APP_CC g_signal_pipe(void (*func)(int)); -void APP_CC g_signal_usr1(void (*func)(int)); -int APP_CC g_fork(void); -int APP_CC g_setgid(int pid); -int APP_CC g_initgroups(const char* user, int gid); -int APP_CC g_getuid(void); -int APP_CC g_getgid(void); -int APP_CC g_setuid(int pid); -int APP_CC g_setsid(void); -int APP_CC g_setlogin(const char *name); -int APP_CC g_waitchild(void); -int APP_CC g_waitpid(int pid); -void APP_CC g_clearenv(void); -int APP_CC g_setenv(const char* name, const char* value, int rewrite); -char* APP_CC g_getenv(const char* name); -int APP_CC g_exit(int exit_code); -int APP_CC g_getpid(void); -int APP_CC g_sigterm(int pid); -int APP_CC g_getuser_info(const char* username, int* gid, int* uid, char** shell, +int g_pos(const char* str, const char* to_find); +int g_mbstowcs(twchar* dest, const char* src, int n); +int g_wcstombs(char* dest, const twchar* src, int n); +int g_strtrim(char* str, int trim_flags); +long g_load_library(char* in); +int g_free_library(long lib); +void* g_get_proc_address(long lib, const char* name); +int g_system(char* aexec); +char* g_get_strerror(void); +int g_get_errno(void); +int g_execvp(const char* p1, char* args[]); +int g_execlp3(const char* a1, const char* a2, const char* a3); +void g_signal_child_stop(void (*func)(int)); +void g_signal_segfault(void (*func)(int)); +void g_signal_hang_up(void (*func)(int)); +void g_signal_user_interrupt(void (*func)(int)); +void g_signal_terminate(void (*func)(int)); +void g_signal_pipe(void (*func)(int)); +void g_signal_usr1(void (*func)(int)); +int g_fork(void); +int g_setgid(int pid); +int g_initgroups(const char* user, int gid); +int g_getuid(void); +int g_getgid(void); +int g_setuid(int pid); +int g_setsid(void); +int g_setlogin(const char *name); +int g_waitchild(void); +int g_waitpid(int pid); +void g_clearenv(void); +int g_setenv(const char* name, const char* value, int rewrite); +char* g_getenv(const char* name); +int g_exit(int exit_code); +int g_getpid(void); +int g_sigterm(int pid); +int g_getuser_info(const char* username, int* gid, int* uid, char** shell, char** dir, char** gecos); -int APP_CC g_getgroup_info(const char* groupname, int* gid); -int APP_CC g_check_user_in_group(const char* username, int gid, int* ok); -int APP_CC g_time1(void); -int APP_CC g_time2(void); -int APP_CC g_time3(void); -int APP_CC g_save_to_bmp(const char* filename, char* data, int stride_bytes, +int g_getgroup_info(const char* groupname, int* gid); +int g_check_user_in_group(const char* username, int gid, int* ok); +int g_time1(void); +int g_time2(void); +int g_time3(void); +int g_save_to_bmp(const char* filename, char* data, int stride_bytes, int width, int height, int depth, int bits_per_pixel); -int APP_CC g_text2bool(const char *s); -void * APP_CC g_shmat(int shmid); -int APP_CC g_shmdt(const void *shmaddr); -int APP_CC g_gethostname(char *name, int len); -int APP_CC g_mirror_memcpy(void *dst, const void *src, int len); +int g_text2bool(const char *s); +void * g_shmat(int shmid); +int g_shmdt(const void *shmaddr); +int g_gethostname(char *name, int len); +int g_mirror_memcpy(void *dst, const void *src, int len); /* glib-style wrappers */ #define g_new(struct_type, n_structs) \ diff --git a/common/ssl_calls.c b/common/ssl_calls.c index 1e50270b..f92cc972 100644 --- a/common/ssl_calls.c +++ b/common/ssl_calls.c @@ -85,28 +85,28 @@ ssl_finish(void) /* rc4 stuff */ /*****************************************************************************/ -void *APP_CC +void * ssl_rc4_info_create(void) { return g_malloc(sizeof(RC4_KEY), 1); } /*****************************************************************************/ -void APP_CC +void ssl_rc4_info_delete(void *rc4_info) { g_free(rc4_info); } /*****************************************************************************/ -void APP_CC +void ssl_rc4_set_key(void *rc4_info, char *key, int len) { RC4_set_key((RC4_KEY *)rc4_info, len, (tui8 *)key); } /*****************************************************************************/ -void APP_CC +void ssl_rc4_crypt(void *rc4_info, char *data, int len) { RC4((RC4_KEY *)rc4_info, len, (tui8 *)data, (tui8 *)data); @@ -115,35 +115,35 @@ ssl_rc4_crypt(void *rc4_info, char *data, int len) /* sha1 stuff */ /*****************************************************************************/ -void *APP_CC +void * ssl_sha1_info_create(void) { return g_malloc(sizeof(SHA_CTX), 1); } /*****************************************************************************/ -void APP_CC +void ssl_sha1_info_delete(void *sha1_info) { g_free(sha1_info); } /*****************************************************************************/ -void APP_CC +void ssl_sha1_clear(void *sha1_info) { SHA1_Init((SHA_CTX *)sha1_info); } /*****************************************************************************/ -void APP_CC +void ssl_sha1_transform(void *sha1_info, const char *data, int len) { SHA1_Update((SHA_CTX *)sha1_info, data, len); } /*****************************************************************************/ -void APP_CC +void ssl_sha1_complete(void *sha1_info, char *data) { SHA1_Final((tui8 *)data, (SHA_CTX *)sha1_info); @@ -152,35 +152,35 @@ ssl_sha1_complete(void *sha1_info, char *data) /* md5 stuff */ /*****************************************************************************/ -void *APP_CC +void * ssl_md5_info_create(void) { return g_malloc(sizeof(MD5_CTX), 1); } /*****************************************************************************/ -void APP_CC +void ssl_md5_info_delete(void *md5_info) { g_free(md5_info); } /*****************************************************************************/ -void APP_CC +void ssl_md5_clear(void *md5_info) { MD5_Init((MD5_CTX *)md5_info); } /*****************************************************************************/ -void APP_CC +void ssl_md5_transform(void *md5_info, char *data, int len) { MD5_Update((MD5_CTX *)md5_info, data, len); } /*****************************************************************************/ -void APP_CC +void ssl_md5_complete(void *md5_info, char *data) { MD5_Final((tui8 *)data, (MD5_CTX *)md5_info); @@ -189,7 +189,7 @@ ssl_md5_complete(void *md5_info, char *data) /* FIPS stuff */ /*****************************************************************************/ -void *APP_CC +void * ssl_des3_encrypt_info_create(const char *key, const char* ivec) { EVP_CIPHER_CTX *des3_ctx; @@ -205,7 +205,7 @@ ssl_des3_encrypt_info_create(const char *key, const char* ivec) } /*****************************************************************************/ -void *APP_CC +void * ssl_des3_decrypt_info_create(const char *key, const char* ivec) { EVP_CIPHER_CTX *des3_ctx; @@ -221,7 +221,7 @@ ssl_des3_decrypt_info_create(const char *key, const char* ivec) } /*****************************************************************************/ -void APP_CC +void ssl_des3_info_delete(void *des3) { EVP_CIPHER_CTX *des3_ctx; @@ -234,7 +234,7 @@ ssl_des3_info_delete(void *des3) } /*****************************************************************************/ -int APP_CC +int ssl_des3_encrypt(void *des3, int length, const char *in_data, char *out_data) { EVP_CIPHER_CTX *des3_ctx; @@ -251,7 +251,7 @@ ssl_des3_encrypt(void *des3, int length, const char *in_data, char *out_data) } /*****************************************************************************/ -int APP_CC +int ssl_des3_decrypt(void *des3, int length, const char *in_data, char *out_data) { EVP_CIPHER_CTX *des3_ctx; @@ -268,7 +268,7 @@ ssl_des3_decrypt(void *des3, int length, const char *in_data, char *out_data) } /*****************************************************************************/ -void * APP_CC +void * ssl_hmac_info_create(void) { HMAC_CTX *hmac_ctx; @@ -278,7 +278,7 @@ ssl_hmac_info_create(void) } /*****************************************************************************/ -void APP_CC +void ssl_hmac_info_delete(void *hmac) { HMAC_CTX *hmac_ctx; @@ -291,7 +291,7 @@ ssl_hmac_info_delete(void *hmac) } /*****************************************************************************/ -void APP_CC +void ssl_hmac_sha1_init(void *hmac, const char *data, int len) { HMAC_CTX *hmac_ctx; @@ -301,7 +301,7 @@ ssl_hmac_sha1_init(void *hmac, const char *data, int len) } /*****************************************************************************/ -void APP_CC +void ssl_hmac_transform(void *hmac, const char *data, int len) { HMAC_CTX *hmac_ctx; @@ -313,7 +313,7 @@ ssl_hmac_transform(void *hmac, const char *data, int len) } /*****************************************************************************/ -void APP_CC +void ssl_hmac_complete(void *hmac, char *data, int len) { HMAC_CTX *hmac_ctx; @@ -327,7 +327,7 @@ ssl_hmac_complete(void *hmac, char *data, int len) } /*****************************************************************************/ -static void APP_CC +static void ssl_reverse_it(char *p, int len) { int i; @@ -348,7 +348,7 @@ ssl_reverse_it(char *p, int len) } /*****************************************************************************/ -int APP_CC +int ssl_mod_exp(char *out, int out_len, const char *in, int in_len, const char *mod, int mod_len, const char *exp, int exp_len) { @@ -410,7 +410,7 @@ ssl_mod_exp(char *out, int out_len, const char *in, int in_len, /* returns error generates a new rsa key exp is passed in and mod and pri are passed out */ -int APP_CC +int ssl_gen_key_xrdp1(int key_size_in_bits, const char *exp, int exp_len, char *mod, int mod_len, char *pri, int pri_len) { @@ -486,7 +486,6 @@ ssl_gen_key_xrdp1(int key_size_in_bits, const char *exp, int exp_len, /*****************************************************************************/ struct ssl_tls * -APP_CC ssl_tls_create(struct trans *trans, const char *key, const char *cert) { struct ssl_tls *self; @@ -508,7 +507,7 @@ ssl_tls_create(struct trans *trans, const char *key, const char *cert) } /*****************************************************************************/ -int APP_CC +int ssl_tls_print_error(const char *func, SSL *connection, int value) { switch (SSL_get_error(connection, value)) @@ -538,7 +537,7 @@ ssl_tls_print_error(const char *func, SSL *connection, int value) } /*****************************************************************************/ -int APP_CC +int ssl_tls_accept(struct ssl_tls *self, long ssl_protocols, const char *tls_ciphers) { @@ -665,7 +664,7 @@ ssl_tls_accept(struct ssl_tls *self, long ssl_protocols, /*****************************************************************************/ /* returns error, */ -int APP_CC +int ssl_tls_disconnect(struct ssl_tls *self) { int status; @@ -699,7 +698,7 @@ ssl_tls_disconnect(struct ssl_tls *self) } /*****************************************************************************/ -void APP_CC +void ssl_tls_delete(struct ssl_tls *self) { if (self != NULL) @@ -717,7 +716,7 @@ ssl_tls_delete(struct ssl_tls *self) } /*****************************************************************************/ -int APP_CC +int ssl_tls_read(struct ssl_tls *tls, char *data, int length) { int status; @@ -766,7 +765,7 @@ ssl_tls_read(struct ssl_tls *tls, char *data, int length) } /*****************************************************************************/ -int APP_CC +int ssl_tls_write(struct ssl_tls *tls, const char *data, int length) { int status; @@ -811,7 +810,7 @@ ssl_tls_write(struct ssl_tls *tls, const char *data, int length) /*****************************************************************************/ /* returns boolean */ -int APP_CC +int ssl_tls_can_recv(struct ssl_tls *tls, int sck, int millis) { if (SSL_pending(tls->ssl) > 0) diff --git a/common/ssl_calls.h b/common/ssl_calls.h index c969ec43..4c069cb0 100644 --- a/common/ssl_calls.h +++ b/common/ssl_calls.h @@ -26,58 +26,58 @@ int ssl_init(void); int ssl_finish(void); -void* APP_CC +void* ssl_rc4_info_create(void); -void APP_CC +void ssl_rc4_info_delete(void* rc4_info); -void APP_CC +void ssl_rc4_set_key(void* rc4_info, char* key, int len); -void APP_CC +void ssl_rc4_crypt(void* rc4_info, char* data, int len); -void* APP_CC +void* ssl_sha1_info_create(void); -void APP_CC +void ssl_sha1_info_delete(void* sha1_info); -void APP_CC +void ssl_sha1_clear(void* sha1_info); -void APP_CC +void ssl_sha1_transform(void* sha1_info, const char *data, int len); -void APP_CC +void ssl_sha1_complete(void* sha1_info, char* data); -void* APP_CC +void* ssl_md5_info_create(void); -void APP_CC +void ssl_md5_info_delete(void* md5_info); -void APP_CC +void ssl_md5_clear(void* md5_info); -void APP_CC +void ssl_md5_transform(void* md5_info, char* data, int len); -void APP_CC +void ssl_md5_complete(void* md5_info, char* data); -void *APP_CC +void * ssl_des3_encrypt_info_create(const char *key, const char* ivec); -void *APP_CC +void * ssl_des3_decrypt_info_create(const char *key, const char* ivec); -void APP_CC +void ssl_des3_info_delete(void *des3); -int APP_CC +int ssl_des3_encrypt(void *des3, int length, const char *in_data, char *out_data); -int APP_CC +int ssl_des3_decrypt(void *des3, int length, const char *in_data, char *out_data); -void * APP_CC +void * ssl_hmac_info_create(void); -void APP_CC +void ssl_hmac_info_delete(void *hmac); -void APP_CC +void ssl_hmac_sha1_init(void *hmac, const char *data, int len); -void APP_CC +void ssl_hmac_transform(void *hmac, const char *data, int len); -void APP_CC +void ssl_hmac_complete(void *hmac, char *data, int len); -int APP_CC +int ssl_mod_exp(char *out, int out_len, const char *in, int in_len, const char *mod, int mod_len, const char *exp, int exp_len); -int APP_CC +int ssl_gen_key_xrdp1(int key_size_in_bits, const char* exp, int exp_len, char* mod, int mod_len, char* pri, int pri_len); @@ -93,20 +93,20 @@ struct ssl_tls }; /* xrdp_tls.c */ -struct ssl_tls *APP_CC +struct ssl_tls * ssl_tls_create(struct trans *trans, const char *key, const char *cert); -int APP_CC +int ssl_tls_accept(struct ssl_tls *self, long ssl_protocols, const char *tls_ciphers); -int APP_CC +int ssl_tls_disconnect(struct ssl_tls *self); -void APP_CC +void ssl_tls_delete(struct ssl_tls *self); -int APP_CC +int ssl_tls_read(struct ssl_tls *tls, char *data, int length); -int APP_CC +int ssl_tls_write(struct ssl_tls *tls, const char *data, int length); -int APP_CC +int ssl_tls_can_recv(struct ssl_tls *tls, int sck, int millis); const char *ssl_get_version(const struct ssl_st *ssl); diff --git a/common/thread_calls.c b/common/thread_calls.c index addad6fd..4ce25897 100644 --- a/common/thread_calls.c +++ b/common/thread_calls.c @@ -40,7 +40,7 @@ /*****************************************************************************/ /* returns error */ #if defined(_WIN32) -int APP_CC +int tc_thread_create(unsigned long (__stdcall *start_routine)(void *), void *arg) { int rv = 0; @@ -54,7 +54,7 @@ tc_thread_create(unsigned long (__stdcall *start_routine)(void *), void *arg) return rv; } #else -int APP_CC +int tc_thread_create(void * (* start_routine)(void *), void *arg) { int rv = 0; @@ -75,7 +75,7 @@ tc_thread_create(void * (* start_routine)(void *), void *arg) #endif /*****************************************************************************/ -tbus APP_CC +tbus tc_get_threadid(void) { #if defined(_WIN32) @@ -87,7 +87,7 @@ tc_get_threadid(void) /*****************************************************************************/ /* returns boolean */ -int APP_CC +int tc_threadid_equal(tbus tid1, tbus tid2) { #if defined(_WIN32) @@ -98,7 +98,7 @@ tc_threadid_equal(tbus tid1, tbus tid2) } /*****************************************************************************/ -tbus APP_CC +tbus tc_mutex_create(void) { #if defined(_WIN32) @@ -113,7 +113,7 @@ tc_mutex_create(void) } /*****************************************************************************/ -void APP_CC +void tc_mutex_delete(tbus mutex) { #if defined(_WIN32) @@ -128,7 +128,7 @@ tc_mutex_delete(tbus mutex) } /*****************************************************************************/ -int APP_CC +int tc_mutex_lock(tbus mutex) { #if defined(_WIN32) @@ -141,7 +141,7 @@ tc_mutex_lock(tbus mutex) } /*****************************************************************************/ -int APP_CC +int tc_mutex_unlock(tbus mutex) { int rv = 0; @@ -159,7 +159,7 @@ tc_mutex_unlock(tbus mutex) } /*****************************************************************************/ -tbus APP_CC +tbus tc_sem_create(int init_count) { #if defined(_WIN32) @@ -180,7 +180,7 @@ tc_sem_create(int init_count) } /*****************************************************************************/ -void APP_CC +void tc_sem_delete(tbus sem) { #if defined(_WIN32) @@ -197,7 +197,7 @@ tc_sem_delete(tbus sem) } /*****************************************************************************/ -int APP_CC +int tc_sem_dec(tbus sem) { #if defined(_WIN32) @@ -213,7 +213,7 @@ tc_sem_dec(tbus sem) } /*****************************************************************************/ -int APP_CC +int tc_sem_inc(tbus sem) { #if defined(_WIN32) diff --git a/common/thread_calls.h b/common/thread_calls.h index 2a3122fc..c8b6640a 100644 --- a/common/thread_calls.h +++ b/common/thread_calls.h @@ -23,27 +23,27 @@ #include "arch.h" -int APP_CC +int tc_thread_create(THREAD_RV (THREAD_CC * start_routine)(void*), void* arg); -tbus APP_CC +tbus tc_get_threadid(void); -int APP_CC +int tc_threadid_equal(tbus tid1, tbus tid2); -tbus APP_CC +tbus tc_mutex_create(void); -void APP_CC +void tc_mutex_delete(tbus mutex); -int APP_CC +int tc_mutex_lock(tbus mutex); -int APP_CC +int tc_mutex_unlock(tbus mutex); -tbus APP_CC +tbus tc_sem_create(int init_count); -void APP_CC +void tc_sem_delete(tbus sem); -int APP_CC +int tc_sem_dec(tbus sem); -int APP_CC +int tc_sem_inc(tbus sem); #endif diff --git a/common/trans.c b/common/trans.c index f77f959d..d73764de 100644 --- a/common/trans.c +++ b/common/trans.c @@ -31,7 +31,7 @@ #define MAX_SBYTES 0 /*****************************************************************************/ -int APP_CC +int trans_tls_recv(struct trans *self, char *ptr, int len) { if (self->tls == NULL) @@ -42,7 +42,7 @@ trans_tls_recv(struct trans *self, char *ptr, int len) } /*****************************************************************************/ -int APP_CC +int trans_tls_send(struct trans *self, const char *data, int len) { if (self->tls == NULL) @@ -53,7 +53,7 @@ trans_tls_send(struct trans *self, const char *data, int len) } /*****************************************************************************/ -int APP_CC +int trans_tls_can_recv(struct trans *self, int sck, int millis) { if (self->tls == NULL) @@ -64,21 +64,21 @@ trans_tls_can_recv(struct trans *self, int sck, int millis) } /*****************************************************************************/ -int APP_CC +int trans_tcp_recv(struct trans *self, char *ptr, int len) { return g_tcp_recv(self->sck, ptr, len, 0); } /*****************************************************************************/ -int APP_CC +int trans_tcp_send(struct trans *self, const char *data, int len) { return g_tcp_send(self->sck, data, len, 0); } /*****************************************************************************/ -int APP_CC +int trans_tcp_can_recv(struct trans *self, int sck, int millis) { return g_sck_can_recv(sck, millis); @@ -86,7 +86,6 @@ trans_tcp_can_recv(struct trans *self, int sck, int millis) /*****************************************************************************/ struct trans * -APP_CC trans_create(int mode, int in_size, int out_size) { struct trans *self = (struct trans *) NULL; @@ -111,7 +110,7 @@ trans_create(int mode, int in_size, int out_size) } /*****************************************************************************/ -void APP_CC +void trans_delete(struct trans *self) { if (self == 0) @@ -144,7 +143,7 @@ trans_delete(struct trans *self) } /*****************************************************************************/ -int APP_CC +int trans_get_wait_objs(struct trans *self, tbus *objs, int *count) { if (self == 0) @@ -173,7 +172,7 @@ trans_get_wait_objs(struct trans *self, tbus *objs, int *count) } /*****************************************************************************/ -int APP_CC +int trans_get_wait_objs_rw(struct trans *self, tbus *robjs, int *rcount, tbus *wobjs, int *wcount, int *timeout) { @@ -208,7 +207,7 @@ trans_get_wait_objs_rw(struct trans *self, tbus *robjs, int *rcount, } /*****************************************************************************/ -int APP_CC +int trans_send_waiting(struct trans *self, int block) { struct stream *temp_s; @@ -276,7 +275,7 @@ trans_send_waiting(struct trans *self, int block) } /*****************************************************************************/ -int APP_CC +int trans_check_wait_objs(struct trans *self) { tbus in_sck = (tbus) 0; @@ -430,7 +429,7 @@ trans_check_wait_objs(struct trans *self) } /*****************************************************************************/ -int APP_CC +int trans_force_read_s(struct trans *self, struct stream *in_s, int size) { int rcvd; @@ -488,14 +487,14 @@ trans_force_read_s(struct trans *self, struct stream *in_s, int size) } /*****************************************************************************/ -int APP_CC +int trans_force_read(struct trans *self, int size) { return trans_force_read_s(self, self->in_s, size); } /*****************************************************************************/ -int APP_CC +int trans_force_write_s(struct trans *self, struct stream *out_s) { int size; @@ -556,14 +555,14 @@ trans_force_write_s(struct trans *self, struct stream *out_s) } /*****************************************************************************/ -int APP_CC +int trans_force_write(struct trans *self) { return trans_force_write_s(self, self->out_s); } /*****************************************************************************/ -int APP_CC +int trans_write_copy_s(struct trans *self, struct stream *out_s) { int size; @@ -646,14 +645,14 @@ trans_write_copy_s(struct trans *self, struct stream *out_s) } /*****************************************************************************/ -int APP_CC +int trans_write_copy(struct trans* self) { return trans_write_copy_s(self, self->out_s); } /*****************************************************************************/ -int APP_CC +int trans_connect(struct trans *self, const char *server, const char *port, int timeout) { @@ -781,7 +780,7 @@ trans_connect(struct trans *self, const char *server, const char *port, /** * @return 0 on success, 1 on failure */ -int APP_CC +int trans_listen_address(struct trans *self, char *port, const char *address) { if (self->sck != 0) @@ -837,7 +836,7 @@ trans_listen_address(struct trans *self, char *port, const char *address) } /*****************************************************************************/ -int APP_CC +int trans_listen(struct trans *self, char *port) { return trans_listen_address(self, port, "0.0.0.0"); @@ -845,7 +844,6 @@ trans_listen(struct trans *self, char *port) /*****************************************************************************/ struct stream * -APP_CC trans_get_in_s(struct trans *self) { struct stream *rv = (struct stream *) NULL; @@ -864,7 +862,6 @@ trans_get_in_s(struct trans *self) /*****************************************************************************/ struct stream * -APP_CC trans_get_out_s(struct trans *self, int size) { struct stream *rv = (struct stream *) NULL; @@ -884,7 +881,7 @@ trans_get_out_s(struct trans *self, int size) /*****************************************************************************/ /* returns error */ -int APP_CC +int trans_set_tls_mode(struct trans *self, const char *key, const char *cert, long ssl_protocols, const char *tls_ciphers) { @@ -914,7 +911,7 @@ trans_set_tls_mode(struct trans *self, const char *key, const char *cert, /*****************************************************************************/ /* returns error */ -int APP_CC +int trans_shutdown_tls_mode(struct trans *self) { if (self->tls != NULL) diff --git a/common/trans.h b/common/trans.h index fac1fcab..77d1ed17 100644 --- a/common/trans.h +++ b/common/trans.h @@ -37,13 +37,13 @@ struct trans; /* forward declaration */ struct xrdp_tls; -typedef int (DEFAULT_CC *ttrans_data_in)(struct trans* self); -typedef int (DEFAULT_CC *ttrans_conn_in)(struct trans* self, +typedef int (*ttrans_data_in)(struct trans* self); +typedef int (*ttrans_conn_in)(struct trans* self, struct trans* new_self); -typedef int (DEFAULT_CC *tis_term)(void); -typedef int (APP_CC *trans_recv_proc) (struct trans *self, char *ptr, int len); -typedef int (APP_CC *trans_send_proc) (struct trans *self, const char *data, int len); -typedef int (APP_CC *trans_can_recv_proc) (struct trans *self, int sck, int millis); +typedef int (*tis_term)(void); +typedef int (*trans_recv_proc) (struct trans *self, char *ptr, int len); +typedef int (*trans_send_proc) (struct trans *self, const char *data, int len); +typedef int (*trans_can_recv_proc) (struct trans *self, int sck, int millis); /* optional source info */ @@ -88,47 +88,47 @@ struct trans int my_source; }; -struct trans* APP_CC +struct trans* trans_create(int mode, int in_size, int out_size); -void APP_CC +void trans_delete(struct trans* self); -int APP_CC +int trans_get_wait_objs(struct trans* self, tbus* objs, int* count); -int APP_CC +int trans_get_wait_objs_rw(struct trans *self, tbus *robjs, int *rcount, tbus *wobjs, int *wcount, int *timeout); -int APP_CC +int trans_check_wait_objs(struct trans* self); -int APP_CC +int trans_force_read_s(struct trans* self, struct stream* in_s, int size); -int APP_CC +int trans_force_write_s(struct trans* self, struct stream* out_s); -int APP_CC +int trans_force_read(struct trans* self, int size); -int APP_CC +int trans_force_write(struct trans* self); -int APP_CC +int trans_write_copy(struct trans* self); -int APP_CC +int trans_write_copy_s(struct trans* self, struct stream* out_s); -int APP_CC +int trans_connect(struct trans* self, const char* server, const char* port, int timeout); -int APP_CC +int trans_listen_address(struct trans* self, char* port, const char* address); -int APP_CC +int trans_listen(struct trans* self, char* port); -struct stream* APP_CC +struct stream* trans_get_in_s(struct trans* self); -struct stream* APP_CC +struct stream* trans_get_out_s(struct trans* self, int size); -int APP_CC +int trans_set_tls_mode(struct trans *self, const char *key, const char *cert, long ssl_protocols, const char *tls_ciphers); -int APP_CC +int trans_shutdown_tls_mode(struct trans *self); -int APP_CC +int trans_tcp_force_read_s(struct trans *self, struct stream *in_s, int size); #endif diff --git a/keygen/keygen.c b/keygen/keygen.c index bd24b0b9..74be4d6e 100644 --- a/keygen/keygen.c +++ b/keygen/keygen.c @@ -196,7 +196,7 @@ static tui8 g_testkey2048[376] = /* 2048 bit test key */ }; /*****************************************************************************/ -static int APP_CC +static int out_params(void) { g_writeln("%s", ""); @@ -209,7 +209,7 @@ out_params(void) /*****************************************************************************/ /* this is the special key signing algorithm */ -static int APP_CC +static int sign_key(const char *e_data, int e_len, const char *n_data, int n_len, char *sign_data, int sign_len) { @@ -285,7 +285,7 @@ sign_key(const char *e_data, int e_len, const char *n_data, int n_len, } /*****************************************************************************/ -static int APP_CC +static int write_out_line(int fd, const char *name, const char *data, int len) { int max; @@ -337,7 +337,7 @@ write_out_line(int fd, const char *name, const char *data, int len) } /*****************************************************************************/ -static int APP_CC +static int save_all(const char *e_data, int e_len, const char *n_data, int n_len, const char *d_data, int d_len, const char *sign_data, int sign_len, const char *path_and_file_name) @@ -393,7 +393,7 @@ save_all(const char *e_data, int e_len, const char *n_data, int n_len, } /*****************************************************************************/ -static int APP_CC +static int key_gen(const char *path_and_file_name) { char *e_data; @@ -459,14 +459,14 @@ key_gen(const char *path_and_file_name) } /*****************************************************************************/ -static int APP_CC +static int key_gen_auto(void) { return key_gen("/etc/xrdp/rsakeys.ini"); } /*****************************************************************************/ -static int APP_CC +static int key_test512(void) { char *md5_final; @@ -509,7 +509,7 @@ key_test512(void) } /*****************************************************************************/ -static int APP_CC +static int key_test2048(void) { char *md5_final; @@ -552,7 +552,7 @@ key_test2048(void) } /*****************************************************************************/ -int DEFAULT_CC +int main(int argc, char **argv) { if (argc > 1) diff --git a/libxrdp/libxrdp.c b/libxrdp/libxrdp.c index 074e4ddd..41ff1472 100644 --- a/libxrdp/libxrdp.c +++ b/libxrdp/libxrdp.c @@ -112,7 +112,7 @@ libxrdp_get_pdu_bytes(const char *aheader) /******************************************************************************/ /* only used during connection */ -struct stream * APP_CC +struct stream * libxrdp_force_read(struct trans* trans) { int bytes; @@ -967,7 +967,7 @@ libxrdp_orders_mem_blt(struct xrdp_session *session, int cache_id, } /******************************************************************************/ -int DEFAULT_CC +int libxrdp_orders_composite_blt(struct xrdp_session* session, int srcidx, int srcformat, int srcwidth, int srcrepeat, int* srctransform, int mskflags, @@ -1356,7 +1356,7 @@ libxrdp_notify_new_update(struct xrdp_session *session, } /*****************************************************************************/ -int DEFAULT_CC +int libxrdp_notify_delete(struct xrdp_session *session, int window_id, int notify_id) { @@ -1367,7 +1367,7 @@ libxrdp_notify_delete(struct xrdp_session *session, } /*****************************************************************************/ -int DEFAULT_CC +int libxrdp_monitored_desktop(struct xrdp_session *session, struct rail_monitored_desktop_order *mdo, int flags) diff --git a/libxrdp/libxrdp.h b/libxrdp/libxrdp.h index 53993599..1e0f7c96 100644 --- a/libxrdp/libxrdp.h +++ b/libxrdp/libxrdp.h @@ -287,166 +287,166 @@ struct xrdp_mppc_enc }; -int APP_CC +int compress_rdp(struct xrdp_mppc_enc *enc, tui8 *srcData, int len); -struct xrdp_mppc_enc * APP_CC +struct xrdp_mppc_enc * mppc_enc_new(int protocol_type); -void APP_CC +void mppc_enc_free(struct xrdp_mppc_enc *enc); /* xrdp_tcp.c */ -struct xrdp_tcp * APP_CC +struct xrdp_tcp * xrdp_tcp_create(struct xrdp_iso *owner, struct trans *trans); -void APP_CC +void xrdp_tcp_delete(struct xrdp_tcp *self); -int APP_CC +int xrdp_tcp_init(struct xrdp_tcp *self, struct stream *s); -int APP_CC +int xrdp_tcp_recv(struct xrdp_tcp *self, struct stream *s, int len); -int APP_CC +int xrdp_tcp_send(struct xrdp_tcp *self, struct stream *s); /* xrdp_iso.c */ -struct xrdp_iso * APP_CC +struct xrdp_iso * xrdp_iso_create(struct xrdp_mcs *owner, struct trans *trans); -void APP_CC +void xrdp_iso_delete(struct xrdp_iso *self); -int APP_CC +int xrdp_iso_init(struct xrdp_iso *self, struct stream *s); -int APP_CC +int xrdp_iso_recv(struct xrdp_iso *self, struct stream *s); -int APP_CC +int xrdp_iso_send(struct xrdp_iso *self, struct stream *s); -int APP_CC +int xrdp_iso_incoming(struct xrdp_iso *self); -int APP_CC +int xrdp_iso_detect_tpkt(struct xrdp_iso *self, struct stream *s); /* xrdp_mcs.c */ -struct xrdp_mcs * APP_CC +struct xrdp_mcs * xrdp_mcs_create(struct xrdp_sec *owner, struct trans *trans, struct stream *client_mcs_data, struct stream *server_mcs_data); -void APP_CC +void xrdp_mcs_delete(struct xrdp_mcs *self); -int APP_CC +int xrdp_mcs_init(struct xrdp_mcs *self, struct stream *s); -int APP_CC +int xrdp_mcs_recv(struct xrdp_mcs *self, struct stream *s, int *chan); -int APP_CC +int xrdp_mcs_send(struct xrdp_mcs *self, struct stream *s, int chan); -int APP_CC +int xrdp_mcs_incoming(struct xrdp_mcs *self); -int APP_CC +int xrdp_mcs_disconnect(struct xrdp_mcs *self); /* xrdp_sec.c */ -struct xrdp_sec *APP_CC +struct xrdp_sec * xrdp_sec_create(struct xrdp_rdp *owner, struct trans *trans); -void APP_CC +void xrdp_sec_delete(struct xrdp_sec *self); -int APP_CC +int xrdp_sec_init(struct xrdp_sec *self, struct stream *s); -int APP_CC +int xrdp_sec_get_fastpath_bytes(struct xrdp_sec *self); -int APP_CC +int xrdp_sec_init_fastpath(struct xrdp_sec *self, struct stream *s); -int APP_CC +int xrdp_sec_send_fastpath(struct xrdp_sec *self, struct stream *s); -int APP_CC +int xrdp_sec_recv_fastpath(struct xrdp_sec *self, struct stream *s); -int APP_CC +int xrdp_sec_recv(struct xrdp_sec *self, struct stream *s, int *chan); -int APP_CC +int xrdp_sec_send(struct xrdp_sec *self, struct stream *s, int chan); -int APP_CC +int xrdp_sec_process_mcs_data(struct xrdp_sec *self); -int APP_CC +int xrdp_sec_incoming(struct xrdp_sec *self); -int APP_CC +int xrdp_sec_disconnect(struct xrdp_sec *self); /* xrdp_rdp.c */ -struct xrdp_rdp * APP_CC +struct xrdp_rdp * xrdp_rdp_create(struct xrdp_session *session, struct trans *trans); -void APP_CC +void xrdp_rdp_delete(struct xrdp_rdp *self); -int APP_CC +int xrdp_rdp_init(struct xrdp_rdp *self, struct stream *s); -int APP_CC +int xrdp_rdp_init_data(struct xrdp_rdp *self, struct stream *s); -int APP_CC +int xrdp_rdp_get_fastpath_bytes(struct xrdp_rdp *self); -int APP_CC +int xrdp_rdp_init_fastpath(struct xrdp_rdp *self, struct stream *s); -int APP_CC +int xrdp_rdp_recv(struct xrdp_rdp *self, struct stream *s, int *code); -int APP_CC +int xrdp_rdp_send(struct xrdp_rdp *self, struct stream *s, int pdu_type); -int APP_CC +int xrdp_rdp_send_data(struct xrdp_rdp *self, struct stream *s, int data_pdu_type); -int APP_CC +int xrdp_rdp_send_fastpath(struct xrdp_rdp *self, struct stream *s, int data_pdu_type); -int APP_CC +int xrdp_rdp_send_data_update_sync(struct xrdp_rdp *self); -int APP_CC +int xrdp_rdp_incoming(struct xrdp_rdp *self); -int APP_CC +int xrdp_rdp_process_data(struct xrdp_rdp *self, struct stream *s); -int APP_CC +int xrdp_rdp_disconnect(struct xrdp_rdp *self); -int APP_CC +int xrdp_rdp_send_deactivate(struct xrdp_rdp *self); -int APP_CC +int xrdp_rdp_send_session_info(struct xrdp_rdp *self, const char *data, int data_bytes); /* xrdp_orders.c */ -struct xrdp_orders * APP_CC +struct xrdp_orders * xrdp_orders_create(struct xrdp_session *session, struct xrdp_rdp *rdp_layer); -void APP_CC +void xrdp_orders_delete(struct xrdp_orders *self); -int APP_CC +int xrdp_orders_reset(struct xrdp_orders *self); -int APP_CC +int xrdp_orders_init(struct xrdp_orders *self); -int APP_CC +int xrdp_orders_send(struct xrdp_orders *self); -int APP_CC +int xrdp_orders_force_send(struct xrdp_orders *self); -int APP_CC +int xrdp_orders_check(struct xrdp_orders *self, int max_size); -int APP_CC +int xrdp_orders_rect(struct xrdp_orders *self, int x, int y, int cx, int cy, int color, struct xrdp_rect *rect); -int APP_CC +int xrdp_orders_screen_blt(struct xrdp_orders *self, int x, int y, int cx, int cy, int srcx, int srcy, int rop, struct xrdp_rect *rect); -int APP_CC +int xrdp_orders_pat_blt(struct xrdp_orders *self, int x, int y, int cx, int cy, int rop, int bg_color, int fg_color, struct xrdp_brush *brush, struct xrdp_rect *rect); -int APP_CC +int xrdp_orders_dest_blt(struct xrdp_orders *self, int x, int y, int cx, int cy, int rop, struct xrdp_rect *rect); -int APP_CC +int xrdp_orders_line(struct xrdp_orders *self, int mix_mode, int startx, int starty, int endx, int endy, int rop, int bg_color, struct xrdp_pen *pen, struct xrdp_rect *rect); -int APP_CC +int xrdp_orders_mem_blt(struct xrdp_orders *self, int cache_id, int color_table, int x, int y, int cx, int cy, int rop, int srcx, int srcy, int cache_idx, struct xrdp_rect *rect); -int APP_CC +int xrdp_orders_composite_blt(struct xrdp_orders *self, int srcidx, int srcformat, int srcwidth, int srcrepeat, int *srctransform, int mskflags, @@ -455,7 +455,7 @@ xrdp_orders_composite_blt(struct xrdp_orders *self, int srcidx, int mskx, int msky, int dstx, int dsty, int width, int height, int dstformat, struct xrdp_rect *rect); -int APP_CC +int xrdp_orders_text(struct xrdp_orders *self, int font, int flags, int mixmode, int fg_color, int bg_color, @@ -465,61 +465,61 @@ xrdp_orders_text(struct xrdp_orders *self, int box_right, int box_bottom, int x, int y, char *data, int data_len, struct xrdp_rect *rect); -int APP_CC +int xrdp_orders_send_palette(struct xrdp_orders *self, int *palette, int cache_id); -int APP_CC +int xrdp_orders_send_raw_bitmap(struct xrdp_orders *self, int width, int height, int bpp, char *data, int cache_id, int cache_idx); -int APP_CC +int xrdp_orders_send_bitmap(struct xrdp_orders *self, int width, int height, int bpp, char *data, int cache_id, int cache_idx); -int APP_CC +int xrdp_orders_send_font(struct xrdp_orders *self, struct xrdp_font_char *font_char, int font_index, int char_index); -int APP_CC +int xrdp_orders_send_raw_bitmap2(struct xrdp_orders *self, int width, int height, int bpp, char *data, int cache_id, int cache_idx); -int APP_CC +int xrdp_orders_send_bitmap2(struct xrdp_orders *self, int width, int height, int bpp, char *data, int cache_id, int cache_idx, int hints); -int APP_CC +int xrdp_orders_send_bitmap3(struct xrdp_orders *self, int width, int height, int bpp, char *data, int cache_id, int cache_idx, int hints); -int APP_CC +int xrdp_orders_send_brush(struct xrdp_orders *self, int width, int height, int bpp, int type, int size, char *data, int cache_id); -int APP_CC +int xrdp_orders_send_create_os_surface(struct xrdp_orders *self, int id, int width, int height, struct list *del_list); -int APP_CC +int xrdp_orders_send_switch_os_surface(struct xrdp_orders *self, int id); /* xrdp_bitmap_compress.c */ -int APP_CC +int xrdp_bitmap_compress(char *in_data, int width, int height, struct stream *s, int bpp, int byte_limit, int start_line, struct stream *temp_s, int e); -int APP_CC +int xrdp_bitmap32_compress(char *in_data, int width, int height, struct stream *s, int bpp, int byte_limit, int start_line, struct stream *temp_s, int e, int flags); -int APP_CC +int xrdp_jpeg_compress(void *handle, char *in_data, int width, int height, struct stream *s, int bpp, int byte_limit, int start_line, struct stream *temp_s, int e, int quality); -int APP_CC +int xrdp_codec_jpeg_compress(void *handle, int format, /* input data format */ char *inp_data, /* input data */ @@ -536,42 +536,42 @@ xrdp_codec_jpeg_compress(void *handle, /* len of compressed data */ ); -void *APP_CC +void * xrdp_jpeg_init(void); -int APP_CC +int xrdp_jpeg_deinit(void *handle); /* xrdp_channel.c */ -struct xrdp_channel* APP_CC +struct xrdp_channel* xrdp_channel_create(struct xrdp_sec *owner, struct xrdp_mcs *mcs_layer); -void APP_CC +void xrdp_channel_delete(struct xrdp_channel *self); -int APP_CC +int xrdp_channel_init(struct xrdp_channel *self, struct stream *s); -int APP_CC +int xrdp_channel_send(struct xrdp_channel *self, struct stream *s, int channel_id, int total_data_len, int flags); -int APP_CC +int xrdp_channel_process(struct xrdp_channel *self, struct stream *s, int chanid); /* xrdp_fastpath.c */ -struct xrdp_fastpath *APP_CC +struct xrdp_fastpath * xrdp_fastpath_create(struct xrdp_sec *owner, struct trans *trans); -void APP_CC +void xrdp_fastpath_delete(struct xrdp_fastpath *self); -int APP_CC +int xrdp_fastpath_recv(struct xrdp_fastpath *self, struct stream *s); -int APP_CC +int xrdp_fastpath_process_input_event(struct xrdp_fastpath *self, struct stream *s); -int APP_CC +int xrdp_fastpath_init(struct xrdp_fastpath *self, struct stream *s); -int APP_CC +int xrdp_fastpath_send(struct xrdp_fastpath *self, struct stream *s); /* xrdp_caps.c */ -int APP_CC +int xrdp_caps_send_demand_active(struct xrdp_rdp *self); -int APP_CC +int xrdp_caps_process_confirm_active(struct xrdp_rdp *self, struct stream *s); #endif diff --git a/libxrdp/libxrdpinc.h b/libxrdp/libxrdpinc.h index 86ec8201..38bd4b34 100644 --- a/libxrdp/libxrdpinc.h +++ b/libxrdp/libxrdpinc.h @@ -76,66 +76,66 @@ struct xrdp_session struct source_info si; }; -struct xrdp_session * DEFAULT_CC +struct xrdp_session * libxrdp_init(tbus id, struct trans *trans); -int DEFAULT_CC +int libxrdp_exit(struct xrdp_session *session); -int DEFAULT_CC +int libxrdp_disconnect(struct xrdp_session *session); -int DEFAULT_CC +int libxrdp_process_incoming(struct xrdp_session *session); int EXPORT_CC libxrdp_get_pdu_bytes(const char *aheader); -struct stream * APP_CC +struct stream * libxrdp_force_read(struct trans *trans); -int DEFAULT_CC +int libxrdp_process_data(struct xrdp_session *session, struct stream *s); -int DEFAULT_CC +int libxrdp_send_palette(struct xrdp_session *session, int *palette); -int DEFAULT_CC +int libxrdp_send_bell(struct xrdp_session *session); -int DEFAULT_CC +int libxrdp_send_bitmap(struct xrdp_session *session, int width, int height, int bpp, char *data, int x, int y, int cx, int cy); -int DEFAULT_CC +int libxrdp_send_pointer(struct xrdp_session *session, int cache_idx, char *data, char *mask, int x, int y, int bpp); -int DEFAULT_CC +int libxrdp_set_pointer(struct xrdp_session *session, int cache_idx); -int DEFAULT_CC +int libxrdp_orders_init(struct xrdp_session *session); -int DEFAULT_CC +int libxrdp_orders_send(struct xrdp_session *session); -int DEFAULT_CC +int libxrdp_orders_force_send(struct xrdp_session *session); -int DEFAULT_CC +int libxrdp_orders_rect(struct xrdp_session *session, int x, int y, int cx, int cy, int color, struct xrdp_rect *rect); -int DEFAULT_CC +int libxrdp_orders_screen_blt(struct xrdp_session *session, int x, int y, int cx, int cy, int srcx, int srcy, int rop, struct xrdp_rect *rect); -int DEFAULT_CC +int libxrdp_orders_pat_blt(struct xrdp_session *session, int x, int y, int cx, int cy, int rop, int bg_color, int fg_color, struct xrdp_brush *brush, struct xrdp_rect *rect); -int DEFAULT_CC +int libxrdp_orders_dest_blt(struct xrdp_session *session, int x, int y, int cx, int cy, int rop, struct xrdp_rect *rect); -int DEFAULT_CC +int libxrdp_orders_line(struct xrdp_session *session, int mix_mode, int startx, int starty, int endx, int endy, int rop, int bg_color, struct xrdp_pen *pen, struct xrdp_rect *rect); -int DEFAULT_CC +int libxrdp_orders_mem_blt(struct xrdp_session *session, int cache_id, int color_table, int x, int y, int cx, int cy, int rop, int srcx, int srcy, int cache_idx, struct xrdp_rect *rect); -int DEFAULT_CC +int libxrdp_orders_composite_blt(struct xrdp_session *session, int srcidx, int srcformat, int srcwidth, int srcrepeat, int *srctransform, int mskflags, @@ -145,7 +145,7 @@ libxrdp_orders_composite_blt(struct xrdp_session *session, int srcidx, int width, int height, int dstformat, struct xrdp_rect *rect); -int DEFAULT_CC +int libxrdp_orders_text(struct xrdp_session *session, int font, int flags, int mixmode, int fg_color, int bg_color, @@ -155,89 +155,89 @@ libxrdp_orders_text(struct xrdp_session *session, int box_right, int box_bottom, int x, int y, char *data, int data_len, struct xrdp_rect *rect); -int DEFAULT_CC +int libxrdp_orders_send_palette(struct xrdp_session *session, int *palette, int cache_id); -int DEFAULT_CC +int libxrdp_orders_send_raw_bitmap(struct xrdp_session *session, int width, int height, int bpp, char *data, int cache_id, int cache_idx); -int DEFAULT_CC +int libxrdp_orders_send_bitmap(struct xrdp_session *session, int width, int height, int bpp, char *data, int cache_id, int cache_idx); -int DEFAULT_CC +int libxrdp_orders_send_font(struct xrdp_session *session, struct xrdp_font_char *font_char, int font_index, int char_index); -int DEFAULT_CC +int libxrdp_reset(struct xrdp_session *session, int width, int height, int bpp); -int DEFAULT_CC +int libxrdp_orders_send_raw_bitmap2(struct xrdp_session *session, int width, int height, int bpp, char *data, int cache_id, int cache_idx); -int DEFAULT_CC +int libxrdp_orders_send_bitmap2(struct xrdp_session *session, int width, int height, int bpp, char *data, int cache_id, int cache_idx, int hints); -int DEFAULT_CC +int libxrdp_orders_send_bitmap3(struct xrdp_session *session, int width, int height, int bpp, char *data, int cache_id, int cache_idx, int hints); -int DEFAULT_CC +int libxrdp_query_channel(struct xrdp_session *session, int index, char *channel_name, int *channel_flags); -int DEFAULT_CC +int libxrdp_get_channel_id(struct xrdp_session *session, const char *name); -int DEFAULT_CC +int libxrdp_send_to_channel(struct xrdp_session *session, int channel_id, char *data, int data_len, int total_data_len, int flags); -int DEFAULT_CC +int libxrdp_orders_send_brush(struct xrdp_session *session, int width, int height, int bpp, int type, int size, char *data, int cache_id); -int DEFAULT_CC +int libxrdp_orders_send_create_os_surface(struct xrdp_session *session, int id, int width, int height, struct list *del_list); -int DEFAULT_CC +int libxrdp_orders_send_switch_os_surface(struct xrdp_session *session, int id); -int DEFAULT_CC +int libxrdp_window_new_update(struct xrdp_session *session, int window_id, struct rail_window_state_order *window_state, int flags); -int DEFAULT_CC +int libxrdp_window_delete(struct xrdp_session *session, int window_id); -int DEFAULT_CC +int libxrdp_window_icon(struct xrdp_session *session, int window_id, int cache_entry, int cache_id, struct rail_icon_info *icon_info, int flags); -int DEFAULT_CC +int libxrdp_window_cached_icon(struct xrdp_session *session, int window_id, int cache_entry, int cache_id, int flags); -int DEFAULT_CC +int libxrdp_notify_new_update(struct xrdp_session *session, int window_id, int notify_id, struct rail_notify_state_order *notify_state, int flags); -int DEFAULT_CC +int libxrdp_notify_delete(struct xrdp_session *session, int window_id, int notify_id); -int DEFAULT_CC +int libxrdp_monitored_desktop(struct xrdp_session *session, struct rail_monitored_desktop_order *mdo, int flags); -int DEFAULT_CC +int libxrdp_codec_jpeg_compress(struct xrdp_session *session, int format, char *inp_data, int width, int height, int stride, int x, int y, int cx, int cy, int quality, char *out_data, int *io_len); -int DEFAULT_CC +int libxrdp_fastpath_send_surface(struct xrdp_session *session, char *data_pad, int pad_bytes, int data_bytes, diff --git a/libxrdp/xrdp_bitmap32_compress.c b/libxrdp/xrdp_bitmap32_compress.c index 4f6cf253..332c2a2b 100644 --- a/libxrdp/xrdp_bitmap32_compress.c +++ b/libxrdp/xrdp_bitmap32_compress.c @@ -41,7 +41,7 @@ http://msdn.microsoft.com/en-us/library/cc241877.aspx /*****************************************************************************/ /* split RGB */ -static int APP_CC +static int fsplit3(char *in_data, int start_line, int width, int e, char *r_data, char *g_data, char *b_data) { @@ -121,7 +121,7 @@ fsplit3(char *in_data, int start_line, int width, int e, /*****************************************************************************/ /* split ARGB */ -static int APP_CC +static int fsplit4(char *in_data, int start_line, int width, int e, char *a_data, char *r_data, char *g_data, char *b_data) { @@ -218,7 +218,7 @@ do { \ } while (0) /*****************************************************************************/ -static int APP_CC +static int fdelta(char *in_plane, char *out_plane, int cx, int cy) { char delta; @@ -250,7 +250,7 @@ fdelta(char *in_plane, char *out_plane, int cx, int cy) } /*****************************************************************************/ -static int APP_CC +static int fout(int collen, int replen, char *colptr, struct stream *s) { int code; @@ -315,7 +315,7 @@ fout(int collen, int replen, char *colptr, struct stream *s) } /*****************************************************************************/ -static int APP_CC +static int fpack(char *plane, int cx, int cy, struct stream *s) { char *ptr8; @@ -382,7 +382,7 @@ fpack(char *plane, int cx, int cy, struct stream *s) } /*****************************************************************************/ -static int APP_CC +static int foutraw3(struct stream *s, int bytes, int header, char *r_data, char *g_data, char *b_data) { @@ -396,7 +396,7 @@ foutraw3(struct stream *s, int bytes, int header, } /*****************************************************************************/ -static int APP_CC +static int foutraw4(struct stream *s, int bytes, int header, char *a_data, char *r_data, char *g_data, char *b_data) { @@ -412,7 +412,7 @@ foutraw4(struct stream *s, int bytes, int header, /*****************************************************************************/ /* returns the number of lines compressed */ -int APP_CC +int xrdp_bitmap32_compress(char *in_data, int width, int height, struct stream *s, int bpp, int byte_limit, int start_line, struct stream *temp_s, diff --git a/libxrdp/xrdp_bitmap_compress.c b/libxrdp/xrdp_bitmap_compress.c index 91eea60a..3cbdb9e4 100644 --- a/libxrdp/xrdp_bitmap_compress.c +++ b/libxrdp/xrdp_bitmap_compress.c @@ -648,7 +648,7 @@ } while (0) /*****************************************************************************/ -int APP_CC +int xrdp_bitmap_compress(char *in_data, int width, int height, struct stream *s, int bpp, int byte_limit, int start_line, struct stream *temp_s, diff --git a/libxrdp/xrdp_caps.c b/libxrdp/xrdp_caps.c index 43d5d949..91c25813 100644 --- a/libxrdp/xrdp_caps.c +++ b/libxrdp/xrdp_caps.c @@ -26,7 +26,7 @@ #include "libxrdp.h" /*****************************************************************************/ -static int APP_CC +static int xrdp_caps_send_monitorlayout(struct xrdp_rdp *self) { struct stream *s; @@ -66,7 +66,7 @@ xrdp_caps_send_monitorlayout(struct xrdp_rdp *self) } /*****************************************************************************/ -static int APP_CC +static int xrdp_caps_process_general(struct xrdp_rdp *self, struct stream *s, int len) { @@ -101,7 +101,7 @@ xrdp_caps_process_general(struct xrdp_rdp *self, struct stream *s, } /*****************************************************************************/ -static int APP_CC +static int xrdp_caps_process_order(struct xrdp_rdp *self, struct stream *s, int len) { @@ -178,7 +178,7 @@ xrdp_caps_process_order(struct xrdp_rdp *self, struct stream *s, /*****************************************************************************/ /* get the bitmap cache size */ -static int APP_CC +static int xrdp_caps_process_bmpcache(struct xrdp_rdp *self, struct stream *s, int len) { @@ -220,7 +220,7 @@ xrdp_caps_process_bmpcache(struct xrdp_rdp *self, struct stream *s, /*****************************************************************************/ /* get the bitmap cache size */ -static int APP_CC +static int xrdp_caps_process_bmpcache2(struct xrdp_rdp *self, struct stream *s, int len) { @@ -263,7 +263,7 @@ xrdp_caps_process_bmpcache2(struct xrdp_rdp *self, struct stream *s, } /*****************************************************************************/ -static int APP_CC +static int xrdp_caps_process_cache_v3_codec_id(struct xrdp_rdp *self, struct stream *s, int len) { @@ -283,7 +283,7 @@ xrdp_caps_process_cache_v3_codec_id(struct xrdp_rdp *self, struct stream *s, /*****************************************************************************/ /* get the number of client cursor cache */ -static int APP_CC +static int xrdp_caps_process_pointer(struct xrdp_rdp *self, struct stream *s, int len) { @@ -325,7 +325,7 @@ xrdp_caps_process_pointer(struct xrdp_rdp *self, struct stream *s, } /*****************************************************************************/ -static int APP_CC +static int xrdp_caps_process_input(struct xrdp_rdp *self, struct stream *s, int len) { @@ -344,7 +344,7 @@ xrdp_caps_process_input(struct xrdp_rdp *self, struct stream *s, /*****************************************************************************/ /* get the type of client brush cache */ -int APP_CC +int xrdp_caps_process_brushcache(struct xrdp_rdp *self, struct stream *s, int len) { @@ -361,7 +361,7 @@ xrdp_caps_process_brushcache(struct xrdp_rdp *self, struct stream *s, } /*****************************************************************************/ -int APP_CC +int xrdp_caps_process_offscreen_bmpcache(struct xrdp_rdp *self, struct stream *s, int len) { @@ -387,7 +387,7 @@ xrdp_caps_process_offscreen_bmpcache(struct xrdp_rdp *self, struct stream *s, } /*****************************************************************************/ -int APP_CC +int xrdp_caps_process_rail(struct xrdp_rdp *self, struct stream *s, int len) { int i32; @@ -405,7 +405,7 @@ xrdp_caps_process_rail(struct xrdp_rdp *self, struct stream *s, int len) } /*****************************************************************************/ -static int APP_CC +static int xrdp_caps_process_window(struct xrdp_rdp *self, struct stream *s, int len) { int i32; @@ -430,7 +430,7 @@ xrdp_caps_process_window(struct xrdp_rdp *self, struct stream *s, int len) } /*****************************************************************************/ -static int APP_CC +static int xrdp_caps_process_codecs(struct xrdp_rdp *self, struct stream *s, int len) { int codec_id; @@ -525,7 +525,7 @@ xrdp_caps_process_codecs(struct xrdp_rdp *self, struct stream *s, int len) } /*****************************************************************************/ -static int APP_CC +static int xrdp_caps_process_multifragmentupdate(struct xrdp_rdp *self, struct stream *s, int len) { @@ -537,7 +537,7 @@ xrdp_caps_process_multifragmentupdate(struct xrdp_rdp *self, struct stream *s, } /*****************************************************************************/ -static int APP_CC +static int xrdp_caps_process_frame_ack(struct xrdp_rdp *self, struct stream *s, int len) { g_writeln("xrdp_caps_process_frame_ack:"); @@ -554,7 +554,7 @@ xrdp_caps_process_frame_ack(struct xrdp_rdp *self, struct stream *s, int len) } /*****************************************************************************/ -static int APP_CC +static int xrdp_caps_process_surface_cmds(struct xrdp_rdp *self, struct stream *s, int len) { int cmdFlags; @@ -566,7 +566,7 @@ xrdp_caps_process_surface_cmds(struct xrdp_rdp *self, struct stream *s, int len) } /*****************************************************************************/ -int APP_CC +int xrdp_caps_process_confirm_active(struct xrdp_rdp *self, struct stream *s) { int cap_len; @@ -717,7 +717,7 @@ xrdp_caps_process_confirm_active(struct xrdp_rdp *self, struct stream *s) return 0; } /*****************************************************************************/ -int APP_CC +int xrdp_caps_send_demand_active(struct xrdp_rdp *self) { struct stream *s; diff --git a/libxrdp/xrdp_channel.c b/libxrdp/xrdp_channel.c index 9fd9feab..4f4f3ef3 100644 --- a/libxrdp/xrdp_channel.c +++ b/libxrdp/xrdp_channel.c @@ -33,7 +33,7 @@ /*****************************************************************************/ /* returns pointer or nil on error */ -static struct mcs_channel_item *APP_CC +static struct mcs_channel_item * xrdp_channel_get_item(struct xrdp_channel *self, int channel_id) { struct mcs_channel_item *channel; @@ -50,7 +50,7 @@ xrdp_channel_get_item(struct xrdp_channel *self, int channel_id) } /*****************************************************************************/ -struct xrdp_channel *APP_CC +struct xrdp_channel * xrdp_channel_create(struct xrdp_sec *owner, struct xrdp_mcs *mcs_layer) { struct xrdp_channel *self; @@ -63,7 +63,7 @@ xrdp_channel_create(struct xrdp_sec *owner, struct xrdp_mcs *mcs_layer) /*****************************************************************************/ /* returns error */ -void APP_CC +void xrdp_channel_delete(struct xrdp_channel *self) { if (self == 0) @@ -77,7 +77,7 @@ xrdp_channel_delete(struct xrdp_channel *self) /*****************************************************************************/ /* returns error */ -int APP_CC +int xrdp_channel_init(struct xrdp_channel *self, struct stream *s) { if (xrdp_sec_init(self->sec_layer, s) != 0) @@ -92,7 +92,7 @@ xrdp_channel_init(struct xrdp_channel *self, struct stream *s) /*****************************************************************************/ /* returns error */ /* This sends data out to the secure layer. */ -int APP_CC +int xrdp_channel_send(struct xrdp_channel *self, struct stream *s, int channel_id, int total_data_len, int flags) { @@ -140,7 +140,7 @@ xrdp_channel_send(struct xrdp_channel *self, struct stream *s, int channel_id, /* returns error */ /* this will inform the callback, whatever it is that some channel data is ready. the default for this is a call to xrdp_wm.c. */ -static int APP_CC +static int xrdp_channel_call_callback(struct xrdp_channel *self, struct stream *s, int channel_id, int total_data_len, int flags) @@ -181,7 +181,7 @@ xrdp_channel_call_callback(struct xrdp_channel *self, struct stream *s, channel packet. 'chanid' passed in here is the mcs channel id so it MCS_GLOBAL_CHANNEL plus something. */ -int APP_CC +int xrdp_channel_process(struct xrdp_channel *self, struct stream *s, int chanid) { diff --git a/libxrdp/xrdp_fastpath.c b/libxrdp/xrdp_fastpath.c index 41f6340b..ba9e1182 100644 --- a/libxrdp/xrdp_fastpath.c +++ b/libxrdp/xrdp_fastpath.c @@ -24,7 +24,7 @@ #include "libxrdp.h" /*****************************************************************************/ -struct xrdp_fastpath *APP_CC +struct xrdp_fastpath * xrdp_fastpath_create(struct xrdp_sec *owner, struct trans *trans) { struct xrdp_fastpath *self; @@ -39,7 +39,7 @@ xrdp_fastpath_create(struct xrdp_sec *owner, struct trans *trans) } /*****************************************************************************/ -void APP_CC +void xrdp_fastpath_delete(struct xrdp_fastpath *self) { if (self == 0) @@ -51,14 +51,14 @@ xrdp_fastpath_delete(struct xrdp_fastpath *self) /*****************************************************************************/ /* returns error */ -int APP_CC +int xrdp_fastpath_reset(struct xrdp_fastpath *self) { return 0; } /*****************************************************************************/ -int APP_CC +int xrdp_fastpath_recv(struct xrdp_fastpath *self, struct stream *s) { int fp_hdr; @@ -102,7 +102,7 @@ xrdp_fastpath_recv(struct xrdp_fastpath *self, struct stream *s) /*****************************************************************************/ /* no fragmentation */ -int APP_CC +int xrdp_fastpath_init(struct xrdp_fastpath *self, struct stream *s) { int bytes; @@ -117,7 +117,7 @@ xrdp_fastpath_init(struct xrdp_fastpath *self, struct stream *s) } /*****************************************************************************/ -static int APP_CC +static int xrdp_fastpath_session_callback(struct xrdp_fastpath *self, int msg, long param1, long param2, long param3, long param4) @@ -138,7 +138,7 @@ xrdp_fastpath_session_callback(struct xrdp_fastpath *self, int msg, /*****************************************************************************/ /* no fragmentation */ -int APP_CC +int xrdp_fastpath_send(struct xrdp_fastpath *self, struct stream *s) { if (trans_write_copy_s(self->trans, s) != 0) @@ -151,7 +151,7 @@ xrdp_fastpath_send(struct xrdp_fastpath *self, struct stream *s) /*****************************************************************************/ /* FASTPATH_INPUT_EVENT_SCANCODE */ -static int APP_CC +static int xrdp_fastpath_process_EVENT_SCANCODE(struct xrdp_fastpath *self, int eventFlags, struct stream *s) { @@ -185,7 +185,7 @@ xrdp_fastpath_process_EVENT_SCANCODE(struct xrdp_fastpath *self, /*****************************************************************************/ /* FASTPATH_INPUT_EVENT_MOUSE */ -static int APP_CC +static int xrdp_fastpath_process_EVENT_MOUSE(struct xrdp_fastpath *self, int eventFlags, struct stream *s) { @@ -215,7 +215,7 @@ xrdp_fastpath_process_EVENT_MOUSE(struct xrdp_fastpath *self, /*****************************************************************************/ /* FASTPATH_INPUT_EVENT_MOUSEX */ -static int APP_CC +static int xrdp_fastpath_process_EVENT_MOUSEX(struct xrdp_fastpath *self, int eventFlags, struct stream *s) { @@ -245,7 +245,7 @@ xrdp_fastpath_process_EVENT_MOUSEX(struct xrdp_fastpath *self, /*****************************************************************************/ /* FASTPATH_INPUT_EVENT_SYNC */ -static int APP_CC +static int xrdp_fastpath_process_EVENT_SYNC(struct xrdp_fastpath *self, int eventFlags, struct stream *s) { @@ -265,7 +265,7 @@ xrdp_fastpath_process_EVENT_SYNC(struct xrdp_fastpath *self, /*****************************************************************************/ /* FASTPATH_INPUT_EVENT_UNICODE */ -static int APP_CC +static int xrdp_fastpath_process_EVENT_UNICODE(struct xrdp_fastpath *self, int eventFlags, struct stream *s) { @@ -297,7 +297,7 @@ xrdp_fastpath_process_EVENT_UNICODE(struct xrdp_fastpath *self, /*****************************************************************************/ /* FASTPATH_INPUT_EVENT */ -int APP_CC +int xrdp_fastpath_process_input_event(struct xrdp_fastpath *self, struct stream *s) { diff --git a/libxrdp/xrdp_iso.c b/libxrdp/xrdp_iso.c index 861a5e5d..7cff94a3 100644 --- a/libxrdp/xrdp_iso.c +++ b/libxrdp/xrdp_iso.c @@ -37,7 +37,6 @@ /*****************************************************************************/ struct xrdp_iso * -APP_CC xrdp_iso_create(struct xrdp_mcs *owner, struct trans *trans) { struct xrdp_iso *self; @@ -51,7 +50,7 @@ xrdp_iso_create(struct xrdp_mcs *owner, struct trans *trans) } /*****************************************************************************/ -void APP_CC +void xrdp_iso_delete(struct xrdp_iso *self) { if (self == 0) @@ -64,7 +63,7 @@ xrdp_iso_delete(struct xrdp_iso *self) /*****************************************************************************/ /* returns error */ -static int APP_CC +static int xrdp_iso_negotiate_security(struct xrdp_iso *self) { int rv = 0; @@ -123,7 +122,7 @@ xrdp_iso_negotiate_security(struct xrdp_iso *self) /*****************************************************************************/ /* returns error */ -static int APP_CC +static int xrdp_iso_process_rdp_neg_req(struct xrdp_iso *self, struct stream *s) { int flags; @@ -155,7 +154,7 @@ xrdp_iso_process_rdp_neg_req(struct xrdp_iso *self, struct stream *s) } /*****************************************************************************/ /* returns error */ -static int APP_CC +static int xrdp_iso_recv_msg(struct xrdp_iso *self, struct stream *s, int *code, int *len) { int ver; @@ -216,7 +215,7 @@ xrdp_iso_recv_msg(struct xrdp_iso *self, struct stream *s, int *code, int *len) /*****************************************************************************/ /* returns error */ -int APP_CC +int xrdp_iso_recv(struct xrdp_iso *self, struct stream *s) { int code; @@ -240,7 +239,7 @@ xrdp_iso_recv(struct xrdp_iso *self, struct stream *s) return 0; } /*****************************************************************************/ -static int APP_CC +static int xrdp_iso_send_cc(struct xrdp_iso *self) { struct stream *s; @@ -304,7 +303,7 @@ xrdp_iso_send_cc(struct xrdp_iso *self) } /*****************************************************************************/ /* returns error */ -int APP_CC +int xrdp_iso_incoming(struct xrdp_iso *self) { int rv = 0; @@ -398,7 +397,7 @@ xrdp_iso_incoming(struct xrdp_iso *self) /*****************************************************************************/ /* returns error */ -int APP_CC +int xrdp_iso_init(struct xrdp_iso *self, struct stream *s) { init_stream(s, 8192 * 4); /* 32 KB */ @@ -408,7 +407,7 @@ xrdp_iso_init(struct xrdp_iso *self, struct stream *s) /*****************************************************************************/ /* returns error */ -int APP_CC +int xrdp_iso_send(struct xrdp_iso *self, struct stream *s) { int len; diff --git a/libxrdp/xrdp_jpeg_compress.c b/libxrdp/xrdp_jpeg_compress.c index e516861d..dbd4d73f 100644 --- a/libxrdp/xrdp_jpeg_compress.c +++ b/libxrdp/xrdp_jpeg_compress.c @@ -35,7 +35,7 @@ #include "log.h" /*****************************************************************************/ -int APP_CC +int xrdp_jpeg_compress(void *handle, char *in_data, int width, int height, struct stream *s, int bpp, int byte_limit, int start_line, struct stream *temp_s, @@ -118,7 +118,7 @@ xrdp_jpeg_compress(void *handle, char *in_data, int width, int height, * frame buffer (inp_data) *****************************************************************************/ -int APP_CC +int xrdp_codec_jpeg_compress(void *handle, int format, /* input data format */ char *inp_data, /* input data */ @@ -198,7 +198,7 @@ xrdp_codec_jpeg_compress(void *handle, } /*****************************************************************************/ -void *APP_CC +void * xrdp_jpeg_init(void) { tjhandle tj_han; @@ -208,7 +208,7 @@ xrdp_jpeg_init(void) } /*****************************************************************************/ -int APP_CC +int xrdp_jpeg_deinit(void *handle) { tjhandle tj_han; @@ -243,7 +243,7 @@ struct mydata_comp /*****************************************************************************/ /* called at beginning */ -static void DEFAULT_CC +static void my_init_destination(j_compress_ptr cinfo) { struct mydata_comp *md; @@ -257,7 +257,7 @@ my_init_destination(j_compress_ptr cinfo) /*****************************************************************************/ /* called when buffer is full and we need more space */ -static int DEFAULT_CC +static int my_empty_output_buffer(j_compress_ptr cinfo) { struct mydata_comp *md; @@ -274,7 +274,7 @@ my_empty_output_buffer(j_compress_ptr cinfo) /*****************************************************************************/ /* called at end */ -static void DEFAULT_CC +static void my_term_destination(j_compress_ptr cinfo) { struct mydata_comp *md; @@ -286,7 +286,7 @@ my_term_destination(j_compress_ptr cinfo) } /*****************************************************************************/ -static int APP_CC +static int jp_do_compress(JOCTET *data, int width, int height, int bpp, int quality, JOCTET *comp_data, int *comp_data_bytes) { @@ -353,7 +353,7 @@ jp_do_compress(JOCTET *data, int width, int height, int bpp, int quality, } /*****************************************************************************/ -static int APP_CC +static int jpeg_compress(char *in_data, int width, int height, struct stream *s, struct stream *temp_s, int bpp, int byte_limit, int e, int quality) @@ -411,7 +411,7 @@ jpeg_compress(char *in_data, int width, int height, } /*****************************************************************************/ -int APP_CC +int xrdp_jpeg_compress(void *handle, char *in_data, int width, int height, struct stream *s, int bpp, int byte_limit, int start_line, struct stream *temp_s, @@ -423,7 +423,7 @@ xrdp_jpeg_compress(void *handle, char *in_data, int width, int height, } /*****************************************************************************/ -int APP_CC +int xrdp_codec_jpeg_compress(void *handle, int format, char *inp_data, int width, int height, int stride, int x, int y, int cx, int cy, int quality, char *out_data, int *io_len) @@ -432,14 +432,14 @@ xrdp_codec_jpeg_compress(void *handle, int format, char *inp_data, int width, } /*****************************************************************************/ -void *APP_CC +void * xrdp_jpeg_init(void) { return 0; } /*****************************************************************************/ -int APP_CC +int xrdp_jpeg_deinit(void *handle) { return 0; @@ -448,7 +448,7 @@ xrdp_jpeg_deinit(void *handle) #else /*****************************************************************************/ -int APP_CC +int xrdp_jpeg_compress(void *handle, char *in_data, int width, int height, struct stream *s, int bpp, int byte_limit, int start_line, struct stream *temp_s, @@ -458,7 +458,7 @@ xrdp_jpeg_compress(void *handle, char *in_data, int width, int height, } /*****************************************************************************/ -int APP_CC +int xrdp_codec_jpeg_compress(void *handle, int format, char *inp_data, int width, int height, int stride, int x, int y, int cx, int cy, int quality, char *out_data, int *io_len) @@ -467,14 +467,14 @@ xrdp_codec_jpeg_compress(void *handle, int format, char *inp_data, int width, } /*****************************************************************************/ -void *APP_CC +void * xrdp_jpeg_init(void) { return 0; } /*****************************************************************************/ -int APP_CC +int xrdp_jpeg_deinit(void *handle) { return 0; diff --git a/libxrdp/xrdp_mcs.c b/libxrdp/xrdp_mcs.c index f66398ed..8438dbba 100644 --- a/libxrdp/xrdp_mcs.c +++ b/libxrdp/xrdp_mcs.c @@ -26,7 +26,7 @@ #include "log.h" /*****************************************************************************/ -struct xrdp_mcs *APP_CC +struct xrdp_mcs * xrdp_mcs_create(struct xrdp_sec *owner, struct trans *trans, struct stream *client_mcs_data, struct stream *server_mcs_data) @@ -47,7 +47,7 @@ xrdp_mcs_create(struct xrdp_sec *owner, struct trans *trans, } /*****************************************************************************/ -void APP_CC +void xrdp_mcs_delete(struct xrdp_mcs *self) { struct mcs_channel_item *channel_item; @@ -81,7 +81,7 @@ xrdp_mcs_delete(struct xrdp_mcs *self) /*****************************************************************************/ /* This function sends channel join confirm */ /* returns error = 1 ok = 0 */ -static int APP_CC +static int xrdp_mcs_send_cjcf(struct xrdp_mcs *self, int userid, int chanid) { struct stream *s; @@ -118,7 +118,7 @@ xrdp_mcs_send_cjcf(struct xrdp_mcs *self, int userid, int chanid) /*****************************************************************************/ /* returns error */ -int APP_CC +int xrdp_mcs_recv(struct xrdp_mcs *self, struct stream *s, int *chan) { int appid; @@ -224,7 +224,7 @@ xrdp_mcs_recv(struct xrdp_mcs *self, struct stream *s, int *chan) /*****************************************************************************/ /* returns error */ -static int APP_CC +static int xrdp_mcs_ber_parse_header(struct xrdp_mcs *self, struct stream *s, int tag_val, int *len) { @@ -294,7 +294,7 @@ xrdp_mcs_ber_parse_header(struct xrdp_mcs *self, struct stream *s, /*****************************************************************************/ /* returns error */ -static int APP_CC +static int xrdp_mcs_parse_domain_params(struct xrdp_mcs *self, struct stream *s) { int len; @@ -323,7 +323,7 @@ xrdp_mcs_parse_domain_params(struct xrdp_mcs *self, struct stream *s) /*****************************************************************************/ /* returns error */ -static int APP_CC +static int xrdp_mcs_recv_connect_initial(struct xrdp_mcs *self) { int len; @@ -430,7 +430,7 @@ xrdp_mcs_recv_connect_initial(struct xrdp_mcs *self) /*****************************************************************************/ /* returns error */ -static int APP_CC +static int xrdp_mcs_recv_edrq(struct xrdp_mcs *self) { int opcode; @@ -489,7 +489,7 @@ xrdp_mcs_recv_edrq(struct xrdp_mcs *self) /*****************************************************************************/ /* returns error */ -static int APP_CC +static int xrdp_mcs_recv_aurq(struct xrdp_mcs *self) { int opcode; @@ -540,7 +540,7 @@ xrdp_mcs_recv_aurq(struct xrdp_mcs *self) /*****************************************************************************/ /* returns error */ -static int APP_CC +static int xrdp_mcs_send_aucf(struct xrdp_mcs *self) { struct stream *s; @@ -575,7 +575,7 @@ xrdp_mcs_send_aucf(struct xrdp_mcs *self) /*****************************************************************************/ /* returns error */ -static int APP_CC +static int xrdp_mcs_recv_cjrq(struct xrdp_mcs *self) { int opcode; @@ -630,7 +630,7 @@ xrdp_mcs_recv_cjrq(struct xrdp_mcs *self) /*****************************************************************************/ /* returns error */ -static int APP_CC +static int xrdp_mcs_ber_out_header(struct xrdp_mcs *self, struct stream *s, int tag_val, int len) { @@ -658,7 +658,7 @@ xrdp_mcs_ber_out_header(struct xrdp_mcs *self, struct stream *s, /*****************************************************************************/ /* returns error */ -static int APP_CC +static int xrdp_mcs_ber_out_int8(struct xrdp_mcs *self, struct stream *s, int value) { xrdp_mcs_ber_out_header(self, s, BER_TAG_INTEGER, 1); @@ -669,7 +669,7 @@ xrdp_mcs_ber_out_int8(struct xrdp_mcs *self, struct stream *s, int value) #if 0 /* not used */ /*****************************************************************************/ /* returns error */ -static int APP_CC +static int xrdp_mcs_ber_out_int16(struct xrdp_mcs *self, struct stream *s, int value) { xrdp_mcs_ber_out_header(self, s, BER_TAG_INTEGER, 2); @@ -681,7 +681,7 @@ xrdp_mcs_ber_out_int16(struct xrdp_mcs *self, struct stream *s, int value) /*****************************************************************************/ /* returns error */ -static int APP_CC +static int xrdp_mcs_ber_out_int24(struct xrdp_mcs *self, struct stream *s, int value) { xrdp_mcs_ber_out_header(self, s, BER_TAG_INTEGER, 3); @@ -693,7 +693,7 @@ xrdp_mcs_ber_out_int24(struct xrdp_mcs *self, struct stream *s, int value) /*****************************************************************************/ /* returns error */ -static int APP_CC +static int xrdp_mcs_out_domain_params(struct xrdp_mcs *self, struct stream *s, int max_channels, int max_users, int max_tokens, @@ -712,7 +712,7 @@ xrdp_mcs_out_domain_params(struct xrdp_mcs *self, struct stream *s, } /*****************************************************************************/ /* prepare server gcc data to send in mcs response msg */ -int APP_CC +int xrdp_mcs_out_gcc_data(struct xrdp_sec *self) { struct stream *s; @@ -869,7 +869,7 @@ xrdp_mcs_out_gcc_data(struct xrdp_sec *self) } /*****************************************************************************/ /* returns error */ -static int APP_CC +static int xrdp_mcs_send_connect_response(struct xrdp_mcs *self) { int data_len; @@ -907,7 +907,7 @@ xrdp_mcs_send_connect_response(struct xrdp_mcs *self) /*****************************************************************************/ /* returns error */ -int APP_CC +int xrdp_mcs_incoming(struct xrdp_mcs *self) { int index; @@ -970,7 +970,7 @@ xrdp_mcs_incoming(struct xrdp_mcs *self) /*****************************************************************************/ /* returns error */ -int APP_CC +int xrdp_mcs_init(struct xrdp_mcs *self, struct stream *s) { xrdp_iso_init(self->iso_layer, s); @@ -982,7 +982,7 @@ xrdp_mcs_init(struct xrdp_mcs *self, struct stream *s) /* returns error */ /* Inform the callback that an mcs packet has been sent. This is needed so the module can send any high priority mcs packets like audio. */ -static int APP_CC +static int xrdp_mcs_call_callback(struct xrdp_mcs *self) { int rv; @@ -1014,7 +1014,7 @@ xrdp_mcs_call_callback(struct xrdp_mcs *self) /*****************************************************************************/ /* returns error */ -int APP_CC +int xrdp_mcs_send(struct xrdp_mcs *self, struct stream *s, int chan) { int len; @@ -1083,7 +1083,7 @@ xrdp_mcs_send(struct xrdp_mcs *self, struct stream *s, int chan) * Internal help function to close the socket * @param self */ -void APP_CC +void close_rdp_socket(struct xrdp_mcs *self) { if (self->iso_layer != 0) @@ -1102,7 +1102,7 @@ close_rdp_socket(struct xrdp_mcs *self) /*****************************************************************************/ /* returns error */ -int APP_CC +int xrdp_mcs_disconnect(struct xrdp_mcs *self) { struct stream *s; diff --git a/libxrdp/xrdp_mppc_enc.c b/libxrdp/xrdp_mppc_enc.c index 93ff84a2..0420876a 100644 --- a/libxrdp/xrdp_mppc_enc.c +++ b/libxrdp/xrdp_mppc_enc.c @@ -431,7 +431,7 @@ do \ * @return struct xrdp_mppc_enc* or nil on failure */ -struct xrdp_mppc_enc * APP_CC +struct xrdp_mppc_enc * mppc_enc_new(int protocol_type) { struct xrdp_mppc_enc *enc; @@ -498,7 +498,7 @@ mppc_enc_new(int protocol_type) * @param enc struct to be deinited */ -void APP_CC +void mppc_enc_free(struct xrdp_mppc_enc *enc) { if (enc == 0) @@ -521,7 +521,7 @@ mppc_enc_free(struct xrdp_mppc_enc *enc) * @return TRUE on success, FALSE on failure */ -static int APP_CC +static int compress_rdp_4(struct xrdp_mppc_enc *enc, tui8 *srcData, int len) { /* RDP 4.0 encoding not yet implemented */ @@ -538,7 +538,7 @@ compress_rdp_4(struct xrdp_mppc_enc *enc, tui8 *srcData, int len) * @return TRUE on success, FALSE on failure */ -static int APP_CC +static int compress_rdp_5(struct xrdp_mppc_enc *enc, tui8 *srcData, int len) { char *outputBuffer; /* points to enc->outputBuffer */ @@ -1007,7 +1007,7 @@ compress_rdp_5(struct xrdp_mppc_enc *enc, tui8 *srcData, int len) * @return TRUE on success, FALSE on failure */ -int APP_CC +int compress_rdp(struct xrdp_mppc_enc *enc, tui8 *srcData, int len) { if ((enc == 0) || (srcData == 0) || (len <= 0) || (len > enc->buf_len)) diff --git a/libxrdp/xrdp_orders.c b/libxrdp/xrdp_orders.c index 3ce0ecb5..7ce5a21b 100644 --- a/libxrdp/xrdp_orders.c +++ b/libxrdp/xrdp_orders.c @@ -41,7 +41,7 @@ #define MAX_ORDERS_SIZE (16 * 1024 - 256) /*****************************************************************************/ -struct xrdp_orders *APP_CC +struct xrdp_orders * xrdp_orders_create(struct xrdp_session *session, struct xrdp_rdp *rdp_layer) { struct xrdp_orders *self; @@ -65,7 +65,7 @@ xrdp_orders_create(struct xrdp_session *session, struct xrdp_rdp *rdp_layer) } /*****************************************************************************/ -void APP_CC +void xrdp_orders_delete(struct xrdp_orders *self) { if (self == 0) @@ -83,7 +83,7 @@ xrdp_orders_delete(struct xrdp_orders *self) /*****************************************************************************/ /* set all values to zero */ /* returns error */ -int APP_CC +int xrdp_orders_reset(struct xrdp_orders *self) { if (xrdp_orders_force_send(self) != 0) @@ -102,7 +102,7 @@ xrdp_orders_reset(struct xrdp_orders *self) /*****************************************************************************/ /* returns error */ -int APP_CC +int xrdp_orders_init(struct xrdp_orders *self) { self->order_level++; @@ -138,7 +138,7 @@ xrdp_orders_init(struct xrdp_orders *self) /*****************************************************************************/ /* returns error */ -int APP_CC +int xrdp_orders_send(struct xrdp_orders *self) { int rv; @@ -177,7 +177,7 @@ xrdp_orders_send(struct xrdp_orders *self) /*****************************************************************************/ /* returns error */ -int APP_CC +int xrdp_orders_force_send(struct xrdp_orders *self) { if (self == 0) @@ -216,7 +216,7 @@ xrdp_orders_force_send(struct xrdp_orders *self) /* check if the current order will fit in packet size of 16384, if not */ /* send what we got and init a new one */ /* returns error */ -int APP_CC +int xrdp_orders_check(struct xrdp_orders *self, int max_size) { int size; @@ -270,7 +270,7 @@ xrdp_orders_check(struct xrdp_orders *self, int max_size) /*****************************************************************************/ /* check if rect is the same as the last one sent */ /* returns boolean */ -static int APP_CC +static int xrdp_orders_last_bounds(struct xrdp_orders *self, struct xrdp_rect *rect) { if (rect == 0) @@ -292,7 +292,7 @@ xrdp_orders_last_bounds(struct xrdp_orders *self, struct xrdp_rect *rect) /*****************************************************************************/ /* check if all coords are within 256 bytes */ /* returns boolean */ -static int APP_CC +static int xrdp_orders_send_delta(struct xrdp_orders *self, int *vals, int count) { int i; @@ -310,7 +310,7 @@ xrdp_orders_send_delta(struct xrdp_orders *self, int *vals, int count) /*****************************************************************************/ /* returns error */ -static int APP_CC +static int xrdp_orders_out_bounds(struct xrdp_orders *self, struct xrdp_rect *rect) { char *bounds_flags_ptr; @@ -428,7 +428,7 @@ xrdp_orders_out_bounds(struct xrdp_orders *self, struct xrdp_rect *rect) /*****************************************************************************/ /* returns error */ -static int APP_CC +static int xrdp_order_pack_small_or_tiny(struct xrdp_orders *self, char *order_flags_ptr, int orders_flags, char *present_ptr, int present, @@ -485,7 +485,7 @@ xrdp_order_pack_small_or_tiny(struct xrdp_orders *self, /* returns error */ /* send a solid rect to client */ /* max size 23 */ -int APP_CC +int xrdp_orders_rect(struct xrdp_orders *self, int x, int y, int cx, int cy, int color, struct xrdp_rect *rect) { @@ -655,7 +655,7 @@ xrdp_orders_rect(struct xrdp_orders *self, int x, int y, int cx, int cy, /* returns error */ /* send a screen blt order */ /* max size 25 */ -int APP_CC +int xrdp_orders_screen_blt(struct xrdp_orders *self, int x, int y, int cx, int cy, int srcx, int srcy, int rop, struct xrdp_rect *rect) @@ -845,7 +845,7 @@ xrdp_orders_screen_blt(struct xrdp_orders *self, int x, int y, /* returns error */ /* send a pat blt order */ /* max size 39 */ -int APP_CC +int xrdp_orders_pat_blt(struct xrdp_orders *self, int x, int y, int cx, int cy, int rop, int bg_color, int fg_color, struct xrdp_brush *brush, @@ -1064,7 +1064,7 @@ xrdp_orders_pat_blt(struct xrdp_orders *self, int x, int y, /* returns error */ /* send a dest blt order */ /* max size 21 */ -int APP_CC +int xrdp_orders_dest_blt(struct xrdp_orders *self, int x, int y, int cx, int cy, int rop, struct xrdp_rect *rect) @@ -1218,7 +1218,7 @@ xrdp_orders_dest_blt(struct xrdp_orders *self, int x, int y, /* returns error */ /* send a line order */ /* max size 32 */ -int APP_CC +int xrdp_orders_line(struct xrdp_orders *self, int mix_mode, int startx, int starty, int endx, int endy, int rop, int bg_color, @@ -1436,7 +1436,7 @@ xrdp_orders_line(struct xrdp_orders *self, int mix_mode, /* returns error */ /* send a mem blt order */ /* max size 30 */ -int APP_CC +int xrdp_orders_mem_blt(struct xrdp_orders *self, int cache_id, int color_table, int x, int y, int cx, int cy, int rop, int srcx, int srcy, @@ -1642,7 +1642,7 @@ xrdp_orders_mem_blt(struct xrdp_orders *self, int cache_id, /*****************************************************************************/ /* returns error */ -int APP_CC +int xrdp_orders_composite_blt(struct xrdp_orders* self, int srcidx, int srcformat, int srcwidth, int srcrepeat, int* srctransform, int mskflags, int mskidx, int mskformat, @@ -1971,7 +1971,7 @@ xrdp_orders_composite_blt(struct xrdp_orders* self, int srcidx, int srcformat, /*****************************************************************************/ /* returns error */ -int APP_CC +int xrdp_orders_text(struct xrdp_orders *self, int font, int flags, int mixmode, int fg_color, int bg_color, @@ -2168,7 +2168,7 @@ xrdp_orders_text(struct xrdp_orders *self, /*****************************************************************************/ /* returns error */ /* when a palette gets sent, send the main palette too */ -int APP_CC +int xrdp_orders_send_palette(struct xrdp_orders *self, int *palette, int cache_id) { @@ -2204,7 +2204,7 @@ xrdp_orders_send_palette(struct xrdp_orders *self, int *palette, /*****************************************************************************/ /* returns error */ /* max size width * height * Bpp + 16 */ -int APP_CC +int xrdp_orders_send_raw_bitmap(struct xrdp_orders *self, int width, int height, int bpp, char *data, int cache_id, int cache_idx) @@ -2324,7 +2324,7 @@ xrdp_orders_send_raw_bitmap(struct xrdp_orders *self, /*****************************************************************************/ /* returns error */ /* max size width * height * Bpp + 16 */ -int APP_CC +int xrdp_orders_send_bitmap(struct xrdp_orders *self, int width, int height, int bpp, char *data, int cache_id, int cache_idx) @@ -2432,7 +2432,7 @@ xrdp_orders_send_bitmap(struct xrdp_orders *self, /* returns error */ /* max size datasize + 18*/ /* todo, only sends one for now */ -int APP_CC +int xrdp_orders_send_font(struct xrdp_orders *self, struct xrdp_font_char *font_char, int font_index, int char_index) @@ -2477,7 +2477,7 @@ xrdp_orders_send_font(struct xrdp_orders *self, /*****************************************************************************/ /* returns error */ /* max size width * height * Bpp + 14 */ -int APP_CC +int xrdp_orders_send_raw_bitmap2(struct xrdp_orders *self, int width, int height, int bpp, char *data, int cache_id, int cache_idx) @@ -2599,7 +2599,7 @@ xrdp_orders_send_raw_bitmap2(struct xrdp_orders *self, /*****************************************************************************/ /* returns error */ /* max size width * height * Bpp + 14 */ -int APP_CC +int xrdp_orders_send_bitmap2(struct xrdp_orders *self, int width, int height, int bpp, char *data, int cache_id, int cache_idx, int hints) @@ -2712,7 +2712,7 @@ xrdp_orders_send_as_jpeg(struct xrdp_orders *self, #if defined(XRDP_NEUTRINORDP) /*****************************************************************************/ /* secondary drawing order (bitmap v3) using remotefx compression */ -static int APP_CC +static int xrdp_orders_send_as_rfx(struct xrdp_orders *self, int width, int height, int bpp, int hints) @@ -2740,7 +2740,7 @@ xrdp_orders_send_as_rfx(struct xrdp_orders *self, #if defined(XRDP_JPEG) || defined(XRDP_NEUTRINORDP) /*****************************************************************************/ -static int APP_CC +static int xrdp_orders_out_v3(struct xrdp_orders *self, int cache_id, int cache_idx, char *buf, int bufsize, int width, int height, int bpp, int codec_id) @@ -2783,7 +2783,7 @@ xrdp_orders_out_v3(struct xrdp_orders *self, int cache_id, int cache_idx, /*****************************************************************************/ /* secondary drawing order (bitmap v3) using remotefx compression */ -int APP_CC +int xrdp_orders_send_bitmap3(struct xrdp_orders *self, int width, int height, int bpp, char *data, int cache_id, int cache_idx, int hints) @@ -2891,7 +2891,7 @@ xrdp_orders_send_bitmap3(struct xrdp_orders *self, /*****************************************************************************/ /* returns error */ /* send a brush cache entry */ -int APP_CC +int xrdp_orders_send_brush(struct xrdp_orders *self, int width, int height, int bpp, int type, int size, char *data, int cache_id) { @@ -2922,7 +2922,7 @@ xrdp_orders_send_brush(struct xrdp_orders *self, int width, int height, /*****************************************************************************/ /* returns error */ /* send an off screen bitmap entry */ -int APP_CC +int xrdp_orders_send_create_os_surface(struct xrdp_orders *self, int id, int width, int height, struct list *del_list) @@ -2981,7 +2981,7 @@ xrdp_orders_send_create_os_surface(struct xrdp_orders *self, int id, /*****************************************************************************/ /* returns error */ -int APP_CC +int xrdp_orders_send_switch_os_surface(struct xrdp_orders *self, int id) { int order_flags; diff --git a/libxrdp/xrdp_orders_rail.c b/libxrdp/xrdp_orders_rail.c index 19da4c2c..9bbd9e12 100644 --- a/libxrdp/xrdp_orders_rail.c +++ b/libxrdp/xrdp_orders_rail.c @@ -30,7 +30,7 @@ /*****************************************************************************/ /* RAIL */ /* returns error */ -int APP_CC +int xrdp_orders_send_window_delete(struct xrdp_orders *self, int window_id) { int order_size; @@ -61,7 +61,7 @@ xrdp_orders_send_window_delete(struct xrdp_orders *self, int window_id) /* returns error */ /* flags can contain WINDOW_ORDER_STATE_NEW and/or WINDOW_ORDER_FIELD_ICON_BIG */ -int APP_CC +int xrdp_orders_send_window_cached_icon(struct xrdp_orders *self, int window_id, int cache_entry, int cache_id, int flags) @@ -97,7 +97,7 @@ xrdp_orders_send_window_cached_icon(struct xrdp_orders *self, /*****************************************************************************/ /* RAIL */ /* returns error */ -static int APP_CC +static int xrdp_orders_send_ts_icon(struct stream *s, int cache_entry, int cache_id, struct rail_icon_info *icon_info) { @@ -140,7 +140,7 @@ xrdp_orders_send_ts_icon(struct stream *s, int cache_entry, int cache_id, /* returns error */ /* flags can contain WINDOW_ORDER_STATE_NEW and/or WINDOW_ORDER_FIELD_ICON_BIG */ -int APP_CC +int xrdp_orders_send_window_icon(struct xrdp_orders *self, int window_id, int cache_entry, int cache_id, struct rail_icon_info *icon_info, @@ -189,7 +189,7 @@ xrdp_orders_send_window_icon(struct xrdp_orders *self, /*****************************************************************************/ /* returns error */ -static int APP_CC +static int xrdp_orders_send_as_unicode(struct stream *s, const char *text) { int str_chars; @@ -222,7 +222,7 @@ xrdp_orders_send_as_unicode(struct stream *s, const char *text) /* RAIL */ /* returns error */ /* flags can contain WINDOW_ORDER_STATE_NEW */ -int APP_CC +int xrdp_orders_send_window_new_update(struct xrdp_orders *self, int window_id, struct rail_window_state_order *window_state, int flags) @@ -478,7 +478,7 @@ xrdp_orders_send_window_new_update(struct xrdp_orders *self, int window_id, /*****************************************************************************/ /* RAIL */ /* returns error */ -int APP_CC +int xrdp_orders_send_notify_delete(struct xrdp_orders *self, int window_id, int notify_id) { @@ -511,7 +511,7 @@ xrdp_orders_send_notify_delete(struct xrdp_orders *self, int window_id, /* RAIL */ /* returns error */ /* flags can contain WINDOW_ORDER_STATE_NEW */ -int APP_CC +int xrdp_orders_send_notify_new_update(struct xrdp_orders *self, int window_id, int notify_id, struct rail_notify_state_order *notify_state, @@ -652,7 +652,7 @@ xrdp_orders_send_notify_new_update(struct xrdp_orders *self, /* RAIL */ /* returns error */ /* used for both Non-Monitored Desktop and Actively Monitored Desktop */ -int APP_CC +int xrdp_orders_send_monitored_desktop(struct xrdp_orders *self, struct rail_monitored_desktop_order *mdo, int flags) diff --git a/libxrdp/xrdp_orders_rail.h b/libxrdp/xrdp_orders_rail.h index 475b8f17..db8a785f 100644 --- a/libxrdp/xrdp_orders_rail.h +++ b/libxrdp/xrdp_orders_rail.h @@ -19,30 +19,30 @@ #if !defined(_XRDP_ORDERS_RAIL_H) #define _XRDP_ORDERS_RAIL_H -int APP_CC +int xrdp_orders_send_window_delete(struct xrdp_orders *self, int window_id); -int APP_CC +int xrdp_orders_send_window_cached_icon(struct xrdp_orders *self, int window_id, int cache_entry, int cache_id, int flags); -int APP_CC +int xrdp_orders_send_window_icon(struct xrdp_orders *self, int window_id, int cache_entry, int cache_id, struct rail_icon_info *icon_info, int flags); -int APP_CC +int xrdp_orders_send_window_new_update(struct xrdp_orders *self, int window_id, struct rail_window_state_order *window_state, int flags); -int APP_CC +int xrdp_orders_send_notify_delete(struct xrdp_orders *self, int window_id, int notify_id); -int APP_CC +int xrdp_orders_send_notify_new_update(struct xrdp_orders *self, int window_id, int notify_id, struct rail_notify_state_order *notify_state, int flags); -int APP_CC +int xrdp_orders_send_monitored_desktop(struct xrdp_orders *self, struct rail_monitored_desktop_order *mdo, int flags); diff --git a/libxrdp/xrdp_rdp.c b/libxrdp/xrdp_rdp.c index ff53cb80..adb66d99 100644 --- a/libxrdp/xrdp_rdp.c +++ b/libxrdp/xrdp_rdp.c @@ -40,7 +40,7 @@ #define FASTPATH_FRAG_SIZE (16 * 1024 - 128) /*****************************************************************************/ -static int APP_CC +static int xrdp_rdp_read_config(struct xrdp_client_info *client_info) { int index = 0; @@ -357,7 +357,7 @@ xrdp_rdp_detect_cpu(void) #endif /*****************************************************************************/ -struct xrdp_rdp *APP_CC +struct xrdp_rdp * xrdp_rdp_create(struct xrdp_session *session, struct trans *trans) { struct xrdp_rdp *self = (struct xrdp_rdp *)NULL; @@ -392,7 +392,7 @@ xrdp_rdp_create(struct xrdp_session *session, struct trans *trans) } /*****************************************************************************/ -void APP_CC +void xrdp_rdp_delete(struct xrdp_rdp *self) { if (self == 0) @@ -409,7 +409,7 @@ xrdp_rdp_delete(struct xrdp_rdp *self) } /*****************************************************************************/ -int APP_CC +int xrdp_rdp_init(struct xrdp_rdp *self, struct stream *s) { if (xrdp_sec_init(self->sec_layer, s) != 0) @@ -422,7 +422,7 @@ xrdp_rdp_init(struct xrdp_rdp *self, struct stream *s) } /*****************************************************************************/ -int APP_CC +int xrdp_rdp_init_data(struct xrdp_rdp *self, struct stream *s) { if (xrdp_sec_init(self->sec_layer, s) != 0) @@ -436,7 +436,7 @@ xrdp_rdp_init_data(struct xrdp_rdp *self, struct stream *s) /*****************************************************************************/ /* returns error */ -int APP_CC +int xrdp_rdp_recv(struct xrdp_rdp *self, struct stream *s, int *code) { int error = 0; @@ -535,7 +535,7 @@ xrdp_rdp_recv(struct xrdp_rdp *self, struct stream *s, int *code) } /*****************************************************************************/ -int APP_CC +int xrdp_rdp_send(struct xrdp_rdp *self, struct stream *s, int pdu_type) { int len = 0; @@ -558,7 +558,7 @@ xrdp_rdp_send(struct xrdp_rdp *self, struct stream *s, int pdu_type) } /*****************************************************************************/ -int APP_CC +int xrdp_rdp_send_data(struct xrdp_rdp *self, struct stream *s, int data_pdu_type) { @@ -647,7 +647,7 @@ xrdp_rdp_send_data(struct xrdp_rdp *self, struct stream *s, /*****************************************************************************/ /* returns the fastpath rdp byte count */ -int APP_CC +int xrdp_rdp_get_fastpath_bytes(struct xrdp_rdp *self) { if (self->client_info.rdp_compression) @@ -658,7 +658,7 @@ xrdp_rdp_get_fastpath_bytes(struct xrdp_rdp *self) } /*****************************************************************************/ -int APP_CC +int xrdp_rdp_init_fastpath(struct xrdp_rdp *self, struct stream *s) { if (xrdp_sec_init_fastpath(self->sec_layer, s) != 0) @@ -680,7 +680,7 @@ xrdp_rdp_init_fastpath(struct xrdp_rdp *self, struct stream *s) /* returns error */ /* 2.2.9.1.2.1 Fast-Path Update (TS_FP_UPDATE) * http://msdn.microsoft.com/en-us/library/cc240622.aspx */ -int APP_CC +int xrdp_rdp_send_fastpath(struct xrdp_rdp *self, struct stream *s, int data_pdu_type) { @@ -805,7 +805,7 @@ xrdp_rdp_send_fastpath(struct xrdp_rdp *self, struct stream *s, } /*****************************************************************************/ -int APP_CC +int xrdp_rdp_send_data_update_sync(struct xrdp_rdp *self) { struct stream *s = (struct stream *)NULL; @@ -863,7 +863,7 @@ xrdp_rdp_send_data_update_sync(struct xrdp_rdp *self) } /*****************************************************************************/ -int APP_CC +int xrdp_rdp_incoming(struct xrdp_rdp *self) { struct xrdp_iso *iso; @@ -907,7 +907,7 @@ xrdp_rdp_incoming(struct xrdp_rdp *self) } /*****************************************************************************/ -static int APP_CC +static int xrdp_rdp_process_data_pointer(struct xrdp_rdp *self, struct stream *s) { return 0; @@ -915,7 +915,7 @@ xrdp_rdp_process_data_pointer(struct xrdp_rdp *self, struct stream *s) /*****************************************************************************/ /* RDP_DATA_PDU_INPUT */ -static int APP_CC +static int xrdp_rdp_process_data_input(struct xrdp_rdp *self, struct stream *s) { int num_events; @@ -966,7 +966,7 @@ xrdp_rdp_process_data_input(struct xrdp_rdp *self, struct stream *s) } /*****************************************************************************/ -static int APP_CC +static int xrdp_rdp_send_synchronise(struct xrdp_rdp *self) { struct stream *s; @@ -995,7 +995,7 @@ xrdp_rdp_send_synchronise(struct xrdp_rdp *self) } /*****************************************************************************/ -static int APP_CC +static int xrdp_rdp_send_control(struct xrdp_rdp *self, int action) { struct stream *s; @@ -1025,7 +1025,7 @@ xrdp_rdp_send_control(struct xrdp_rdp *self, int action) } /*****************************************************************************/ -static int APP_CC +static int xrdp_rdp_process_data_control(struct xrdp_rdp *self, struct stream *s) { int action; @@ -1054,7 +1054,7 @@ xrdp_rdp_process_data_control(struct xrdp_rdp *self, struct stream *s) } /*****************************************************************************/ -static int APP_CC +static int xrdp_rdp_process_data_sync(struct xrdp_rdp *self) { DEBUG(("xrdp_rdp_process_data_sync")); @@ -1062,7 +1062,7 @@ xrdp_rdp_process_data_sync(struct xrdp_rdp *self) } /*****************************************************************************/ -static int APP_CC +static int xrdp_rdp_process_screen_update(struct xrdp_rdp *self, struct stream *s) { int left; @@ -1089,7 +1089,7 @@ xrdp_rdp_process_screen_update(struct xrdp_rdp *self, struct stream *s) } /*****************************************************************************/ -static int APP_CC +static int xrdp_rdp_send_fontmap(struct xrdp_rdp *self) { struct stream *s; @@ -1121,7 +1121,7 @@ xrdp_rdp_send_fontmap(struct xrdp_rdp *self) } /*****************************************************************************/ -static int APP_CC +static int xrdp_rdp_process_data_font(struct xrdp_rdp *self, struct stream *s) { int seq; @@ -1151,7 +1151,7 @@ xrdp_rdp_process_data_font(struct xrdp_rdp *self, struct stream *s) /*****************************************************************************/ /* sent 37 pdu */ -static int APP_CC +static int xrdp_rdp_send_disconnect_query_response(struct xrdp_rdp *self) { struct stream *s; @@ -1180,7 +1180,7 @@ xrdp_rdp_send_disconnect_query_response(struct xrdp_rdp *self) #if 0 /* not used */ /*****************************************************************************/ /* sent RDP_DATA_PDU_DISCONNECT 47 pdu */ -static int APP_CC +static int xrdp_rdp_send_disconnect_reason(struct xrdp_rdp *self, int reason) { struct stream *s; @@ -1209,7 +1209,7 @@ xrdp_rdp_send_disconnect_reason(struct xrdp_rdp *self, int reason) #endif /*****************************************************************************/ -static int APP_CC +static int xrdp_rdp_process_frame_ack(struct xrdp_rdp *self, struct stream *s) { int frame_id; @@ -1228,7 +1228,7 @@ xrdp_rdp_process_frame_ack(struct xrdp_rdp *self, struct stream *s) /*****************************************************************************/ /* RDP_PDU_DATA */ -int APP_CC +int xrdp_rdp_process_data(struct xrdp_rdp *self, struct stream *s) { int data_type; @@ -1283,7 +1283,7 @@ xrdp_rdp_process_data(struct xrdp_rdp *self, struct stream *s) return 0; } /*****************************************************************************/ -int APP_CC +int xrdp_rdp_disconnect(struct xrdp_rdp *self) { int rv; @@ -1295,7 +1295,7 @@ xrdp_rdp_disconnect(struct xrdp_rdp *self) } /*****************************************************************************/ -int APP_CC +int xrdp_rdp_send_deactivate(struct xrdp_rdp *self) { struct stream *s; @@ -1326,7 +1326,7 @@ xrdp_rdp_send_deactivate(struct xrdp_rdp *self) } /*****************************************************************************/ -int APP_CC +int xrdp_rdp_send_session_info(struct xrdp_rdp *self, const char *data, int data_bytes) { diff --git a/libxrdp/xrdp_sec.c b/libxrdp/xrdp_sec.c index 2ef51d49..1cb038e9 100644 --- a/libxrdp/xrdp_sec.c +++ b/libxrdp/xrdp_sec.c @@ -190,7 +190,7 @@ static const tui8 g_fips_ivec[8] = }; /*****************************************************************************/ -static void APP_CC +static void hex_str_to_bin(char *in, char *out, int out_len) { int in_index; @@ -225,7 +225,7 @@ hex_str_to_bin(char *in, char *out, int out_len) } /*****************************************************************************/ -static void APP_CC +static void xrdp_load_keyboard_layout(struct xrdp_client_info *client_info) { int fd; @@ -440,7 +440,7 @@ xrdp_load_keyboard_layout(struct xrdp_client_info *client_info) } /*****************************************************************************/ -struct xrdp_sec *APP_CC +struct xrdp_sec * xrdp_sec_create(struct xrdp_rdp *owner, struct trans *trans) { struct xrdp_sec *self; @@ -461,7 +461,7 @@ xrdp_sec_create(struct xrdp_rdp *owner, struct trans *trans) } /*****************************************************************************/ -void APP_CC +void xrdp_sec_delete(struct xrdp_sec *self) { if (self == 0) @@ -487,7 +487,7 @@ xrdp_sec_delete(struct xrdp_sec *self) /*****************************************************************************/ /* returns error */ -int APP_CC +int xrdp_sec_init(struct xrdp_sec *self, struct stream *s) { if (xrdp_mcs_init(self->mcs_layer, s) != 0) @@ -516,7 +516,7 @@ xrdp_sec_init(struct xrdp_sec *self, struct stream *s) /*****************************************************************************/ /* Reduce key entropy from 64 to 40 bits */ -static void APP_CC +static void xrdp_sec_make_40bit(char *key) { key[0] = 0xd1; @@ -527,7 +527,7 @@ xrdp_sec_make_40bit(char *key) /*****************************************************************************/ /* returns error */ /* update an encryption key */ -static int APP_CC +static int xrdp_sec_update(char *key, char *update_key, int key_len) { char shasig[20]; @@ -563,7 +563,7 @@ xrdp_sec_update(char *key, char *update_key, int key_len) } /*****************************************************************************/ -static void APP_CC +static void xrdp_sec_fips_decrypt(struct xrdp_sec *self, char *data, int len) { LLOGLN(10, ("xrdp_sec_fips_decrypt:")); @@ -572,7 +572,7 @@ xrdp_sec_fips_decrypt(struct xrdp_sec *self, char *data, int len) } /*****************************************************************************/ -static void APP_CC +static void xrdp_sec_decrypt(struct xrdp_sec *self, char *data, int len) { LLOGLN(10, ("xrdp_sec_decrypt:")); @@ -589,7 +589,7 @@ xrdp_sec_decrypt(struct xrdp_sec *self, char *data, int len) } /*****************************************************************************/ -static void APP_CC +static void xrdp_sec_fips_encrypt(struct xrdp_sec *self, char *data, int len) { LLOGLN(10, ("xrdp_sec_fips_encrypt:")); @@ -598,7 +598,7 @@ xrdp_sec_fips_encrypt(struct xrdp_sec *self, char *data, int len) } /*****************************************************************************/ -static void APP_CC +static void xrdp_sec_encrypt(struct xrdp_sec *self, char *data, int len) { LLOGLN(10, ("xrdp_sec_encrypt:")); @@ -616,7 +616,7 @@ xrdp_sec_encrypt(struct xrdp_sec *self, char *data, int len) } /*****************************************************************************/ -static int APP_CC +static int unicode_in(struct stream *s, int uni_len, char *dst, int dst_len) { int dst_index; @@ -652,7 +652,7 @@ unicode_in(struct stream *s, int uni_len, char *dst, int dst_len) /*****************************************************************************/ /* returns error */ -static int APP_CC +static int xrdp_sec_process_logon_info(struct xrdp_sec *self, struct stream *s) { int flags = 0; @@ -865,7 +865,7 @@ xrdp_sec_process_logon_info(struct xrdp_sec *self, struct stream *s) /*****************************************************************************/ /* returns error */ -static int APP_CC +static int xrdp_sec_send_lic_initial(struct xrdp_sec *self) { struct stream *s; @@ -895,7 +895,7 @@ xrdp_sec_send_lic_initial(struct xrdp_sec *self) /*****************************************************************************/ /* returns error */ -static int APP_CC +static int xrdp_sec_send_lic_response(struct xrdp_sec *self) { struct stream *s; @@ -924,7 +924,7 @@ xrdp_sec_send_lic_response(struct xrdp_sec *self) /*****************************************************************************/ /* returns error */ -static int APP_CC +static int xrdp_sec_send_media_lic_response(struct xrdp_sec *self) { struct stream *s; @@ -952,7 +952,7 @@ xrdp_sec_send_media_lic_response(struct xrdp_sec *self) } /*****************************************************************************/ -static void APP_CC +static void xrdp_sec_rsa_op(struct xrdp_sec *self, char *out, char *in, int in_bytes, char *mod, char *exp) { @@ -962,7 +962,7 @@ xrdp_sec_rsa_op(struct xrdp_sec *self, char *out, char *in, int in_bytes, } /*****************************************************************************/ -static void APP_CC +static void xrdp_sec_hash_48(char *out, char *in, char *salt1, char *salt2, int salt) { int i; @@ -996,7 +996,7 @@ xrdp_sec_hash_48(char *out, char *in, char *salt1, char *salt2, int salt) } /*****************************************************************************/ -static void APP_CC +static void xrdp_sec_hash_16(char *out, char *in, char *salt1, char *salt2) { void *md5_info; @@ -1011,7 +1011,7 @@ xrdp_sec_hash_16(char *out, char *in, char *salt1, char *salt2) } /*****************************************************************************/ -static void APP_CC +static void fips_expand_key_bits(const char *in, char *out) { tui8 buf[32]; @@ -1055,7 +1055,7 @@ fips_expand_key_bits(const char *in, char *out) } /****************************************************************************/ -static void APP_CC +static void xrdp_sec_fips_establish_keys(struct xrdp_sec *self) { char server_encrypt_key[32]; @@ -1100,7 +1100,7 @@ xrdp_sec_fips_establish_keys(struct xrdp_sec *self) } /****************************************************************************/ -static void APP_CC +static void xrdp_sec_establish_keys(struct xrdp_sec *self) { char session_key[48]; @@ -1141,7 +1141,7 @@ xrdp_sec_establish_keys(struct xrdp_sec *self) /*****************************************************************************/ /* returns error */ -int APP_CC +int xrdp_sec_recv_fastpath(struct xrdp_sec *self, struct stream *s) { int ver; @@ -1203,7 +1203,7 @@ xrdp_sec_recv_fastpath(struct xrdp_sec *self, struct stream *s) } /*****************************************************************************/ /* returns error */ -int APP_CC +int xrdp_sec_recv(struct xrdp_sec *self, struct stream *s, int *chan) { int flags; @@ -1368,7 +1368,7 @@ buf_out_uint32(char *buffer, int value) /*****************************************************************************/ /* Generate a MAC hash (5.2.3.1), using a combination of SHA1 and MD5 */ -static void APP_CC +static void xrdp_sec_fips_sign(struct xrdp_sec *self, char *out, int out_len, char *data, int data_len) { @@ -1385,7 +1385,7 @@ xrdp_sec_fips_sign(struct xrdp_sec *self, char *out, int out_len, /*****************************************************************************/ /* Generate a MAC hash (5.2.3.1), using a combination of SHA1 and MD5 */ -static void APP_CC +static void xrdp_sec_sign(struct xrdp_sec *self, char *out, int out_len, char *data, int data_len) { @@ -1416,7 +1416,7 @@ xrdp_sec_sign(struct xrdp_sec *self, char *out, int out_len, /*****************************************************************************/ /* returns error */ -int APP_CC +int xrdp_sec_send(struct xrdp_sec *self, struct stream *s, int chan) { int datalen; @@ -1466,7 +1466,7 @@ xrdp_sec_send(struct xrdp_sec *self, struct stream *s, int chan) /*****************************************************************************/ /* returns the fastpath sec byte count */ -int APP_CC +int xrdp_sec_get_fastpath_bytes(struct xrdp_sec *self) { if (self->crypt_level == CRYPT_LEVEL_FIPS) @@ -1482,7 +1482,7 @@ xrdp_sec_get_fastpath_bytes(struct xrdp_sec *self) /*****************************************************************************/ /* returns error */ -int APP_CC +int xrdp_sec_init_fastpath(struct xrdp_sec *self, struct stream *s) { if (xrdp_fastpath_init(self->fastpath_layer, s) != 0) @@ -1508,7 +1508,7 @@ xrdp_sec_init_fastpath(struct xrdp_sec *self, struct stream *s) /* returns error */ /* 2.2.9.1.2 Server Fast-Path Update PDU (TS_FP_UPDATE_PDU) * http://msdn.microsoft.com/en-us/library/cc240621.aspx */ -int APP_CC +int xrdp_sec_send_fastpath(struct xrdp_sec *self, struct stream *s) { int secFlags; @@ -1581,7 +1581,7 @@ xrdp_sec_send_fastpath(struct xrdp_sec *self, struct stream *s) /*****************************************************************************/ /* http://msdn.microsoft.com/en-us/library/cc240510.aspx 2.2.1.3.2 Client Core Data (TS_UD_CS_CORE) */ -static int APP_CC +static int xrdp_sec_process_mcs_data_CS_CORE(struct xrdp_sec* self, struct stream* s) { int colorDepth; @@ -1724,7 +1724,7 @@ xrdp_sec_process_mcs_data_CS_CORE(struct xrdp_sec* self, struct stream* s) } /*****************************************************************************/ -static int APP_CC +static int xrdp_sec_process_mcs_data_CS_SECURITY(struct xrdp_sec *self, struct stream* s) { int crypt_method; @@ -1823,7 +1823,7 @@ xrdp_sec_process_mcs_data_CS_SECURITY(struct xrdp_sec *self, struct stream* s) /*****************************************************************************/ /* this adds the mcs channels in the list of channels to be used when creating the server mcs data */ -static int APP_CC +static int xrdp_sec_process_mcs_data_channels(struct xrdp_sec *self, struct stream *s) { int num_channels; @@ -1884,7 +1884,7 @@ xrdp_sec_process_mcs_data_channels(struct xrdp_sec *self, struct stream *s) /*****************************************************************************/ /* reads the client monitors data */ -static int APP_CC +static int xrdp_sec_process_mcs_data_monitors(struct xrdp_sec *self, struct stream *s) { int index; @@ -2014,7 +2014,7 @@ xrdp_sec_process_mcs_data_monitors(struct xrdp_sec *self, struct stream *s) /*****************************************************************************/ /* process client mcs data, we need some things in here to create the server mcs data */ -int APP_CC +int xrdp_sec_process_mcs_data(struct xrdp_sec *self) { struct stream *s = (struct stream *)NULL; @@ -2112,7 +2112,7 @@ xrdp_sec_process_mcs_data(struct xrdp_sec *self) /*****************************************************************************/ /* process the mcs client data we received from the mcs layer */ -static int APP_CC +static int xrdp_sec_in_mcs_data(struct xrdp_sec *self) { struct stream *s = (struct stream *)NULL; @@ -2176,7 +2176,7 @@ xrdp_sec_in_mcs_data(struct xrdp_sec *self) /*****************************************************************************/ /* returns error */ -int APP_CC +int xrdp_sec_init_rdp_security(struct xrdp_sec *self) { switch (self->rdp_layer->client_info.crypt_level) @@ -2228,7 +2228,7 @@ xrdp_sec_init_rdp_security(struct xrdp_sec *self) } /*****************************************************************************/ -int APP_CC +int xrdp_sec_incoming(struct xrdp_sec *self) { struct list *items = NULL; @@ -2364,7 +2364,7 @@ xrdp_sec_incoming(struct xrdp_sec *self) } /*****************************************************************************/ -int APP_CC +int xrdp_sec_disconnect(struct xrdp_sec *self) { int rv; diff --git a/libxrdp/xrdp_surface.c b/libxrdp/xrdp_surface.c index 85978c0a..73c7465a 100644 --- a/libxrdp/xrdp_surface.c +++ b/libxrdp/xrdp_surface.c @@ -25,7 +25,7 @@ #include "freerdp/codec/rfx.h" /*****************************************************************************/ -struct xrdp_surface *APP_CC +struct xrdp_surface * xrdp_surface_create(struct xrdp_session *session, struct xrdp_fastpath *fastpath) { struct xrdp_surface *self; @@ -39,7 +39,7 @@ xrdp_surface_create(struct xrdp_session *session, struct xrdp_fastpath *fastpath } /*****************************************************************************/ -void APP_CC +void xrdp_surface_delete(struct xrdp_surface *self) { STREAM *s; @@ -60,14 +60,14 @@ xrdp_surface_delete(struct xrdp_surface *self) /*****************************************************************************/ /* returns error */ -int APP_CC +int xrdp_surface_reset(struct xrdp_surface *self) { return 0; } /*****************************************************************************/ -int APP_CC +int xrdp_surface_init(struct xrdp_surface *self) { int width; @@ -89,7 +89,7 @@ xrdp_surface_init(struct xrdp_surface *self) } /*****************************************************************************/ -int APP_CC +int xrdp_surface_send_surface_bits(struct xrdp_surface *self, int bpp, char *data, int x, int y, int cx, int cy) { @@ -153,7 +153,7 @@ xrdp_surface_send_surface_bits(struct xrdp_surface *self, int bpp, char *data, } /*****************************************************************************/ -int APP_CC +int xrdp_surface_send_frame_marker(struct xrdp_surface *self, uint16 frameAction, uint32 frameId) { @@ -26,7 +26,7 @@ /*****************************************************************************/ /* return error */ -int DEFAULT_CC +int lib_mod_start(struct mod *mod, int w, int h, int bpp) { LIB_DEBUG(mod, "in lib_mod_start"); @@ -39,7 +39,7 @@ lib_mod_start(struct mod *mod, int w, int h, int bpp) /******************************************************************************/ /* return error */ -int DEFAULT_CC +int lib_mod_connect(struct mod *mod) { LIB_DEBUG(mod, "in lib_mod_connect"); @@ -49,7 +49,7 @@ lib_mod_connect(struct mod *mod) /******************************************************************************/ /* return error */ -int DEFAULT_CC +int lib_mod_event(struct mod *mod, int msg, long param1, long param2, long param3, long param4) { @@ -60,7 +60,7 @@ lib_mod_event(struct mod *mod, int msg, long param1, long param2, /******************************************************************************/ /* return error */ -int DEFAULT_CC +int lib_mod_signal(struct mod *mod) { LIB_DEBUG(mod, "in lib_mod_signal"); @@ -70,7 +70,7 @@ lib_mod_signal(struct mod *mod) /******************************************************************************/ /* return error */ -int DEFAULT_CC +int lib_mod_end(struct mod *mod) { return 0; @@ -78,7 +78,7 @@ lib_mod_end(struct mod *mod) /******************************************************************************/ /* return error */ -int DEFAULT_CC +int lib_mod_set_param(struct mod *mod, const char *name, const char *value) { return 0; diff --git a/neutrinordp/xrdp-color.c b/neutrinordp/xrdp-color.c index bcbdfa2b..1d3ff2e2 100644 --- a/neutrinordp/xrdp-color.c +++ b/neutrinordp/xrdp-color.c @@ -23,7 +23,7 @@ #include "xrdp-neutrinordp.h" -char *APP_CC +char * convert_bitmap(int in_bpp, int out_bpp, char *bmpdata, int width, int height, int *palette) { @@ -246,7 +246,7 @@ convert_bitmap(int in_bpp, int out_bpp, char *bmpdata, /*****************************************************************************/ /* returns color or 0 */ -int APP_CC +int convert_color(int in_bpp, int out_bpp, int in_color, int *palette) { int pixel; diff --git a/neutrinordp/xrdp-color.h b/neutrinordp/xrdp-color.h index acf63780..74df98a5 100644 --- a/neutrinordp/xrdp-color.h +++ b/neutrinordp/xrdp-color.h @@ -20,10 +20,10 @@ #ifndef __XRDP_COLOR_H #define __XRDP_COLOR_H -char *APP_CC +char * convert_bitmap(int in_bpp, int out_bpp, char *bmpdata, int width, int height, int *palette); -int APP_CC +int convert_color(int in_bpp, int out_bpp, int in_color, int *palette); #endif diff --git a/neutrinordp/xrdp-neutrinordp.c b/neutrinordp/xrdp-neutrinordp.c index 7c854ee7..a2ef4fc2 100644 --- a/neutrinordp/xrdp-neutrinordp.c +++ b/neutrinordp/xrdp-neutrinordp.c @@ -64,7 +64,7 @@ verifyColorMap(struct mod *mod) /*****************************************************************************/ /* return error */ -static int DEFAULT_CC +static int lxrdp_start(struct mod *mod, int w, int h, int bpp) { rdpSettings *settings; @@ -86,7 +86,7 @@ lxrdp_start(struct mod *mod, int w, int h, int bpp) /******************************************************************************/ /* return error */ -static int DEFAULT_CC +static int lxrdp_connect(struct mod *mod) { boolean ok; @@ -193,7 +193,7 @@ lxrdp_connect(struct mod *mod) /******************************************************************************/ /* return error */ -static int DEFAULT_CC +static int lxrdp_event(struct mod *mod, int msg, long param1, long param2, long param3, long param4) { @@ -393,7 +393,7 @@ lxrdp_event(struct mod *mod, int msg, long param1, long param2, /******************************************************************************/ /* return error */ -static int DEFAULT_CC +static int lxrdp_signal(struct mod *mod) { LLOGLN(10, ("lxrdp_signal:")); @@ -402,7 +402,7 @@ lxrdp_signal(struct mod *mod) /******************************************************************************/ /* return error */ -static int DEFAULT_CC +static int lxrdp_end(struct mod *mod) { int i; @@ -430,7 +430,7 @@ lxrdp_end(struct mod *mod) /******************************************************************************/ /* return error */ -static int DEFAULT_CC +static int lxrdp_set_param(struct mod *mod, const char *name, const char *value) { rdpSettings *settings; @@ -493,7 +493,7 @@ lxrdp_set_param(struct mod *mod, const char *name, const char *value) } /******************************************************************************/ -static int DEFAULT_CC +static int lxrdp_session_change(struct mod *mod, int a, int b) { LLOGLN(0, ("lxrdp_session_change: - no code here")); @@ -501,7 +501,7 @@ lxrdp_session_change(struct mod *mod, int a, int b) } /******************************************************************************/ -static int DEFAULT_CC +static int lxrdp_get_wait_objs(struct mod *mod, tbus *read_objs, int *rcount, tbus *write_objs, int *wcount, int *timeout) { @@ -524,7 +524,7 @@ lxrdp_get_wait_objs(struct mod *mod, tbus *read_objs, int *rcount, } /******************************************************************************/ -static int DEFAULT_CC +static int lxrdp_check_wait_objs(struct mod *mod) { boolean ok; @@ -542,7 +542,7 @@ lxrdp_check_wait_objs(struct mod *mod) } /******************************************************************************/ -static void DEFAULT_CC +static void lfreerdp_begin_paint(rdpContext *context) { struct mod *mod; @@ -553,7 +553,7 @@ lfreerdp_begin_paint(rdpContext *context) } /******************************************************************************/ -static void DEFAULT_CC +static void lfreerdp_end_paint(rdpContext *context) { struct mod *mod; @@ -564,7 +564,7 @@ lfreerdp_end_paint(rdpContext *context) } /******************************************************************************/ -static void DEFAULT_CC +static void lfreerdp_set_bounds(rdpContext *context, rdpBounds *bounds) { struct mod *mod; @@ -591,7 +591,7 @@ lfreerdp_set_bounds(rdpContext *context, rdpBounds *bounds) } /******************************************************************************/ -static void DEFAULT_CC +static void lfreerdp_bitmap_update(rdpContext *context, BITMAP_UPDATE *bitmap) { struct mod *mod; @@ -664,7 +664,7 @@ lfreerdp_bitmap_update(rdpContext *context, BITMAP_UPDATE *bitmap) } /******************************************************************************/ -static void DEFAULT_CC +static void lfreerdp_dst_blt(rdpContext *context, DSTBLT_ORDER *dstblt) { struct mod *mod; @@ -678,7 +678,7 @@ lfreerdp_dst_blt(rdpContext *context, DSTBLT_ORDER *dstblt) } /******************************************************************************/ -static void DEFAULT_CC +static void lfreerdp_pat_blt(rdpContext *context, PATBLT_ORDER *patblt) { struct mod *mod; @@ -745,7 +745,7 @@ lfreerdp_pat_blt(rdpContext *context, PATBLT_ORDER *patblt) } /******************************************************************************/ -static void DEFAULT_CC +static void lfreerdp_scr_blt(rdpContext *context, SCRBLT_ORDER *scrblt) { struct mod *mod; @@ -760,7 +760,7 @@ lfreerdp_scr_blt(rdpContext *context, SCRBLT_ORDER *scrblt) } /******************************************************************************/ -static void DEFAULT_CC +static void lfreerdp_opaque_rect(rdpContext *context, OPAQUE_RECT_ORDER *opaque_rect) { struct mod *mod; @@ -784,7 +784,7 @@ lfreerdp_opaque_rect(rdpContext *context, OPAQUE_RECT_ORDER *opaque_rect) } /******************************************************************************/ -static void DEFAULT_CC +static void lfreerdp_mem_blt(rdpContext *context, MEMBLT_ORDER *memblt) { int id; @@ -828,7 +828,7 @@ lfreerdp_mem_blt(rdpContext *context, MEMBLT_ORDER *memblt) } /******************************************************************************/ -static void DEFAULT_CC +static void lfreerdp_glyph_index(rdpContext *context, GLYPH_INDEX_ORDER *glyph_index) { struct mod *mod; @@ -889,7 +889,7 @@ lfreerdp_glyph_index(rdpContext *context, GLYPH_INDEX_ORDER *glyph_index) } /******************************************************************************/ -static void DEFAULT_CC +static void lfreerdp_line_to(rdpContext *context, LINE_TO_ORDER *line_to) { struct mod *mod; @@ -916,7 +916,7 @@ lfreerdp_line_to(rdpContext *context, LINE_TO_ORDER *line_to) } /******************************************************************************/ -static void DEFAULT_CC +static void lfreerdp_cache_bitmap(rdpContext *context, CACHE_BITMAP_ORDER *cache_bitmap_order) { LLOGLN(0, ("lfreerdp_cache_bitmap: - no code here")); @@ -924,7 +924,7 @@ lfreerdp_cache_bitmap(rdpContext *context, CACHE_BITMAP_ORDER *cache_bitmap_orde /******************************************************************************/ /* Turn the bitmap upside down*/ -static void DEFAULT_CC +static void lfreerdp_upsidedown(uint8 *destination, CACHE_BITMAP_V2_ORDER *cache_bitmap_v2_order, int server_Bpp) { tui8 *src; @@ -951,7 +951,7 @@ lfreerdp_upsidedown(uint8 *destination, CACHE_BITMAP_V2_ORDER *cache_bitmap_v2_o } /******************************************************************************/ -static void DEFAULT_CC +static void lfreerdp_cache_bitmapV2(rdpContext *context, CACHE_BITMAP_V2_ORDER *cache_bitmap_v2_order) { @@ -1034,7 +1034,7 @@ lfreerdp_cache_bitmapV2(rdpContext *context, } /******************************************************************************/ -static void DEFAULT_CC +static void lfreerdp_cache_glyph(rdpContext *context, CACHE_GLYPH_ORDER *cache_glyph_order) { int index; @@ -1062,7 +1062,7 @@ lfreerdp_cache_glyph(rdpContext *context, CACHE_GLYPH_ORDER *cache_glyph_order) } /******************************************************************************/ -static void DEFAULT_CC +static void lfreerdp_cache_brush(rdpContext *context, CACHE_BRUSH_ORDER *cache_brush_order) { int idx; @@ -1126,7 +1126,7 @@ lfreerdp_cache_brush(rdpContext *context, CACHE_BRUSH_ORDER *cache_brush_order) } /******************************************************************************/ -static void DEFAULT_CC +static void lfreerdp_pointer_position(rdpContext *context, POINTER_POSITION_UPDATE *pointer_position) { @@ -1134,7 +1134,7 @@ lfreerdp_pointer_position(rdpContext *context, } /******************************************************************************/ -static void DEFAULT_CC +static void lfreerdp_pointer_system(rdpContext *context, POINTER_SYSTEM_UPDATE *pointer_system) { @@ -1142,7 +1142,7 @@ lfreerdp_pointer_system(rdpContext *context, } /******************************************************************************/ -static void DEFAULT_CC +static void lfreerdp_pointer_color(rdpContext *context, POINTER_COLOR_UPDATE *pointer_color) { @@ -1150,7 +1150,7 @@ lfreerdp_pointer_color(rdpContext *context, } /******************************************************************************/ -static int APP_CC +static int lfreerdp_get_pixel(void *bits, int width, int height, int bpp, int delta, int x, int y) { @@ -1183,7 +1183,7 @@ lfreerdp_get_pixel(void *bits, int width, int height, int bpp, } /******************************************************************************/ -static int APP_CC +static int lfreerdp_set_pixel(int pixel, void *bits, int width, int height, int bpp, int delta, int x, int y) { @@ -1229,7 +1229,7 @@ lfreerdp_set_pixel(int pixel, void *bits, int width, int height, int bpp, } /******************************************************************************/ -static int APP_CC +static int lfreerdp_convert_color_image(void *dst, int dst_width, int dst_height, int dst_bpp, int dst_delta, void *src, int src_width, int src_height, @@ -1254,7 +1254,7 @@ lfreerdp_convert_color_image(void *dst, int dst_width, int dst_height, } /******************************************************************************/ -static void DEFAULT_CC +static void lfreerdp_pointer_new(rdpContext *context, POINTER_NEW_UPDATE *pointer_new) { @@ -1341,7 +1341,7 @@ lfreerdp_pointer_new(rdpContext *context, } /******************************************************************************/ -static void DEFAULT_CC +static void lfreerdp_pointer_cached(rdpContext *context, POINTER_CACHED_UPDATE *pointer_cached) { @@ -1359,14 +1359,14 @@ lfreerdp_pointer_cached(rdpContext *context, } /******************************************************************************/ -static void DEFAULT_CC +static void lfreerdp_polygon_cb(rdpContext *context, POLYGON_CB_ORDER *polygon_cb) { LLOGLN(0, ("lfreerdp_polygon_sc called:- not supported!!!!!!!!!!!!!!!!!!!!")); } /******************************************************************************/ -static void DEFAULT_CC +static void lfreerdp_polygon_sc(rdpContext *context, POLYGON_SC_ORDER *polygon_sc) { struct mod *mod; @@ -1421,7 +1421,7 @@ lfreerdp_polygon_sc(rdpContext *context, POLYGON_SC_ORDER *polygon_sc) } /******************************************************************************/ -static void DEFAULT_CC +static void lfreerdp_synchronize(rdpContext *context) { struct mod *mod; @@ -1430,7 +1430,7 @@ lfreerdp_synchronize(rdpContext *context) } /******************************************************************************/ -static boolean DEFAULT_CC +static boolean lfreerdp_pre_connect(freerdp *instance) { struct mod *mod; @@ -1597,7 +1597,7 @@ lfreerdp_pre_connect(freerdp *instance) } /*****************************************************************************/ -void DEFAULT_CC +void lrail_WindowCreate(rdpContext *context, WINDOW_ORDER_INFO *orderInfo, WINDOW_STATE_ORDER *window_state) { @@ -1678,7 +1678,7 @@ lrail_WindowCreate(rdpContext *context, WINDOW_ORDER_INFO *orderInfo, } /*****************************************************************************/ -void DEFAULT_CC +void lrail_WindowUpdate(rdpContext *context, WINDOW_ORDER_INFO *orderInfo, WINDOW_STATE_ORDER *window_state) { @@ -1687,7 +1687,7 @@ lrail_WindowUpdate(rdpContext *context, WINDOW_ORDER_INFO *orderInfo, } /*****************************************************************************/ -void DEFAULT_CC +void lrail_WindowDelete(rdpContext *context, WINDOW_ORDER_INFO *orderInfo) { struct mod *mod; @@ -1698,7 +1698,7 @@ lrail_WindowDelete(rdpContext *context, WINDOW_ORDER_INFO *orderInfo) } /*****************************************************************************/ -void DEFAULT_CC +void lrail_WindowIcon(rdpContext *context, WINDOW_ORDER_INFO *orderInfo, WINDOW_ICON_ORDER *window_icon) { @@ -1724,7 +1724,7 @@ lrail_WindowIcon(rdpContext *context, WINDOW_ORDER_INFO *orderInfo, } /*****************************************************************************/ -void DEFAULT_CC +void lrail_WindowCachedIcon(rdpContext *context, WINDOW_ORDER_INFO *orderInfo, WINDOW_CACHED_ICON_ORDER *window_cached_icon) { @@ -1739,7 +1739,7 @@ lrail_WindowCachedIcon(rdpContext *context, WINDOW_ORDER_INFO *orderInfo, } /*****************************************************************************/ -void DEFAULT_CC +void lrail_NotifyIconCreate(rdpContext *context, WINDOW_ORDER_INFO *orderInfo, NOTIFY_ICON_STATE_ORDER *notify_icon_state) { @@ -1796,7 +1796,7 @@ lrail_NotifyIconCreate(rdpContext *context, WINDOW_ORDER_INFO *orderInfo, } /*****************************************************************************/ -void DEFAULT_CC +void lrail_NotifyIconUpdate(rdpContext *context, WINDOW_ORDER_INFO *orderInfo, NOTIFY_ICON_STATE_ORDER *notify_icon_state) { @@ -1805,7 +1805,7 @@ lrail_NotifyIconUpdate(rdpContext *context, WINDOW_ORDER_INFO *orderInfo, } /*****************************************************************************/ -void DEFAULT_CC +void lrail_NotifyIconDelete(rdpContext *context, WINDOW_ORDER_INFO *orderInfo) { struct mod *mod; @@ -1817,7 +1817,7 @@ lrail_NotifyIconDelete(rdpContext *context, WINDOW_ORDER_INFO *orderInfo) } /*****************************************************************************/ -void DEFAULT_CC +void lrail_MonitoredDesktop(rdpContext *context, WINDOW_ORDER_INFO *orderInfo, MONITORED_DESKTOP_ORDER *monitored_desktop) { @@ -1849,7 +1849,7 @@ lrail_MonitoredDesktop(rdpContext *context, WINDOW_ORDER_INFO *orderInfo, } /*****************************************************************************/ -void DEFAULT_CC +void lrail_NonMonitoredDesktop(rdpContext *context, WINDOW_ORDER_INFO *orderInfo) { struct mod *mod; @@ -1862,7 +1862,7 @@ lrail_NonMonitoredDesktop(rdpContext *context, WINDOW_ORDER_INFO *orderInfo) } /******************************************************************************/ -static boolean DEFAULT_CC +static boolean lfreerdp_post_connect(freerdp *instance) { struct mod *mod; @@ -1886,21 +1886,21 @@ lfreerdp_post_connect(freerdp *instance) } /******************************************************************************/ -static void DEFAULT_CC +static void lfreerdp_context_new(freerdp *instance, rdpContext *context) { LLOGLN(0, ("lfreerdp_context_new: %p", context)); } /******************************************************************************/ -static void DEFAULT_CC +static void lfreerdp_context_free(freerdp *instance, rdpContext *context) { LLOGLN(0, ("lfreerdp_context_free: - no code here")); } /******************************************************************************/ -static int DEFAULT_CC +static int lfreerdp_receive_channel_data(freerdp *instance, int channelId, uint8 *data, int size, int flags, int total_size) { @@ -1941,7 +1941,7 @@ lfreerdp_receive_channel_data(freerdp *instance, int channelId, uint8 *data, } /******************************************************************************/ -static boolean DEFAULT_CC +static boolean lfreerdp_authenticate(freerdp *instance, char **username, char **password, char **domain) { @@ -1950,7 +1950,7 @@ lfreerdp_authenticate(freerdp *instance, char **username, } /******************************************************************************/ -static boolean DEFAULT_CC +static boolean lfreerdp_verify_certificate(freerdp *instance, char *subject, char *issuer, char *fingerprint) { @@ -1959,7 +1959,7 @@ lfreerdp_verify_certificate(freerdp *instance, char *subject, char *issuer, } /******************************************************************************/ -static int DEFAULT_CC +static int lfreerdp_session_info(freerdp* instance, uint8* data, int data_bytes) { struct mod *mod; diff --git a/sesman/access.c b/sesman/access.c index 2418505d..b978bf28 100644 --- a/sesman/access.c +++ b/sesman/access.c @@ -33,7 +33,7 @@ extern struct config_sesman *g_cfg; /* in sesman.c */ /******************************************************************************/ -int DEFAULT_CC +int access_login_allowed(const char *user) { int gid; @@ -82,7 +82,7 @@ access_login_allowed(const char *user) } /******************************************************************************/ -int DEFAULT_CC +int access_login_mng_allowed(const char *user) { int gid; diff --git a/sesman/access.h b/sesman/access.h index 7705f8bb..a52b1451 100644 --- a/sesman/access.h +++ b/sesman/access.h @@ -34,7 +34,7 @@ * @return 0 if access is denied, !=0 if allowed * */ -int DEFAULT_CC +int access_login_allowed(const char *user); /** @@ -44,7 +44,7 @@ access_login_allowed(const char *user); * @return 0 if access is denied, !=0 if allowed * */ -int DEFAULT_CC +int access_login_mng_allowed(const char *user); #endif diff --git a/sesman/auth.h b/sesman/auth.h index 68e677ef..56f78090 100644 --- a/sesman/auth.h +++ b/sesman/auth.h @@ -35,7 +35,7 @@ * @return non-zero handle on success, 0 on failure * */ -long DEFAULT_CC +long auth_userpass(const char *user, const char *pass, int *errorcode); /** @@ -46,7 +46,7 @@ auth_userpass(const char *user, const char *pass, int *errorcode); * @return 0 on success, 1 on failure * */ -int DEFAULT_CC +int auth_start_session(long in_val, int in_display); /** @@ -56,7 +56,7 @@ auth_start_session(long in_val, int in_display); * @return 0 on success, 1 on failure * */ -int DEFAULT_CC +int auth_stop_session(long in_val); /** @@ -66,7 +66,7 @@ auth_stop_session(long in_val); * @return 0 on success, 1 on failure * */ -int DEFAULT_CC +int auth_end(long in_val); /** @@ -76,7 +76,7 @@ auth_end(long in_val); * @return 0 on success, 1 on failure * */ -int DEFAULT_CC +int auth_set_env(long in_val); @@ -93,7 +93,7 @@ auth_set_env(long in_val); * @return 0 on success, 1 on failure * */ -int DEFAULT_CC +int auth_check_pwd_chg(const char *user); /** @@ -103,7 +103,7 @@ auth_check_pwd_chg(const char *user); * @return 0 on success, 1 on failure * */ -int DEFAULT_CC +int auth_change_pwd(const char *user, const char *newpwd); #endif diff --git a/sesman/chansrv/chansrv.c b/sesman/chansrv/chansrv.c index a56b80d9..e2fd2db9 100644 --- a/sesman/chansrv/chansrv.c +++ b/sesman/chansrv/chansrv.c @@ -93,7 +93,7 @@ static struct timeout_obj *g_timeout_head = 0; static struct timeout_obj *g_timeout_tail = 0; /*****************************************************************************/ -int APP_CC +int add_timeout(int msoffset, void (*callback)(void *data), void *data) { struct timeout_obj *tobj; @@ -119,7 +119,7 @@ add_timeout(int msoffset, void (*callback)(void *data), void *data) } /*****************************************************************************/ -static int APP_CC +static int get_timeout(int *timeout) { struct timeout_obj *tobj; @@ -165,7 +165,7 @@ get_timeout(int *timeout) } /*****************************************************************************/ -static int APP_CC +static int check_timeout(void) { struct timeout_obj *tobj; @@ -219,7 +219,7 @@ check_timeout(void) } /*****************************************************************************/ -int DEFAULT_CC +int g_is_term(void) { return g_is_wait_obj_set(g_term_event); @@ -228,7 +228,7 @@ g_is_term(void) /*****************************************************************************/ /* add data to chan_item, on its way to the client */ /* returns error */ -static int APP_CC +static int add_data_to_chan_item(struct chan_item *chan_item, char *data, int size) { struct stream *s; @@ -257,7 +257,7 @@ add_data_to_chan_item(struct chan_item *chan_item, char *data, int size) /*****************************************************************************/ /* returns error */ -static int APP_CC +static int send_data_from_chan_item(struct chan_item *chan_item) { struct stream *s; @@ -327,7 +327,7 @@ send_data_from_chan_item(struct chan_item *chan_item) /*****************************************************************************/ /* returns error */ -static int APP_CC +static int check_chan_items(void) { int index; @@ -345,7 +345,7 @@ check_chan_items(void) /*****************************************************************************/ /* returns error */ -int APP_CC +int send_channel_data(int chan_id, char *data, int size) { int index; @@ -375,7 +375,7 @@ send_channel_data(int chan_id, char *data, int size) /*****************************************************************************/ /* returns error */ -int APP_CC +int send_rail_drawing_orders(char* data, int size) { LOGM((LOG_LEVEL_DEBUG, "chansrv::send_rail_drawing_orders: size %d", size)); @@ -400,7 +400,7 @@ send_rail_drawing_orders(char* data, int size) /*****************************************************************************/ /* returns error */ -static int APP_CC +static int send_init_response_message(void) { struct stream *s = (struct stream *)NULL; @@ -423,7 +423,7 @@ send_init_response_message(void) /*****************************************************************************/ /* returns error */ -static int APP_CC +static int send_channel_setup_response_message(void) { struct stream *s = (struct stream *)NULL; @@ -446,7 +446,7 @@ send_channel_setup_response_message(void) /*****************************************************************************/ /* returns error */ -static int APP_CC +static int send_channel_data_response_message(void) { struct stream *s = (struct stream *)NULL; @@ -469,7 +469,7 @@ send_channel_data_response_message(void) /*****************************************************************************/ /* returns error */ -static int APP_CC +static int process_message_init(struct stream *s) { LOGM((LOG_LEVEL_DEBUG, "process_message_init:")); @@ -478,7 +478,7 @@ process_message_init(struct stream *s) /*****************************************************************************/ /* returns error */ -static int APP_CC +static int process_message_channel_setup(struct stream *s) { int num_chans; @@ -604,7 +604,7 @@ process_message_channel_setup(struct stream *s) /*****************************************************************************/ /* returns error */ -static int APP_CC +static int process_message_channel_data(struct stream *s) { int chan_id = 0; @@ -683,7 +683,7 @@ process_message_channel_data(struct stream *s) /*****************************************************************************/ /* returns error */ -static int APP_CC +static int process_message_channel_data_response(struct stream *s) { LOG(10, ("process_message_channel_data_response:")); @@ -693,7 +693,7 @@ process_message_channel_data_response(struct stream *s) /*****************************************************************************/ /* returns error */ -static int APP_CC +static int process_message(void) { struct stream *s = (struct stream *)NULL; @@ -755,7 +755,7 @@ process_message(void) /*****************************************************************************/ /* returns error */ -int DEFAULT_CC +int my_trans_data_in(struct trans *trans) { struct stream *s = (struct stream *)NULL; @@ -791,7 +791,7 @@ my_trans_data_in(struct trans *trans) * called when WTSVirtualChannelWrite() is invoked in xrdpapi.c * ******************************************************************************/ -int DEFAULT_CC +int my_api_trans_data_in(struct trans *trans) { struct stream *s; @@ -885,7 +885,7 @@ my_api_trans_data_in(struct trans *trans) } /*****************************************************************************/ -int DEFAULT_CC +int my_trans_conn_in(struct trans *trans, struct trans *new_trans) { if (trans == 0) @@ -922,7 +922,7 @@ my_trans_conn_in(struct trans *trans, struct trans *new_trans) * called when WTSVirtualChannelOpenEx is invoked in xrdpapi.c * ******************************************************************************/ -int DEFAULT_CC +int my_api_trans_conn_in(struct trans *trans, struct trans *new_trans) { struct xrdp_api_data *ad; @@ -1016,7 +1016,7 @@ my_api_trans_conn_in(struct trans *trans, struct trans *new_trans) } /*****************************************************************************/ -static int APP_CC +static int setup_listen(void) { char port[256]; @@ -1054,7 +1054,7 @@ setup_listen(void) } /*****************************************************************************/ -static int APP_CC +static int setup_api_listen(void) { char port[256]; @@ -1235,7 +1235,7 @@ channel_thread_loop(void *in_val) } /*****************************************************************************/ -void DEFAULT_CC +void term_signal_handler(int sig) { LOGM((LOG_LEVEL_INFO, "term_signal_handler: got signal %d", sig)); @@ -1243,14 +1243,14 @@ term_signal_handler(int sig) } /*****************************************************************************/ -void DEFAULT_CC +void nil_signal_handler(int sig) { LOGM((LOG_LEVEL_INFO, "nil_signal_handler: got signal %d", sig)); } /*****************************************************************************/ -void DEFAULT_CC +void child_signal_handler(int sig) { int pid; @@ -1270,7 +1270,7 @@ child_signal_handler(int sig) } /*****************************************************************************/ -void DEFAULT_CC +void segfault_signal_handler(int sig) { LOG(0, ("segfault_signal_handler: entered.......")); @@ -1279,7 +1279,7 @@ segfault_signal_handler(int sig) } /*****************************************************************************/ -static int APP_CC +static int get_display_num_from_display(char *display_text) { int index; @@ -1338,7 +1338,7 @@ get_display_num_from_display(char *display_text) } /*****************************************************************************/ -int APP_CC +int main_cleanup(void) { g_delete_wait_obj(g_term_event); @@ -1350,7 +1350,7 @@ main_cleanup(void) } /*****************************************************************************/ -static int APP_CC +static int read_ini(void) { char filename[256]; @@ -1391,7 +1391,7 @@ read_ini(void) } /*****************************************************************************/ -static int APP_CC +static int get_log_path(char *path, int bytes) { char* log_path; @@ -1443,7 +1443,7 @@ get_log_path(char *path, int bytes) } /*****************************************************************************/ -static enum logLevels APP_CC +static enum logLevels get_log_level(const char* level_str, enum logLevels default_level) { static const char* levels[] = { @@ -1470,7 +1470,7 @@ get_log_level(const char* level_str, enum logLevels default_level) } /*****************************************************************************/ -static int APP_CC +static int run_exec(void) { int pid; @@ -1497,7 +1497,7 @@ run_exec(void) } /*****************************************************************************/ -int DEFAULT_CC +int main(int argc, char **argv) { tbus waiters[4]; @@ -1640,7 +1640,7 @@ main(int argc, char **argv) * * @return unused slot index on success, -1 on failure ******************************************************************************/ -int APP_CC +int find_empty_slot_in_dvc_channels(void) { int i; @@ -1663,7 +1663,7 @@ find_empty_slot_in_dvc_channels(void) * * @return xrdp_api_data struct containing dvc_chan_id or NULL on failure ******************************************************************************/ -struct xrdp_api_data *APP_CC +struct xrdp_api_data * struct_from_dvc_chan_id(tui32 dvc_chan_id) { int i; diff --git a/sesman/chansrv/chansrv.h b/sesman/chansrv/chansrv.h index 389f2bd3..e75810c8 100644 --- a/sesman/chansrv/chansrv.h +++ b/sesman/chansrv/chansrv.h @@ -54,15 +54,15 @@ struct xrdp_api_data int is_connected; }; -int DEFAULT_CC +int g_is_term(void); -int APP_CC send_channel_data(int chan_id, char *data, int size); -int APP_CC send_rail_drawing_orders(char* data, int size); -int APP_CC main_cleanup(void); -int APP_CC add_timeout(int msoffset, void (*callback)(void* data), void* data); -int APP_CC find_empty_slot_in_dvc_channels(void); -struct xrdp_api_data * APP_CC struct_from_dvc_chan_id(tui32 dvc_chan_id); +int send_channel_data(int chan_id, char *data, int size); +int send_rail_drawing_orders(char* data, int size); +int main_cleanup(void); +int add_timeout(int msoffset, void (*callback)(void* data), void* data); +int find_empty_slot_in_dvc_channels(void); +struct xrdp_api_data * struct_from_dvc_chan_id(tui32 dvc_chan_id); int remove_struct_with_chan_id(tui32 dvc_chan_id); #define LOG_LEVEL 5 diff --git a/sesman/chansrv/chansrv_fuse.c b/sesman/chansrv/chansrv_fuse.c index 04b8fd68..31353ee4 100644 --- a/sesman/chansrv/chansrv_fuse.c +++ b/sesman/chansrv/chansrv_fuse.c @@ -365,7 +365,7 @@ static void xfuse_mark_as_stale(fuse_ino_t pinode); static void xfuse_delete_stale_entries(fuse_ino_t pinode); /*****************************************************************************/ -int APP_CC +int load_fuse_config(void) { int index; @@ -407,7 +407,7 @@ load_fuse_config(void) * @return 0 on success, -1 on failure *****************************************************************************/ -int APP_CC +int xfuse_init(void) { struct fuse_args args = FUSE_ARGS_INIT(0, NULL); @@ -489,7 +489,7 @@ xfuse_init(void) * @return 0 on success, -1 on failure *****************************************************************************/ -int APP_CC +int xfuse_deinit(void) { xfuse_deinit_xrdp_fs(); diff --git a/sesman/chansrv/clipboard.c b/sesman/chansrv/clipboard.c index 359a9116..a690e5e2 100644 --- a/sesman/chansrv/clipboard.c +++ b/sesman/chansrv/clipboard.c @@ -286,7 +286,7 @@ static int g_file_format_id = -1; static char g_last_atom_name[256] = ""; /*****************************************************************************/ -static char* APP_CC +static char* get_atom_text(Atom atom) { char* name; @@ -318,7 +318,7 @@ get_atom_text(Atom atom) /*****************************************************************************/ /* this is one way to get the current time from the x server */ -static Time APP_CC +static Time clipboard_get_server_time(void) { XEvent xevent; @@ -340,7 +340,7 @@ clipboard_get_server_time(void) } /*****************************************************************************/ -static int APP_CC +static int clipboard_find_format_id(int format_id) { int index; @@ -357,7 +357,7 @@ clipboard_find_format_id(int format_id) /*****************************************************************************/ /* returns error */ -int APP_CC +int clipboard_init(void) { struct stream *s; @@ -510,7 +510,7 @@ clipboard_init(void) } /*****************************************************************************/ -int APP_CC +int clipboard_deinit(void) { LOG(0, ("clipboard_deinit:")); @@ -534,7 +534,7 @@ clipboard_deinit(void) } /*****************************************************************************/ -static int APP_CC +static int clipboard_send_data_request(int format_id) { struct stream *s; @@ -561,7 +561,7 @@ clipboard_send_data_request(int format_id) } /*****************************************************************************/ -static int APP_CC +static int clipboard_send_format_ack(void) { struct stream *s; @@ -585,7 +585,7 @@ clipboard_send_format_ack(void) /*****************************************************************************/ /* returns number of bytes written */ -int APP_CC +int clipboard_out_unicode(struct stream *s, const char *text, int num_chars) { int index; @@ -620,7 +620,7 @@ clipboard_out_unicode(struct stream *s, const char *text, int num_chars) /*****************************************************************************/ /* returns number of bytes read */ -int APP_CC +int clipboard_in_unicode(struct stream *s, char *text, int *num_chars) { int index; @@ -660,7 +660,7 @@ static char windows_native_format[] = }; /*****************************************************************************/ -static int APP_CC +static int clipboard_send_format_announce(int xrdp_clip_type) { struct stream *s; @@ -781,7 +781,7 @@ clipboard_send_format_announce(int xrdp_clip_type) } /*****************************************************************************/ -static int APP_CC +static int clipboard_send_data_response_for_image(const char *data, int data_size) { struct stream *s; @@ -805,7 +805,7 @@ clipboard_send_data_response_for_image(const char *data, int data_size) } /*****************************************************************************/ -static int APP_CC +static int clipboard_send_data_response_for_text(const char *data, int data_size) { struct stream *s; @@ -848,7 +848,7 @@ clipboard_send_data_response_for_text(const char *data, int data_size) } /*****************************************************************************/ -static int APP_CC +static int clipboard_send_data_response(int xrdp_clip_type, const char *data, int data_size) { log_debug("clipboard_send_data_response:"); @@ -880,7 +880,7 @@ clipboard_send_data_response(int xrdp_clip_type, const char *data, int data_size } /*****************************************************************************/ -static int APP_CC +static int clipboard_set_selection_owner(void) { Window owner; @@ -901,7 +901,7 @@ clipboard_set_selection_owner(void) } /*****************************************************************************/ -static int APP_CC +static int clipboard_provide_selection_c2s(XSelectionRequestEvent *req, Atom type) { XEvent xev; @@ -957,7 +957,7 @@ clipboard_provide_selection_c2s(XSelectionRequestEvent *req, Atom type) } /*****************************************************************************/ -static int APP_CC +static int clipboard_provide_selection(XSelectionRequestEvent *req, Atom type, int format, char *data, int length) { @@ -987,7 +987,7 @@ clipboard_provide_selection(XSelectionRequestEvent *req, Atom type, int format, } /*****************************************************************************/ -static int APP_CC +static int clipboard_refuse_selection(XSelectionRequestEvent *req) { XEvent xev; @@ -1009,7 +1009,7 @@ clipboard_refuse_selection(XSelectionRequestEvent *req) /* sent by client or server when its local system clipboard is updated with new clipboard data; contains Clipboard Format ID and name pairs of new Clipboard Formats on the clipboard. */ -static int APP_CC +static int clipboard_process_format_announce(struct stream *s, int clip_msg_status, int clip_msg_len) { @@ -1089,7 +1089,7 @@ clipboard_process_format_announce(struct stream *s, int clip_msg_status, /*****************************************************************************/ /* response to CB_FORMAT_LIST; used to indicate whether processing of the Format List PDU was successful */ -static int APP_CC +static int clipboard_process_format_ack(struct stream *s, int clip_msg_status, int clip_msg_len) { @@ -1123,7 +1123,7 @@ clipboard_send_data_response_failed(void) /* sent from server to client * sent by recipient of CB_FORMAT_LIST; used to request data for one * of the formats that was listed in CB_FORMAT_LIST */ -static int APP_CC +static int clipboard_process_data_request(struct stream *s, int clip_msg_status, int clip_msg_len) { @@ -1199,7 +1199,7 @@ clipboard_process_data_request(struct stream *s, int clip_msg_status, processing of the CB_FORMAT_DATA_REQUEST was successful; if processing was successful, CB_FORMAT_DATA_RESPONSE includes contents of requested clipboard data. */ -static int APP_CC +static int clipboard_process_data_response_for_image(struct stream *s, int clip_msg_status, int clip_msg_len) @@ -1243,7 +1243,7 @@ clipboard_process_data_response_for_image(struct stream *s, successful, CB_FORMAT_DATA_RESPONSE includes contents of requested clipboard data. */ /*****************************************************************************/ -static int APP_CC +static int clipboard_process_data_response(struct stream *s, int clip_msg_status, int clip_msg_len) { @@ -1335,7 +1335,7 @@ clipboard_process_data_response(struct stream *s, int clip_msg_status, } /*****************************************************************************/ -static int APP_CC +static int clipboard_process_clip_caps(struct stream *s, int clip_msg_status, int clip_msg_len) { @@ -1383,7 +1383,7 @@ clipboard_process_clip_caps(struct stream *s, int clip_msg_status, } /*****************************************************************************/ -static int APP_CC +static int ss_part(char *data, int data_bytes) { int index; @@ -1440,7 +1440,7 @@ ss_part(char *data, int data_bytes) } /*****************************************************************************/ -static int APP_CC +static int ss_end(void) { char *data; @@ -1475,7 +1475,7 @@ ss_end(void) } /*****************************************************************************/ -static int APP_CC +static int ss_start(char *data, int data_bytes, int total_bytes) { XEvent xev; @@ -1538,7 +1538,7 @@ ss_start(char *data, int data_bytes, int total_bytes) } /*****************************************************************************/ -int APP_CC +int clipboard_data_in(struct stream *s, int chan_id, int chan_flags, int length, int total_length) { @@ -1695,7 +1695,7 @@ clipboard_data_in(struct stream *s, int chan_id, int chan_flags, int length, Time timestamp; Time selection_timestamp; } XFixesSelectionNotifyEvent; */ -static int APP_CC +static int clipboard_event_selection_owner_notify(XEvent *xevent) { XFixesSelectionNotifyEvent *lxevent; @@ -1727,7 +1727,7 @@ clipboard_event_selection_owner_notify(XEvent *xevent) /*****************************************************************************/ /* returns error get a window property from wnd */ -static int APP_CC +static int clipboard_get_window_property(Window wnd, Atom prop, Atom *type, int *fmt, int *n_items, char **xdata, int *xdata_size) { @@ -1835,7 +1835,7 @@ clipboard_get_window_property(Window wnd, Atom prop, Atom *type, int *fmt, Atom property; // atom or None Time time; } XSelectionEvent; */ -static int APP_CC +static int clipboard_event_selection_notify(XEvent *xevent) { XSelectionEvent *lxevent; @@ -2130,7 +2130,7 @@ clipboard_event_selection_notify(XEvent *xevent) * doesn't mean a 32bit value, but actually a long. So 32 means 4 bytes on * a 32bit machine and 8 bytes on a 64 machine */ -static int APP_CC +static int clipboard_event_selection_request(XEvent *xevent) { XSelectionRequestEvent *lxev; @@ -2297,7 +2297,7 @@ clipboard_event_selection_request(XEvent *xevent) Atom selection; Time time; } XSelectionClearEvent; */ -static int APP_CC +static int clipboard_event_selection_clear(XEvent *xevent) { log_debug("clipboard_event_selection_clear:"); @@ -2316,7 +2316,7 @@ clipboard_event_selection_clear(XEvent *xevent) Time time; int state; // PropertyNewValue or PropertyDelete } XPropertyEvent; */ -static int APP_CC +static int clipboard_event_property_notify(XEvent *xevent) { Atom actual_type_return; @@ -2479,7 +2479,7 @@ clipboard_event_property_notify(XEvent *xevent) /*****************************************************************************/ /* returns 0, event handled, 1 unhandled */ -int APP_CC +int clipboard_xevent(void *xevent) { XEvent *lxevent; diff --git a/sesman/chansrv/clipboard.h b/sesman/chansrv/clipboard.h index 449899ba..62108eb3 100644 --- a/sesman/chansrv/clipboard.h +++ b/sesman/chansrv/clipboard.h @@ -23,9 +23,9 @@ #include "arch.h" #include "parse.h" -int APP_CC clipboard_init(void); -int APP_CC clipboard_deinit(void); -int APP_CC clipboard_data_in(struct stream *s, int chan_id, int chan_flags, int length, int total_length); -int APP_CC clipboard_xevent(void *xevent); +int clipboard_init(void); +int clipboard_deinit(void); +int clipboard_data_in(struct stream *s, int chan_id, int chan_flags, int length, int total_length); +int clipboard_xevent(void *xevent); #endif diff --git a/sesman/chansrv/clipboard_common.h b/sesman/chansrv/clipboard_common.h index 1944b760..312b5df8 100644 --- a/sesman/chansrv/clipboard_common.h +++ b/sesman/chansrv/clipboard_common.h @@ -127,8 +127,8 @@ struct clip_file_desc /* CLIPRDR_FILEDESCRIPTOR */ char cFileName[256]; }; -int APP_CC clipboard_out_unicode(struct stream *s, const char *text, +int clipboard_out_unicode(struct stream *s, const char *text, int num_chars); -int APP_CC clipboard_in_unicode(struct stream *s, char *text, int *num_chars); +int clipboard_in_unicode(struct stream *s, char *text, int *num_chars); #endif diff --git a/sesman/chansrv/clipboard_file.c b/sesman/chansrv/clipboard_file.c index 338e375a..e8663774 100644 --- a/sesman/chansrv/clipboard_file.c +++ b/sesman/chansrv/clipboard_file.c @@ -107,7 +107,7 @@ static int g_file_request_sent_type = 0; /*****************************************************************************/ #if 0 -static tui64 APP_CC +static tui64 timeval2wintime(struct timeval *tv) { tui64 result; @@ -123,7 +123,7 @@ timeval2wintime(struct timeval *tv) /*****************************************************************************/ /* this will replace %20 or any hex with the space or correct char * returns error */ -static int APP_CC +static int clipboard_check_file(char *filename) { char lfilename[256]; @@ -158,7 +158,7 @@ clipboard_check_file(char *filename) } /*****************************************************************************/ -static int APP_CC +static int clipboard_get_file(const char *file, int bytes) { int sindex; @@ -236,7 +236,7 @@ clipboard_get_file(const char *file, int bytes) } /*****************************************************************************/ -static int APP_CC +static int clipboard_get_files(const char *files, int bytes) { int index; @@ -278,7 +278,7 @@ clipboard_get_files(const char *files, int bytes) /*****************************************************************************/ /* server to client */ /* response to client asking for clipboard contents that is file list */ -int APP_CC +int clipboard_send_data_response_for_file(const char *data, int data_size) { struct stream *s; @@ -344,7 +344,7 @@ clipboard_send_data_response_for_file(const char *data, int data_size) /*****************************************************************************/ /* send the file size from server to the client */ -static int APP_CC +static int clipboard_send_file_size(int streamId, int lindex) { struct stream *s; @@ -385,7 +385,7 @@ clipboard_send_file_size(int streamId, int lindex) /*****************************************************************************/ /* ask the client to send the file size */ -int APP_CC +int clipboard_request_file_size(int stream_id, int lindex) { struct stream *s; @@ -421,7 +421,7 @@ clipboard_request_file_size(int stream_id, int lindex) /*****************************************************************************/ /* send a chunk of the file from server to client */ -static int APP_CC +static int clipboard_send_file_data(int streamId, int lindex, int nPositionLow, int cbRequested) { @@ -488,7 +488,7 @@ clipboard_send_file_data(int streamId, int lindex, /*****************************************************************************/ /* ask the client to send the file size */ -int APP_CC +int clipboard_request_file_data(int stream_id, int lindex, int offset, int request_bytes) { @@ -528,7 +528,7 @@ clipboard_request_file_data(int stream_id, int lindex, int offset, /*****************************************************************************/ /* client is asking from info about a file */ -int APP_CC +int clipboard_process_file_request(struct stream *s, int clip_msg_status, int clip_msg_len) { @@ -562,7 +562,7 @@ clipboard_process_file_request(struct stream *s, int clip_msg_status, /*****************************************************************************/ /* server requested info about the file and this is the response it's either the file size or file data */ -int APP_CC +int clipboard_process_file_response(struct stream *s, int clip_msg_status, int clip_msg_len) { @@ -595,7 +595,7 @@ clipboard_process_file_response(struct stream *s, int clip_msg_status, /*****************************************************************************/ /* read in CLIPRDR_FILEDESCRIPTOR */ -static int APP_CC +static int clipboard_c2s_in_file_info(struct stream *s, struct clip_file_desc *cfd) { int num_chars; @@ -627,7 +627,7 @@ clipboard_c2s_in_file_info(struct stream *s, struct clip_file_desc *cfd) } /*****************************************************************************/ -int APP_CC +int clipboard_c2s_in_files(struct stream *s, char *file_list) { int cItems; diff --git a/sesman/chansrv/clipboard_file.h b/sesman/chansrv/clipboard_file.h index a9eb95a0..16377b0e 100644 --- a/sesman/chansrv/clipboard_file.h +++ b/sesman/chansrv/clipboard_file.h @@ -22,20 +22,20 @@ #include "arch.h" #include "parse.h" -int APP_CC +int clipboard_send_data_response_for_file(const char *data, int data_size); -int APP_CC +int clipboard_process_file_request(struct stream *s, int clip_msg_status, int clip_msg_len); -int APP_CC +int clipboard_process_file_response(struct stream *s, int clip_msg_status, int clip_msg_len); -int APP_CC +int clipboard_c2s_in_files(struct stream *s, char *file_list); -int APP_CC +int clipboard_request_file_size(int stream_id, int lindex); -int APP_CC +int clipboard_request_file_data(int stream_id, int lindex, int offset, int request_bytes); diff --git a/sesman/chansrv/devredir.c b/sesman/chansrv/devredir.c index 598d0aa9..629b3cc9 100644 --- a/sesman/chansrv/devredir.c +++ b/sesman/chansrv/devredir.c @@ -109,7 +109,7 @@ struct stream *g_input_stream = NULL; void xfuse_devredir_cb_write_file(void *vp, const char *buf, size_t length); /*****************************************************************************/ -int APP_CC +int dev_redir_init(void) { struct stream *s; @@ -156,7 +156,7 @@ dev_redir_init(void) } /*****************************************************************************/ -int APP_CC +int dev_redir_deinit(void) { scard_deinit(); @@ -169,7 +169,7 @@ dev_redir_deinit(void) * @return 0 on success, -1 on failure *****************************************************************************/ -int APP_CC +int dev_redir_data_in(struct stream *s, int chan_id, int chan_flags, int length, int total_length) { @@ -287,7 +287,7 @@ done: } /*****************************************************************************/ -int APP_CC +int dev_redir_get_wait_objs(tbus *objs, int *count, int *timeout) { if (g_is_smartcard_redir_supported) @@ -298,7 +298,7 @@ dev_redir_get_wait_objs(tbus *objs, int *count, int *timeout) } /*****************************************************************************/ -int APP_CC +int dev_redir_check_wait_objs(void) { if (g_is_smartcard_redir_supported) @@ -720,7 +720,7 @@ void devredir_proc_client_devlist_announce_req(struct stream *s) } } -void APP_CC +void dev_redir_proc_device_iocompletion(struct stream *s) { FUSE_DATA *fuse_data = NULL; @@ -884,7 +884,7 @@ done: log_debug("exiting"); } -void APP_CC +void dev_redir_proc_query_dir_response(IRP *irp, struct stream *s_in, tui32 DeviceId, @@ -1001,7 +1001,7 @@ dev_redir_proc_query_dir_response(IRP *irp, * @return 0 on success, -1 on failure *****************************************************************************/ -int APP_CC +int dev_redir_get_dir_listing(void *fusep, tui32 device_id, const char *path) { tui32 DesiredAccess; @@ -1048,7 +1048,7 @@ dev_redir_get_dir_listing(void *fusep, tui32 device_id, const char *path) return rval; } -int APP_CC +int dev_redir_file_open(void *fusep, tui32 device_id, const char *path, int mode, int type, const char *gen_buf) { @@ -1166,7 +1166,7 @@ int devredir_file_close(void *fusep, tui32 device_id, tui32 FileId) * Remove (delete) a directory or file *****************************************************************************/ -int APP_CC +int devredir_rmdir_or_file(void *fusep, tui32 device_id, const char *path, int mode) { tui32 DesiredAccess; @@ -1209,7 +1209,7 @@ devredir_rmdir_or_file(void *fusep, tui32 device_id, const char *path, int mode) * @return 0 on success, -1 on failure *****************************************************************************/ -int APP_CC +int devredir_file_read(void *fusep, tui32 DeviceId, tui32 FileId, tui32 Length, tui64 Offset) { @@ -1260,7 +1260,7 @@ devredir_file_read(void *fusep, tui32 DeviceId, tui32 FileId, return 0; } -int APP_CC +int dev_redir_file_write(void *fusep, tui32 DeviceId, tui32 FileId, const char *buf, int Length, tui64 Offset) { @@ -1327,7 +1327,7 @@ dev_redir_file_write(void *fusep, tui32 DeviceId, tui32 FileId, * @return FUSE_DATA on success, or NULL on failure *****************************************************************************/ -FUSE_DATA *APP_CC +FUSE_DATA * devredir_fuse_data_peek(IRP *irp) { log_debug("returning %p", irp->fd_head); @@ -1340,7 +1340,7 @@ devredir_fuse_data_peek(IRP *irp) * @return FUSE_DATA on success, NULL on failure *****************************************************************************/ -FUSE_DATA *APP_CC +FUSE_DATA * devredir_fuse_data_dequeue(IRP *irp) { FUSE_DATA *head; @@ -1376,7 +1376,7 @@ devredir_fuse_data_dequeue(IRP *irp) * @return 0 on success, -1 on failure *****************************************************************************/ -int APP_CC +int devredir_fuse_data_enqueue(IRP *irp, void *vp) { FUSE_DATA *fd; @@ -1415,7 +1415,7 @@ devredir_fuse_data_enqueue(IRP *irp, void *vp) ** miscellaneous stuff ** ******************************************************************************/ -void APP_CC +void devredir_insert_DeviceIoRequest(struct stream *s, tui32 DeviceId, tui32 FileId, @@ -1437,7 +1437,7 @@ devredir_insert_DeviceIoRequest(struct stream *s, * Convert / to windows compatible \ *****************************************************************************/ -void APP_CC +void devredir_cvt_slash(char *path) { char *cptr = path; @@ -1450,7 +1450,7 @@ devredir_cvt_slash(char *path) } } -void APP_CC +void devredir_cvt_to_unicode(char *unicode, const char *path) { char *dest; @@ -1476,7 +1476,7 @@ devredir_cvt_to_unicode(char *unicode, const char *path) *dest++ = 0; } -void APP_CC +void devredir_cvt_from_unicode_len(char *path, char *unicode, int len) { char *dest; @@ -1513,7 +1513,7 @@ devredir_cvt_from_unicode_len(char *path, char *unicode, int len) g_free(dest_saved); } -int APP_CC +int dev_redir_string_ends_with(char *string, char c) { int len; @@ -1522,7 +1522,7 @@ dev_redir_string_ends_with(char *string, char c) return (string[len - 1] == c) ? 1 : 0; } -void APP_CC +void devredir_insert_RDPDR_header(struct stream *s, tui16 Component, tui16 PacketId) { @@ -1530,7 +1530,7 @@ devredir_insert_RDPDR_header(struct stream *s, tui16 Component, xstream_wr_u16_le(s, PacketId); } -void APP_CC +void devredir_proc_cid_rmdir_or_file(IRP *irp, tui32 IoStatus) { struct stream *s; @@ -1567,7 +1567,7 @@ devredir_proc_cid_rmdir_or_file(IRP *irp, tui32 IoStatus) return; } -void APP_CC +void devredir_proc_cid_rmdir_or_file_resp(IRP *irp, tui32 IoStatus) { FUSE_DATA *fuse_data; @@ -1594,7 +1594,7 @@ devredir_proc_cid_rmdir_or_file_resp(IRP *irp, tui32 IoStatus) IRP_MJ_CLOSE, 0, 32); } -void APP_CC +void devredir_proc_cid_rename_file(IRP *irp, tui32 IoStatus) { struct stream *s; @@ -1647,7 +1647,7 @@ devredir_proc_cid_rename_file(IRP *irp, tui32 IoStatus) return; } -void APP_CC +void devredir_proc_cid_rename_file_resp(IRP *irp, tui32 IoStatus) { FUSE_DATA *fuse_data; diff --git a/sesman/chansrv/devredir.h b/sesman/chansrv/devredir.h index cbe279db..5618b39c 100644 --- a/sesman/chansrv/devredir.h +++ b/sesman/chansrv/devredir.h @@ -31,14 +31,14 @@ FUSE_DATA *devredir_fuse_data_peek(IRP *irp); FUSE_DATA *devredir_fuse_data_dequeue(IRP *irp); int devredir_fuse_data_enqueue(IRP *irp, void *vp); -int APP_CC dev_redir_init(void); -int APP_CC dev_redir_deinit(void); +int dev_redir_init(void); +int dev_redir_deinit(void); -int APP_CC dev_redir_data_in(struct stream* s, int chan_id, int chan_flags, +int dev_redir_data_in(struct stream* s, int chan_id, int chan_flags, int length, int total_length); -int APP_CC dev_redir_get_wait_objs(tbus* objs, int* count, int* timeout); -int APP_CC dev_redir_check_wait_objs(void); +int dev_redir_get_wait_objs(tbus* objs, int* count, int* timeout); +int dev_redir_check_wait_objs(void); void dev_redir_send_server_core_cap_req(void); void dev_redir_send_server_clientID_confirm(void); @@ -105,11 +105,11 @@ int devredir_file_close(void *fusep, tui32 device_id, tui32 file_id); int devredir_file_read(void *fusep, tui32 device_id, tui32 FileId, tui32 Length, tui64 Offset); -int APP_CC +int dev_redir_file_write(void *fusep, tui32 DeviceId, tui32 FileId, const char *buf, int Length, tui64 Offset); -int APP_CC +int devredir_rmdir_or_file(void *fusep, tui32 device_id, const char *path, int mode); /* diff --git a/sesman/chansrv/drdynvc.c b/sesman/chansrv/drdynvc.c index 3de03f7e..c02bdadb 100644 --- a/sesman/chansrv/drdynvc.c +++ b/sesman/chansrv/drdynvc.c @@ -25,21 +25,21 @@ extern int g_drdynvc_chan_id; /* in chansrv.c */ int g_drdynvc_inited = 0; -static int APP_CC drdynvc_send_capability_request(uint16_t version); -static int APP_CC drdynvc_process_capability_response(struct stream* s, unsigned char cmd); -static int APP_CC drdynvc_process_open_channel_response(struct stream *s, unsigned char cmd); -static int APP_CC drdynvc_process_close_channel_response(struct stream *s, unsigned char cmd); -static int APP_CC drdynvc_process_data_first(struct stream* s, unsigned char cmd); -static int APP_CC drdynvc_process_data(struct stream* s, unsigned char cmd); -static int APP_CC drdynvc_insert_uint_124(struct stream *s, uint32_t val); -static int APP_CC drdynvc_get_chan_id(struct stream *s, char cmd, uint32_t *chan_id_p); +static int drdynvc_send_capability_request(uint16_t version); +static int drdynvc_process_capability_response(struct stream* s, unsigned char cmd); +static int drdynvc_process_open_channel_response(struct stream *s, unsigned char cmd); +static int drdynvc_process_close_channel_response(struct stream *s, unsigned char cmd); +static int drdynvc_process_data_first(struct stream* s, unsigned char cmd); +static int drdynvc_process_data(struct stream* s, unsigned char cmd); +static int drdynvc_insert_uint_124(struct stream *s, uint32_t val); +static int drdynvc_get_chan_id(struct stream *s, char cmd, uint32_t *chan_id_p); /** * bring up dynamic virtual channel * * @return 0 on success, -1 on response ******************************************************************************/ -int APP_CC +int drdynvc_init(void) { /* bring up X11 */ @@ -57,7 +57,7 @@ drdynvc_init(void) * * @return 0 on success, -1 on response ******************************************************************************/ -static int APP_CC +static int drdynvc_send_capability_request(uint16_t version) { struct stream *s; @@ -92,7 +92,7 @@ drdynvc_send_capability_request(uint16_t version) * * @return 0 on success, -1 on failure ******************************************************************************/ -static int APP_CC +static int drdynvc_process_capability_response(struct stream *s, unsigned char cmd) { int cap_version; @@ -125,7 +125,7 @@ drdynvc_process_capability_response(struct stream *s, unsigned char cmd) * * @return 0 on success, -1 on failure ******************************************************************************/ -int APP_CC +int drdynvc_send_open_channel_request(int chan_pri, unsigned int chan_id, char *chan_name) { @@ -165,7 +165,7 @@ drdynvc_send_open_channel_request(int chan_pri, unsigned int chan_id, return 0; } -static int APP_CC +static int drdynvc_process_open_channel_response(struct stream *s, unsigned char cmd) { struct xrdp_api_data *adp; @@ -199,7 +199,7 @@ drdynvc_process_open_channel_response(struct stream *s, unsigned char cmd) return 0; } -int APP_CC +int drdynvc_send_close_channel_request(unsigned int chan_id) { struct stream *s; @@ -226,7 +226,7 @@ drdynvc_send_close_channel_request(unsigned int chan_id) return 0; } -static int APP_CC +static int drdynvc_process_close_channel_response(struct stream *s, unsigned char cmd) { uint32_t chan_id; @@ -247,7 +247,7 @@ drdynvc_process_close_channel_response(struct stream *s, unsigned char cmd) * * @return 0 on success, -1 on failure ******************************************************************************/ -int APP_CC drdynvc_write_data(uint32_t chan_id, char *data, int data_size) +int drdynvc_write_data(uint32_t chan_id, char *data, int data_size) { struct stream *s; char *saved_ptr; @@ -338,7 +338,7 @@ int APP_CC drdynvc_write_data(uint32_t chan_id, char *data, int data_size) return 0; } -static int APP_CC +static int drdynvc_process_data_first(struct stream *s, unsigned char cmd) { struct xrdp_api_data *adp; @@ -385,7 +385,7 @@ drdynvc_process_data_first(struct stream *s, unsigned char cmd) return 0; } -static int APP_CC +static int drdynvc_process_data(struct stream *s, unsigned char cmd) { struct xrdp_api_data *adp; @@ -425,7 +425,7 @@ drdynvc_process_data(struct stream *s, unsigned char cmd) * * @return 0 on success, -1 on failure ******************************************************************************/ -int APP_CC +int drdynvc_data_in(struct stream *s, int chan_id, int chan_flags, int length, int total_length) { @@ -473,7 +473,7 @@ drdynvc_data_in(struct stream *s, int chan_id, int chan_flags, int length, * @return 1 for short insertion * @return 2 for uint32_t insertions ******************************************************************************/ -static int APP_CC +static int drdynvc_insert_uint_124(struct stream *s, uint32_t val) { int ret_val; @@ -504,7 +504,7 @@ drdynvc_insert_uint_124(struct stream *s, uint32_t val) * @param cmd first byte in stream * @param chan_id return channel id here ******************************************************************************/ -static int APP_CC +static int drdynvc_get_chan_id(struct stream *s, char cmd, uint32_t *chan_id_p) { int cbChId; diff --git a/sesman/chansrv/drdynvc.h b/sesman/chansrv/drdynvc.h index 15398867..cd6a5fca 100644 --- a/sesman/chansrv/drdynvc.h +++ b/sesman/chansrv/drdynvc.h @@ -56,12 +56,12 @@ #define CMD_DVC_CLOSE_CHANNEL 0x40 #define CMD_DVC_CAPABILITY 0x50 -int APP_CC drdynvc_init(void); -int APP_CC drdynvc_send_open_channel_request(int chan_pri, unsigned int chan_id, +int drdynvc_init(void); +int drdynvc_send_open_channel_request(int chan_pri, unsigned int chan_id, char *chan_name); -int APP_CC drdynvc_send_close_channel_request(unsigned int chan_id); -int APP_CC drdynvc_write_data(uint32_t chan_id, char *data, int data_size); -int APP_CC drdynvc_data_in(struct stream* s, int chan_id, int chan_flags, +int drdynvc_send_close_channel_request(unsigned int chan_id); +int drdynvc_write_data(uint32_t chan_id, char *data, int data_size); +int drdynvc_data_in(struct stream* s, int chan_id, int chan_flags, int length, int total_length); #endif diff --git a/sesman/chansrv/irp.h b/sesman/chansrv/irp.h index a13ea8e5..39840a16 100644 --- a/sesman/chansrv/irp.h +++ b/sesman/chansrv/irp.h @@ -55,12 +55,12 @@ struct irp void *user_data; }; -IRP * APP_CC devredir_irp_new(void); -IRP * APP_CC devredir_irp_clone(IRP *irp); -int APP_CC devredir_irp_delete(IRP *irp); -IRP * APP_CC devredir_irp_find(tui32 completion_id); -IRP * APP_CC devredir_irp_find_by_fileid(tui32 FileId); -IRP * APP_CC devredir_irp_get_last(void); -void APP_CC devredir_irp_dump(void); +IRP * devredir_irp_new(void); +IRP * devredir_irp_clone(IRP *irp); +int devredir_irp_delete(IRP *irp); +IRP * devredir_irp_find(tui32 completion_id); +IRP * devredir_irp_find_by_fileid(tui32 FileId); +IRP * devredir_irp_get_last(void); +void devredir_irp_dump(void); #endif /* end ifndef __IRP_H */ diff --git a/sesman/chansrv/rail.c b/sesman/chansrv/rail.c index 6682cb75..1adacca0 100644 --- a/sesman/chansrv/rail.c +++ b/sesman/chansrv/rail.c @@ -160,14 +160,14 @@ struct rail_window_data #define RAIL_STYLE_DIALOG (0x80000000) #define RAIL_EXT_STYLE_DIALOG (0x00040000) -static int APP_CC rail_win_get_state(Window win); -static int APP_CC rail_create_window(Window window_id, Window owner_id); -static int APP_CC rail_win_set_state(Window win, unsigned long state); -static int APP_CC rail_show_window(Window window_id, int show_state); -static int APP_CC rail_win_send_text(Window win); +static int rail_win_get_state(Window win); +static int rail_create_window(Window window_id, Window owner_id); +static int rail_win_set_state(Window win, unsigned long state); +static int rail_show_window(Window window_id, int show_state); +static int rail_win_send_text(Window win); /*****************************************************************************/ -static int APP_CC +static int rail_send_key_esc(int window_id) { XEvent event; @@ -185,7 +185,7 @@ rail_send_key_esc(int window_id) } /*****************************************************************************/ -static struct rail_window_data* APP_CC +static struct rail_window_data* rail_get_window_data(Window window) { unsigned int bytes; @@ -219,7 +219,7 @@ rail_get_window_data(Window window) } /*****************************************************************************/ -static int APP_CC +static int rail_set_window_data(Window window, struct rail_window_data* rwd) { int bytes; @@ -232,7 +232,7 @@ rail_set_window_data(Window window, struct rail_window_data* rwd) /*****************************************************************************/ /* get the rail window data, if not exist, try to create it and return */ -static struct rail_window_data* APP_CC +static struct rail_window_data* rail_get_window_data_safe(Window window) { struct rail_window_data* rv; @@ -249,7 +249,7 @@ rail_get_window_data_safe(Window window) } /******************************************************************************/ -static int APP_CC +static int is_window_valid_child_of_root(unsigned int window_id) { int found; @@ -276,7 +276,7 @@ is_window_valid_child_of_root(unsigned int window_id) } /*****************************************************************************/ -static int APP_CC +static int rail_send_init(void) { struct stream *s; @@ -301,7 +301,7 @@ rail_send_init(void) } /******************************************************************************/ -static int DEFAULT_CC +static int anotherWMRunning(Display *display, XErrorEvent *xe) { g_rail_running = 0; @@ -309,7 +309,7 @@ anotherWMRunning(Display *display, XErrorEvent *xe) } /******************************************************************************/ -static int APP_CC +static int rail_is_another_wm_running(void) { XErrorHandler old; @@ -334,7 +334,7 @@ rail_is_another_wm_running(void) } /*****************************************************************************/ -int APP_CC +int rail_init(void) { LOG(10, ("chansrv::rail_init:")); @@ -344,7 +344,7 @@ rail_init(void) } /*****************************************************************************/ -int APP_CC +int rail_deinit(void) { if (g_rail_up) @@ -359,7 +359,7 @@ rail_deinit(void) return 0; } -int APP_CC +int rail_startup(void) { int dummy; @@ -406,7 +406,7 @@ rail_startup(void) } /*****************************************************************************/ -static char *APP_CC +static char * read_uni(struct stream *s, int num_chars) { twchar *rchrs; @@ -442,7 +442,7 @@ read_uni(struct stream *s, int num_chars) } /*****************************************************************************/ -static int APP_CC +static int rail_process_exec(struct stream *s, int size) { int flags; @@ -487,7 +487,7 @@ rail_process_exec(struct stream *s, int size) } /******************************************************************************/ -static int APP_CC +static int rail_win_popdown(void) { int rv = 0; @@ -523,7 +523,7 @@ rail_win_popdown(void) } /******************************************************************************/ -static int APP_CC +static int rail_close_window(int window_id) { XEvent ce; @@ -546,7 +546,7 @@ rail_close_window(int window_id) } /*****************************************************************************/ -void DEFAULT_CC +void my_timeout(void* data) { LOG(10, ("my_timeout: g_got_focus %d", g_got_focus)); @@ -558,7 +558,7 @@ my_timeout(void* data) } /*****************************************************************************/ -static int APP_CC +static int rail_process_activate(struct stream *s, int size) { unsigned int window_id; @@ -636,7 +636,7 @@ rail_select_input(Window window_id) } /*****************************************************************************/ -static int APP_CC +static int rail_restore_windows(void) { unsigned int i; @@ -667,7 +667,7 @@ rail_restore_windows(void) } /*****************************************************************************/ -static int APP_CC +static int rail_process_system_param(struct stream *s, int size) { int system_param; @@ -689,7 +689,7 @@ rail_process_system_param(struct stream *s, int size) } /*****************************************************************************/ -static int APP_CC +static int rail_get_property(Display* display, Window target, Atom type, Atom property, unsigned char** data, unsigned long* count) { @@ -729,7 +729,7 @@ rail_get_property(Display* display, Window target, Atom type, Atom property, } /*****************************************************************************/ -static int APP_CC +static int rail_win_get_state(Window win) { unsigned long nitems = 0; @@ -751,7 +751,7 @@ rail_win_get_state(Window win) } /*****************************************************************************/ -static int APP_CC +static int rail_win_set_state(Window win, unsigned long state) { int old_state; @@ -777,7 +777,7 @@ rail_win_set_state(Window win, unsigned long state) /*****************************************************************************/ /* *data pointer that needs g_free */ -static int APP_CC +static int rail_win_get_text(Window win, char **data) { int ret = 0; @@ -816,7 +816,7 @@ rail_win_get_text(Window win, char **data) } /******************************************************************************/ -static int APP_CC +static int rail_minmax_window(int window_id, int max) { LOG(10, ("chansrv::rail_minmax_window 0x%8.8x:", window_id)); @@ -835,7 +835,7 @@ rail_minmax_window(int window_id, int max) } /*****************************************************************************/ -static int APP_CC +static int rail_restore_window(int window_id) { XWindowAttributes window_attributes; @@ -855,7 +855,7 @@ rail_restore_window(int window_id) } /*****************************************************************************/ -static int APP_CC +static int rail_process_system_command(struct stream *s, int size) { int window_id; @@ -913,7 +913,7 @@ rail_process_system_command(struct stream *s, int size) } /*****************************************************************************/ -static int APP_CC +static int rail_process_handshake(struct stream *s, int size) { int build_number; @@ -925,7 +925,7 @@ rail_process_handshake(struct stream *s, int size) } /*****************************************************************************/ -static int APP_CC +static int rail_process_notify_event(struct stream *s, int size) { int window_id; @@ -942,7 +942,7 @@ rail_process_notify_event(struct stream *s, int size) } /*****************************************************************************/ -static int APP_CC +static int rail_process_window_move(struct stream *s, int size) { int window_id; @@ -978,7 +978,7 @@ rail_process_window_move(struct stream *s, int size) } /*****************************************************************************/ -static int APP_CC +static int rail_process_local_move_size(struct stream *s, int size) { int window_id; @@ -1004,7 +1004,7 @@ rail_process_local_move_size(struct stream *s, int size) /*****************************************************************************/ /* server to client only */ -static int APP_CC +static int rail_process_min_max_info(struct stream *s, int size) { LOG(10, ("chansrv::rail_process_min_max_info:")); @@ -1012,7 +1012,7 @@ rail_process_min_max_info(struct stream *s, int size) } /*****************************************************************************/ -static int APP_CC +static int rail_process_client_status(struct stream *s, int size) { int flags; @@ -1024,7 +1024,7 @@ rail_process_client_status(struct stream *s, int size) } /*****************************************************************************/ -static int APP_CC +static int rail_process_sys_menu(struct stream *s, int size) { int window_id; @@ -1043,7 +1043,7 @@ rail_process_sys_menu(struct stream *s, int size) } /*****************************************************************************/ -static int APP_CC +static int rail_process_lang_bar_info(struct stream *s, int size) { int language_bar_status; @@ -1055,7 +1055,7 @@ rail_process_lang_bar_info(struct stream *s, int size) } /*****************************************************************************/ -static int APP_CC +static int rail_process_appid_req(struct stream *s, int size) { LOG(10, ("chansrv::rail_process_appid_req:")); @@ -1063,7 +1063,7 @@ rail_process_appid_req(struct stream *s, int size) } /*****************************************************************************/ -static int APP_CC +static int rail_process_appid_resp(struct stream *s, int size) { LOG(10, ("chansrv::rail_process_appid_resp:")); @@ -1072,7 +1072,7 @@ rail_process_appid_resp(struct stream *s, int size) /*****************************************************************************/ /* server to client only */ -static int APP_CC +static int rail_process_exec_result(struct stream *s, int size) { LOG(10, ("chansrv::rail_process_exec_result:")); @@ -1081,7 +1081,7 @@ rail_process_exec_result(struct stream *s, int size) /*****************************************************************************/ /* data in from client ( client -> xrdp -> chansrv ) */ -int APP_CC +int rail_data_in(struct stream *s, int chan_id, int chan_flags, int length, int total_length) { @@ -1222,7 +1222,7 @@ get_string_crc(const char* text) /*****************************************************************************/ /* returns 0, event handled, 1 unhandled */ -static int APP_CC +static int rail_win_send_text(Window win) { char* data = 0; @@ -1285,7 +1285,7 @@ rail_win_send_text(Window win) } /*****************************************************************************/ -static int APP_CC +static int rail_destroy_window(Window window_id) { struct stream *s; @@ -1304,7 +1304,7 @@ rail_destroy_window(Window window_id) } /*****************************************************************************/ -static int APP_CC +static int rail_show_window(Window window_id, int show_state) { int flags; @@ -1326,7 +1326,7 @@ rail_show_window(Window window_id, int show_state) } /*****************************************************************************/ -static int APP_CC +static int rail_create_window(Window window_id, Window owner_id) { int x; @@ -1487,7 +1487,7 @@ rail_create_window(Window window_id, Window owner_id) /*****************************************************************************/ /* returns 0, event handled, 1 unhandled */ -int APP_CC +int rail_configure_request_window(XConfigureRequestEvent* config) { int num_window_rects = 1; @@ -1692,7 +1692,7 @@ rail_configure_request_window(XConfigureRequestEvent* config) /*****************************************************************************/ /* returns 0, event handled, 1 unhandled */ -int APP_CC +int rail_configure_window(XConfigureEvent *config) { int num_window_rects = 1; @@ -1784,7 +1784,7 @@ rail_desktop_resize(XEvent *lxevent) /*****************************************************************************/ /* returns 0, event handled, 1 unhandled */ -int APP_CC +int rail_xevent(void *xevent) { XEvent *lxevent; diff --git a/sesman/chansrv/rail.h b/sesman/chansrv/rail.h index 3be3a15d..e3facb00 100644 --- a/sesman/chansrv/rail.h +++ b/sesman/chansrv/rail.h @@ -23,15 +23,15 @@ #include "arch.h" #include "parse.h" -int APP_CC +int rail_init(void); -int APP_CC +int rail_deinit(void); -int APP_CC +int rail_data_in(struct stream* s, int chan_id, int chan_flags, int length, int total_length); -int APP_CC +int rail_xevent(void* xevent); -int APP_CC rail_request_title(int window_id); +int rail_request_title(int window_id); #endif diff --git a/sesman/chansrv/smartcard.c b/sesman/chansrv/smartcard.c index f46a839e..d6f23e60 100644 --- a/sesman/chansrv/smartcard.c +++ b/sesman/chansrv/smartcard.c @@ -163,129 +163,129 @@ extern int g_rdpdr_chan_id; /* in chansrv.c */ /****************************************************************************** ** static functions local to this file ** ******************************************************************************/ -static struct stream * APP_CC scard_make_new_ioctl(IRP *irp, tui32 ioctl); -static int APP_CC scard_add_new_device(tui32 device_id); -static int APP_CC scard_get_free_slot(void); -static void APP_CC scard_release_resources(void); -static void APP_CC scard_send_EstablishContext(IRP *irp, int scope); -static void APP_CC scard_send_ReleaseContext(IRP *irp, +static struct stream * scard_make_new_ioctl(IRP *irp, tui32 ioctl); +static int scard_add_new_device(tui32 device_id); +static int scard_get_free_slot(void); +static void scard_release_resources(void); +static void scard_send_EstablishContext(IRP *irp, int scope); +static void scard_send_ReleaseContext(IRP *irp, char *context, int context_bytes); -static void APP_CC scard_send_IsContextValid(IRP* irp, +static void scard_send_IsContextValid(IRP* irp, char *context, int context_bytes); -static void APP_CC scard_send_ListReaders(IRP *irp, +static void scard_send_ListReaders(IRP *irp, char *context, int context_bytes, char *groups, int cchReaders, int wide); -static void APP_CC scard_send_GetStatusChange(IRP *irp, +static void scard_send_GetStatusChange(IRP *irp, char *context, int context_bytes, int wide, tui32 timeout, tui32 num_readers, READER_STATE *rsa); -static void APP_CC scard_send_Connect(IRP *irp, +static void scard_send_Connect(IRP *irp, char *context, int context_bytes, int wide, READER_STATE *rs); -static void APP_CC scard_send_Reconnect(IRP *irp, +static void scard_send_Reconnect(IRP *irp, char *context, int context_bytes, char *card, int card_bytes, READER_STATE *rs); -static void APP_CC scard_send_BeginTransaction(IRP *irp, +static void scard_send_BeginTransaction(IRP *irp, char *context, int context_bytes, char *card, int card_bytes); -static void APP_CC scard_send_EndTransaction(IRP *irp, +static void scard_send_EndTransaction(IRP *irp, char *context, int context_bytes, char *card, int card_bytes, tui32 dwDisposition); -static void APP_CC scard_send_Status(IRP *irp, int wide, +static void scard_send_Status(IRP *irp, int wide, char *context, int context_bytes, char *card, int card_bytes, int cchReaderLen, int cbAtrLen); -static void APP_CC scard_send_Disconnect(IRP *irp, +static void scard_send_Disconnect(IRP *irp, char *context, int context_bytes, char *card, int card_bytes, int dwDisposition); -static int APP_CC scard_send_Transmit(IRP *irp, +static int scard_send_Transmit(IRP *irp, char *context, int context_byte, char *card, int card_bytes, char *send_data, int send_bytes, int recv_bytes, struct xrdp_scard_io_request *send_ior, struct xrdp_scard_io_request *recv_ior); -static int APP_CC scard_send_Control(IRP* irp, char *context, int context_bytes, +static int scard_send_Control(IRP* irp, char *context, int context_bytes, char *card, int card_bytes, char *send_data, int send_bytes, int recv_bytes, int control_code); -static int APP_CC scard_send_Cancel(IRP *irp, char *context, int context_bytes); -static int APP_CC scard_send_GetAttrib(IRP *irp, char *card, int card_bytes, +static int scard_send_Cancel(IRP *irp, char *context, int context_bytes); +static int scard_send_GetAttrib(IRP *irp, char *card, int card_bytes, READER_STATE *rs); /****************************************************************************** ** local callbacks into this module ** ******************************************************************************/ -static void APP_CC scard_handle_EstablishContext_Return(struct stream *s, IRP *irp, +static void scard_handle_EstablishContext_Return(struct stream *s, IRP *irp, tui32 DeviceId, tui32 CompletionId, tui32 IoStatus); -static void APP_CC scard_handle_ReleaseContext_Return(struct stream *s, IRP *irp, +static void scard_handle_ReleaseContext_Return(struct stream *s, IRP *irp, tui32 DeviceId, tui32 CompletionId, tui32 IoStatus); -static void APP_CC scard_handle_IsContextValid_Return(struct stream *s, IRP *irp, +static void scard_handle_IsContextValid_Return(struct stream *s, IRP *irp, tui32 DeviceId, tui32 CompletionId, tui32 IoStatus); -static void APP_CC scard_handle_ListReaders_Return(struct stream *s, IRP *irp, +static void scard_handle_ListReaders_Return(struct stream *s, IRP *irp, tui32 DeviceId, tui32 CompletionId, tui32 IoStatus); -static void APP_CC scard_handle_GetStatusChange_Return(struct stream *s, IRP *irp, +static void scard_handle_GetStatusChange_Return(struct stream *s, IRP *irp, tui32 DeviceId, tui32 CompletionId, tui32 IoStatus); -static void APP_CC scard_handle_Connect_Return(struct stream *s, IRP *irp, +static void scard_handle_Connect_Return(struct stream *s, IRP *irp, tui32 DeviceId, tui32 CompletionId, tui32 IoStatus); -static void APP_CC scard_handle_Reconnect_Return(struct stream *s, IRP *irp, +static void scard_handle_Reconnect_Return(struct stream *s, IRP *irp, tui32 DeviceId, tui32 CompletionId, tui32 IoStatus); -static void APP_CC scard_handle_BeginTransaction_Return(struct stream *s, IRP *irp, +static void scard_handle_BeginTransaction_Return(struct stream *s, IRP *irp, tui32 DeviceId, tui32 CompletionId, tui32 IoStatus); -static void APP_CC scard_handle_EndTransaction_Return(struct stream *s, IRP *irp, +static void scard_handle_EndTransaction_Return(struct stream *s, IRP *irp, tui32 DeviceId, tui32 CompletionId, tui32 IoStatus); -static void APP_CC scard_handle_Status_Return(struct stream *s, IRP *irp, +static void scard_handle_Status_Return(struct stream *s, IRP *irp, tui32 DeviceId, tui32 CompletionId, tui32 IoStatus); -static void APP_CC scard_handle_Disconnect_Return(struct stream *s, IRP *irp, +static void scard_handle_Disconnect_Return(struct stream *s, IRP *irp, tui32 DeviceId, tui32 CompletionId, tui32 IoStatus); -static void APP_CC scard_handle_Transmit_Return(struct stream *s, IRP *irp, +static void scard_handle_Transmit_Return(struct stream *s, IRP *irp, tui32 DeviceId, tui32 CompletionId, tui32 IoStatus); -static void APP_CC scard_handle_Control_Return(struct stream *s, IRP *irp, +static void scard_handle_Control_Return(struct stream *s, IRP *irp, tui32 DeviceId, tui32 CompletionId, tui32 IoStatus); -static void APP_CC scard_handle_Cancel_Return(struct stream *s, IRP *irp, +static void scard_handle_Cancel_Return(struct stream *s, IRP *irp, tui32 DeviceId, tui32 CompletionId, tui32 IoStatus); -static void APP_CC scard_handle_GetAttrib_Return(struct stream *s, IRP *irp, +static void scard_handle_GetAttrib_Return(struct stream *s, IRP *irp, tui32 DeviceId, tui32 CompletionId, tui32 IoStatus); @@ -298,7 +298,7 @@ static void APP_CC scard_handle_GetAttrib_Return(struct stream *s, IRP *irp, /** *****************************************************************************/ -void APP_CC +void scard_device_announce(tui32 device_id) { log_debug("entered: device_id=%d", device_id); @@ -323,7 +323,7 @@ scard_device_announce(tui32 device_id) /** * *****************************************************************************/ -int APP_CC +int scard_get_wait_objs(tbus *objs, int *count, int *timeout) { return scard_pcsc_get_wait_objs(objs, count, timeout); @@ -332,7 +332,7 @@ scard_get_wait_objs(tbus *objs, int *count, int *timeout) /** * *****************************************************************************/ -int APP_CC +int scard_check_wait_objs(void) { return scard_pcsc_check_wait_objs(); @@ -341,7 +341,7 @@ scard_check_wait_objs(void) /** * *****************************************************************************/ -int APP_CC +int scard_init(void) { LOG(0, ("scard_init:")); @@ -351,7 +351,7 @@ scard_init(void) /** * *****************************************************************************/ -int APP_CC +int scard_deinit(void) { LOG(0, ("scard_deinit:")); @@ -364,7 +364,7 @@ scard_deinit(void) /** * *****************************************************************************/ -int APP_CC +int scard_send_establish_context(void *user_data, int scope) { IRP *irp; @@ -391,7 +391,7 @@ scard_send_establish_context(void *user_data, int scope) /** * Release a previously established Smart Card context *****************************************************************************/ -int APP_CC +int scard_send_release_context(void *user_data, char *context, int context_bytes) { @@ -419,7 +419,7 @@ scard_send_release_context(void *user_data, /** * Checks if a previously established context is still valid *****************************************************************************/ -int APP_CC +int scard_send_is_valid_context(void *user_data, char *context, int context_bytes) { IRP *irp; @@ -446,7 +446,7 @@ scard_send_is_valid_context(void *user_data, char *context, int context_bytes) /** * *****************************************************************************/ -int APP_CC +int scard_send_list_readers(void *user_data, char *context, int context_bytes, char *groups, int cchReaders, int wide) { @@ -480,7 +480,7 @@ scard_send_list_readers(void *user_data, char *context, int context_bytes, * @param num_readers number of entries in rsa * @param rsa array of READER_STATEs *****************************************************************************/ -int APP_CC +int scard_send_get_status_change(void *user_data, char *context, int context_bytes, int wide, tui32 timeout, tui32 num_readers, READER_STATE* rsa) @@ -513,7 +513,7 @@ scard_send_get_status_change(void *user_data, char *context, int context_bytes, * @param con connection to client * @param wide TRUE if unicode string *****************************************************************************/ -int APP_CC +int scard_send_connect(void *user_data, char *context, int context_bytes, int wide, READER_STATE* rs) { @@ -549,7 +549,7 @@ scard_send_connect(void *user_data, char *context, int context_bytes, * rs.preferred_protocol * rs.init_type *****************************************************************************/ -int APP_CC +int scard_send_reconnect(void *user_data, char *context, int context_bytes, char *card, int card_bytes, READER_STATE* rs) { @@ -580,7 +580,7 @@ scard_send_reconnect(void *user_data, char *context, int context_bytes, * * @param con connection to client *****************************************************************************/ -int APP_CC +int scard_send_begin_transaction(void *user_data, char *context, int context_bytes, char *card, int card_bytes) { @@ -612,7 +612,7 @@ scard_send_begin_transaction(void *user_data, char *context, int context_bytes, * @param con connection to client * @param sc_handle handle to smartcard *****************************************************************************/ -int APP_CC +int scard_send_end_transaction(void *user_data, char *context, int context_bytes, char *card, int card_bytes, tui32 dwDisposition) @@ -645,7 +645,7 @@ scard_send_end_transaction(void *user_data, char *context, int context_bytes, * @param con connection to client * @param wide TRUE if unicode string *****************************************************************************/ -int APP_CC +int scard_send_status(void *user_data, int wide, char *context, int context_bytes, char *card, int card_bytes, int cchReaderLen, int cbAtrLen) @@ -678,7 +678,7 @@ scard_send_status(void *user_data, int wide, char *context, int context_bytes, * @param con connection to client * @param sc_handle handle to smartcard *****************************************************************************/ -int APP_CC +int scard_send_disconnect(void *user_data, char *context, int context_bytes, char *card, int card_bytes, int dwDisposition) { @@ -708,7 +708,7 @@ scard_send_disconnect(void *user_data, char *context, int context_bytes, * The Transmit_Call structure is used to send data to the smart card * associated with a valid context. *****************************************************************************/ -int APP_CC +int scard_send_transmit(void *user_data, char *context, int context_bytes, char *card, int card_bytes, char *send_data, int send_bytes, int recv_bytes, @@ -741,7 +741,7 @@ scard_send_transmit(void *user_data, char *context, int context_bytes, /** * Communicate directly with the smart card reader *****************************************************************************/ -int APP_CC +int scard_send_control(void *user_data, char* context, int context_bytes, char *card, int card_bytes, char *send_data, int send_bytes, @@ -774,7 +774,7 @@ scard_send_control(void *user_data, char* context, int context_bytes, /** * Cancel any outstanding calls *****************************************************************************/ -int APP_CC +int scard_send_cancel(void *user_data, char *context, int context_bytes) { IRP *irp; @@ -801,7 +801,7 @@ scard_send_cancel(void *user_data, char *context, int context_bytes) /** * Get reader attributes *****************************************************************************/ -int APP_CC +int scard_send_get_attrib(void *user_data, char *card, int card_bytes, READER_STATE* rs) { @@ -840,7 +840,7 @@ scard_send_get_attrib(void *user_data, char *card, int card_bytes, * * @return stream with IOCTL inserted in it, NULL on error *****************************************************************************/ -static struct stream * APP_CC +static struct stream * scard_make_new_ioctl(IRP *irp, tui32 ioctl) { /* @@ -892,7 +892,7 @@ scard_make_new_ioctl(IRP *irp, tui32 ioctl) * * @return index into smartcards[] on success, -1 on failure *****************************************************************************/ -static int APP_CC +static int scard_add_new_device(tui32 device_id) { int index; @@ -923,7 +923,7 @@ scard_add_new_device(tui32 device_id) * @return index of first unused entry in smartcards or -1 if smartcards * is full *****************************************************************************/ -static int APP_CC +static int scard_get_free_slot(void) { int i; @@ -944,7 +944,7 @@ scard_get_free_slot(void) /** * Release resources prior to shutting down *****************************************************************************/ -static void APP_CC +static void scard_release_resources(void) { int i; @@ -962,7 +962,7 @@ scard_release_resources(void) /** * *****************************************************************************/ -static void APP_CC +static void scard_send_EstablishContext(IRP *irp, int scope) { struct stream *s; @@ -1002,7 +1002,7 @@ scard_send_EstablishContext(IRP *irp, int scope) /** * Release a previously established Smart Card context *****************************************************************************/ -static void APP_CC +static void scard_send_ReleaseContext(IRP *irp, char *context, int context_bytes) { /* see [MS-RDPESC] 3.1.4.2 */ @@ -1053,7 +1053,7 @@ scard_send_ReleaseContext(IRP *irp, char *context, int context_bytes) /** * Checks if a previously established context is still valid *****************************************************************************/ -static void APP_CC +static void scard_send_IsContextValid(IRP *irp, char *context, int context_bytes) { /* see [MS-RDPESC] 3.1.4.3 */ @@ -1115,7 +1115,7 @@ scard_send_IsContextValid(IRP *irp, char *context, int context_bytes) /** * *****************************************************************************/ -static void APP_CC +static void scard_send_ListReaders(IRP *irp, char *context, int context_bytes, char *groups, int cchReaders, int wide) { @@ -1247,7 +1247,7 @@ align_s(struct stream *s, int bytes) * @param num_readers number of entries in rsa * @param rsa array of READER_STATEs *****************************************************************************/ -static void APP_CC +static void scard_send_GetStatusChange(IRP* irp, char *context, int context_bytes, int wide, tui32 timeout, tui32 num_readers, READER_STATE* rsa) @@ -1378,7 +1378,7 @@ scard_send_GetStatusChange(IRP* irp, char *context, int context_bytes, * @param wide TRUE if unicode string * @param rs reader state *****************************************************************************/ -static void APP_CC +static void scard_send_Connect(IRP* irp, char *context, int context_bytes, int wide, READER_STATE* rs) { @@ -1475,7 +1475,7 @@ scard_send_Connect(IRP* irp, char *context, int context_bytes, * rs.preferred_protocol * rs.init_type *****************************************************************************/ -static void APP_CC +static void scard_send_Reconnect(IRP *irp, char *context, int context_bytes, char *card, int card_bytes, READER_STATE *rs) { @@ -1546,7 +1546,7 @@ scard_send_Reconnect(IRP *irp, char *context, int context_bytes, * * @param con connection to client *****************************************************************************/ -static void APP_CC +static void scard_send_BeginTransaction(IRP *irp, char *context, int context_bytes, char *card, int card_bytes) { @@ -1613,7 +1613,7 @@ scard_send_BeginTransaction(IRP *irp, char *context, int context_bytes, * @param con connection to client * @param sc_handle handle to smartcard *****************************************************************************/ -static void APP_CC +static void scard_send_EndTransaction(IRP *irp, char *context, int context_bytes, char *card, int card_bytes, tui32 dwDisposition) @@ -1680,7 +1680,7 @@ scard_send_EndTransaction(IRP *irp, char *context, int context_bytes, * @param con connection to client * @param wide TRUE if unicode string *****************************************************************************/ -static void APP_CC +static void scard_send_Status(IRP *irp, int wide, char *context, int context_bytes, char *card, int card_bytes, int cchReaderLen, int cbAtrLen) @@ -1768,7 +1768,7 @@ scard_send_Status(IRP *irp, int wide, char *context, int context_bytes, * @param con connection to client * @param sc_handle handle to smartcard *****************************************************************************/ -static void APP_CC +static void scard_send_Disconnect(IRP *irp, char *context, int context_bytes, char *card, int card_bytes, int dwDisposition) { @@ -1832,7 +1832,7 @@ scard_send_Disconnect(IRP *irp, char *context, int context_bytes, * The Transmit_Call structure is used to send data to the smart card * associated with a valid context. *****************************************************************************/ -static int APP_CC +static int scard_send_Transmit(IRP *irp, char *context, int context_bytes, char *card, int card_bytes, char *send_data, int send_bytes, int recv_bytes, @@ -2025,7 +2025,7 @@ scard_send_Transmit(IRP *irp, char *context, int context_bytes, /** * Communicate directly with the smart card reader *****************************************************************************/ -static int APP_CC +static int scard_send_Control(IRP *irp, char *context, int context_bytes, char *card, int card_bytes, char *send_data, int send_bytes, int recv_bytes, int control_code) @@ -2101,7 +2101,7 @@ scard_send_Control(IRP *irp, char *context, int context_bytes, /** * Cancel any outstanding calls *****************************************************************************/ -static int APP_CC +static int scard_send_Cancel(IRP *irp, char *context, int context_bytes) { /* see [MS-RDPESC] 3.1.4.27 */ @@ -2153,7 +2153,7 @@ scard_send_Cancel(IRP *irp, char *context, int context_bytes) /** * Get reader attributes *****************************************************************************/ -static int APP_CC +static int scard_send_GetAttrib(IRP *irp, char *card, int card_bytes, READER_STATE *rs) { /* see [MS-RDPESC] 2.2.2.21 */ @@ -2223,7 +2223,7 @@ scard_send_GetAttrib(IRP *irp, char *card, int card_bytes, READER_STATE *rs) /** * *****************************************************************************/ -static void APP_CC +static void scard_handle_EstablishContext_Return(struct stream *s, IRP *irp, tui32 DeviceId, tui32 CompletionId, tui32 IoStatus) @@ -2272,9 +2272,9 @@ scard_handle_ReleaseContext_Return(struct stream *s, IRP *irp, * *****************************************************************************/ static void -APP_CC scard_handle_IsContextValid_Return(struct stream *s, IRP *irp, - tui32 DeviceId, tui32 CompletionId, - tui32 IoStatus) +scard_handle_IsContextValid_Return(struct stream *s, IRP *irp, + tui32 DeviceId, tui32 CompletionId, + tui32 IoStatus) { tui32 len; @@ -2297,7 +2297,7 @@ APP_CC scard_handle_IsContextValid_Return(struct stream *s, IRP *irp, /** * *****************************************************************************/ -static void APP_CC +static void scard_handle_ListReaders_Return(struct stream *s, IRP *irp, tui32 DeviceId, tui32 CompletionId, tui32 IoStatus) @@ -2373,7 +2373,7 @@ scard_handle_Connect_Return(struct stream *s, IRP *irp, /** * *****************************************************************************/ -static void APP_CC +static void scard_handle_Reconnect_Return(struct stream *s, IRP *irp, tui32 DeviceId, tui32 CompletionId, tui32 IoStatus) @@ -2503,7 +2503,7 @@ scard_handle_Disconnect_Return(struct stream *s, IRP *irp, /** * *****************************************************************************/ -static void APP_CC +static void scard_handle_Transmit_Return(struct stream *s, IRP *irp, tui32 DeviceId, tui32 CompletionId, tui32 IoStatus) { @@ -2528,7 +2528,7 @@ scard_handle_Transmit_Return(struct stream *s, IRP *irp, tui32 DeviceId, /** * *****************************************************************************/ -static void APP_CC +static void scard_handle_Control_Return(struct stream *s, IRP *irp, tui32 DeviceId, tui32 CompletionId,tui32 IoStatus) { @@ -2553,7 +2553,7 @@ scard_handle_Control_Return(struct stream *s, IRP *irp, tui32 DeviceId, /** * *****************************************************************************/ -static void APP_CC +static void scard_handle_Cancel_Return(struct stream *s, IRP *irp, tui32 DeviceId, tui32 CompletionId, tui32 IoStatus) { @@ -2578,7 +2578,7 @@ scard_handle_Cancel_Return(struct stream *s, IRP *irp, tui32 DeviceId, /** * *****************************************************************************/ -static void APP_CC +static void scard_handle_GetAttrib_Return(struct stream *s, IRP *irp, tui32 DeviceId, tui32 CompletionId, tui32 IoStatus) { diff --git a/sesman/chansrv/smartcard.h b/sesman/chansrv/smartcard.h index 3ea503a8..590f8966 100644 --- a/sesman/chansrv/smartcard.h +++ b/sesman/chansrv/smartcard.h @@ -106,66 +106,66 @@ typedef struct reader_state } READER_STATE; void scard_device_announce(tui32 device_id); -int APP_CC scard_get_wait_objs(tbus *objs, int *count, int *timeout); -int APP_CC scard_check_wait_objs(void); -int APP_CC scard_init(void); -int APP_CC scard_deinit(void); -int APP_CC scard_send_establish_context(void *user_data, int scope); -int APP_CC scard_send_release_context(void *user_data, +int scard_get_wait_objs(tbus *objs, int *count, int *timeout); +int scard_check_wait_objs(void); +int scard_init(void); +int scard_deinit(void); +int scard_send_establish_context(void *user_data, int scope); +int scard_send_release_context(void *user_data, char *context, int context_bytes); -int APP_CC scard_send_is_valid_context(void *user_data, +int scard_send_is_valid_context(void *user_data, char *context, int context_bytes); -int APP_CC scard_send_list_readers(void *user_data, +int scard_send_list_readers(void *user_data, char *context, int context_bytes, char *groups, int cchReaders, int wide); -int APP_CC scard_send_get_status_change(void *user_data, +int scard_send_get_status_change(void *user_data, char *context, int context_bytes, int wide, tui32 timeout, tui32 num_readers, READER_STATE* rsa); -int APP_CC scard_send_connect(void *user_data, +int scard_send_connect(void *user_data, char *context, int context_bytes, int wide, READER_STATE* rs); -int APP_CC scard_send_reconnect(void *user_data, +int scard_send_reconnect(void *user_data, char *context, int context_bytes, char *card, int card_bytes, READER_STATE* rs); -int APP_CC scard_send_begin_transaction(void *user_data, +int scard_send_begin_transaction(void *user_data, char *context, int context_bytes, char *card, int card_bytes); -int APP_CC scard_send_end_transaction(void *user_data, +int scard_send_end_transaction(void *user_data, char *context, int context_bytes, char *card, int card_bytes, tui32 dwDisposition); -int APP_CC scard_send_status(void *user_data, int wide, +int scard_send_status(void *user_data, int wide, char *context, int context_bytes, char *card, int card_bytes, int cchReaderLen, int cbAtrLen); -int APP_CC scard_send_disconnect(void *user_data, +int scard_send_disconnect(void *user_data, char *context, int context_bytes, char *card, int card_bytes, int dwDisposition); -int APP_CC scard_send_transmit(void *user_data, +int scard_send_transmit(void *user_data, char *context, int context_bytes, char *card, int card_bytes, char *send_data, int send_bytes, int recv_bytes, struct xrdp_scard_io_request *send_ior, struct xrdp_scard_io_request *recv_ior); -int APP_CC scard_send_control(void *user_data, +int scard_send_control(void *user_data, char *context, int context_bytes, char *card, int card_bytes, char *send_data, int send_bytes, int recv_bytes, int control_code); -int APP_CC scard_send_cancel(void *user_data, +int scard_send_cancel(void *user_data, char *context, int context_bytes); -int APP_CC scard_send_get_attrib(void *user_data, char *card, int card_bytes, +int scard_send_get_attrib(void *user_data, char *card, int card_bytes, READER_STATE* rs); /* diff --git a/sesman/chansrv/smartcard_pcsc.c b/sesman/chansrv/smartcard_pcsc.c index f98f30bb..51409567 100644 --- a/sesman/chansrv/smartcard_pcsc.c +++ b/sesman/chansrv/smartcard_pcsc.c @@ -367,7 +367,7 @@ context_add_card(struct pcsc_uds_client *uds_client, } /*****************************************************************************/ -int APP_CC +int scard_pcsc_get_wait_objs(tbus *objs, int *count, int *timeout) { struct pcsc_uds_client *uds_client; @@ -394,7 +394,7 @@ scard_pcsc_get_wait_objs(tbus *objs, int *count, int *timeout) } /*****************************************************************************/ -int APP_CC +int scard_pcsc_check_wait_objs(void) { struct pcsc_uds_client *uds_client; @@ -432,7 +432,7 @@ scard_pcsc_check_wait_objs(void) /*****************************************************************************/ /* returns error */ -int APP_CC +int scard_process_establish_context(struct trans *con, struct stream *in_s) { int dwScope; @@ -450,7 +450,7 @@ scard_process_establish_context(struct trans *con, struct stream *in_s) /*****************************************************************************/ /* returns error */ -int APP_CC +int scard_function_establish_context_return(void *user_data, struct stream *in_s, int len, int status) @@ -511,7 +511,7 @@ scard_function_establish_context_return(void *user_data, /*****************************************************************************/ /* returns error */ -int APP_CC +int scard_process_release_context(struct trans *con, struct stream *in_s) { int hContext; @@ -539,7 +539,7 @@ scard_process_release_context(struct trans *con, struct stream *in_s) /*****************************************************************************/ /* returns error */ -int APP_CC +int scard_function_release_context_return(void *user_data, struct stream *in_s, int len, int status) @@ -582,7 +582,7 @@ struct pcsc_list_readers /*****************************************************************************/ /* returns error */ -int APP_CC +int scard_process_list_readers(struct trans *con, struct stream *in_s) { int hContext; @@ -620,7 +620,7 @@ scard_process_list_readers(struct trans *con, struct stream *in_s) } /*****************************************************************************/ -int APP_CC +int scard_function_list_readers_return(void *user_data, struct stream *in_s, int len, int status) @@ -726,7 +726,7 @@ scard_function_list_readers_return(void *user_data, /*****************************************************************************/ /* returns error */ -int APP_CC +int scard_process_connect(struct trans *con, struct stream *in_s) { int hContext; @@ -760,7 +760,7 @@ scard_process_connect(struct trans *con, struct stream *in_s) } /*****************************************************************************/ -int APP_CC +int scard_function_connect_return(void *user_data, struct stream *in_s, int len, int status) @@ -824,7 +824,7 @@ scard_function_connect_return(void *user_data, /*****************************************************************************/ /* returns error */ -int APP_CC +int scard_process_disconnect(struct trans *con, struct stream *in_s) { int hCard; @@ -853,7 +853,7 @@ scard_process_disconnect(struct trans *con, struct stream *in_s) } /*****************************************************************************/ -int APP_CC +int scard_function_disconnect_return(void *user_data, struct stream *in_s, int len, int status) @@ -889,7 +889,7 @@ scard_function_disconnect_return(void *user_data, /*****************************************************************************/ /* returns error */ -int APP_CC +int scard_process_begin_transaction(struct trans *con, struct stream *in_s) { int hCard; @@ -918,7 +918,7 @@ scard_process_begin_transaction(struct trans *con, struct stream *in_s) /*****************************************************************************/ /* returns error */ -int APP_CC +int scard_function_begin_transaction_return(void *user_data, struct stream *in_s, int len, int status) @@ -954,7 +954,7 @@ scard_function_begin_transaction_return(void *user_data, /*****************************************************************************/ /* returns error */ -int APP_CC +int scard_process_end_transaction(struct trans *con, struct stream *in_s) { int hCard; @@ -986,7 +986,7 @@ scard_process_end_transaction(struct trans *con, struct stream *in_s) /*****************************************************************************/ /* returns error */ -int APP_CC +int scard_function_end_transaction_return(void *user_data, struct stream *in_s, int len, int status) @@ -1023,7 +1023,7 @@ scard_function_end_transaction_return(void *user_data, /*****************************************************************************/ /* returns error */ -int APP_CC +int scard_function_get_attrib_return(void *user_data, struct stream *in_s, int len, int status) @@ -1041,7 +1041,7 @@ struct pcsc_transmit /*****************************************************************************/ /* returns error */ -int APP_CC +int scard_process_transmit(struct trans *con, struct stream *in_s) { int hCard; @@ -1099,7 +1099,7 @@ scard_process_transmit(struct trans *con, struct stream *in_s) /*****************************************************************************/ /* returns error */ -int APP_CC +int scard_function_transmit_return(void *user_data, struct stream *in_s, int len, int status) @@ -1178,7 +1178,7 @@ scard_function_transmit_return(void *user_data, /*****************************************************************************/ /* returns error */ -int APP_CC +int scard_process_control(struct trans *con, struct stream *in_s) { int hCard; @@ -1219,7 +1219,7 @@ scard_process_control(struct trans *con, struct stream *in_s) /*****************************************************************************/ /* returns error */ -int APP_CC +int scard_function_control_return(void *user_data, struct stream *in_s, int len, int status) @@ -1275,7 +1275,7 @@ struct pcsc_status /*****************************************************************************/ /* returns error */ -int APP_CC +int scard_process_status(struct trans *con, struct stream *in_s) { int hCard; @@ -1336,7 +1336,7 @@ static int g_ms2pc[] = { PC_SCARD_UNKNOWN, PC_SCARD_ABSENT, /*****************************************************************************/ /* returns error */ -int APP_CC +int scard_function_status_return(void *user_data, struct stream *in_s, int len, int status) @@ -1444,7 +1444,7 @@ scard_function_status_return(void *user_data, /*****************************************************************************/ /* returns error */ -int APP_CC +int scard_process_get_status_change(struct trans *con, struct stream *in_s) { int index; @@ -1506,7 +1506,7 @@ scard_process_get_status_change(struct trans *con, struct stream *in_s) } /*****************************************************************************/ -int APP_CC +int scard_function_get_status_change_return(void *user_data, struct stream *in_s, int len, int status) @@ -1576,7 +1576,7 @@ scard_function_get_status_change_return(void *user_data, /*****************************************************************************/ /* returns error */ -int APP_CC +int scard_process_cancel(struct trans *con, struct stream *in_s) { int hContext; @@ -1602,7 +1602,7 @@ scard_process_cancel(struct trans *con, struct stream *in_s) /*****************************************************************************/ /* returns error */ -int APP_CC +int scard_function_cancel_return(void *user_data, struct stream *in_s, int len, int status) @@ -1638,7 +1638,7 @@ scard_function_cancel_return(void *user_data, /*****************************************************************************/ /* returns error */ -int APP_CC +int scard_function_is_context_valid_return(void *user_data, struct stream *in_s, int len, int status) @@ -1648,7 +1648,7 @@ scard_function_is_context_valid_return(void *user_data, /*****************************************************************************/ /* returns error */ -int APP_CC scard_function_reconnect_return(void *user_data, +int scard_function_reconnect_return(void *user_data, struct stream *in_s, int len, int status) { @@ -1657,7 +1657,7 @@ int APP_CC scard_function_reconnect_return(void *user_data, /*****************************************************************************/ /* returns error */ -int APP_CC +int scard_process_msg(struct trans *con, struct stream *in_s, int command) { int rv; @@ -1751,7 +1751,7 @@ scard_process_msg(struct trans *con, struct stream *in_s, int command) /*****************************************************************************/ /* returns error */ -int DEFAULT_CC +int my_pcsc_trans_data_in(struct trans *trans) { struct stream *s; @@ -1778,7 +1778,7 @@ my_pcsc_trans_data_in(struct trans *trans) /*****************************************************************************/ /* got a new connection from libpcsclite */ -int DEFAULT_CC +int my_pcsc_trans_conn_in(struct trans *trans, struct trans *new_trans) { struct pcsc_uds_client *uds_client; @@ -1818,7 +1818,7 @@ my_pcsc_trans_conn_in(struct trans *trans, struct trans *new_trans) } /*****************************************************************************/ -int APP_CC +int scard_pcsc_init(void) { char *home; @@ -1865,7 +1865,7 @@ scard_pcsc_init(void) } /*****************************************************************************/ -int APP_CC +int scard_pcsc_deinit(void) { LLOGLN(0, ("scard_pcsc_deinit:")); @@ -1891,22 +1891,22 @@ scard_pcsc_deinit(void) #else -int APP_CC +int scard_pcsc_get_wait_objs(tbus *objs, int *count, int *timeout) { return 0; } -int APP_CC +int scard_pcsc_check_wait_objs(void) { return 0; } -int APP_CC +int scard_pcsc_init(void) { return 0; } -int APP_CC +int scard_pcsc_deinit(void) { return 0; diff --git a/sesman/chansrv/smartcard_pcsc.h b/sesman/chansrv/smartcard_pcsc.h index b7ca2183..90e6475b 100644 --- a/sesman/chansrv/smartcard_pcsc.h +++ b/sesman/chansrv/smartcard_pcsc.h @@ -24,65 +24,65 @@ #ifndef _SMARTCARD_PCSC_H #define _SMARTCARD_PCSC_H -int APP_CC scard_pcsc_get_wait_objs(tbus *objs, int *count, int *timeout); -int APP_CC scard_pcsc_check_wait_objs(void); -int APP_CC scard_pcsc_init(void); -int APP_CC scard_pcsc_deinit(void); -int APP_CC scard_function_establish_context_return(void *user_data, +int scard_pcsc_get_wait_objs(tbus *objs, int *count, int *timeout); +int scard_pcsc_check_wait_objs(void); +int scard_pcsc_init(void); +int scard_pcsc_deinit(void); +int scard_function_establish_context_return(void *user_data, struct stream *in_s, int len, int status); -int APP_CC scard_function_release_context_return(void *user_data, +int scard_function_release_context_return(void *user_data, struct stream *in_s, int len, int status); -int APP_CC scard_function_list_readers_return(void *user_data, +int scard_function_list_readers_return(void *user_data, struct stream *in_s, int len, int status); -int APP_CC scard_function_transmit_return(void *user_data, +int scard_function_transmit_return(void *user_data, struct stream *in_s, int len, int status); -int APP_CC scard_function_control_return(void *user_data, +int scard_function_control_return(void *user_data, struct stream *in_s, int len, int status); -int APP_CC scard_function_get_status_change_return(void *user_data, +int scard_function_get_status_change_return(void *user_data, struct stream *in_s, int len, int status); -int APP_CC scard_function_connect_return(void *user_data, +int scard_function_connect_return(void *user_data, struct stream *in_s, int len, int status); -int APP_CC scard_function_status_return(void *user_data, +int scard_function_status_return(void *user_data, struct stream *in_s, int len, int status); -int APP_CC scard_function_begin_transaction_return(void *user_data, +int scard_function_begin_transaction_return(void *user_data, struct stream *in_s, int len, int status); -int APP_CC scard_function_end_transaction_return(void *user_data, +int scard_function_end_transaction_return(void *user_data, struct stream *in_s, int len, int status); -int APP_CC scard_function_is_context_valid_return(void *user_data, +int scard_function_is_context_valid_return(void *user_data, struct stream *in_s, int len, int status); -int APP_CC scard_function_reconnect_return(void *user_data, +int scard_function_reconnect_return(void *user_data, struct stream *in_s, int len, int status); -int APP_CC scard_function_disconnect_return(void *user_data, +int scard_function_disconnect_return(void *user_data, struct stream *in_s, int len, int status); -int APP_CC scard_function_cancel_return(void *user_data, +int scard_function_cancel_return(void *user_data, struct stream *in_s, int len, int status); -int APP_CC scard_function_get_attrib_return(void *user_data, +int scard_function_get_attrib_return(void *user_data, struct stream *in_s, int len, int status); diff --git a/sesman/chansrv/sound.c b/sesman/chansrv/sound.c index 31af3e4a..2958e123 100644 --- a/sesman/chansrv/sound.c +++ b/sesman/chansrv/sound.c @@ -206,21 +206,21 @@ static int g_client_input_format_index = 0; static int g_server_input_format_index = 0; /* microphone related */ -static int APP_CC sound_send_server_input_formats(void); -static int APP_CC sound_process_input_format(int aindex, int wFormatTag, +static int sound_send_server_input_formats(void); +static int sound_process_input_format(int aindex, int wFormatTag, int nChannels, int nSamplesPerSec, int nAvgBytesPerSec, int nBlockAlign, int wBitsPerSample, int cbSize, char *data); -static int APP_CC sound_process_input_formats(struct stream *s, int size); -static int APP_CC sound_input_start_recording(void); -static int APP_CC sound_input_stop_recording(void); -static int APP_CC sound_process_input_data(struct stream *s, int bytes); -static int DEFAULT_CC sound_sndsrvr_source_data_in(struct trans *trans); -static int APP_CC sound_start_source_listener(void); -static int APP_CC sound_start_sink_listener(void); +static int sound_process_input_formats(struct stream *s, int size); +static int sound_input_start_recording(void); +static int sound_input_stop_recording(void); +static int sound_process_input_data(struct stream *s, int bytes); +static int sound_sndsrvr_source_data_in(struct trans *trans); +static int sound_start_source_listener(void); +static int sound_start_sink_listener(void); /*****************************************************************************/ -static int APP_CC +static int sound_send_server_output_formats(void) { struct stream *s; @@ -322,7 +322,7 @@ sound_send_training(void) } /*****************************************************************************/ -static int APP_CC +static int sound_process_output_format(int aindex, int wFormatTag, int nChannels, int nSamplesPerSec, int nAvgBytesPerSec, int nBlockAlign, int wBitsPerSample, @@ -391,7 +391,7 @@ sound_process_output_format(int aindex, int wFormatTag, int nChannels, 0020 10 b1 02 00 04 00 10 00 00 00 */ -static int APP_CC +static int sound_process_output_formats(struct stream *s, int size) { int num_formats; @@ -780,7 +780,7 @@ sound_send_close(void) /*****************************************************************************/ /* from client */ -static int APP_CC +static int sound_process_training(struct stream *s, int size) { int time_diff; @@ -792,7 +792,7 @@ sound_process_training(struct stream *s, int size) /*****************************************************************************/ /* from client */ -static int APP_CC +static int sound_process_wave_confirm(struct stream *s, int size) { int wTimeStamp; @@ -816,7 +816,7 @@ sound_process_wave_confirm(struct stream *s, int size) /*****************************************************************************/ /* process message in from the audio source, eg pulse, alsa on it's way to the client. returns error */ -static int APP_CC +static int process_pcm_message(int id, int size, struct stream *s) { switch (id) @@ -838,7 +838,7 @@ process_pcm_message(int id, int size, struct stream *s) /* data in from sound_server_sink */ -static int DEFAULT_CC +static int sound_sndsrvr_sink_data_in(struct trans *trans) { struct stream *s; @@ -879,7 +879,7 @@ sound_sndsrvr_sink_data_in(struct trans *trans) /* incoming connection on unix domain socket - sound_server_sink -> xrdp */ -static int DEFAULT_CC +static int sound_sndsrvr_sink_conn_in(struct trans *trans, struct trans *new_trans) { LOG(0, ("sound_sndsrvr_sink_conn_in:")); @@ -909,7 +909,7 @@ sound_sndsrvr_sink_conn_in(struct trans *trans, struct trans *new_trans) /* incoming connection on unix domain socket - sound_server_source -> xrdp */ -static int DEFAULT_CC +static int sound_sndsrvr_source_conn_in(struct trans *trans, struct trans *new_trans) { LOG(0, ("sound_sndsrvr_source_conn_in: client connected")); @@ -936,7 +936,7 @@ sound_sndsrvr_source_conn_in(struct trans *trans, struct trans *new_trans) } /*****************************************************************************/ -int APP_CC +int sound_init(void) { LOG(0, ("sound_init:")); @@ -965,7 +965,7 @@ sound_init(void) } /*****************************************************************************/ -int APP_CC +int sound_deinit(void) { LOG(10, ("sound_deinit:")); @@ -1011,7 +1011,7 @@ sound_deinit(void) /* data in from client ( client -> xrdp -> chansrv ) */ -int APP_CC +int sound_data_in(struct stream *s, int chan_id, int chan_flags, int length, int total_length) { @@ -1067,7 +1067,7 @@ sound_data_in(struct stream *s, int chan_id, int chan_flags, int length, } /*****************************************************************************/ -int APP_CC +int sound_get_wait_objs(tbus *objs, int *count, int *timeout) { int lcount; @@ -1103,7 +1103,7 @@ sound_get_wait_objs(tbus *objs, int *count, int *timeout) } /*****************************************************************************/ -int APP_CC +int sound_check_wait_objs(void) { if (g_audio_l_trans_out != 0) @@ -1161,7 +1161,7 @@ sound_check_wait_objs(void) * *****************************************************************************/ -static int APP_CC +static int sound_send_server_input_formats(void) { struct stream *s; @@ -1225,7 +1225,7 @@ sound_send_server_input_formats(void) * *****************************************************************************/ -static int APP_CC +static int sound_process_input_format(int aindex, int wFormatTag, int nChannels, int nSamplesPerSec, int nAvgBytesPerSec, int nBlockAlign, int wBitsPerSample, @@ -1273,7 +1273,7 @@ sound_process_input_format(int aindex, int wFormatTag, int nChannels, * *****************************************************************************/ -static int APP_CC +static int sound_process_input_formats(struct stream *s, int size) { int num_formats; @@ -1318,7 +1318,7 @@ sound_process_input_formats(struct stream *s, int size) * *****************************************************************************/ -static int APP_CC +static int sound_input_start_recording(void) { struct stream* s; @@ -1357,7 +1357,7 @@ sound_input_start_recording(void) * *****************************************************************************/ -static int APP_CC +static int sound_input_stop_recording(void) { struct stream* s; @@ -1387,7 +1387,7 @@ sound_input_stop_recording(void) * Process data: xrdp <- client *****************************************************************************/ -static int APP_CC +static int sound_process_input_data(struct stream *s, int bytes) { struct stream *ls; @@ -1415,7 +1415,7 @@ sound_process_input_data(struct stream *s, int bytes) * Got a command from sound_server_source *****************************************************************************/ -static int DEFAULT_CC +static int sound_sndsrvr_source_data_in(struct trans *trans) { struct stream *ts = NULL; @@ -1516,7 +1516,7 @@ sound_sndsrvr_source_data_in(struct trans *trans) /** * Start a listener for microphone redirection connections *****************************************************************************/ -static int APP_CC +static int sound_start_source_listener(void) { char port[1024]; @@ -1533,7 +1533,7 @@ sound_start_source_listener(void) /** * Start a listener for speaker redirection connections *****************************************************************************/ -static int APP_CC +static int sound_start_sink_listener(void) { char port[1024]; diff --git a/sesman/chansrv/sound.h b/sesman/chansrv/sound.h index f3563dab..8227464a 100644 --- a/sesman/chansrv/sound.h +++ b/sesman/chansrv/sound.h @@ -50,12 +50,12 @@ #define PA_CMD_STOP_REC 2 #define PA_CMD_SEND_DATA 3 -int APP_CC sound_init(void); -int APP_CC sound_deinit(void); -int APP_CC sound_get_wait_objs(tbus* objs, int* count, int* timeout); -int APP_CC sound_check_wait_objs(void); +int sound_init(void); +int sound_deinit(void); +int sound_get_wait_objs(tbus* objs, int* count, int* timeout); +int sound_check_wait_objs(void); -int APP_CC sound_data_in(struct stream* s, int chan_id, int chan_flags, +int sound_data_in(struct stream* s, int chan_id, int chan_flags, int length, int total_length); #endif diff --git a/sesman/chansrv/xcommon.c b/sesman/chansrv/xcommon.c index 92124407..8abc27f7 100644 --- a/sesman/chansrv/xcommon.c +++ b/sesman/chansrv/xcommon.c @@ -51,7 +51,7 @@ Atom g_net_wm_name = 0; Atom g_wm_state = 0; /*****************************************************************************/ -static int DEFAULT_CC +static int xcommon_error_handler(Display *dis, XErrorEvent *xer) { char text[256]; @@ -68,7 +68,7 @@ xcommon_error_handler(Display *dis, XErrorEvent *xer) Do any cleanup that needs to be done on exit, like removing temporary files. Don't worry about memory leaks */ #if 0 -static int DEFAULT_CC +static int xcommon_fatal_handler(Display *dis) { return 0; @@ -80,7 +80,7 @@ xcommon_fatal_handler(Display *dis) this is like g_time2 in os_calls, but not milliseconds since machine was up, something else this is a time value similar to what the xserver uses */ -int APP_CC +int xcommon_get_local_time(void) { return g_time3(); @@ -88,7 +88,7 @@ xcommon_get_local_time(void) /******************************************************************************/ /* this should be called first */ -int APP_CC +int xcommon_init(void) { if (g_display != 0) @@ -139,7 +139,7 @@ xcommon_init(void) /* returns error this is called to get any wait objects for the main loop timeout can be nil */ -int APP_CC +int xcommon_get_wait_objs(tbus *objs, int *count, int *timeout) { int lcount; @@ -156,7 +156,7 @@ xcommon_get_wait_objs(tbus *objs, int *count, int *timeout) } /*****************************************************************************/ -int APP_CC +int xcommon_check_wait_objs(void) { XEvent xevent; diff --git a/sesman/chansrv/xcommon.h b/sesman/chansrv/xcommon.h index 57a7d4fa..ea74b89f 100644 --- a/sesman/chansrv/xcommon.h +++ b/sesman/chansrv/xcommon.h @@ -26,13 +26,13 @@ #define FORMAT_TO_BYTES(_format) \ (_format) == 32 ? sizeof(long) : (_format) / 8 -int APP_CC +int xcommon_get_local_time(void); -int APP_CC +int xcommon_init(void); -int APP_CC +int xcommon_get_wait_objs(tbus* objs, int* count, int* timeout); -int APP_CC +int xcommon_check_wait_objs(void); #endif diff --git a/sesman/config.c b/sesman/config.c index c2e565ee..794ff4c2 100644 --- a/sesman/config.c +++ b/sesman/config.c @@ -39,7 +39,7 @@ extern struct config_sesman *g_cfg; /* in sesman.c */ /******************************************************************************/ -int DEFAULT_CC +int config_read(struct config_sesman *cfg) { int fd; @@ -103,7 +103,7 @@ config_read(struct config_sesman *cfg) } /******************************************************************************/ -int DEFAULT_CC +int config_read_globals(int file, struct config_sesman *cf, struct list *param_n, struct list *param_v) { @@ -187,7 +187,7 @@ config_read_globals(int file, struct config_sesman *cf, struct list *param_n, } /******************************************************************************/ -int DEFAULT_CC +int config_read_security(int file, struct config_security *sc, struct list *param_n, struct list *param_v) @@ -272,7 +272,7 @@ config_read_security(int file, struct config_security *sc, } /******************************************************************************/ -int DEFAULT_CC +int config_read_sessions(int file, struct config_sessions *se, struct list *param_n, struct list *param_v) { @@ -368,7 +368,7 @@ config_read_sessions(int file, struct config_sessions *se, struct list *param_n, } /******************************************************************************/ -int DEFAULT_CC +int config_read_rdp_params(int file, struct config_sesman *cs, struct list *param_n, struct list *param_v) { @@ -399,7 +399,7 @@ config_read_rdp_params(int file, struct config_sesman *cs, struct list *param_n, } /******************************************************************************/ -int DEFAULT_CC +int config_read_xorg_params(int file, struct config_sesman *cs, struct list *param_n, struct list *param_v) { @@ -432,7 +432,7 @@ config_read_xorg_params(int file, struct config_sesman *cs, } /******************************************************************************/ -int DEFAULT_CC +int config_read_vnc_params(int file, struct config_sesman *cs, struct list *param_n, struct list *param_v) { @@ -463,7 +463,7 @@ config_read_vnc_params(int file, struct config_sesman *cs, struct list *param_n, } /******************************************************************************/ -int DEFAULT_CC +int config_read_session_variables(int file, struct config_sesman *cs, struct list *param_n, struct list *param_v) { diff --git a/sesman/config.h b/sesman/config.h index 2baef632..87f489db 100644 --- a/sesman/config.h +++ b/sesman/config.h @@ -251,7 +251,7 @@ struct config_sesman * @return 0 on success, 1 on failure * */ -int DEFAULT_CC +int config_read(struct config_sesman* cfg); /** @@ -264,7 +264,7 @@ config_read(struct config_sesman* cfg); * @return 0 on success, 1 on failure * */ -int DEFAULT_CC +int config_read_globals(int file, struct config_sesman* cf, struct list* param_n, struct list* param_v); @@ -278,7 +278,7 @@ config_read_globals(int file, struct config_sesman* cf, * @return 0 on success, 1 on failure * */ -int DEFAULT_CC +int config_read_logging(int file, struct log_config* lc, struct list* param_n, struct list* param_v); @@ -292,7 +292,7 @@ config_read_logging(int file, struct log_config* lc, struct list* param_n, * @return 0 on success, 1 on failure * */ -int DEFAULT_CC +int config_read_security(int file, struct config_security* sc, struct list* param_n, struct list* param_v); @@ -306,7 +306,7 @@ config_read_security(int file, struct config_security* sc, * @return 0 on success, 1 on failure * */ -int DEFAULT_CC +int config_read_sessions(int file, struct config_sessions* ss, struct list* param_n, struct list* param_v); @@ -320,7 +320,7 @@ config_read_sessions(int file, struct config_sessions* ss, * @return 0 on success, 1 on failure * */ -int DEFAULT_CC +int config_read_rdp_params(int file, struct config_sesman* cs, struct list* param_n, struct list* param_v); @@ -334,7 +334,7 @@ config_read_rdp_params(int file, struct config_sesman* cs, struct list* param_n, * @return 0 on success, 1 on failure * */ -int DEFAULT_CC +int config_read_xorg_params(int file, struct config_sesman* cs, struct list* param_n, struct list* param_v); @@ -348,11 +348,11 @@ config_read_xorg_params(int file, struct config_sesman* cs, struct list* param_n * @return 0 on success, 1 on failure * */ -int DEFAULT_CC +int config_read_vnc_params(int file, struct config_sesman* cs, struct list* param_n, struct list* param_v); -int DEFAULT_CC +int config_read_session_variables(int file, struct config_sesman *cs, struct list *param_n, struct list *param_v); diff --git a/sesman/env.c b/sesman/env.c index 2a07b873..eabc92c4 100644 --- a/sesman/env.c +++ b/sesman/env.c @@ -38,7 +38,7 @@ extern unsigned char g_fixedkey[8]; /* in sesman.c */ extern struct config_sesman *g_cfg; /* in sesman.c */ /******************************************************************************/ -int DEFAULT_CC +int env_check_password_file(const char *filename, const char *passwd) { char encryptedPasswd[16]; @@ -87,7 +87,7 @@ env_check_password_file(const char *filename, const char *passwd) /******************************************************************************/ /* its the responsibility of the caller to free passwd_file */ -int DEFAULT_CC +int env_set_user(const char *username, char **passwd_file, int display, const struct list *env_names, const struct list *env_values) { diff --git a/sesman/env.h b/sesman/env.h index a7156508..d499b838 100644 --- a/sesman/env.h +++ b/sesman/env.h @@ -37,7 +37,7 @@ * @return 0 on success, 1 on error * */ -int DEFAULT_CC +int env_check_password_file(const char *filename, const char *password); /** @@ -49,7 +49,7 @@ env_check_password_file(const char *filename, const char *password); * @return 0 on success, g_getuser_info() error codes on error * */ -int DEFAULT_CC +int env_set_user(const char *username, char **passwd_file, int display, const struct list *env_names, const struct list *env_values); diff --git a/sesman/libscp/libscp_init.c b/sesman/libscp/libscp_init.c index 7eabd705..b0df86f7 100644 --- a/sesman/libscp/libscp_init.c +++ b/sesman/libscp/libscp_init.c @@ -33,7 +33,7 @@ //struct log_config* s_log; /* server API */ -int DEFAULT_CC +int scp_init(void) { /* diff --git a/sesman/libscp/libscp_init.h b/sesman/libscp/libscp_init.h index 7e74640c..2bf67cb8 100644 --- a/sesman/libscp/libscp_init.h +++ b/sesman/libscp/libscp_init.h @@ -40,7 +40,7 @@ * It this memory needs to be g_free()d * */ -int DEFAULT_CC +int scp_init(void); #endif diff --git a/sesman/libscp/libscp_lock.c b/sesman/libscp/libscp_lock.c index e025882d..23647dcb 100644 --- a/sesman/libscp/libscp_lock.c +++ b/sesman/libscp/libscp_lock.c @@ -36,7 +36,7 @@ int lock_fork_forkers_count; /* threads that want to fork */ int lock_fork_blockers_count; /* threads that are blocking fork */ int lock_fork_waiting_count; /* threads suspended until the fork finishes */ -void DEFAULT_CC +void scp_lock_init(void) { /* initializing fork lock */ @@ -53,7 +53,7 @@ scp_lock_init(void) } /******************************************************************************/ -void DEFAULT_CC +void scp_lock_fork_request(void) { /* lock mutex */ @@ -73,7 +73,7 @@ scp_lock_fork_request(void) } /******************************************************************************/ -void DEFAULT_CC +void scp_lock_fork_release(void) { pthread_mutex_lock(&lock_fork); @@ -95,7 +95,7 @@ scp_lock_fork_release(void) } /******************************************************************************/ -void DEFAULT_CC +void scp_lock_fork_critical_section_end(int blocking) { //LOG_DBG("lock_fork_critical_section_end()",0); @@ -118,7 +118,7 @@ scp_lock_fork_critical_section_end(int blocking) } /******************************************************************************/ -int DEFAULT_CC +int scp_lock_fork_critical_section_start(void) { //LOG_DBG("lock_fork_critical_section_start()",0); diff --git a/sesman/libscp/libscp_lock.h b/sesman/libscp/libscp_lock.h index ae2c361b..9f8fd4ed 100644 --- a/sesman/libscp/libscp_lock.h +++ b/sesman/libscp/libscp_lock.h @@ -29,7 +29,7 @@ * @brief initializes all the locks * */ -void DEFAULT_CC +void scp_lock_init(void); /** @@ -37,7 +37,7 @@ scp_lock_init(void); * @brief requires to fork a new child process * */ -void DEFAULT_CC +void scp_lock_fork_request(void); /** @@ -45,7 +45,7 @@ scp_lock_fork_request(void); * @brief releases a fork() request * */ -void DEFAULT_CC +void scp_lock_fork_release(void); /** @@ -59,7 +59,7 @@ scp_lock_fork_release(void); * @return * */ -int DEFAULT_CC +int scp_lock_fork_critical_section_start(void); /** @@ -67,7 +67,7 @@ scp_lock_fork_critical_section_start(void); * @brief closes the critical section * */ -void DEFAULT_CC +void scp_lock_fork_critical_section_end(int blocking); #endif diff --git a/sesman/libscp/libscp_tcp.c b/sesman/libscp/libscp_tcp.c index 86e71956..0fe54f75 100644 --- a/sesman/libscp/libscp_tcp.c +++ b/sesman/libscp/libscp_tcp.c @@ -33,7 +33,7 @@ extern struct log_config *s_log; /*****************************************************************************/ -int DEFAULT_CC +int scp_tcp_force_recv(int sck, char *data, int len) { int rcvd; @@ -76,7 +76,7 @@ scp_tcp_force_recv(int sck, char *data, int len) } /*****************************************************************************/ -int DEFAULT_CC +int scp_tcp_force_send(int sck, char *data, int len) { int sent; @@ -119,7 +119,7 @@ scp_tcp_force_send(int sck, char *data, int len) } /*****************************************************************************/ -int DEFAULT_CC +int scp_tcp_bind(int sck, char *addr, char *port) { return g_tcp_bind_address(sck, port, addr); diff --git a/sesman/libscp/libscp_tcp.h b/sesman/libscp/libscp_tcp.h index 1db70797..ceeb6860 100644 --- a/sesman/libscp/libscp_tcp.h +++ b/sesman/libscp/libscp_tcp.h @@ -38,7 +38,7 @@ * @return 0 on success, 1 on error * */ -int DEFAULT_CC +int scp_tcp_force_recv(int sck, char* data, int len); /** @@ -50,7 +50,7 @@ scp_tcp_force_recv(int sck, char* data, int len); * @return 0 on success, 1 on error * */ -int DEFAULT_CC +int scp_tcp_force_send(int sck, char* data, int len); /** @@ -62,7 +62,7 @@ scp_tcp_force_send(int sck, char* data, int len); * @return 0 on success, -1 on error * */ -int DEFAULT_CC +int scp_tcp_bind(int sck, char* addr, char* port); #endif diff --git a/sesman/scp.c b/sesman/scp.c index a6fbc76e..d548052a 100644 --- a/sesman/scp.c +++ b/sesman/scp.c @@ -36,7 +36,7 @@ extern struct config_sesman *g_cfg; /* in sesman.c */ /******************************************************************************/ -void *DEFAULT_CC +void * scp_process_start(void *sck) { struct SCP_CONNECTION scon; diff --git a/sesman/scp.h b/sesman/scp.h index 1cdfbc4f..c174d3d9 100644 --- a/sesman/scp.h +++ b/sesman/scp.h @@ -39,7 +39,7 @@ * @param socket the connection socket * */ -void* DEFAULT_CC +void* scp_process_start(void* sck); #endif diff --git a/sesman/scp_v0.c b/sesman/scp_v0.c index 9f272719..a6a1060c 100644 --- a/sesman/scp_v0.c +++ b/sesman/scp_v0.c @@ -33,7 +33,7 @@ extern struct config_sesman *g_cfg; /* in sesman.c */ /******************************************************************************/ -void DEFAULT_CC +void scp_v0_process(struct SCP_CONNECTION *c, struct SCP_SESSION *s) { int display = 0; diff --git a/sesman/scp_v0.h b/sesman/scp_v0.h index 8aa6f401..41d6bb7e 100644 --- a/sesman/scp_v0.h +++ b/sesman/scp_v0.h @@ -37,7 +37,7 @@ * @param out_s output stream * */ -void DEFAULT_CC +void scp_v0_process(struct SCP_CONNECTION* c, struct SCP_SESSION* s); #endif diff --git a/sesman/scp_v1.c b/sesman/scp_v1.c index 517e20d6..74668efc 100644 --- a/sesman/scp_v1.c +++ b/sesman/scp_v1.c @@ -38,7 +38,7 @@ extern struct config_sesman *g_cfg; /* in sesman.c */ static void parseCommonStates(enum SCP_SERVER_STATES_E e, const char *f); /******************************************************************************/ -void DEFAULT_CC +void scp_v1_process(struct SCP_CONNECTION *c, struct SCP_SESSION *s) { long data; diff --git a/sesman/scp_v1.h b/sesman/scp_v1.h index a1d718a7..c7bd72f5 100644 --- a/sesman/scp_v1.h +++ b/sesman/scp_v1.h @@ -35,7 +35,7 @@ * @param out_s output stream * */ -void DEFAULT_CC +void scp_v1_process(struct SCP_CONNECTION* c, struct SCP_SESSION* s); #endif diff --git a/sesman/scp_v1_mng.c b/sesman/scp_v1_mng.c index d945f2d7..044b35ad 100644 --- a/sesman/scp_v1_mng.c +++ b/sesman/scp_v1_mng.c @@ -37,7 +37,7 @@ extern struct config_sesman *g_cfg; /* in sesman.c */ static void parseCommonStates(enum SCP_SERVER_STATES_E e, const char *f); /******************************************************************************/ -void DEFAULT_CC +void scp_v1_mng_process(struct SCP_CONNECTION *c, struct SCP_SESSION *s) { long data; diff --git a/sesman/scp_v1_mng.h b/sesman/scp_v1_mng.h index 74d4e392..89cacea1 100644 --- a/sesman/scp_v1_mng.h +++ b/sesman/scp_v1_mng.h @@ -35,7 +35,7 @@ * @param out_s output stream * */ -void DEFAULT_CC +void scp_v1_mng_process(struct SCP_CONNECTION* c, struct SCP_SESSION* s); #endif diff --git a/sesman/sesman.c b/sesman/sesman.c index 01bac015..738421ad 100644 --- a/sesman/sesman.c +++ b/sesman/sesman.c @@ -43,7 +43,7 @@ tintptr g_term_event = 0; * @brief Starts sesman main loop * */ -static void DEFAULT_CC +static void sesman_main_loop(void) { int in_sck; @@ -148,7 +148,7 @@ print_usage(int retcode) } /******************************************************************************/ -int DEFAULT_CC +int main(int argc, char **argv) { int fd; diff --git a/sesman/session.c b/sesman/session.c index 78d9ae9f..06e44cf0 100644 --- a/sesman/session.c +++ b/sesman/session.c @@ -61,7 +61,7 @@ extern tbus g_term_event; /* in sesman.c */ * @param len the allocated len for outstr * @return */ -char *APP_CC +char * dumpItemsToString(struct list *self, char *outstr, int len) { int index; @@ -90,7 +90,7 @@ dumpItemsToString(struct list *self, char *outstr, int len) /******************************************************************************/ -struct session_item *DEFAULT_CC +struct session_item * session_get_bydata(const char *name, int width, int height, int bpp, int type, const char *client_ip) { @@ -163,7 +163,7 @@ session_get_bydata(const char *name, int width, int height, int bpp, int type, * @return 0 if there isn't a display running, nonzero otherwise * */ -static int DEFAULT_CC +static int x_server_running_check_ports(int display) { char text[256]; @@ -250,7 +250,7 @@ x_server_running_check_ports(int display) * @return 0 if there isn't a display running, nonzero otherwise * */ -static int DEFAULT_CC +static int x_server_running(int display) { char text[256]; @@ -269,7 +269,7 @@ x_server_running(int display) } /******************************************************************************/ -static void DEFAULT_CC +static void session_start_sessvc(int xpid, int wmpid, long data, char *username, int display) { struct list *sessvc_params = (struct list *)NULL; @@ -342,7 +342,7 @@ session_start_sessvc(int xpid, int wmpid, long data, char *username, int display /******************************************************************************/ /* called with the main thread returns boolean */ -static int APP_CC +static int session_is_display_in_chain(int display) { struct session_chain *chain; @@ -367,7 +367,7 @@ session_is_display_in_chain(int display) /******************************************************************************/ /* called with the main thread */ -static int APP_CC +static int session_get_avail_display_from_chain(void) { int display; @@ -392,7 +392,7 @@ session_get_avail_display_from_chain(void) } /******************************************************************************/ -static int APP_CC +static int wait_for_xserver(int display) { int i; @@ -421,7 +421,7 @@ wait_for_xserver(int display) /******************************************************************************/ /* called with the main thread */ -static int APP_CC +static int session_start_fork(tbus data, tui8 type, struct SCP_SESSION *s) { int display = 0; @@ -876,7 +876,7 @@ session_start_fork(tbus data, tui8 type, struct SCP_SESSION *s) /******************************************************************************/ /* called with the main thread */ -static int APP_CC +static int session_reconnect_fork(int display, char *username) { int pid; @@ -910,7 +910,7 @@ session_reconnect_fork(int display, char *username) /******************************************************************************/ /* called by a worker thread, ask the main thread to call session_sync_start and wait till done */ -int DEFAULT_CC +int session_start(long data, tui8 type, struct SCP_SESSION *s) { return session_start_fork(data, type, s); @@ -919,14 +919,14 @@ session_start(long data, tui8 type, struct SCP_SESSION *s) /******************************************************************************/ /* called by a worker thread, ask the main thread to call session_sync_start and wait till done */ -int DEFAULT_CC +int session_reconnect(int display, char *username) { return session_reconnect_fork(display, username); } /******************************************************************************/ -int DEFAULT_CC +int session_kill(int pid) { struct session_chain *tmp; @@ -987,7 +987,7 @@ session_kill(int pid) } /******************************************************************************/ -void DEFAULT_CC +void session_sigkill_all(void) { struct session_chain *tmp; @@ -1012,7 +1012,7 @@ session_sigkill_all(void) } /******************************************************************************/ -struct session_item *DEFAULT_CC +struct session_item * session_get_bypid(int pid) { struct session_chain *tmp; diff --git a/sesman/session.h b/sesman/session.h index 04bf4267..4533a1a1 100644 --- a/sesman/session.h +++ b/sesman/session.h @@ -91,7 +91,7 @@ struct session_chain * @return session data or 0 * */ -struct session_item* DEFAULT_CC +struct session_item* session_get_bydata(const char *name, int width, int height, int bpp, int type, const char *client_ip); #ifndef session_find_item @@ -104,10 +104,10 @@ session_get_bydata(const char *name, int width, int height, int bpp, int type, * @return 0 on error, display number if success * */ -int DEFAULT_CC +int session_start(long data, tui8 type, struct SCP_SESSION *s); -int DEFAULT_CC +int session_reconnect(int display, char* username); /** @@ -117,7 +117,7 @@ session_reconnect(int display, char* username); * @return * */ -int DEFAULT_CC +int session_kill(int pid); /** @@ -126,7 +126,7 @@ session_kill(int pid); * @return * */ -void DEFAULT_CC +void session_sigkill_all(void); /** @@ -136,7 +136,7 @@ session_sigkill_all(void); * @return a pointer to the session descriptor on success, NULL otherwise * */ -struct session_item* DEFAULT_CC +struct session_item* session_get_bypid(int pid); /** diff --git a/sesman/sessvc/sessvc.c b/sesman/sessvc/sessvc.c index 3fb80a60..2426b698 100644 --- a/sesman/sessvc/sessvc.c +++ b/sesman/sessvc/sessvc.c @@ -34,7 +34,7 @@ static int g_term = 0; /*****************************************************************************/ -void DEFAULT_CC +void term_signal_handler(int sig) { g_writeln("xrdp-sessvc: term_signal_handler: got signal %d", sig); @@ -42,7 +42,7 @@ term_signal_handler(int sig) } /*****************************************************************************/ -void DEFAULT_CC +void nil_signal_handler(int sig) { g_writeln("xrdp-sessvc: nil_signal_handler: got signal %d", sig); @@ -50,7 +50,7 @@ nil_signal_handler(int sig) /******************************************************************************/ /* chansrv can exit at any time without cleaning up, it's an xlib app */ -int APP_CC +int chansrv_cleanup(int pid) { char text[256]; @@ -73,7 +73,7 @@ chansrv_cleanup(int pid) } /******************************************************************************/ -int DEFAULT_CC +int main(int argc, char **argv) { int ret = 0; diff --git a/sesman/sig.c b/sesman/sig.c index 3ddaa2b2..782e8fe2 100644 --- a/sesman/sig.c +++ b/sesman/sig.c @@ -38,7 +38,7 @@ extern struct config_sesman *g_cfg; /* in sesman.c */ extern tbus g_term_event; /******************************************************************************/ -void DEFAULT_CC +void sig_sesman_shutdown(int sig) { char pid_file[256]; @@ -62,7 +62,7 @@ sig_sesman_shutdown(int sig) } /******************************************************************************/ -void DEFAULT_CC +void sig_sesman_reload_cfg(int sig) { int error; @@ -125,7 +125,7 @@ sig_sesman_reload_cfg(int sig) } /******************************************************************************/ -void DEFAULT_CC +void sig_sesman_session_end(int sig) { int pid; @@ -144,7 +144,7 @@ sig_sesman_session_end(int sig) } /******************************************************************************/ -void *DEFAULT_CC +void * sig_handler_thread(void *arg) { int recv_signal; diff --git a/sesman/sig.h b/sesman/sig.h index 17f8f917..0a8494b0 100644 --- a/sesman/sig.h +++ b/sesman/sig.h @@ -33,7 +33,7 @@ * @param sig The received signal * */ -void DEFAULT_CC +void sig_sesman_shutdown(int sig); /** @@ -42,7 +42,7 @@ sig_sesman_shutdown(int sig); * @param sig The received signal * */ -void DEFAULT_CC +void sig_sesman_reload_cfg(int sig); /** @@ -51,7 +51,7 @@ sig_sesman_reload_cfg(int sig); * @param sig The received signal * */ -void DEFAULT_CC +void sig_sesman_session_end(int sig); /** @@ -59,7 +59,7 @@ sig_sesman_session_end(int sig); * @brief signal handling thread * */ -void* DEFAULT_CC +void* sig_handler_thread(void* arg); #endif diff --git a/sesman/tools/sesrun.c b/sesman/tools/sesrun.c index 11a807f1..b9bca988 100644 --- a/sesman/tools/sesrun.c +++ b/sesman/tools/sesrun.c @@ -34,7 +34,7 @@ struct config_sesman g_cfg; /* config.h */ /******************************************************************************/ -int DEFAULT_CC +int main(int argc, char **argv) { int sck; diff --git a/sesman/tools/tcp.c b/sesman/tools/tcp.c index dbb5e178..e6fe7888 100644 --- a/sesman/tools/tcp.c +++ b/sesman/tools/tcp.c @@ -37,7 +37,7 @@ #include <string.h> /*****************************************************************************/ -int DEFAULT_CC +int tcp_force_recv(int sck, char *data, int len) { int rcvd; @@ -87,7 +87,7 @@ tcp_force_recv(int sck, char *data, int len) } /*****************************************************************************/ -int DEFAULT_CC +int tcp_force_send(int sck, char *data, int len) { int sent; @@ -137,7 +137,7 @@ tcp_force_send(int sck, char *data, int len) } /*****************************************************************************/ -int DEFAULT_CC +int tcp_bind(int sck, char *addr, char *port) { struct sockaddr_in s; diff --git a/sesman/tools/tcp.h b/sesman/tools/tcp.h index 6697c662..e436ccd4 100644 --- a/sesman/tools/tcp.h +++ b/sesman/tools/tcp.h @@ -36,7 +36,7 @@ * @return 0 on success, 1 on error * */ -int DEFAULT_CC +int tcp_force_recv(int sck, char* data, int len); /** @@ -48,7 +48,7 @@ tcp_force_recv(int sck, char* data, int len); * @return 0 on success, 1 on error * */ -int DEFAULT_CC +int tcp_force_send(int sck, char* data, int len); /** @@ -60,7 +60,7 @@ tcp_force_send(int sck, char* data, int len); * @return 0 on success, -1 on error * */ -int DEFAULT_CC +int tcp_bind(int sck, char* addr, char* port); #endif diff --git a/sesman/verify_user.c b/sesman/verify_user.c index e3de9e8f..315fc90f 100644 --- a/sesman/verify_user.c +++ b/sesman/verify_user.c @@ -43,15 +43,15 @@ extern struct config_sesman *g_cfg; /* in sesman.c */ -static int DEFAULT_CC +static int auth_crypt_pwd(const char *pwd, const char *pln, char *crp); -static int DEFAULT_CC +static int auth_account_disabled(struct spwd *stp); /******************************************************************************/ /* returns boolean */ -long DEFAULT_CC +long auth_userpass(const char *user, const char *pass, int *errorcode) { const char *encr; @@ -99,7 +99,7 @@ auth_userpass(const char *user, const char *pass, int *errorcode) /******************************************************************************/ /* returns error */ -int DEFAULT_CC +int auth_start_session(long in_val, int in_display) { return 0; @@ -107,28 +107,28 @@ auth_start_session(long in_val, int in_display) /******************************************************************************/ /* returns error */ -int DEFAULT_CC +int auth_stop_session(long in_val) { return 0; } /******************************************************************************/ -int DEFAULT_CC +int auth_end(long in_val) { return 0; } /******************************************************************************/ -int DEFAULT_CC +int auth_set_env(long in_val) { return 0; } /******************************************************************************/ -int DEFAULT_CC +int auth_check_pwd_chg(const char *user) { struct passwd *spw; @@ -185,7 +185,7 @@ auth_check_pwd_chg(const char *user) return AUTH_PWD_CHG_OK; } -int DEFAULT_CC +int auth_change_pwd(const char *user, const char *newpwd) { struct passwd *spw; @@ -259,7 +259,7 @@ auth_change_pwd(const char *user, const char *newpwd) * */ -static int DEFAULT_CC +static int auth_crypt_pwd(const char *pwd, const char *pln, char *crp) { char salt[13] = "$1$"; @@ -299,7 +299,7 @@ auth_crypt_pwd(const char *pwd, const char *pln, char *crp) * @return 1 if the account is disabled, 0 otherwise * */ -static int DEFAULT_CC +static int auth_account_disabled(struct spwd *stp) { int today; diff --git a/sesman/verify_user_bsd.c b/sesman/verify_user_bsd.c index 3000de99..1e99f567 100644 --- a/sesman/verify_user_bsd.c +++ b/sesman/verify_user_bsd.c @@ -47,7 +47,7 @@ extern struct config_sesman* g_cfg; /* in sesman.c */ /******************************************************************************/ /* returns boolean */ -long DEFAULT_CC +long auth_userpass(const char *user, const char *pass, int *errorcode) { int ret = auth_userokay(user, NULL, "auth-xrdp", pass); @@ -56,40 +56,40 @@ auth_userpass(const char *user, const char *pass, int *errorcode) /******************************************************************************/ /* returns error */ -int DEFAULT_CC +int auth_start_session(long in_val, int in_display) { return 0; } /******************************************************************************/ -int DEFAULT_CC +int auth_end(long in_val) { return 0; } /******************************************************************************/ -int DEFAULT_CC +int auth_set_env(long in_val) { return 0; } /******************************************************************************/ -int DEFAULT_CC +int auth_check_pwd_chg(const char *user) { return 0; } -int DEFAULT_CC +int auth_change_pwd(const char *user, const char *newpwd) { return 0; } -int DEFAULT_CC +int auth_stop_session(long in_val) { return 0; @@ -104,7 +104,7 @@ auth_stop_session(long in_val) * */ -static int DEFAULT_CC +static int auth_crypt_pwd(const char *pwd, const char *pln, char *crp) { return 0; @@ -115,7 +115,7 @@ auth_crypt_pwd(const char *pwd, const char *pln, char *crp) * @return 1 if the account is disabled, 0 otherwise * */ -static int DEFAULT_CC +static int auth_account_disabled(struct spwd* stp) { return 0; diff --git a/sesman/verify_user_kerberos.c b/sesman/verify_user_kerberos.c index 4f58c83a..bf011506 100644 --- a/sesman/verify_user_kerberos.c +++ b/sesman/verify_user_kerberos.c @@ -77,7 +77,7 @@ struct user_info /******************************************************************************/ /* returns boolean */ -static int DEFAULT_CC +static int k5_begin(struct k_opts *opts, struct k5_data *k5, struct user_info *u_info) { krb5_error_code code = 0; @@ -168,7 +168,7 @@ k5_begin(struct k_opts *opts, struct k5_data *k5, struct user_info *u_info) } /******************************************************************************/ -static void DEFAULT_CC +static void k5_end(struct k5_data *k5) { if (k5->name) @@ -399,7 +399,7 @@ cleanup: /******************************************************************************/ /* returns boolean */ -int DEFAULT_CC +int auth_userpass(const char *user, const char *pass, int *errorcode) { struct k_opts opts; @@ -428,7 +428,7 @@ auth_userpass(const char *user, const char *pass, int *errorcode) /******************************************************************************/ /* returns error */ -int DEFAULT_CC +int auth_start_session(long in_val, int in_display) { return 0; @@ -436,21 +436,21 @@ auth_start_session(long in_val, int in_display) /******************************************************************************/ /* returns error */ -int DEFAULT_CC +int auth_stop_session(long in_val) { return 0; } /******************************************************************************/ -int DEFAULT_CC +int auth_end(long in_val) { return 0; } /******************************************************************************/ -int DEFAULT_CC +int auth_set_env(long in_val) { return 0; diff --git a/sesman/verify_user_pam.c b/sesman/verify_user_pam.c index 19c76a06..15174c24 100644 --- a/sesman/verify_user_pam.c +++ b/sesman/verify_user_pam.c @@ -50,7 +50,7 @@ struct t_auth_info }; /******************************************************************************/ -static int DEFAULT_CC +static int verify_pam_conv(int num_msg, const struct pam_message **msg, struct pam_response **resp, void *appdata_ptr) { @@ -86,7 +86,7 @@ verify_pam_conv(int num_msg, const struct pam_message **msg, } /******************************************************************************/ -static void DEFAULT_CC +static void get_service_name(char *service_name) { service_name[0] = 0; @@ -105,7 +105,7 @@ get_service_name(char *service_name) /* returns long, zero is no go Stores the detailed error code in the errorcode variable*/ -long DEFAULT_CC +long auth_userpass(const char *user, const char *pass, int *errorcode) { int error; @@ -179,7 +179,7 @@ auth_userpass(const char *user, const char *pass, int *errorcode) /******************************************************************************/ /* returns error */ -int DEFAULT_CC +int auth_start_session(long in_val, int in_display) { struct t_auth_info *auth_info; @@ -220,7 +220,7 @@ auth_start_session(long in_val, int in_display) /******************************************************************************/ /* returns error */ -int DEFAULT_CC +int auth_stop_session(long in_val) { struct t_auth_info *auth_info; @@ -241,7 +241,7 @@ auth_stop_session(long in_val) /******************************************************************************/ /* returns error */ /* cleanup */ -int DEFAULT_CC +int auth_end(long in_val) { struct t_auth_info *auth_info; @@ -274,7 +274,7 @@ auth_end(long in_val) /******************************************************************************/ /* returns error */ /* set any pam env vars */ -int DEFAULT_CC +int auth_set_env(long in_val) { struct t_auth_info *auth_info; diff --git a/sesman/verify_user_pam_userpass.c b/sesman/verify_user_pam_userpass.c index 4fa246a5..fc872778 100644 --- a/sesman/verify_user_pam_userpass.c +++ b/sesman/verify_user_pam_userpass.c @@ -37,7 +37,7 @@ /******************************************************************************/ /* returns boolean */ -int DEFAULT_CC +int auth_userpass(const char *user, const char *pass, int *errorcode) { pam_handle_t *pamh; @@ -88,7 +88,7 @@ auth_userpass(const char *user, const char *pass, int *errorcode) /******************************************************************************/ /* returns error */ -int DEFAULT_CC +int auth_start_session(long in_val, int in_display) { return 0; @@ -96,21 +96,21 @@ auth_start_session(long in_val, int in_display) /******************************************************************************/ /* returns error */ -int DEFAULT_CC +int auth_stop_session(long in_val) { return 0; } /******************************************************************************/ -int DEFAULT_CC +int auth_end(long in_val) { return 0; } /******************************************************************************/ -int DEFAULT_CC +int auth_set_env(long in_val) { return 0; diff --git a/sesman/xauth.c b/sesman/xauth.c index b95efb39..5f633bba 100644 --- a/sesman/xauth.c +++ b/sesman/xauth.c @@ -33,7 +33,7 @@ /******************************************************************************/ -int DEFAULT_CC +int add_xauth_cookie(int display, const char *file) { FILE *dp; diff --git a/sesman/xauth.h b/sesman/xauth.h index 3254d635..a38d636e 100644 --- a/sesman/xauth.h +++ b/sesman/xauth.h @@ -35,7 +35,7 @@ * @return 0 if adding the cookie is ok */ -int DEFAULT_CC +int add_xauth_cookie(int display, const char *file); #endif diff --git a/tests/tcp_proxy/main.c b/tests/tcp_proxy/main.c index 5ea53f5f..09822f28 100644 --- a/tests/tcp_proxy/main.c +++ b/tests/tcp_proxy/main.c @@ -37,20 +37,20 @@ int g_rem_io_count = 0; // bytes read from remote port static int g_terminated = 0; static char g_buf[1024 * 32]; -#define DEFAULT_CC -#define APP_CC +#define +#define typedef unsigned short tui16; /*****************************************************************************/ -static void APP_CC +static void g_memset(void *ptr, int val, int size) { memset(ptr, val, size); } /*****************************************************************************/ -static void DEFAULT_CC +static void g_printf(const char *format, ...) { va_list ap; @@ -61,7 +61,7 @@ g_printf(const char *format, ...) } /*****************************************************************************/ -static void DEFAULT_CC +static void g_writeln(const char *format, ...) { va_list ap; @@ -73,7 +73,7 @@ g_writeln(const char *format, ...) } /*****************************************************************************/ -static void APP_CC +static void g_hexdump(char *p, int len) { unsigned char *line; @@ -116,7 +116,7 @@ g_hexdump(char *p, int len) } /*****************************************************************************/ -static int APP_CC +static int g_tcp_socket(void) { int rv; @@ -159,7 +159,7 @@ g_tcp_socket(void) } /*****************************************************************************/ -static int APP_CC +static int g_tcp_set_non_blocking(int sck) { unsigned long i; @@ -171,7 +171,7 @@ g_tcp_set_non_blocking(int sck) } /*****************************************************************************/ -static int APP_CC +static int g_tcp_bind(int sck, const char* port) { struct sockaddr_in s; @@ -184,14 +184,14 @@ g_tcp_bind(int sck, const char* port) } /*****************************************************************************/ -static int APP_CC +static int g_tcp_listen(int sck) { return listen(sck, 2); } /*****************************************************************************/ -static int APP_CC +static int g_tcp_select(int sck1, int sck2) { fd_set rfds; @@ -248,14 +248,14 @@ g_tcp_select(int sck1, int sck2) } /*****************************************************************************/ -static int APP_CC +static int g_tcp_recv(int sck, void *ptr, int len, int flags) { return recv(sck, ptr, len, flags); } /*****************************************************************************/ -static void APP_CC +static void g_tcp_close(int sck) { if (sck == 0) @@ -266,28 +266,28 @@ g_tcp_close(int sck) } /*****************************************************************************/ -static int APP_CC +static int g_tcp_send(int sck, const void *ptr, int len, int flags) { return send(sck, ptr, len, flags); } /*****************************************************************************/ -void APP_CC +void g_sleep(int msecs) { usleep(msecs * 1000); } /*****************************************************************************/ -static int APP_CC +static int g_tcp_last_error_would_block(int sck) { return (errno == EWOULDBLOCK) || (errno == EAGAIN) || (errno == EINPROGRESS); } /*****************************************************************************/ -static int APP_CC +static int g_tcp_accept(int sck) { int ret ; @@ -301,7 +301,7 @@ g_tcp_accept(int sck) } /*****************************************************************************/ -static int APP_CC +static int g_tcp_connect(int sck, const char* address, const char* port) { struct sockaddr_in s; @@ -332,7 +332,7 @@ g_tcp_connect(int sck, const char* address, const char* port) } /*****************************************************************************/ -static int APP_CC +static int g_tcp_socket_ok(int sck) { int opt; @@ -350,20 +350,20 @@ g_tcp_socket_ok(int sck) } /*****************************************************************************/ -static void APP_CC +static void g_init(const char *app_name) { setlocale(LC_CTYPE, ""); } /*****************************************************************************/ -static void APP_CC +static void g_deinit(void) { } /*****************************************************************************/ -static int APP_CC +static int g_tcp_can_send(int sck, int millis) { fd_set wfds; @@ -389,28 +389,28 @@ g_tcp_can_send(int sck, int millis) } /*****************************************************************************/ -static void APP_CC +static void g_signal_user_interrupt(void (*func)(int)) { signal(SIGINT, func); } /*****************************************************************************/ -static void APP_CC +static void g_signal_terminate(void (*func)(int)) { signal(SIGTERM, func); } /*****************************************************************************/ -static void APP_CC +static void g_signal_usr1(void (*func)(int)) { signal(SIGUSR1, func); } /*****************************************************************************/ -static int APP_CC +static int g_strcasecmp(const char *c1, const char *c2) { return strcasecmp(c1, c2); @@ -41,11 +41,11 @@ #define AS_LOG_MESSAGE log_message -static int APP_CC +static int lib_mod_process_message(struct vnc *v, struct stream *s); /******************************************************************************/ -static int APP_CC +static int lib_send_copy(struct vnc *v, struct stream *s) { return trans_write_copy_s(v->trans, s); @@ -57,7 +57,7 @@ lib_send_copy(struct vnc *v, struct stream *s) on the wire 'bytes' in, contains 16 bytes server random out, random and 'passwd' conbined */ -static void APP_CC +static void rfbEncryptBytes(char *bytes, const char *passwd) { char key[24]; @@ -78,7 +78,7 @@ rfbEncryptBytes(char *bytes, const char *passwd) /******************************************************************************/ /* sha1 hash 'passwd', create a string from the hash and call rfbEncryptBytes */ -static void APP_CC +static void rfbHashEncryptBytes(char *bytes, const char *passwd) { char passwd_hash[20]; @@ -102,7 +102,7 @@ rfbHashEncryptBytes(char *bytes, const char *passwd) } /******************************************************************************/ -static int DEFAULT_CC +static int lib_process_channel_data(struct vnc *v, int chanid, int flags, int size, struct stream *s, int total_size) { @@ -256,7 +256,7 @@ lib_process_channel_data(struct vnc *v, int chanid, int flags, int size, } /******************************************************************************/ -int DEFAULT_CC +int lib_mod_event(struct vnc *v, int msg, long param1, long param2, long param3, long param4) { @@ -401,7 +401,7 @@ lib_mod_event(struct vnc *v, int msg, long param1, long param2, } //****************************************************************************** -int DEFAULT_CC +int get_pixel_safe(char *data, int x, int y, int width, int height, int bpp) { int start = 0; @@ -470,7 +470,7 @@ get_pixel_safe(char *data, int x, int y, int width, int height, int bpp) } /******************************************************************************/ -void DEFAULT_CC +void set_pixel_safe(char *data, int x, int y, int width, int height, int bpp, int pixel) { @@ -529,7 +529,7 @@ set_pixel_safe(char *data, int x, int y, int width, int height, int bpp, } /******************************************************************************/ -int DEFAULT_CC +int split_color(int pixel, int *r, int *g, int *b, int bpp, int *palette) { if (bpp == 8) @@ -568,7 +568,7 @@ split_color(int pixel, int *r, int *g, int *b, int bpp, int *palette) } /******************************************************************************/ -int DEFAULT_CC +int make_color(int r, int g, int b, int bpp) { if (bpp == 24) @@ -584,7 +584,7 @@ make_color(int r, int g, int b, int bpp) } /******************************************************************************/ -int DEFAULT_CC +int lib_framebuffer_update(struct vnc *v) { char *d1; @@ -761,7 +761,7 @@ lib_framebuffer_update(struct vnc *v) /******************************************************************************/ /* clip data from the vnc server */ -int DEFAULT_CC +int lib_clip_data(struct vnc *v) { struct stream *s; @@ -811,7 +811,7 @@ lib_clip_data(struct vnc *v) } /******************************************************************************/ -int DEFAULT_CC +int lib_palette_update(struct vnc *v) { struct stream *s; @@ -867,7 +867,7 @@ lib_palette_update(struct vnc *v) } /******************************************************************************/ -int DEFAULT_CC +int lib_bell_trigger(struct vnc *v) { int error; @@ -877,7 +877,7 @@ lib_bell_trigger(struct vnc *v) } /******************************************************************************/ -int DEFAULT_CC +int lib_mod_signal(struct vnc *v) { g_writeln("lib_mod_signal: not used"); @@ -885,7 +885,7 @@ lib_mod_signal(struct vnc *v) } /******************************************************************************/ -static int APP_CC +static int lib_mod_process_message(struct vnc *v, struct stream *s) { char type; @@ -925,7 +925,7 @@ lib_mod_process_message(struct vnc *v, struct stream *s) } /******************************************************************************/ -int DEFAULT_CC +int lib_mod_start(struct vnc *v, int w, int h, int bpp) { v->server_begin_update(v); @@ -939,7 +939,7 @@ lib_mod_start(struct vnc *v, int w, int h, int bpp) } /******************************************************************************/ -static int APP_CC +static int lib_open_clip_channel(struct vnc *v) { char init_data[12] = { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; @@ -955,7 +955,7 @@ lib_open_clip_channel(struct vnc *v) } /******************************************************************************/ -static int APP_CC +static int lib_data_in(struct trans *trans) { struct vnc *self; @@ -991,7 +991,7 @@ lib_data_in(struct trans *trans) /* return error */ -int DEFAULT_CC +int lib_mod_connect(struct vnc *v) { char cursor_data[32 * (32 * 3)]; @@ -1406,7 +1406,7 @@ lib_mod_connect(struct vnc *v) } /******************************************************************************/ -int DEFAULT_CC +int lib_mod_end(struct vnc *v) { if (v->vnc_desktop != 0) @@ -1418,7 +1418,7 @@ lib_mod_end(struct vnc *v) } /******************************************************************************/ -int DEFAULT_CC +int lib_mod_set_param(struct vnc *v, const char *name, const char *value) { if (g_strcasecmp(name, "username") == 0) @@ -1456,7 +1456,7 @@ lib_mod_set_param(struct vnc *v, const char *name, const char *value) /******************************************************************************/ /* return error */ -int DEFAULT_CC +int lib_mod_get_wait_objs(struct vnc *v, tbus *read_objs, int *rcount, tbus *write_objs, int *wcount, int *timeout) { @@ -1476,7 +1476,7 @@ lib_mod_get_wait_objs(struct vnc *v, tbus *read_objs, int *rcount, /******************************************************************************/ /* return error */ -int DEFAULT_CC +int lib_mod_check_wait_objs(struct vnc *v) { int rv; diff --git a/xrdp/funcs.c b/xrdp/funcs.c index a6e6bfcb..d22927ac 100644 --- a/xrdp/funcs.c +++ b/xrdp/funcs.c @@ -26,7 +26,7 @@ /*****************************************************************************/ /* returns boolean */ -int APP_CC +int rect_contains_pt(struct xrdp_rect *in, int x, int y) { if (x < in->left) @@ -53,7 +53,7 @@ rect_contains_pt(struct xrdp_rect *in, int x, int y) } /*****************************************************************************/ -int APP_CC +int rect_intersect(struct xrdp_rect *in1, struct xrdp_rect *in2, struct xrdp_rect *out) { @@ -99,7 +99,7 @@ rect_intersect(struct xrdp_rect *in1, struct xrdp_rect *in2, /*****************************************************************************/ /* returns boolean */ -int APP_CC +int rect_contained_by(struct xrdp_rect *in1, int left, int top, int right, int bottom) { @@ -117,7 +117,7 @@ rect_contained_by(struct xrdp_rect *in1, int left, int top, /*****************************************************************************/ /* adjust the bounds to fit in the bitmap */ /* return false if there is nothing to draw else return true */ -int APP_CC +int check_bounds(struct xrdp_bitmap *b, int *x, int *y, int *cx, int *cy) { if (*x >= b->width) @@ -168,7 +168,7 @@ check_bounds(struct xrdp_bitmap *b, int *x, int *y, int *cx, int *cy) /*****************************************************************************/ /* add a ch at index position in text, index starts at 0 */ /* if index = -1 add it to the end */ -int APP_CC +int add_char_at(char *text, int text_size, twchar ch, int index) { int len; @@ -203,7 +203,7 @@ add_char_at(char *text, int text_size, twchar ch, int index) /*****************************************************************************/ /* remove a ch at index position in text, index starts at 0 */ /* if index = -1 remove it from the end */ -int APP_CC +int remove_char_at(char *text, int text_size, int index) { int len; @@ -240,7 +240,7 @@ remove_char_at(char *text, int text_size, int index) } /*****************************************************************************/ -int APP_CC +int set_string(char **in_str, const char *in) { if (in_str == 0) @@ -254,7 +254,7 @@ set_string(char **in_str, const char *in) } /*****************************************************************************/ -int APP_CC +int wchar_repeat(twchar *dest, int dest_size_in_wchars, twchar ch, int repeat) { int index; diff --git a/xrdp/lang.c b/xrdp/lang.c index 037bb438..ff242599 100644 --- a/xrdp/lang.c +++ b/xrdp/lang.c @@ -64,7 +64,7 @@ static struct codepair g_map[] = }; /*****************************************************************************/ -struct xrdp_key_info *APP_CC +struct xrdp_key_info * get_key_info_from_scan_code(int device_flags, int scan_code, int *keys, int caps_lock, int num_lock, int scroll_lock, struct xrdp_keymap *keymap) @@ -131,7 +131,7 @@ get_key_info_from_scan_code(int device_flags, int scan_code, int *keys, } /*****************************************************************************/ -int APP_CC +int get_keysym_from_scan_code(int device_flags, int scan_code, int *keys, int caps_lock, int num_lock, int scroll_lock, struct xrdp_keymap *keymap) @@ -151,7 +151,7 @@ get_keysym_from_scan_code(int device_flags, int scan_code, int *keys, } /*****************************************************************************/ -twchar APP_CC +twchar get_char_from_scan_code(int device_flags, int scan_code, int *keys, int caps_lock, int num_lock, int scroll_lock, struct xrdp_keymap *keymap) @@ -171,7 +171,7 @@ get_char_from_scan_code(int device_flags, int scan_code, int *keys, } /*****************************************************************************/ -static int APP_CC +static int km_read_section(int fd, const char *section_name, struct xrdp_key_info *keymap) { struct list *names; @@ -226,7 +226,7 @@ km_read_section(int fd, const char *section_name, struct xrdp_key_info *keymap) } /*****************************************************************************/ -int APP_CC +int get_keymaps(int keylayout, struct xrdp_keymap *keymap) { int fd; diff --git a/xrdp/xrdp.c b/xrdp/xrdp.c index c16be0b9..27c20146 100644 --- a/xrdp/xrdp.c +++ b/xrdp/xrdp.c @@ -49,7 +49,7 @@ static long (*g_sync_func)(long param1, long param2); /* This function is used to run a function from the main thread. Sync_func is the function pointer that will run from main thread The function can have two long in parameters and must return long */ -long APP_CC +long g_xrdp_sync(long (*sync_func)(long param1, long param2), long sync_param1, long sync_param2) { @@ -104,7 +104,7 @@ g_xrdp_sync(long (*sync_func)(long param1, long param2), long sync_param1, } /*****************************************************************************/ -void DEFAULT_CC +void xrdp_shutdown(int sig) { tbus threadid; @@ -120,7 +120,7 @@ xrdp_shutdown(int sig) } /*****************************************************************************/ -void DEFAULT_CC +void xrdp_child(int sig) { g_waitchild(); @@ -128,7 +128,7 @@ xrdp_child(int sig) /*****************************************************************************/ /* called in child just after fork */ -int APP_CC +int xrdp_child_fork(void) { int pid; @@ -146,14 +146,14 @@ xrdp_child_fork(void) } /*****************************************************************************/ -int DEFAULT_CC +int g_is_term(void) { return g_is_wait_obj_set(g_term_event); } /*****************************************************************************/ -void APP_CC +void g_set_term(int in_val) { if (in_val) @@ -167,21 +167,21 @@ g_set_term(int in_val) } /*****************************************************************************/ -tbus APP_CC +tbus g_get_term_event(void) { return g_term_event; } /*****************************************************************************/ -tbus APP_CC +tbus g_get_sync_event(void) { return g_sync_event; } /*****************************************************************************/ -void DEFAULT_CC +void pipe_sig(int sig_num) { /* do nothing */ @@ -191,7 +191,7 @@ pipe_sig(int sig_num) /*****************************************************************************/ /*Some function must be called from the main thread. if g_sync_command==THREAD_WAITING a function is waiting to be processed*/ -void APP_CC +void g_process_waiting_function(void) { tc_mutex_lock(g_sync_mutex); @@ -213,7 +213,7 @@ g_process_waiting_function(void) } /*****************************************************************************/ -int APP_CC +int xrdp_process_params(int argc, char **argv, struct xrdp_startup_params *startup_params) { @@ -360,7 +360,7 @@ xrdp_sanity_check(void) } /*****************************************************************************/ -int DEFAULT_CC +int main(int argc, char **argv) { int test; diff --git a/xrdp/xrdp.h b/xrdp/xrdp.h index b4b88499..fa65219e 100644 --- a/xrdp/xrdp.h +++ b/xrdp/xrdp.h @@ -37,239 +37,239 @@ #include "log.h" /* xrdp.c */ -long APP_CC +long g_xrdp_sync(long (*sync_func)(long param1, long param2), long sync_param1, long sync_param2); -int DEFAULT_CC +int g_is_term(void); -void APP_CC +void g_set_term(int in_val); -tbus APP_CC +tbus g_get_term_event(void); -tbus APP_CC +tbus g_get_sync_event(void); -void APP_CC +void g_process_waiting_function(void); /* xrdp_cache.c */ -struct xrdp_cache* APP_CC +struct xrdp_cache* xrdp_cache_create(struct xrdp_wm* owner, struct xrdp_session* session, struct xrdp_client_info* client_info); -void APP_CC +void xrdp_cache_delete(struct xrdp_cache* self); -int APP_CC +int xrdp_cache_reset(struct xrdp_cache* self, struct xrdp_client_info* client_info); -int APP_CC +int xrdp_cache_add_bitmap(struct xrdp_cache* self, struct xrdp_bitmap* bitmap, int hints); -int APP_CC +int xrdp_cache_add_palette(struct xrdp_cache* self, int* palette); -int APP_CC +int xrdp_cache_add_char(struct xrdp_cache* self, struct xrdp_font_char* font_item); -int APP_CC +int xrdp_cache_add_pointer(struct xrdp_cache* self, struct xrdp_pointer_item* pointer_item); -int APP_CC +int xrdp_cache_add_pointer_static(struct xrdp_cache* self, struct xrdp_pointer_item* pointer_item, int index); -int APP_CC +int xrdp_cache_add_brush(struct xrdp_cache* self, char* brush_item_data); -int APP_CC +int xrdp_cache_add_os_bitmap(struct xrdp_cache* self, struct xrdp_bitmap* bitmap, int rdpindex); -int APP_CC +int xrdp_cache_remove_os_bitmap(struct xrdp_cache* self, int rdpindex); -struct xrdp_os_bitmap_item* APP_CC +struct xrdp_os_bitmap_item* xrdp_cache_get_os_bitmap(struct xrdp_cache* self, int rdpindex); /* xrdp_wm.c */ -struct xrdp_wm* APP_CC +struct xrdp_wm* xrdp_wm_create(struct xrdp_process* owner, struct xrdp_client_info* client_info); -void APP_CC +void xrdp_wm_delete(struct xrdp_wm* self); -int APP_CC +int xrdp_wm_send_palette(struct xrdp_wm* self); -int APP_CC +int xrdp_wm_send_bell(struct xrdp_wm* self); -int APP_CC +int xrdp_wm_load_static_colors_plus(struct xrdp_wm* self, char* autorun_name); -int APP_CC +int xrdp_wm_load_static_pointers(struct xrdp_wm* self); -int APP_CC +int xrdp_wm_init(struct xrdp_wm* self); -int APP_CC +int xrdp_wm_send_bitmap(struct xrdp_wm* self, struct xrdp_bitmap* bitmap, int x, int y, int cx, int cy); -int APP_CC +int xrdp_wm_set_pointer(struct xrdp_wm* self, int cache_idx); -unsigned int APP_CC +unsigned int xrdp_wm_htoi (const char *ptr); -int APP_CC +int xrdp_wm_set_focused(struct xrdp_wm* self, struct xrdp_bitmap* wnd); -int APP_CC +int xrdp_wm_get_vis_region(struct xrdp_wm* self, struct xrdp_bitmap* bitmap, int x, int y, int cx, int cy, struct xrdp_region* region, int clip_children); -int APP_CC +int xrdp_wm_mouse_move(struct xrdp_wm* self, int x, int y); -int APP_CC +int xrdp_wm_mouse_click(struct xrdp_wm* self, int x, int y, int but, int down); -int APP_CC +int xrdp_wm_key(struct xrdp_wm* self, int device_flags, int scan_code); -int APP_CC +int xrdp_wm_key_sync(struct xrdp_wm* self, int device_flags, int key_flags); -int APP_CC +int xrdp_wm_pu(struct xrdp_wm* self, struct xrdp_bitmap* control); -int APP_CC +int xrdp_wm_send_pointer(struct xrdp_wm* self, int cache_idx, char* data, char* mask, int x, int y, int bpp); -int APP_CC +int xrdp_wm_pointer(struct xrdp_wm* self, char* data, char* mask, int x, int y, int bpp); -int DEFAULT_CC +int callback(intptr_t id, int msg, intptr_t param1, intptr_t param2, intptr_t param3, intptr_t param4); -int APP_CC +int xrdp_wm_delete_all_children(struct xrdp_wm* self); -int APP_CC +int xrdp_wm_show_log(struct xrdp_wm *self); -int APP_CC +int xrdp_wm_log_msg(struct xrdp_wm *self, enum logLevels loglevel, const char *fmt, ...) printflike(3, 4); -int APP_CC +int xrdp_wm_get_wait_objs(struct xrdp_wm* self, tbus* robjs, int* rc, tbus* wobjs, int* wc, int* timeout); -int APP_CC +int xrdp_wm_check_wait_objs(struct xrdp_wm* self); -int APP_CC +int xrdp_wm_set_login_mode(struct xrdp_wm* self, int login_mode); /* xrdp_process.c */ -struct xrdp_process* APP_CC +struct xrdp_process* xrdp_process_create(struct xrdp_listen* owner, tbus done_event); -void APP_CC +void xrdp_process_delete(struct xrdp_process* self); -int APP_CC +int xrdp_process_main_loop(struct xrdp_process* self); /* xrdp_listen.c */ -struct xrdp_listen* APP_CC +struct xrdp_listen* xrdp_listen_create(void); -void APP_CC +void xrdp_listen_delete(struct xrdp_listen* self); -int APP_CC +int xrdp_listen_main_loop(struct xrdp_listen* self); /* xrdp_region.c */ -struct xrdp_region* APP_CC +struct xrdp_region* xrdp_region_create(struct xrdp_wm* wm); -void APP_CC +void xrdp_region_delete(struct xrdp_region* self); -int APP_CC +int xrdp_region_add_rect(struct xrdp_region* self, struct xrdp_rect* rect); -int APP_CC +int xrdp_region_subtract_rect(struct xrdp_region* self, struct xrdp_rect* rect); -int APP_CC +int xrdp_region_intersect_rect(struct xrdp_region* self, struct xrdp_rect* rect); -int APP_CC +int xrdp_region_get_rect(struct xrdp_region* self, int index, struct xrdp_rect* rect); /* xrdp_bitmap.c */ -struct xrdp_bitmap* APP_CC +struct xrdp_bitmap* xrdp_bitmap_create(int width, int height, int bpp, int type, struct xrdp_wm* wm); -struct xrdp_bitmap* APP_CC +struct xrdp_bitmap* xrdp_bitmap_create_with_data(int width, int height, int bpp, char* data, struct xrdp_wm* wm); -void APP_CC +void xrdp_bitmap_delete(struct xrdp_bitmap* self); -struct xrdp_bitmap* APP_CC +struct xrdp_bitmap* xrdp_bitmap_get_child_by_id(struct xrdp_bitmap* self, int id); -int APP_CC +int xrdp_bitmap_set_focus(struct xrdp_bitmap* self, int focused); -int APP_CC +int xrdp_bitmap_resize(struct xrdp_bitmap* self, int width, int height); -int APP_CC +int xrdp_bitmap_load(struct xrdp_bitmap* self, const char* filename, int* palette); -int APP_CC +int xrdp_bitmap_get_pixel(struct xrdp_bitmap* self, int x, int y); -int APP_CC +int xrdp_bitmap_set_pixel(struct xrdp_bitmap* self, int x, int y, int pixel); -int APP_CC +int xrdp_bitmap_copy_box(struct xrdp_bitmap* self, struct xrdp_bitmap* dest, int x, int y, int cx, int cy); -int APP_CC +int xrdp_bitmap_hash_crc(struct xrdp_bitmap *self); -int APP_CC +int xrdp_bitmap_copy_box_with_crc(struct xrdp_bitmap* self, struct xrdp_bitmap* dest, int x, int y, int cx, int cy); -int APP_CC +int xrdp_bitmap_compare(struct xrdp_bitmap* self, struct xrdp_bitmap* b); -int APP_CC +int xrdp_bitmap_invalidate(struct xrdp_bitmap* self, struct xrdp_rect* rect); -int APP_CC +int xrdp_bitmap_def_proc(struct xrdp_bitmap* self, int msg, int param1, int param2); -int APP_CC +int xrdp_bitmap_to_screenx(struct xrdp_bitmap* self, int x); -int APP_CC +int xrdp_bitmap_to_screeny(struct xrdp_bitmap* self, int y); -int APP_CC +int xrdp_bitmap_from_screenx(struct xrdp_bitmap* self, int x); -int APP_CC +int xrdp_bitmap_from_screeny(struct xrdp_bitmap* self, int y); -int APP_CC +int xrdp_bitmap_get_screen_clip(struct xrdp_bitmap* self, struct xrdp_painter* painter, struct xrdp_rect* rect, int* dx, int* dy); /* xrdp_painter.c */ -struct xrdp_painter* APP_CC +struct xrdp_painter* xrdp_painter_create(struct xrdp_wm* wm, struct xrdp_session* session); -void APP_CC +void xrdp_painter_delete(struct xrdp_painter* self); -int APP_CC +int wm_painter_set_target(struct xrdp_painter* self); -int APP_CC +int xrdp_painter_begin_update(struct xrdp_painter* self); -int APP_CC +int xrdp_painter_end_update(struct xrdp_painter* self); -int APP_CC +int xrdp_painter_font_needed(struct xrdp_painter* self); -int APP_CC +int xrdp_painter_set_clip(struct xrdp_painter* self, int x, int y, int cx, int cy); -int APP_CC +int xrdp_painter_clr_clip(struct xrdp_painter* self); -int APP_CC +int xrdp_painter_fill_rect(struct xrdp_painter* self, struct xrdp_bitmap* bitmap, int x, int y, int cx, int cy); -int APP_CC +int xrdp_painter_draw_bitmap(struct xrdp_painter* self, struct xrdp_bitmap* bitmap, struct xrdp_bitmap* to_draw, int x, int y, int cx, int cy); -int APP_CC +int xrdp_painter_text_width(struct xrdp_painter* self, const char *text); -int APP_CC +int xrdp_painter_text_height(struct xrdp_painter* self, const char *text); -int APP_CC +int xrdp_painter_draw_text(struct xrdp_painter* self, struct xrdp_bitmap* bitmap, int x, int y, const char* text); -int APP_CC +int xrdp_painter_draw_text2(struct xrdp_painter* self, struct xrdp_bitmap* bitmap, int font, int flags, int mixmode, @@ -278,13 +278,13 @@ xrdp_painter_draw_text2(struct xrdp_painter* self, int box_left, int box_top, int box_right, int box_bottom, int x, int y, char* data, int data_len); -int APP_CC +int xrdp_painter_copy(struct xrdp_painter* self, struct xrdp_bitmap* src, struct xrdp_bitmap* dst, int x, int y, int cx, int cy, int srcx, int srcy); -int APP_CC +int xrdp_painter_composite(struct xrdp_painter* self, struct xrdp_bitmap* src, int srcformat, @@ -298,220 +298,220 @@ xrdp_painter_composite(struct xrdp_painter* self, int srcx, int srcy, int mskx, int msky, int dstx, int dsty, int width, int height, int dstformat); -int APP_CC +int xrdp_painter_line(struct xrdp_painter* self, struct xrdp_bitmap* bitmap, int x1, int y1, int x2, int y2); /* xrdp_font.c */ -struct xrdp_font* APP_CC +struct xrdp_font* xrdp_font_create(struct xrdp_wm* wm); -void APP_CC +void xrdp_font_delete(struct xrdp_font* self); -int APP_CC +int xrdp_font_item_compare(struct xrdp_font_char* font1, struct xrdp_font_char* font2); /* funcs.c */ -int APP_CC +int rect_contains_pt(struct xrdp_rect* in, int x, int y); -int APP_CC +int rect_intersect(struct xrdp_rect* in1, struct xrdp_rect* in2, struct xrdp_rect* out); -int APP_CC +int rect_contained_by(struct xrdp_rect* in1, int left, int top, int right, int bottom); -int APP_CC +int check_bounds(struct xrdp_bitmap* b, int* x, int* y, int* cx, int* cy); -int APP_CC +int add_char_at(char* text, int text_size, twchar ch, int index); -int APP_CC +int remove_char_at(char* text, int text_size, int index); -int APP_CC +int set_string(char** in_str, const char* in); -int APP_CC +int wchar_repeat(twchar* dest, int dest_size_in_wchars, twchar ch, int repeat); /* in lang.c */ -struct xrdp_key_info* APP_CC +struct xrdp_key_info* get_key_info_from_scan_code(int device_flags, int scan_code, int* keys, int caps_lock, int num_lock, int scroll_lock, struct xrdp_keymap* keymap); -int APP_CC +int get_keysym_from_scan_code(int device_flags, int scan_code, int* keys, int caps_lock, int num_lock, int scroll_lock, struct xrdp_keymap* keymap); -twchar APP_CC +twchar get_char_from_scan_code(int device_flags, int scan_code, int* keys, int caps_lock, int num_lock, int scroll_lock, struct xrdp_keymap* keymap); -int APP_CC +int get_keymaps(int keylayout, struct xrdp_keymap* keymap); /* xrdp_login_wnd.c */ -int APP_CC +int xrdp_login_wnd_create(struct xrdp_wm* self); -int APP_CC +int load_xrdp_config(struct xrdp_config *config, int bpp); /* xrdp_bitmap_compress.c */ -int APP_CC +int xrdp_bitmap_compress(char* in_data, int width, int height, struct stream* s, int bpp, int byte_limit, int start_line, struct stream* temp, int e); /* xrdp_mm.c */ -struct xrdp_mm* APP_CC +struct xrdp_mm* xrdp_mm_create(struct xrdp_wm* owner); -void APP_CC +void xrdp_mm_delete(struct xrdp_mm* self); -int APP_CC +int xrdp_mm_connect(struct xrdp_mm* self); -int APP_CC +int xrdp_mm_process_channel_data(struct xrdp_mm* self, tbus param1, tbus param2, tbus param3, tbus param4); -int APP_CC +int xrdp_mm_get_wait_objs(struct xrdp_mm* self, tbus* read_objs, int* rcount, tbus* write_objs, int* wcount, int* timeout); -int APP_CC +int xrdp_mm_check_chan(struct xrdp_mm *self); -int APP_CC +int xrdp_mm_check_wait_objs(struct xrdp_mm* self); -int APP_CC +int xrdp_mm_frame_ack(struct xrdp_mm *self, int frame_id); -int DEFAULT_CC +int server_begin_update(struct xrdp_mod* mod); -int DEFAULT_CC +int server_end_update(struct xrdp_mod* mod); -int DEFAULT_CC +int server_bell_trigger(struct xrdp_mod* mod); -int DEFAULT_CC +int server_fill_rect(struct xrdp_mod* mod, int x, int y, int cx, int cy); -int DEFAULT_CC +int server_screen_blt(struct xrdp_mod* mod, int x, int y, int cx, int cy, int srcx, int srcy); -int DEFAULT_CC +int server_paint_rect(struct xrdp_mod* mod, int x, int y, int cx, int cy, char* data, int width, int height, int srcx, int srcy); -int DEFAULT_CC +int server_paint_rect_bpp(struct xrdp_mod* mod, int x, int y, int cx, int cy, char* data, int width, int height, int srcx, int srcy, int bpp); -int DEFAULT_CC +int server_composite(struct xrdp_mod* mod, int srcidx, int srcformat, int srcwidth, int srcrepeat, int* srctransform, int mskflags, int mskidx, int mskformat, int mskwidth, int mskrepeat, int op, int srcx, int srcy, int mskx, int msky, int dstx, int dsty, int width, int height, int dstformat); -int DEFAULT_CC +int server_paint_rects(struct xrdp_mod* mod, int num_drects, short *drects, int num_crects, short *crects, char *data, int width, int height, int flags, int frame_id); -int DEFAULT_CC +int server_set_pointer(struct xrdp_mod* mod, int x, int y, char* data, char* mask); -int DEFAULT_CC +int server_set_pointer_ex(struct xrdp_mod* mod, int x, int y, char* data, char* mask, int bpp); -int DEFAULT_CC +int server_palette(struct xrdp_mod* mod, int* palette); -int DEFAULT_CC +int server_msg(struct xrdp_mod* mod, char* msg, int code); -int DEFAULT_CC +int server_is_term(struct xrdp_mod* mod); -int APP_CC +int xrdp_child_fork(void); -int DEFAULT_CC +int server_set_clip(struct xrdp_mod* mod, int x, int y, int cx, int cy); -int DEFAULT_CC +int server_reset_clip(struct xrdp_mod* mod); -int DEFAULT_CC +int server_set_fgcolor(struct xrdp_mod* mod, int fgcolor); -int DEFAULT_CC +int server_set_bgcolor(struct xrdp_mod* mod, int bgcolor); -int DEFAULT_CC +int server_set_opcode(struct xrdp_mod* mod, int opcode); -int DEFAULT_CC +int server_set_mixmode(struct xrdp_mod* mod, int mixmode); -int DEFAULT_CC +int server_set_brush(struct xrdp_mod* mod, int x_origin, int y_origin, int style, char* pattern); -int DEFAULT_CC +int server_set_pen(struct xrdp_mod* mod, int style, int width); -int DEFAULT_CC +int server_draw_line(struct xrdp_mod* mod, int x1, int y1, int x2, int y2); -int DEFAULT_CC +int server_add_char(struct xrdp_mod* mod, int font, int character, int offset, int baseline, int width, int height, char* data); -int DEFAULT_CC +int server_draw_text(struct xrdp_mod* mod, int font, int flags, int mixmode, int clip_left, int clip_top, int clip_right, int clip_bottom, int box_left, int box_top, int box_right, int box_bottom, int x, int y, char* data, int data_len); -int DEFAULT_CC +int server_reset(struct xrdp_mod* mod, int width, int height, int bpp); -int DEFAULT_CC +int is_channel_allowed(struct xrdp_wm* wm, int channel_id); -int DEFAULT_CC +int server_query_channel(struct xrdp_mod* mod, int index, char* channel_name, int* channel_flags); -int DEFAULT_CC +int server_get_channel_id(struct xrdp_mod* mod, const char *name); -int DEFAULT_CC +int server_send_to_channel(struct xrdp_mod* mod, int channel_id, char* data, int data_len, int total_data_len, int flags); -int DEFAULT_CC +int server_create_os_surface(struct xrdp_mod* mod, int id, int width, int height); -int DEFAULT_CC +int server_create_os_surface_bpp(struct xrdp_mod* mod, int id, int width, int height, int bpp); -int DEFAULT_CC +int server_switch_os_surface(struct xrdp_mod* mod, int id); -int DEFAULT_CC +int server_delete_os_surface(struct xrdp_mod* mod, int id); -int DEFAULT_CC +int server_paint_rect_os(struct xrdp_mod* mod, int x, int y, int cx, int cy, int id, int srcx, int srcy); -int DEFAULT_CC +int server_set_hints(struct xrdp_mod* mod, int hints, int mask); -int DEFAULT_CC +int server_window_new_update(struct xrdp_mod* mod, int window_id, struct rail_window_state_order* window_state, int flags); -int DEFAULT_CC +int server_window_delete(struct xrdp_mod* mod, int window_id); -int DEFAULT_CC +int server_window_icon(struct xrdp_mod* mod, int window_id, int cache_entry, int cache_id, struct rail_icon_info* icon_info, int flags); -int DEFAULT_CC +int server_window_cached_icon(struct xrdp_mod* mod, int window_id, int cache_entry, int cache_id, int flags); -int DEFAULT_CC +int server_notify_new_update(struct xrdp_mod* mod, int window_id, int notify_id, struct rail_notify_state_order* notify_state, int flags); -int DEFAULT_CC +int server_notify_delete(struct xrdp_mod* mod, int window_id, int notify_id); -int DEFAULT_CC +int server_monitored_desktop(struct xrdp_mod* mod, struct rail_monitored_desktop_order* mdo, int flags); -int DEFAULT_CC +int server_add_char_alpha(struct xrdp_mod* mod, int font, int character, int offset, int baseline, int width, int height, char* data); -int DEFAULT_CC +int server_session_info(struct xrdp_mod *mod, const char *data, int data_bytes); diff --git a/xrdp/xrdp_bitmap.c b/xrdp/xrdp_bitmap.c index ef8d61ce..e097806a 100644 --- a/xrdp/xrdp_bitmap.c +++ b/xrdp/xrdp_bitmap.c @@ -95,7 +95,7 @@ static const unsigned int g_crc_table[256] = #define CRC_END(in_crc) (in_crc) = ((in_crc) ^ 0xFFFFFFFF) /*****************************************************************************/ -struct xrdp_bitmap *APP_CC +struct xrdp_bitmap * xrdp_bitmap_create(int width, int height, int bpp, int type, struct xrdp_wm *wm) { @@ -155,7 +155,7 @@ xrdp_bitmap_create(int width, int height, int bpp, } /*****************************************************************************/ -struct xrdp_bitmap *APP_CC +struct xrdp_bitmap * xrdp_bitmap_create_with_data(int width, int height, int bpp, char *data, struct xrdp_wm *wm) @@ -206,7 +206,7 @@ xrdp_bitmap_create_with_data(int width, int height, } /*****************************************************************************/ -void APP_CC +void xrdp_bitmap_delete(struct xrdp_bitmap *self) { int i = 0; @@ -309,7 +309,7 @@ xrdp_bitmap_delete(struct xrdp_bitmap *self) } /*****************************************************************************/ -struct xrdp_bitmap *APP_CC +struct xrdp_bitmap * xrdp_bitmap_get_child_by_id(struct xrdp_bitmap *self, int id) { int i = 0; @@ -331,7 +331,7 @@ xrdp_bitmap_get_child_by_id(struct xrdp_bitmap *self, int id) /*****************************************************************************/ /* if focused is true focus this window else unfocus it */ /* returns error */ -int APP_CC +int xrdp_bitmap_set_focus(struct xrdp_bitmap *self, int focused) { struct xrdp_painter *painter = (struct xrdp_painter *)NULL; @@ -372,7 +372,7 @@ xrdp_bitmap_set_focus(struct xrdp_bitmap *self, int focused) } /*****************************************************************************/ -static int APP_CC +static int xrdp_bitmap_get_index(struct xrdp_bitmap *self, int *palette, int color) { int r = 0; @@ -390,7 +390,7 @@ xrdp_bitmap_get_index(struct xrdp_bitmap *self, int *palette, int color) /*****************************************************************************/ /* returns error */ -int APP_CC +int xrdp_bitmap_resize(struct xrdp_bitmap *self, int width, int height) { int Bpp = 0; @@ -432,7 +432,7 @@ xrdp_bitmap_resize(struct xrdp_bitmap *self, int width, int height) /* load a bmp file */ /* return 0 ok */ /* return 1 error */ -int APP_CC +int xrdp_bitmap_load(struct xrdp_bitmap *self, const char *filename, int *palette) { int fd = 0; @@ -718,7 +718,7 @@ xrdp_bitmap_load(struct xrdp_bitmap *self, const char *filename, int *palette) } /*****************************************************************************/ -int APP_CC +int xrdp_bitmap_get_pixel(struct xrdp_bitmap *self, int x, int y) { if (self == 0) @@ -751,7 +751,7 @@ xrdp_bitmap_get_pixel(struct xrdp_bitmap *self, int x, int y) } /*****************************************************************************/ -int APP_CC +int xrdp_bitmap_set_pixel(struct xrdp_bitmap *self, int x, int y, int pixel) { if (self == 0) @@ -786,7 +786,7 @@ xrdp_bitmap_set_pixel(struct xrdp_bitmap *self, int x, int y, int pixel) /*****************************************************************************/ /* copy part of self at x, y to 0, 0 in dest */ /* returns error */ -int APP_CC +int xrdp_bitmap_copy_box(struct xrdp_bitmap *self, struct xrdp_bitmap *dest, int x, int y, int cx, int cy) @@ -902,7 +902,7 @@ xrdp_bitmap_copy_box(struct xrdp_bitmap *self, } /*****************************************************************************/ -int APP_CC +int xrdp_bitmap_hash_crc(struct xrdp_bitmap *self) { void *hash; @@ -949,7 +949,7 @@ xrdp_bitmap_hash_crc(struct xrdp_bitmap *self) /*****************************************************************************/ /* copy part of self at x, y to 0, 0 in dest */ /* returns error */ -int APP_CC +int xrdp_bitmap_copy_box_with_crc(struct xrdp_bitmap *self, struct xrdp_bitmap *dest, int x, int y, int cx, int cy) @@ -1212,7 +1212,7 @@ xrdp_bitmap_copy_box_with_crc(struct xrdp_bitmap *self, /*****************************************************************************/ /* returns true if they are the same, else returns false */ -int APP_CC +int xrdp_bitmap_compare(struct xrdp_bitmap *self, struct xrdp_bitmap *b) { @@ -1252,7 +1252,7 @@ xrdp_bitmap_compare(struct xrdp_bitmap *self, } /*****************************************************************************/ -static int APP_CC +static int xrdp_bitmap_draw_focus_box(struct xrdp_bitmap *self, struct xrdp_painter *painter, int x, int y, int cx, int cy) @@ -1290,7 +1290,7 @@ xrdp_bitmap_draw_focus_box(struct xrdp_bitmap *self, /*****************************************************************************/ /* x and y are in relation to self for 0, 0 is the top left of the control */ -static int APP_CC +static int xrdp_bitmap_draw_button(struct xrdp_bitmap *self, struct xrdp_painter *painter, int x, int y, int w, int h, @@ -1357,7 +1357,7 @@ xrdp_bitmap_draw_button(struct xrdp_bitmap *self, /*****************************************************************************/ /* nil for rect means the whole thing */ /* returns error */ -int APP_CC +int xrdp_bitmap_invalidate(struct xrdp_bitmap *self, struct xrdp_rect *rect) { int i; @@ -1768,7 +1768,7 @@ xrdp_bitmap_invalidate(struct xrdp_bitmap *self, struct xrdp_rect *rect) /*****************************************************************************/ /* returns error */ -int APP_CC +int xrdp_bitmap_def_proc(struct xrdp_bitmap *self, int msg, int param1, int param2) { @@ -2073,7 +2073,7 @@ xrdp_bitmap_def_proc(struct xrdp_bitmap *self, int msg, /*****************************************************************************/ /* convert the controls coords to screen coords */ -int APP_CC +int xrdp_bitmap_to_screenx(struct xrdp_bitmap *self, int x) { int i; @@ -2091,7 +2091,7 @@ xrdp_bitmap_to_screenx(struct xrdp_bitmap *self, int x) /*****************************************************************************/ /* convert the controls coords to screen coords */ -int APP_CC +int xrdp_bitmap_to_screeny(struct xrdp_bitmap *self, int y) { int i; @@ -2109,7 +2109,7 @@ xrdp_bitmap_to_screeny(struct xrdp_bitmap *self, int y) /*****************************************************************************/ /* convert the screen coords to controls coords */ -int APP_CC +int xrdp_bitmap_from_screenx(struct xrdp_bitmap *self, int x) { int i; @@ -2127,7 +2127,7 @@ xrdp_bitmap_from_screenx(struct xrdp_bitmap *self, int x) /*****************************************************************************/ /* convert the screen coords to controls coords */ -int APP_CC +int xrdp_bitmap_from_screeny(struct xrdp_bitmap *self, int y) { int i; @@ -2144,7 +2144,7 @@ xrdp_bitmap_from_screeny(struct xrdp_bitmap *self, int y) } /*****************************************************************************/ -int APP_CC +int xrdp_bitmap_get_screen_clip(struct xrdp_bitmap *self, struct xrdp_painter *painter, struct xrdp_rect *rect, diff --git a/xrdp/xrdp_cache.c b/xrdp/xrdp_cache.c index ba2226cd..35ed794b 100644 --- a/xrdp/xrdp_cache.c +++ b/xrdp/xrdp_cache.c @@ -39,7 +39,7 @@ while (0) /*****************************************************************************/ -static int APP_CC +static int xrdp_cache_reset_lru(struct xrdp_cache *self) { int index; @@ -73,7 +73,7 @@ xrdp_cache_reset_lru(struct xrdp_cache *self) } /*****************************************************************************/ -static int APP_CC +static int xrdp_cache_reset_crc(struct xrdp_cache *self) { int index; @@ -92,7 +92,7 @@ xrdp_cache_reset_crc(struct xrdp_cache *self) } /*****************************************************************************/ -struct xrdp_cache *APP_CC +struct xrdp_cache * xrdp_cache_create(struct xrdp_wm *owner, struct xrdp_session *session, struct xrdp_client_info *client_info) @@ -131,7 +131,7 @@ xrdp_cache_create(struct xrdp_wm *owner, } /*****************************************************************************/ -void APP_CC +void xrdp_cache_delete(struct xrdp_cache *self) { int i; @@ -181,7 +181,7 @@ xrdp_cache_delete(struct xrdp_cache *self) } /*****************************************************************************/ -int APP_CC +int xrdp_cache_reset(struct xrdp_cache *self, struct xrdp_client_info *client_info) { @@ -237,7 +237,7 @@ xrdp_cache_reset(struct xrdp_cache *self, (_b1->width == _b2->width) && (_b1->height == _b2->height)) /*****************************************************************************/ -static int APP_CC +static int xrdp_cache_update_lru(struct xrdp_cache *self, int cache_id, int lru_index) { int tail_index; @@ -308,7 +308,7 @@ xrdp_cache_update_lru(struct xrdp_cache *self, int cache_id, int lru_index) /*****************************************************************************/ /* returns cache id */ -int APP_CC +int xrdp_cache_add_bitmap(struct xrdp_cache *self, struct xrdp_bitmap *bitmap, int hints) { @@ -498,7 +498,7 @@ xrdp_cache_add_bitmap(struct xrdp_cache *self, struct xrdp_bitmap *bitmap, /*****************************************************************************/ /* not used */ /* not sure how to use a palette in rdp */ -int APP_CC +int xrdp_cache_add_palette(struct xrdp_cache *self, int *palette) { int i; @@ -554,7 +554,7 @@ xrdp_cache_add_palette(struct xrdp_cache *self, int *palette) } /*****************************************************************************/ -int APP_CC +int xrdp_cache_add_char(struct xrdp_cache *self, struct xrdp_font_char *font_item) { @@ -621,7 +621,7 @@ xrdp_cache_add_char(struct xrdp_cache *self, client if it finds it returns the index in the cache does not take ownership of pointer_item */ -int APP_CC +int xrdp_cache_add_pointer(struct xrdp_cache *self, struct xrdp_pointer_item *pointer_item) { @@ -689,7 +689,7 @@ xrdp_cache_add_pointer(struct xrdp_cache *self, /*****************************************************************************/ /* this does not take ownership of pointer_item, it makes a copy */ -int APP_CC +int xrdp_cache_add_pointer_static(struct xrdp_cache *self, struct xrdp_pointer_item *pointer_item, int index) @@ -721,7 +721,7 @@ xrdp_cache_add_pointer_static(struct xrdp_cache *self, /*****************************************************************************/ /* this does not take ownership of brush_item_data, it makes a copy */ -int APP_CC +int xrdp_cache_add_brush(struct xrdp_cache *self, char *brush_item_data) { @@ -772,7 +772,7 @@ xrdp_cache_add_brush(struct xrdp_cache *self, /*****************************************************************************/ /* returns error */ -int APP_CC +int xrdp_cache_add_os_bitmap(struct xrdp_cache *self, struct xrdp_bitmap *bitmap, int rdpindex) { @@ -790,7 +790,7 @@ xrdp_cache_add_os_bitmap(struct xrdp_cache *self, struct xrdp_bitmap *bitmap, /*****************************************************************************/ /* returns error */ -int APP_CC +int xrdp_cache_remove_os_bitmap(struct xrdp_cache *self, int rdpindex) { struct xrdp_os_bitmap_item *bi; @@ -819,7 +819,7 @@ xrdp_cache_remove_os_bitmap(struct xrdp_cache *self, int rdpindex) } /*****************************************************************************/ -struct xrdp_os_bitmap_item *APP_CC +struct xrdp_os_bitmap_item * xrdp_cache_get_os_bitmap(struct xrdp_cache *self, int rdpindex) { struct xrdp_os_bitmap_item *bi; diff --git a/xrdp/xrdp_encoder.c b/xrdp/xrdp_encoder.c index 46bfeccf..d5df5085 100644 --- a/xrdp/xrdp_encoder.c +++ b/xrdp/xrdp_encoder.c @@ -56,7 +56,7 @@ static int process_enc_h264(struct xrdp_encoder *self, XRDP_ENC_DATA *enc); /*****************************************************************************/ -struct xrdp_encoder *APP_CC +struct xrdp_encoder * xrdp_encoder_create(struct xrdp_mm *mm) { struct xrdp_encoder *self; @@ -147,7 +147,7 @@ xrdp_encoder_create(struct xrdp_mm *mm) } /*****************************************************************************/ -void APP_CC +void xrdp_encoder_delete(struct xrdp_encoder *self) { XRDP_ENC_DATA *enc; diff --git a/xrdp/xrdp_encoder.h b/xrdp/xrdp_encoder.h index 0cb21951..a84a48e1 100644 --- a/xrdp/xrdp_encoder.h +++ b/xrdp/xrdp_encoder.h @@ -62,9 +62,9 @@ struct xrdp_enc_data_done typedef struct xrdp_enc_data_done XRDP_ENC_DATA_DONE; -struct xrdp_encoder *APP_CC +struct xrdp_encoder * xrdp_encoder_create(struct xrdp_mm *mm); -void APP_CC +void xrdp_encoder_delete(struct xrdp_encoder *self); THREAD_RV THREAD_CC proc_enc_msg(void *arg); diff --git a/xrdp/xrdp_font.c b/xrdp/xrdp_font.c index f8f6e04f..ae2e116f 100644 --- a/xrdp/xrdp_font.c +++ b/xrdp/xrdp_font.c @@ -66,7 +66,7 @@ static char w_char[] = #endif /*****************************************************************************/ -struct xrdp_font *APP_CC +struct xrdp_font * xrdp_font_create(struct xrdp_wm *wm) { struct xrdp_font *self; @@ -175,7 +175,7 @@ xrdp_font_create(struct xrdp_wm *wm) /*****************************************************************************/ /* free the font and all the items */ -void APP_CC +void xrdp_font_delete(struct xrdp_font *self) { int i; @@ -195,7 +195,7 @@ xrdp_font_delete(struct xrdp_font *self) /*****************************************************************************/ /* compare the two font items returns 1 if they match */ -int APP_CC +int xrdp_font_item_compare(struct xrdp_font_char *font1, struct xrdp_font_char *font2) { diff --git a/xrdp/xrdp_listen.c b/xrdp/xrdp_listen.c index 000b05d3..0fbe61fa 100644 --- a/xrdp/xrdp_listen.c +++ b/xrdp/xrdp_listen.c @@ -50,7 +50,7 @@ xrdp_listen_create_pro_done(struct xrdp_listen *self) } /*****************************************************************************/ -struct xrdp_listen *APP_CC +struct xrdp_listen * xrdp_listen_create(void) { struct xrdp_listen *self; @@ -80,7 +80,7 @@ xrdp_listen_create(void) } /*****************************************************************************/ -void APP_CC +void xrdp_listen_delete(struct xrdp_listen *self) { if (self->listen_trans != 0) @@ -101,7 +101,7 @@ xrdp_listen_delete(struct xrdp_listen *self) /*****************************************************************************/ /* returns error */ -static int APP_CC +static int xrdp_listen_add_pro(struct xrdp_listen *self, struct xrdp_process *process) { list_add_item(self->process_list, (tbus)process); @@ -109,7 +109,7 @@ xrdp_listen_add_pro(struct xrdp_listen *self, struct xrdp_process *process) } /*****************************************************************************/ -static int APP_CC +static int xrdp_listen_delete_done_pro(struct xrdp_listen *self) { int i; @@ -261,7 +261,7 @@ xrdp_listen_get_port_address(char *port, int port_bytes, } /*****************************************************************************/ -static int APP_CC +static int xrdp_listen_fork(struct xrdp_listen *self, struct trans *server_trans) { int pid; @@ -299,7 +299,7 @@ xrdp_listen_fork(struct xrdp_listen *self, struct trans *server_trans) /*****************************************************************************/ /* a new connection is coming in */ -int DEFAULT_CC +int xrdp_listen_conn_in(struct trans *self, struct trans *new_self) { struct xrdp_process *process; @@ -332,7 +332,7 @@ xrdp_listen_conn_in(struct trans *self, struct trans *new_self) /*****************************************************************************/ /* wait for incoming connections */ -int APP_CC +int xrdp_listen_main_loop(struct xrdp_listen *self) { int error; diff --git a/xrdp/xrdp_login_wnd.c b/xrdp/xrdp_login_wnd.c index 70e3e345..49477a12 100644 --- a/xrdp/xrdp_login_wnd.c +++ b/xrdp/xrdp_login_wnd.c @@ -27,7 +27,7 @@ /*****************************************************************************/ /* all login help screen events go here */ -static int DEFAULT_CC +static int xrdp_wm_login_help_notify(struct xrdp_bitmap *wnd, struct xrdp_bitmap *sender, int msg, long param1, long param2) @@ -88,7 +88,7 @@ logging on."); #if 0 /*****************************************************************************/ -static int DEFAULT_CC +static int xrdp_wm_popup_notify(struct xrdp_bitmap *wnd, struct xrdp_bitmap *sender, int msg, int param1, int param2) @@ -98,7 +98,7 @@ xrdp_wm_popup_notify(struct xrdp_bitmap *wnd, #endif /*****************************************************************************/ -int APP_CC +int xrdp_wm_delete_all_children(struct xrdp_wm *self) { int index; @@ -117,7 +117,7 @@ xrdp_wm_delete_all_children(struct xrdp_wm *self) } /*****************************************************************************/ -static int APP_CC +static int set_mod_data_item(struct xrdp_mod_data *mod, char *name, char *value) { int index; @@ -135,7 +135,7 @@ set_mod_data_item(struct xrdp_mod_data *mod, char *name, char *value) } /*****************************************************************************/ -static int APP_CC +static int xrdp_wm_help_clicked(struct xrdp_bitmap *wnd) { struct xrdp_bitmap *help; @@ -174,7 +174,7 @@ xrdp_wm_help_clicked(struct xrdp_bitmap *wnd) } /*****************************************************************************/ -static int APP_CC +static int xrdp_wm_cancel_clicked(struct xrdp_bitmap *wnd) { if (wnd != 0) @@ -192,7 +192,7 @@ xrdp_wm_cancel_clicked(struct xrdp_bitmap *wnd) } /*****************************************************************************/ -static int APP_CC +static int xrdp_wm_ok_clicked(struct xrdp_bitmap *wnd) { struct xrdp_bitmap *combo; @@ -268,7 +268,7 @@ xrdp_wm_ok_clicked(struct xrdp_bitmap *wnd) * @return the index number of the combobox that the user prefer. * 0 if the user does not prefer any choice. */ -static int APP_CC +static int xrdp_wm_parse_domain_information(char *originalDomainInfo, int comboMax, int decode, char *resultBuffer) { @@ -326,7 +326,7 @@ xrdp_wm_parse_domain_information(char *originalDomainInfo, int comboMax, } /******************************************************************************/ -static int APP_CC +static int xrdp_wm_show_edits(struct xrdp_wm *self, struct xrdp_bitmap *combo) { int count; @@ -459,7 +459,7 @@ xrdp_wm_show_edits(struct xrdp_wm *self, struct xrdp_bitmap *combo) /*****************************************************************************/ /* all login screen events go here */ -static int DEFAULT_CC +static int xrdp_wm_login_notify(struct xrdp_bitmap *wnd, struct xrdp_bitmap *sender, int msg, long param1, long param2) @@ -517,7 +517,7 @@ xrdp_wm_login_notify(struct xrdp_bitmap *wnd, } /******************************************************************************/ -static int APP_CC +static int xrdp_wm_login_fill_in_combo(struct xrdp_wm *self, struct xrdp_bitmap *b) { struct list *sections; @@ -600,7 +600,7 @@ xrdp_wm_login_fill_in_combo(struct xrdp_wm *self, struct xrdp_bitmap *b) } /******************************************************************************/ -int APP_CC +int xrdp_login_wnd_create(struct xrdp_wm *self) { struct xrdp_bitmap *but; @@ -794,7 +794,7 @@ xrdp_login_wnd_create(struct xrdp_wm *self) * * @return 0 on success, -1 on failure *****************************************************************************/ -int APP_CC +int load_xrdp_config(struct xrdp_config *config, int bpp) { struct xrdp_cfg_globals *globals; diff --git a/xrdp/xrdp_mm.c b/xrdp/xrdp_mm.c index 72b818cf..74f54dbe 100644 --- a/xrdp/xrdp_mm.c +++ b/xrdp/xrdp_mm.c @@ -49,7 +49,7 @@ while (0) /*****************************************************************************/ -struct xrdp_mm *APP_CC +struct xrdp_mm * xrdp_mm_create(struct xrdp_wm *owner) { struct xrdp_mm *self; @@ -78,7 +78,7 @@ xrdp_mm_create(struct xrdp_wm *owner) /*****************************************************************************/ /* called from main thread */ -static long DEFAULT_CC +static long xrdp_mm_sync_unload(long param1, long param2) { return g_free_library(param1); @@ -86,7 +86,7 @@ xrdp_mm_sync_unload(long param1, long param2) /*****************************************************************************/ /* called from main thread */ -static long DEFAULT_CC +static long xrdp_mm_sync_load(long param1, long param2) { long rv; @@ -98,7 +98,7 @@ xrdp_mm_sync_load(long param1, long param2) } /*****************************************************************************/ -static void APP_CC +static void xrdp_mm_module_cleanup(struct xrdp_mm *self) { log_message(LOG_LEVEL_DEBUG, "xrdp_mm_module_cleanup"); @@ -136,7 +136,7 @@ xrdp_mm_module_cleanup(struct xrdp_mm *self) } /*****************************************************************************/ -void APP_CC +void xrdp_mm_delete(struct xrdp_mm *self) { if (self == 0) @@ -160,7 +160,7 @@ xrdp_mm_delete(struct xrdp_mm *self) /*****************************************************************************/ /* Send login information to sesman */ -static int APP_CC +static int xrdp_mm_send_login(struct xrdp_mm *self) { struct stream *s; @@ -292,7 +292,7 @@ xrdp_mm_send_login(struct xrdp_mm *self) /* this goes through the login_names looking for one called 'aname' then it copies the corresponding login_values item into 'dest' 'dest' must be at least 'dest_len' + 1 bytes in size */ -static int APP_CC +static int xrdp_mm_get_value(struct xrdp_mm *self, const char *aname, char *dest, int dest_len) { @@ -328,7 +328,7 @@ xrdp_mm_get_value(struct xrdp_mm *self, const char *aname, char *dest, } /*****************************************************************************/ -static int APP_CC +static int xrdp_mm_setup_mod1(struct xrdp_mm *self) { void *func; @@ -485,7 +485,7 @@ xrdp_mm_setup_mod1(struct xrdp_mm *self) } /*****************************************************************************/ -static int APP_CC +static int xrdp_mm_setup_mod2(struct xrdp_mm *self, tui8 *guid) { char text[256]; @@ -630,7 +630,7 @@ xrdp_mm_setup_mod2(struct xrdp_mm *self, tui8 *guid) /*****************************************************************************/ /* returns error send a list of channels to the channel handler */ -static int APP_CC +static int xrdp_mm_trans_send_channel_setup(struct xrdp_mm *self, struct trans *trans) { int index; @@ -680,7 +680,7 @@ xrdp_mm_trans_send_channel_setup(struct xrdp_mm *self, struct trans *trans) /*****************************************************************************/ /* returns error */ -static int APP_CC +static int xrdp_mm_trans_send_channel_data_response(struct xrdp_mm *self, struct trans *trans) { @@ -704,7 +704,7 @@ xrdp_mm_trans_send_channel_data_response(struct xrdp_mm *self, /*****************************************************************************/ /* returns error init is done, sent channel setup */ -static int APP_CC +static int xrdp_mm_trans_process_init_response(struct xrdp_mm *self, struct trans *trans) { return xrdp_mm_trans_send_channel_setup(self, trans); @@ -713,7 +713,7 @@ xrdp_mm_trans_process_init_response(struct xrdp_mm *self, struct trans *trans) /*****************************************************************************/ /* returns error data coming in from the channel handler, send it to the client */ -static int APP_CC +static int xrdp_mm_trans_process_channel_data(struct xrdp_mm *self, struct trans *trans) { struct stream *s; @@ -751,7 +751,7 @@ xrdp_mm_trans_process_channel_data(struct xrdp_mm *self, struct trans *trans) /*****************************************************************************/ /* returns error process rail create window order */ -static int APP_CC +static int xrdp_mm_process_rail_create_window(struct xrdp_mm* self, struct stream* s) { int flags; @@ -838,7 +838,7 @@ xrdp_mm_process_rail_create_window(struct xrdp_mm* self, struct stream* s) /*****************************************************************************/ /* returns error process rail configure window order */ -static int APP_CC +static int xrdp_mm_process_rail_configure_window(struct xrdp_mm* self, struct stream* s) { int flags; @@ -912,7 +912,7 @@ xrdp_mm_process_rail_configure_window(struct xrdp_mm* self, struct stream* s) /*****************************************************************************/ /* returns error process rail destroy window order */ -static int APP_CC +static int xrdp_mm_process_rail_destroy_window(struct xrdp_mm* self, struct stream* s) { int window_id; @@ -935,7 +935,7 @@ xrdp_mm_process_rail_destroy_window(struct xrdp_mm* self, struct stream* s) /*****************************************************************************/ /* returns error process rail update window (show state) order */ -static int APP_CC +static int xrdp_mm_process_rail_show_window(struct xrdp_mm* self, struct stream* s) { int window_id; @@ -964,7 +964,7 @@ xrdp_mm_process_rail_show_window(struct xrdp_mm* self, struct stream* s) /*****************************************************************************/ /* returns error process rail update window (title) order */ -static int APP_CC +static int xrdp_mm_process_rail_update_window_text(struct xrdp_mm* self, struct stream* s) { int size; @@ -1004,7 +1004,7 @@ xrdp_mm_process_rail_update_window_text(struct xrdp_mm* self, struct stream* s) /*****************************************************************************/ /* returns error process alternate secondary drawing orders for rail channel */ -static int APP_CC +static int xrdp_mm_process_rail_drawing_orders(struct xrdp_mm* self, struct trans* trans) { struct stream* s; @@ -1042,7 +1042,7 @@ xrdp_mm_process_rail_drawing_orders(struct xrdp_mm* self, struct trans* trans) /*****************************************************************************/ /* returns error process a message for the channel handler */ -static int APP_CC +static int xrdp_mm_chan_process_msg(struct xrdp_mm *self, struct trans *trans, struct stream *s) { @@ -1094,7 +1094,7 @@ xrdp_mm_chan_process_msg(struct xrdp_mm *self, struct trans *trans, /*****************************************************************************/ /* this is callback from trans obj returns error */ -static int APP_CC +static int xrdp_mm_chan_data_in(struct trans *trans) { struct xrdp_mm *self; @@ -1129,7 +1129,7 @@ xrdp_mm_chan_data_in(struct trans *trans) } /*****************************************************************************/ -static int APP_CC +static int xrdp_mm_chan_send_init(struct xrdp_mm *self) { struct stream *s; @@ -1151,7 +1151,7 @@ xrdp_mm_chan_send_init(struct xrdp_mm *self) /*****************************************************************************/ /* connect to chansrv */ -static int APP_CC +static int xrdp_mm_connect_chansrv(struct xrdp_mm *self, const char *ip, const char *port) { int index; @@ -1227,7 +1227,7 @@ static void cleanup_sesman_connection(struct xrdp_mm *self) } /*****************************************************************************/ -static int APP_CC +static int xrdp_mm_process_login_response(struct xrdp_mm *self, struct stream *s) { int ok; @@ -1353,7 +1353,7 @@ xrdp_mm_get_sesman_port(char *port, int port_bytes) /*****************************************************************************/ /* returns error data coming from client that need to go to channel handler */ -int APP_CC +int xrdp_mm_process_channel_data(struct xrdp_mm *self, tbus param1, tbus param2, tbus param3, tbus param4) { @@ -1404,7 +1404,7 @@ xrdp_mm_process_channel_data(struct xrdp_mm *self, tbus param1, tbus param2, /*****************************************************************************/ /* This is the callback registered for sesman communication replies. */ -static int APP_CC +static int xrdp_mm_sesman_data_in(struct trans *trans) { struct xrdp_mm *self; @@ -1456,7 +1456,7 @@ xrdp_mm_sesman_data_in(struct trans *trans) #ifndef USE_NOPAM /*********************************************************************/ /* return 0 on success */ -static int APP_CC +static int access_control(char *username, char *password, char *srv) { int reply; @@ -1575,7 +1575,7 @@ access_control(char *username, char *password, char *srv) /* This routine clears all states to make sure that our next login will be * as expected. If the user does not press ok on the log window and try to * connect again we must make sure that no previous information is stored.*/ -static void APP_CC +static void cleanup_states(struct xrdp_mm *self) { if (self != NULL) @@ -1595,7 +1595,7 @@ cleanup_states(struct xrdp_mm *self) } #ifndef USE_NOPAM -static const char * APP_CC +static const char * getPAMError(const int pamError, char *text, int text_bytes) { switch (pamError) @@ -1734,7 +1734,7 @@ getPAMError(const int pamError, char *text, int text_bytes) } } -static const char * APP_CC +static const char * getPAMAdditionalErrorInfo(const int pamError, struct xrdp_mm *self) { switch (pamError) @@ -1831,7 +1831,7 @@ getPAMAdditionalErrorInfo(const int pamError, struct xrdp_mm *self) #endif /*****************************************************************************/ -int APP_CC +int xrdp_mm_connect(struct xrdp_mm *self) { struct list *names; @@ -2046,7 +2046,7 @@ xrdp_mm_connect(struct xrdp_mm *self) } /*****************************************************************************/ -int APP_CC +int xrdp_mm_get_wait_objs(struct xrdp_mm *self, tbus *read_objs, int *rcount, tbus *write_objs, int *wcount, int *timeout) @@ -2092,7 +2092,7 @@ xrdp_mm_get_wait_objs(struct xrdp_mm *self, #if DUMP_JPEG /*****************************************************************************/ -static int APP_CC +static int xrdp_mm_dump_jpeg(struct xrdp_mm *self, XRDP_ENC_DATA_DONE *enc_done) { static tbus ii; @@ -2143,7 +2143,7 @@ xrdp_mm_dump_jpeg(struct xrdp_mm *self, XRDP_ENC_DATA_DONE *enc_done) #endif /*****************************************************************************/ -int APP_CC +int xrdp_mm_check_chan(struct xrdp_mm *self) { //g_writeln("xrdp_mm_check_chan:"); @@ -2165,7 +2165,7 @@ xrdp_mm_check_chan(struct xrdp_mm *self) } /*****************************************************************************/ -static int APP_CC +static int xrdp_mm_update_module_frame_ack(struct xrdp_mm *self) { int fif; @@ -2187,7 +2187,7 @@ xrdp_mm_update_module_frame_ack(struct xrdp_mm *self) } /*****************************************************************************/ -static int APP_CC +static int xrdp_mm_process_enc_done(struct xrdp_mm *self) { XRDP_ENC_DATA_DONE *enc_done; @@ -2253,7 +2253,7 @@ xrdp_mm_process_enc_done(struct xrdp_mm *self) } /*****************************************************************************/ -int APP_CC +int xrdp_mm_check_wait_objs(struct xrdp_mm *self) { int rv; @@ -2323,7 +2323,7 @@ xrdp_mm_check_wait_objs(struct xrdp_mm *self) /*****************************************************************************/ /* frame ack from client */ -int APP_CC +int xrdp_mm_frame_ack(struct xrdp_mm *self, int frame_id) { struct xrdp_encoder *encoder; @@ -2355,7 +2355,7 @@ xrdp_mm_frame_ack(struct xrdp_mm *self, int frame_id) #if 0 /*****************************************************************************/ -struct xrdp_painter *APP_CC +struct xrdp_painter * get_painter(struct xrdp_mod *mod) { struct xrdp_wm *wm; @@ -2375,7 +2375,7 @@ get_painter(struct xrdp_mod *mod) #endif /*****************************************************************************/ -int DEFAULT_CC +int server_begin_update(struct xrdp_mod *mod) { struct xrdp_wm *wm; @@ -2389,7 +2389,7 @@ server_begin_update(struct xrdp_mod *mod) } /*****************************************************************************/ -int DEFAULT_CC +int server_end_update(struct xrdp_mod *mod) { struct xrdp_painter *p; @@ -2409,7 +2409,7 @@ server_end_update(struct xrdp_mod *mod) /*****************************************************************************/ /* got bell signal... try to send to client */ -int DEFAULT_CC +int server_bell_trigger(struct xrdp_mod *mod) { struct xrdp_wm *wm; @@ -2421,7 +2421,7 @@ server_bell_trigger(struct xrdp_mod *mod) /*****************************************************************************/ -int DEFAULT_CC +int server_fill_rect(struct xrdp_mod *mod, int x, int y, int cx, int cy) { struct xrdp_wm *wm; @@ -2440,7 +2440,7 @@ server_fill_rect(struct xrdp_mod *mod, int x, int y, int cx, int cy) } /*****************************************************************************/ -int DEFAULT_CC +int server_screen_blt(struct xrdp_mod *mod, int x, int y, int cx, int cy, int srcx, int srcy) { @@ -2461,7 +2461,7 @@ server_screen_blt(struct xrdp_mod *mod, int x, int y, int cx, int cy, } /*****************************************************************************/ -int DEFAULT_CC +int server_paint_rect(struct xrdp_mod *mod, int x, int y, int cx, int cy, char *data, int width, int height, int srcx, int srcy) { @@ -2484,7 +2484,7 @@ server_paint_rect(struct xrdp_mod *mod, int x, int y, int cx, int cy, } /*****************************************************************************/ -int DEFAULT_CC +int server_paint_rect_bpp(struct xrdp_mod* mod, int x, int y, int cx, int cy, char* data, int width, int height, int srcx, int srcy, int bpp) @@ -2506,7 +2506,7 @@ server_paint_rect_bpp(struct xrdp_mod* mod, int x, int y, int cx, int cy, } /*****************************************************************************/ -int DEFAULT_CC +int server_composite(struct xrdp_mod* mod, int srcidx, int srcformat, int srcwidth, int srcrepeat, int* srctransform, int mskflags, int mskidx, int mskformat, int mskwidth, @@ -2557,7 +2557,7 @@ server_composite(struct xrdp_mod* mod, int srcidx, int srcformat, } /*****************************************************************************/ -int DEFAULT_CC +int server_paint_rects(struct xrdp_mod* mod, int num_drects, short *drects, int num_crects, short *crects, char *data, int width, int height, int flags, int frame_id) @@ -2651,7 +2651,7 @@ server_paint_rects(struct xrdp_mod* mod, int num_drects, short *drects, } /*****************************************************************************/ -int DEFAULT_CC +int server_session_info(struct xrdp_mod *mod, const char *data, int data_bytes) { struct xrdp_wm *wm; @@ -2662,7 +2662,7 @@ server_session_info(struct xrdp_mod *mod, const char *data, int data_bytes) } /*****************************************************************************/ -int DEFAULT_CC +int server_set_pointer(struct xrdp_mod *mod, int x, int y, char *data, char *mask) { @@ -2674,7 +2674,7 @@ server_set_pointer(struct xrdp_mod *mod, int x, int y, } /*****************************************************************************/ -int DEFAULT_CC +int server_set_pointer_ex(struct xrdp_mod *mod, int x, int y, char *data, char *mask, int bpp) { @@ -2686,7 +2686,7 @@ server_set_pointer_ex(struct xrdp_mod *mod, int x, int y, } /*****************************************************************************/ -int DEFAULT_CC +int server_palette(struct xrdp_mod *mod, int *palette) { struct xrdp_wm *wm; @@ -2703,7 +2703,7 @@ server_palette(struct xrdp_mod *mod, int *palette) } /*****************************************************************************/ -int DEFAULT_CC +int server_msg(struct xrdp_mod *mod, char *msg, int code) { struct xrdp_wm *wm; @@ -2719,14 +2719,14 @@ server_msg(struct xrdp_mod *mod, char *msg, int code) } /*****************************************************************************/ -int DEFAULT_CC +int server_is_term(struct xrdp_mod *mod) { return g_is_term(); } /*****************************************************************************/ -int DEFAULT_CC +int server_set_clip(struct xrdp_mod *mod, int x, int y, int cx, int cy) { struct xrdp_painter *p; @@ -2742,7 +2742,7 @@ server_set_clip(struct xrdp_mod *mod, int x, int y, int cx, int cy) } /*****************************************************************************/ -int DEFAULT_CC +int server_reset_clip(struct xrdp_mod *mod) { struct xrdp_painter *p; @@ -2758,7 +2758,7 @@ server_reset_clip(struct xrdp_mod *mod) } /*****************************************************************************/ -int DEFAULT_CC +int server_set_fgcolor(struct xrdp_mod *mod, int fgcolor) { struct xrdp_painter *p; @@ -2776,7 +2776,7 @@ server_set_fgcolor(struct xrdp_mod *mod, int fgcolor) } /*****************************************************************************/ -int DEFAULT_CC +int server_set_bgcolor(struct xrdp_mod *mod, int bgcolor) { struct xrdp_painter *p; @@ -2793,7 +2793,7 @@ server_set_bgcolor(struct xrdp_mod *mod, int bgcolor) } /*****************************************************************************/ -int DEFAULT_CC +int server_set_opcode(struct xrdp_mod *mod, int opcode) { struct xrdp_painter *p; @@ -2810,7 +2810,7 @@ server_set_opcode(struct xrdp_mod *mod, int opcode) } /*****************************************************************************/ -int DEFAULT_CC +int server_set_mixmode(struct xrdp_mod *mod, int mixmode) { struct xrdp_painter *p; @@ -2827,7 +2827,7 @@ server_set_mixmode(struct xrdp_mod *mod, int mixmode) } /*****************************************************************************/ -int DEFAULT_CC +int server_set_brush(struct xrdp_mod *mod, int x_origin, int y_origin, int style, char *pattern) { @@ -2848,7 +2848,7 @@ server_set_brush(struct xrdp_mod *mod, int x_origin, int y_origin, } /*****************************************************************************/ -int DEFAULT_CC +int server_set_pen(struct xrdp_mod *mod, int style, int width) { struct xrdp_painter *p; @@ -2866,7 +2866,7 @@ server_set_pen(struct xrdp_mod *mod, int style, int width) } /*****************************************************************************/ -int DEFAULT_CC +int server_draw_line(struct xrdp_mod *mod, int x1, int y1, int x2, int y2) { struct xrdp_wm *wm; @@ -2884,7 +2884,7 @@ server_draw_line(struct xrdp_mod *mod, int x1, int y1, int x2, int y2) } /*****************************************************************************/ -int DEFAULT_CC +int server_add_char(struct xrdp_mod *mod, int font, int character, int offset, int baseline, int width, int height, char *data) @@ -2903,7 +2903,7 @@ server_add_char(struct xrdp_mod *mod, int font, int character, } /*****************************************************************************/ -int DEFAULT_CC +int server_draw_text(struct xrdp_mod *mod, int font, int flags, int mixmode, int clip_left, int clip_top, int clip_right, int clip_bottom, @@ -2931,7 +2931,7 @@ server_draw_text(struct xrdp_mod *mod, int font, } /*****************************************************************************/ -int DEFAULT_CC +int server_reset(struct xrdp_mod *mod, int width, int height, int bpp) { struct xrdp_wm *wm; @@ -3007,7 +3007,7 @@ int read_allowed_channel_names(struct list *names, struct list *values) /* internal function return -1 if name is not in list * otherwise return the index 0->count-1*/ -int DEFAULT_CC +int find_name_in_lists(char *inName, struct list *names) { int reply = -1; /*means not in the list*/ @@ -3062,7 +3062,7 @@ int update_allowed_channel_names(struct xrdp_wm *wm, struct list *names, struct /* internal function return 1 if name is in list of channels * and if the value is allowed */ -int DEFAULT_CC +int is_channel_enabled(char *inName, struct list *names, struct list *values) { int reply = 0; /*means not in the list*/ @@ -3155,7 +3155,7 @@ void init_channel_allowed(struct xrdp_wm *wm) /*****************************************************************************/ /* This function returns 1 if the channelID is allowed by rule set * returns 0 if not allowed */ -int DEFAULT_CC is_channel_allowed(struct xrdp_wm *wm, int channel_id) +int is_channel_allowed(struct xrdp_wm *wm, int channel_id) { int i; int reply = 0; /* not allowed */ @@ -3190,7 +3190,7 @@ int DEFAULT_CC is_channel_allowed(struct xrdp_wm *wm, int channel_id) /*****************************************************************************/ /*return 0 if the index is not found*/ -int DEFAULT_CC +int server_query_channel(struct xrdp_mod *mod, int index, char *channel_name, int *channel_flags) { @@ -3209,7 +3209,7 @@ server_query_channel(struct xrdp_mod *mod, int index, char *channel_name, /*****************************************************************************/ /* returns -1 on error */ -int DEFAULT_CC +int server_get_channel_id(struct xrdp_mod *mod, const char *name) { struct xrdp_wm *wm; @@ -3225,7 +3225,7 @@ server_get_channel_id(struct xrdp_mod *mod, const char *name) } /*****************************************************************************/ -int DEFAULT_CC +int server_send_to_channel(struct xrdp_mod *mod, int channel_id, char *data, int data_len, int total_data_len, int flags) @@ -3251,7 +3251,7 @@ server_send_to_channel(struct xrdp_mod *mod, int channel_id, } /*****************************************************************************/ -int DEFAULT_CC +int server_create_os_surface(struct xrdp_mod *mod, int rdpindex, int width, int height) { @@ -3276,7 +3276,7 @@ server_create_os_surface(struct xrdp_mod *mod, int rdpindex, } /*****************************************************************************/ -int DEFAULT_CC +int server_create_os_surface_bpp(struct xrdp_mod* mod, int rdpindex, int width, int height, int bpp) { @@ -3299,7 +3299,7 @@ server_create_os_surface_bpp(struct xrdp_mod* mod, int rdpindex, } /*****************************************************************************/ -int DEFAULT_CC +int server_switch_os_surface(struct xrdp_mod *mod, int rdpindex) { struct xrdp_wm *wm; @@ -3347,7 +3347,7 @@ server_switch_os_surface(struct xrdp_mod *mod, int rdpindex) } /*****************************************************************************/ -int DEFAULT_CC +int server_delete_os_surface(struct xrdp_mod *mod, int rdpindex) { struct xrdp_wm *wm; @@ -3377,7 +3377,7 @@ server_delete_os_surface(struct xrdp_mod *mod, int rdpindex) } /*****************************************************************************/ -int DEFAULT_CC +int server_paint_rect_os(struct xrdp_mod *mod, int x, int y, int cx, int cy, int rdpindex, int srcx, int srcy) { @@ -3410,7 +3410,7 @@ server_paint_rect_os(struct xrdp_mod *mod, int x, int y, int cx, int cy, } /*****************************************************************************/ -int DEFAULT_CC +int server_set_hints(struct xrdp_mod *mod, int hints, int mask) { struct xrdp_wm *wm; @@ -3433,7 +3433,7 @@ server_set_hints(struct xrdp_mod *mod, int hints, int mask) } /*****************************************************************************/ -int DEFAULT_CC +int server_window_new_update(struct xrdp_mod *mod, int window_id, struct rail_window_state_order *window_state, int flags) @@ -3446,7 +3446,7 @@ server_window_new_update(struct xrdp_mod *mod, int window_id, } /*****************************************************************************/ -int DEFAULT_CC +int server_window_delete(struct xrdp_mod *mod, int window_id) { struct xrdp_wm *wm; @@ -3456,7 +3456,7 @@ server_window_delete(struct xrdp_mod *mod, int window_id) } /*****************************************************************************/ -int DEFAULT_CC +int server_window_icon(struct xrdp_mod *mod, int window_id, int cache_entry, int cache_id, struct rail_icon_info *icon_info, int flags) @@ -3469,7 +3469,7 @@ server_window_icon(struct xrdp_mod *mod, int window_id, int cache_entry, } /*****************************************************************************/ -int DEFAULT_CC +int server_window_cached_icon(struct xrdp_mod *mod, int window_id, int cache_entry, int cache_id, int flags) @@ -3482,7 +3482,7 @@ server_window_cached_icon(struct xrdp_mod *mod, } /*****************************************************************************/ -int DEFAULT_CC +int server_notify_new_update(struct xrdp_mod *mod, int window_id, int notify_id, struct rail_notify_state_order *notify_state, @@ -3496,7 +3496,7 @@ server_notify_new_update(struct xrdp_mod *mod, } /*****************************************************************************/ -int DEFAULT_CC +int server_notify_delete(struct xrdp_mod *mod, int window_id, int notify_id) { @@ -3507,7 +3507,7 @@ server_notify_delete(struct xrdp_mod *mod, int window_id, } /*****************************************************************************/ -int DEFAULT_CC +int server_monitored_desktop(struct xrdp_mod *mod, struct rail_monitored_desktop_order *mdo, int flags) @@ -3519,7 +3519,7 @@ server_monitored_desktop(struct xrdp_mod *mod, } /*****************************************************************************/ -int DEFAULT_CC +int server_add_char_alpha(struct xrdp_mod* mod, int font, int character, int offset, int baseline, int width, int height, char* data) diff --git a/xrdp/xrdp_painter.c b/xrdp/xrdp_painter.c index 510cce27..97ae5cc3 100644 --- a/xrdp/xrdp_painter.c +++ b/xrdp/xrdp_painter.c @@ -43,7 +43,7 @@ #if defined(XRDP_PAINTER) /*****************************************************************************/ -static int APP_CC +static int xrdp_painter_add_dirty_rect(struct xrdp_painter *self, int x, int y, int cx, int cy, struct xrdp_rect *clip_rect) { @@ -141,7 +141,7 @@ xrdp_painter_send_dirty(struct xrdp_painter *self) #endif /*****************************************************************************/ -struct xrdp_painter *APP_CC +struct xrdp_painter * xrdp_painter_create(struct xrdp_wm *wm, struct xrdp_session *session) { struct xrdp_painter *self; @@ -174,7 +174,7 @@ xrdp_painter_create(struct xrdp_wm *wm, struct xrdp_session *session) } /*****************************************************************************/ -void APP_CC +void xrdp_painter_delete(struct xrdp_painter *self) { LLOGLN(10, ("xrdp_painter_delete:")); @@ -192,7 +192,7 @@ xrdp_painter_delete(struct xrdp_painter *self) } /*****************************************************************************/ -int APP_CC +int wm_painter_set_target(struct xrdp_painter *self) { int surface_index; @@ -246,7 +246,7 @@ wm_painter_set_target(struct xrdp_painter *self) } /*****************************************************************************/ -int APP_CC +int xrdp_painter_begin_update(struct xrdp_painter *self) { LLOGLN(10, ("xrdp_painter_begin_update:")); @@ -268,7 +268,7 @@ xrdp_painter_begin_update(struct xrdp_painter *self) } /*****************************************************************************/ -int APP_CC +int xrdp_painter_end_update(struct xrdp_painter *self) { LLOGLN(10, ("xrdp_painter_end_update:")); @@ -295,7 +295,7 @@ xrdp_painter_end_update(struct xrdp_painter *self) } /*****************************************************************************/ -int APP_CC +int xrdp_painter_font_needed(struct xrdp_painter *self) { if (self->font == 0) @@ -309,7 +309,7 @@ xrdp_painter_font_needed(struct xrdp_painter *self) #if 0 /*****************************************************************************/ /* returns boolean, true if there is something to draw */ -static int APP_CC +static int xrdp_painter_clip_adj(struct xrdp_painter *self, int *x, int *y, int *cx, int *cy) { @@ -369,7 +369,7 @@ xrdp_painter_clip_adj(struct xrdp_painter *self, int *x, int *y, #endif /*****************************************************************************/ -int APP_CC +int xrdp_painter_set_clip(struct xrdp_painter *self, int x, int y, int cx, int cy) { @@ -382,7 +382,7 @@ xrdp_painter_set_clip(struct xrdp_painter *self, } /*****************************************************************************/ -int APP_CC +int xrdp_painter_clr_clip(struct xrdp_painter *self) { self->use_clip = 0; @@ -391,7 +391,7 @@ xrdp_painter_clr_clip(struct xrdp_painter *self) #if 0 /*****************************************************************************/ -static int APP_CC +static int xrdp_painter_rop(int rop, int src, int dst) { switch (rop & 0x0f) @@ -435,7 +435,7 @@ xrdp_painter_rop(int rop, int src, int dst) #endif /*****************************************************************************/ -int APP_CC +int xrdp_painter_text_width(struct xrdp_painter *self, const char *text) { int index; @@ -473,7 +473,7 @@ xrdp_painter_text_width(struct xrdp_painter *self, const char *text) } /*****************************************************************************/ -int APP_CC +int xrdp_painter_text_height(struct xrdp_painter *self, const char *text) { int index; @@ -511,7 +511,7 @@ xrdp_painter_text_height(struct xrdp_painter *self, const char *text) } /*****************************************************************************/ -static int APP_CC +static int xrdp_painter_setup_brush(struct xrdp_painter *self, struct xrdp_brush *out_brush, struct xrdp_brush *in_brush) @@ -544,7 +544,7 @@ xrdp_painter_setup_brush(struct xrdp_painter *self, #if defined(XRDP_PAINTER) /*****************************************************************************/ -static int APP_CC +static int get_pt_format(struct xrdp_painter *self) { switch (self->wm->screen->bpp) @@ -575,7 +575,7 @@ get_rgb_from_rdp_color(struct xrdp_painter *self, int rdp_color) /*****************************************************************************/ /* fill in an area of the screen with one color */ -int APP_CC +int xrdp_painter_fill_rect(struct xrdp_painter *self, struct xrdp_bitmap *dst, int x, int y, int cx, int cy) @@ -805,7 +805,7 @@ xrdp_painter_fill_rect(struct xrdp_painter *self, } /*****************************************************************************/ -int APP_CC +int xrdp_painter_draw_text(struct xrdp_painter *self, struct xrdp_bitmap *dst, int x, int y, const char *text) @@ -1007,7 +1007,7 @@ xrdp_painter_draw_text(struct xrdp_painter *self, } /*****************************************************************************/ -int APP_CC +int xrdp_painter_draw_text2(struct xrdp_painter *self, struct xrdp_bitmap *dst, int font, int flags, int mixmode, @@ -1098,7 +1098,7 @@ xrdp_painter_draw_text2(struct xrdp_painter *self, } /*****************************************************************************/ -int APP_CC +int xrdp_painter_copy(struct xrdp_painter *self, struct xrdp_bitmap *src, struct xrdp_bitmap *dst, @@ -1374,7 +1374,7 @@ xrdp_painter_copy(struct xrdp_painter *self, } /*****************************************************************************/ -int APP_CC +int xrdp_painter_composite(struct xrdp_painter* self, struct xrdp_bitmap* src, int srcformat, @@ -1459,7 +1459,7 @@ xrdp_painter_composite(struct xrdp_painter* self, } /*****************************************************************************/ -int APP_CC +int xrdp_painter_line(struct xrdp_painter *self, struct xrdp_bitmap *dst, int x1, int y1, int x2, int y2) diff --git a/xrdp/xrdp_process.c b/xrdp/xrdp_process.c index 4c0b44c3..2b6c9a62 100644 --- a/xrdp/xrdp_process.c +++ b/xrdp/xrdp_process.c @@ -28,7 +28,7 @@ static int g_session_id = 0; /*****************************************************************************/ /* always called from xrdp_listen thread */ -struct xrdp_process *APP_CC +struct xrdp_process * xrdp_process_create(struct xrdp_listen *owner, tbus done_event) { struct xrdp_process *self; @@ -48,7 +48,7 @@ xrdp_process_create(struct xrdp_listen *owner, tbus done_event) } /*****************************************************************************/ -void APP_CC +void xrdp_process_delete(struct xrdp_process *self) { if (self == 0) @@ -64,7 +64,7 @@ xrdp_process_delete(struct xrdp_process *self) } /*****************************************************************************/ -static int APP_CC +static int xrdp_process_loop(struct xrdp_process *self, struct stream *s) { int rv; @@ -91,14 +91,14 @@ xrdp_process_loop(struct xrdp_process *self, struct stream *s) /*****************************************************************************/ /* returns boolean */ /* this is so libxrdp.so can known when to quit looping */ -static int DEFAULT_CC +static int xrdp_is_term(void) { return g_is_term(); } /*****************************************************************************/ -static int APP_CC +static int xrdp_process_mod_end(struct xrdp_process *self) { if (self->wm != 0) @@ -119,7 +119,7 @@ xrdp_process_mod_end(struct xrdp_process *self) } /*****************************************************************************/ -static int DEFAULT_CC +static int xrdp_process_data_in(struct trans *self) { struct xrdp_process *pro; @@ -216,7 +216,7 @@ xrdp_process_data_in(struct trans *self) } /*****************************************************************************/ -int APP_CC +int xrdp_process_main_loop(struct xrdp_process *self) { int robjs_count; diff --git a/xrdp/xrdp_region.c b/xrdp/xrdp_region.c index 58cd7f8e..b894a907 100644 --- a/xrdp/xrdp_region.c +++ b/xrdp/xrdp_region.c @@ -31,7 +31,7 @@ #endif /*****************************************************************************/ -struct xrdp_region *APP_CC +struct xrdp_region * xrdp_region_create(struct xrdp_wm *wm) { struct xrdp_region *self; @@ -45,7 +45,7 @@ xrdp_region_create(struct xrdp_wm *wm) } /*****************************************************************************/ -void APP_CC +void xrdp_region_delete(struct xrdp_region *self) { if (self == 0) @@ -59,7 +59,7 @@ xrdp_region_delete(struct xrdp_region *self) /*****************************************************************************/ /* returns error */ -int APP_CC +int xrdp_region_add_rect(struct xrdp_region *self, struct xrdp_rect *rect) { struct pixman_region16 lreg; @@ -78,7 +78,7 @@ xrdp_region_add_rect(struct xrdp_region *self, struct xrdp_rect *rect) /*****************************************************************************/ /* returns error */ -int APP_CC +int xrdp_region_subtract_rect(struct xrdp_region *self, struct xrdp_rect *rect) { struct pixman_region16 lreg; @@ -97,7 +97,7 @@ xrdp_region_subtract_rect(struct xrdp_region *self, struct xrdp_rect *rect) /*****************************************************************************/ /* returns error */ -int APP_CC +int xrdp_region_intersect_rect(struct xrdp_region* self, struct xrdp_rect* rect) { struct pixman_region16 lreg; @@ -117,7 +117,7 @@ xrdp_region_intersect_rect(struct xrdp_region* self, struct xrdp_rect* rect) /*****************************************************************************/ /* returns error */ -int APP_CC +int xrdp_region_get_rect(struct xrdp_region *self, int index, struct xrdp_rect *rect) { diff --git a/xrdp/xrdp_wm.c b/xrdp/xrdp_wm.c index fc975297..335bf27f 100644 --- a/xrdp/xrdp_wm.c +++ b/xrdp/xrdp_wm.c @@ -28,7 +28,7 @@ #include "log.h" /*****************************************************************************/ -struct xrdp_wm *APP_CC +struct xrdp_wm * xrdp_wm_create(struct xrdp_process *owner, struct xrdp_client_info *client_info) { @@ -72,7 +72,7 @@ xrdp_wm_create(struct xrdp_process *owner, } /*****************************************************************************/ -void APP_CC +void xrdp_wm_delete(struct xrdp_wm *self) { if (self == 0) @@ -98,21 +98,21 @@ xrdp_wm_delete(struct xrdp_wm *self) } /*****************************************************************************/ -int APP_CC +int xrdp_wm_send_palette(struct xrdp_wm *self) { return libxrdp_send_palette(self->session, self->palette); } /*****************************************************************************/ -int APP_CC +int xrdp_wm_send_bell(struct xrdp_wm *self) { return libxrdp_send_bell(self->session); } /*****************************************************************************/ -int APP_CC +int xrdp_wm_send_bitmap(struct xrdp_wm *self, struct xrdp_bitmap *bitmap, int x, int y, int cx, int cy) { @@ -121,7 +121,7 @@ xrdp_wm_send_bitmap(struct xrdp_wm *self, struct xrdp_bitmap *bitmap, } /*****************************************************************************/ -int APP_CC +int xrdp_wm_set_focused(struct xrdp_wm *self, struct xrdp_bitmap *wnd) { struct xrdp_bitmap *focus_out_control; @@ -160,7 +160,7 @@ xrdp_wm_set_focused(struct xrdp_wm *self, struct xrdp_bitmap *wnd) } /******************************************************************************/ -static int APP_CC +static int xrdp_wm_get_pixel(char *data, int x, int y, int width, int bpp) { int start; @@ -193,7 +193,7 @@ xrdp_wm_get_pixel(char *data, int x, int y, int width, int bpp) } /*****************************************************************************/ -int APP_CC +int xrdp_wm_pointer(struct xrdp_wm *self, char *data, char *mask, int x, int y, int bpp) { @@ -217,7 +217,7 @@ xrdp_wm_pointer(struct xrdp_wm *self, char *data, char *mask, int x, int y, /*****************************************************************************/ /* returns error */ -int APP_CC +int xrdp_wm_load_pointer(struct xrdp_wm *self, char *file_name, char *data, char *mask, int *x, int *y) { @@ -319,7 +319,7 @@ xrdp_wm_load_pointer(struct xrdp_wm *self, char *file_name, char *data, } /*****************************************************************************/ -int APP_CC +int xrdp_wm_send_pointer(struct xrdp_wm *self, int cache_idx, char *data, char *mask, int x, int y, int bpp) { @@ -328,7 +328,7 @@ xrdp_wm_send_pointer(struct xrdp_wm *self, int cache_idx, } /*****************************************************************************/ -int APP_CC +int xrdp_wm_set_pointer(struct xrdp_wm *self, int cache_idx) { return libxrdp_set_pointer(self->session, cache_idx); @@ -336,7 +336,7 @@ xrdp_wm_set_pointer(struct xrdp_wm *self, int cache_idx) /*****************************************************************************/ /* convert hex string to int */ -unsigned int APP_CC +unsigned int xrdp_wm_htoi (const char *ptr) { unsigned int value = 0; @@ -371,7 +371,7 @@ xrdp_wm_htoi (const char *ptr) } /*****************************************************************************/ -int APP_CC +int xrdp_wm_load_static_colors_plus(struct xrdp_wm *self, char *autorun_name) { int bindex; @@ -522,7 +522,7 @@ xrdp_wm_load_static_colors_plus(struct xrdp_wm *self, char *autorun_name) /*****************************************************************************/ /* returns error */ -int APP_CC +int xrdp_wm_load_static_pointers(struct xrdp_wm *self) { struct xrdp_pointer_item pointer_item; @@ -544,7 +544,7 @@ xrdp_wm_load_static_pointers(struct xrdp_wm *self) } /*****************************************************************************/ -int APP_CC +int xrdp_wm_init(struct xrdp_wm *self) { int fd; @@ -716,7 +716,7 @@ xrdp_wm_init(struct xrdp_wm *self) /*****************************************************************************/ /* returns the number for rects visible for an area relative to a drawable */ /* putting the rects in region */ -int APP_CC +int xrdp_wm_get_vis_region(struct xrdp_wm *self, struct xrdp_bitmap *bitmap, int x, int y, int cx, int cy, struct xrdp_region *region, int clip_children) @@ -764,7 +764,7 @@ xrdp_wm_get_vis_region(struct xrdp_wm *self, struct xrdp_bitmap *bitmap, /*****************************************************************************/ /* return the window at x, y on the screen */ -static struct xrdp_bitmap *APP_CC +static struct xrdp_bitmap * xrdp_wm_at_pos(struct xrdp_bitmap *wnd, int x, int y, struct xrdp_bitmap **wnd1) { @@ -802,7 +802,7 @@ xrdp_wm_at_pos(struct xrdp_bitmap *wnd, int x, int y, } /*****************************************************************************/ -static int APP_CC +static int xrdp_wm_xor_pat(struct xrdp_wm *self, int x, int y, int cx, int cy) { self->painter->clip_children = 0; @@ -842,7 +842,7 @@ xrdp_wm_xor_pat(struct xrdp_wm *self, int x, int y, int cx, int cy) /*****************************************************************************/ /* return true if rect is totally exposed going in reverse z order */ /* from wnd up */ -static int APP_CC +static int xrdp_wm_is_rect_vis(struct xrdp_wm *self, struct xrdp_bitmap *wnd, struct xrdp_rect *rect) { @@ -891,7 +891,7 @@ xrdp_wm_is_rect_vis(struct xrdp_wm *self, struct xrdp_bitmap *wnd, } /*****************************************************************************/ -static int APP_CC +static int xrdp_wm_move_window(struct xrdp_wm *self, struct xrdp_bitmap *wnd, int dx, int dy) { @@ -946,7 +946,7 @@ xrdp_wm_move_window(struct xrdp_wm *self, struct xrdp_bitmap *wnd, /*****************************************************************************/ -static int APP_CC +static int xrdp_wm_undraw_dragging_box(struct xrdp_wm *self, int do_begin_end) { int boxx; @@ -982,7 +982,7 @@ xrdp_wm_undraw_dragging_box(struct xrdp_wm *self, int do_begin_end) } /*****************************************************************************/ -static int APP_CC +static int xrdp_wm_draw_dragging_box(struct xrdp_wm *self, int do_begin_end) { int boxx; @@ -1018,7 +1018,7 @@ xrdp_wm_draw_dragging_box(struct xrdp_wm *self, int do_begin_end) } /*****************************************************************************/ -int APP_CC +int xrdp_wm_mouse_move(struct xrdp_wm *self, int x, int y) { struct xrdp_bitmap *b; @@ -1123,7 +1123,7 @@ xrdp_wm_mouse_move(struct xrdp_wm *self, int x, int y) } /*****************************************************************************/ -static int APP_CC +static int xrdp_wm_clear_popup(struct xrdp_wm *self) { int i; @@ -1147,7 +1147,7 @@ xrdp_wm_clear_popup(struct xrdp_wm *self) } /*****************************************************************************/ -int APP_CC +int xrdp_wm_mouse_click(struct xrdp_wm *self, int x, int y, int but, int down) { struct xrdp_bitmap *control; @@ -1403,7 +1403,7 @@ xrdp_wm_mouse_click(struct xrdp_wm *self, int x, int y, int but, int down) } /*****************************************************************************/ -int APP_CC +int xrdp_wm_key(struct xrdp_wm *self, int device_flags, int scan_code) { int msg; @@ -1469,7 +1469,7 @@ xrdp_wm_key(struct xrdp_wm *self, int device_flags, int scan_code) /*****************************************************************************/ /* happens when client gets focus and sends key modifier info */ -int APP_CC +int xrdp_wm_key_sync(struct xrdp_wm *self, int device_flags, int key_flags) { self->num_lock = 0; @@ -1504,7 +1504,7 @@ xrdp_wm_key_sync(struct xrdp_wm *self, int device_flags, int key_flags) } /*****************************************************************************/ -int APP_CC +int xrdp_wm_key_unicode(struct xrdp_wm *self, int device_flags, int unicode) { int index; @@ -1581,7 +1581,7 @@ xrdp_wm_key_unicode(struct xrdp_wm *self, int device_flags, int unicode) } /*****************************************************************************/ -int APP_CC +int xrdp_wm_pu(struct xrdp_wm *self, struct xrdp_bitmap *control) { int x; @@ -1614,7 +1614,7 @@ xrdp_wm_pu(struct xrdp_wm *self, struct xrdp_bitmap *control) } /*****************************************************************************/ -static int APP_CC +static int xrdp_wm_process_input_mouse(struct xrdp_wm *self, int device_flags, int x, int y) { @@ -1677,7 +1677,7 @@ xrdp_wm_process_input_mouse(struct xrdp_wm *self, int device_flags, } /*****************************************************************************/ -static int APP_CC +static int xrdp_wm_process_input_mousex(struct xrdp_wm* self, int device_flags, int x, int y) { @@ -1711,7 +1711,7 @@ xrdp_wm_process_input_mousex(struct xrdp_wm* self, int device_flags, param2 = size param3 = pointer to data param4 = total size */ -static int APP_CC +static int xrdp_wm_process_channel_data(struct xrdp_wm *self, tbus param1, tbus param2, tbus param3, tbus param4) @@ -1747,7 +1747,7 @@ xrdp_wm_process_channel_data(struct xrdp_wm *self, /******************************************************************************/ /* this is the callbacks coming from libxrdp.so */ -int DEFAULT_CC +int callback(intptr_t id, int msg, intptr_t param1, intptr_t param2, intptr_t param3, intptr_t param4) { @@ -1810,7 +1810,7 @@ callback(intptr_t id, int msg, intptr_t param1, intptr_t param2, /******************************************************************************/ /* returns error */ /* this gets called when there is nothing on any socket */ -static int APP_CC +static int xrdp_wm_login_mode_changed(struct xrdp_wm *self) { if (self == 0) @@ -1854,7 +1854,7 @@ xrdp_wm_login_mode_changed(struct xrdp_wm *self) /*****************************************************************************/ /* this is the log windows notify function */ -static int DEFAULT_CC +static int xrdp_wm_log_wnd_notify(struct xrdp_bitmap *wnd, struct xrdp_bitmap *sender, int msg, long param1, long param2) @@ -1937,7 +1937,7 @@ add_string_to_logwindow(const char *msg, struct list *log) } /*****************************************************************************/ -int APP_CC +int xrdp_wm_show_log(struct xrdp_wm *self) { struct xrdp_bitmap *but; @@ -2026,7 +2026,7 @@ xrdp_wm_show_log(struct xrdp_wm *self) } /*****************************************************************************/ -int APP_CC +int xrdp_wm_log_msg(struct xrdp_wm *self, enum logLevels loglevel, const char *fmt, ...) { @@ -2043,7 +2043,7 @@ xrdp_wm_log_msg(struct xrdp_wm *self, enum logLevels loglevel, } /*****************************************************************************/ -int APP_CC +int xrdp_wm_get_wait_objs(struct xrdp_wm *self, tbus *robjs, int *rc, tbus *wobjs, int *wc, int *timeout) { @@ -2061,7 +2061,7 @@ xrdp_wm_get_wait_objs(struct xrdp_wm *self, tbus *robjs, int *rc, } /******************************************************************************/ -int APP_CC +int xrdp_wm_check_wait_objs(struct xrdp_wm *self) { int rv; @@ -2088,7 +2088,7 @@ xrdp_wm_check_wait_objs(struct xrdp_wm *self) } /*****************************************************************************/ -int APP_CC +int xrdp_wm_set_login_mode(struct xrdp_wm *self, int login_mode) { self->login_mode = login_mode; diff --git a/xrdp/xrdpwin.c b/xrdp/xrdpwin.c index 676f3c84..ea93e54a 100644 --- a/xrdp/xrdpwin.c +++ b/xrdp/xrdpwin.c @@ -46,7 +46,7 @@ static long g_sync_param2 = 0; static long (*g_sync_func)(long param1, long param2); /*****************************************************************************/ -long APP_CC +long g_xrdp_sync(long (*sync_func)(long param1, long param2), long sync_param1, long sync_param2) { @@ -86,7 +86,7 @@ g_xrdp_sync(long (*sync_func)(long param1, long param2), long sync_param1, } /*****************************************************************************/ -void DEFAULT_CC +void xrdp_shutdown(int sig) { tbus threadid; @@ -102,14 +102,14 @@ xrdp_shutdown(int sig) } /*****************************************************************************/ -int APP_CC +int g_is_term(void) { return g_is_wait_obj_set(g_term_event); } /*****************************************************************************/ -void APP_CC +void g_set_term(int in_val) { if (in_val) @@ -123,21 +123,21 @@ g_set_term(int in_val) } /*****************************************************************************/ -tbus APP_CC +tbus g_get_term_event(void) { return g_term_event; } /*****************************************************************************/ -tbus APP_CC +tbus g_get_sync_event(void) { return g_sync_event; } /*****************************************************************************/ -void DEFAULT_CC +void pipe_sig(int sig_num) { /* do nothing */ @@ -145,7 +145,7 @@ pipe_sig(int sig_num) } /*****************************************************************************/ -void APP_CC +void g_process_waiting_function(void) { tc_mutex_lock(g_sync_mutex); @@ -204,7 +204,7 @@ MyHandler(DWORD fdwControl) } /*****************************************************************************/ -static void DEFAULT_CC +static void log_event(HANDLE han, char *msg) { ReportEvent(han, EVENTLOG_INFORMATION_TYPE, 0, 0, 0, 1, 0, &msg, 0); @@ -278,7 +278,7 @@ MyServiceMain(DWORD dwArgc, LPTSTR *lpszArgv) #endif /*****************************************************************************/ -int DEFAULT_CC +int main(int argc, char **argv) { int test; @@ -32,11 +32,11 @@ #define LLOGLN(_level, _args) \ do { if (_level < LOG_LEVEL) { g_writeln _args ; } } while (0) -static int APP_CC +static int lib_mod_process_message(struct mod *mod, struct stream *s); /******************************************************************************/ -static int APP_CC +static int lib_send_copy(struct mod *mod, struct stream *s) { return trans_write_copy_s(mod->trans, s); @@ -44,7 +44,7 @@ lib_send_copy(struct mod *mod, struct stream *s) /******************************************************************************/ /* return error */ -int DEFAULT_CC +int lib_mod_start(struct mod *mod, int w, int h, int bpp) { LIB_DEBUG(mod, "in lib_mod_start"); @@ -56,7 +56,7 @@ lib_mod_start(struct mod *mod, int w, int h, int bpp) } /******************************************************************************/ -static int APP_CC +static int lib_mod_log_peer(struct mod *mod) { int my_pid; @@ -83,7 +83,7 @@ lib_mod_log_peer(struct mod *mod) } /******************************************************************************/ -static int APP_CC +static int lib_data_in(struct trans *trans) { struct mod *self; @@ -140,7 +140,7 @@ lib_data_in(struct trans *trans) /******************************************************************************/ /* return error */ -int DEFAULT_CC +int lib_mod_connect(struct mod *mod) { int error; @@ -329,7 +329,7 @@ lib_mod_connect(struct mod *mod) /******************************************************************************/ /* return error */ -int DEFAULT_CC +int lib_mod_event(struct mod *mod, int msg, tbus param1, tbus param2, tbus param3, tbus param4) { @@ -400,7 +400,7 @@ lib_mod_event(struct mod *mod, int msg, tbus param1, tbus param2, /******************************************************************************/ /* return error */ -static int APP_CC +static int process_server_fill_rect(struct mod *mod, struct stream *s) { int rv; @@ -419,7 +419,7 @@ process_server_fill_rect(struct mod *mod, struct stream *s) /******************************************************************************/ /* return error */ -static int APP_CC +static int process_server_screen_blt(struct mod *mod, struct stream *s) { int rv; @@ -442,7 +442,7 @@ process_server_screen_blt(struct mod *mod, struct stream *s) /******************************************************************************/ /* return error */ -static int APP_CC +static int process_server_paint_rect(struct mod *mod, struct stream *s) { int rv; @@ -475,7 +475,7 @@ process_server_paint_rect(struct mod *mod, struct stream *s) /******************************************************************************/ /* return error */ -static int APP_CC +static int process_server_set_clip(struct mod *mod, struct stream *s) { int rv; @@ -494,7 +494,7 @@ process_server_set_clip(struct mod *mod, struct stream *s) /******************************************************************************/ /* return error */ -static int APP_CC +static int process_server_reset_clip(struct mod *mod, struct stream *s) { int rv; @@ -505,7 +505,7 @@ process_server_reset_clip(struct mod *mod, struct stream *s) /******************************************************************************/ /* return error */ -static int APP_CC +static int process_server_set_fgcolor(struct mod *mod, struct stream *s) { int rv; @@ -518,7 +518,7 @@ process_server_set_fgcolor(struct mod *mod, struct stream *s) /******************************************************************************/ /* return error */ -static int APP_CC +static int process_server_set_bgcolor(struct mod *mod, struct stream *s) { int rv; @@ -531,7 +531,7 @@ process_server_set_bgcolor(struct mod *mod, struct stream *s) /******************************************************************************/ /* return error */ -static int APP_CC +static int process_server_set_opcode(struct mod *mod, struct stream *s) { int rv; @@ -544,7 +544,7 @@ process_server_set_opcode(struct mod *mod, struct stream *s) /******************************************************************************/ /* return error */ -static int APP_CC +static int process_server_set_pen(struct mod *mod, struct stream *s) { int rv; @@ -559,7 +559,7 @@ process_server_set_pen(struct mod *mod, struct stream *s) /******************************************************************************/ /* return error */ -static int APP_CC +static int process_server_draw_line(struct mod *mod, struct stream *s) { int rv; @@ -578,7 +578,7 @@ process_server_draw_line(struct mod *mod, struct stream *s) /******************************************************************************/ /* return error */ -static int APP_CC +static int process_server_set_cursor(struct mod *mod, struct stream *s) { int rv; @@ -597,7 +597,7 @@ process_server_set_cursor(struct mod *mod, struct stream *s) /******************************************************************************/ /* return error */ -static int APP_CC +static int process_server_create_os_surface(struct mod *mod, struct stream *s) { int rv; @@ -614,7 +614,7 @@ process_server_create_os_surface(struct mod *mod, struct stream *s) /******************************************************************************/ /* return error */ -static int APP_CC +static int process_server_switch_os_surface(struct mod *mod, struct stream *s) { int rv; @@ -627,7 +627,7 @@ process_server_switch_os_surface(struct mod *mod, struct stream *s) /******************************************************************************/ /* return error */ -static int APP_CC +static int process_server_delete_os_surface(struct mod *mod, struct stream *s) { int rv; @@ -640,7 +640,7 @@ process_server_delete_os_surface(struct mod *mod, struct stream *s) /******************************************************************************/ /* return error */ -static int APP_CC +static int process_server_paint_rect_os(struct mod *mod, struct stream *s) { int rv; @@ -666,7 +666,7 @@ process_server_paint_rect_os(struct mod *mod, struct stream *s) /******************************************************************************/ /* return error */ -static int APP_CC +static int process_server_set_hints(struct mod *mod, struct stream *s) { int rv; @@ -681,7 +681,7 @@ process_server_set_hints(struct mod *mod, struct stream *s) /******************************************************************************/ /* return error */ -static int APP_CC +static int process_server_window_new_update(struct mod *mod, struct stream *s) { int flags; @@ -764,7 +764,7 @@ process_server_window_new_update(struct mod *mod, struct stream *s) /******************************************************************************/ /* return error */ -static int APP_CC +static int process_server_window_delete(struct mod *mod, struct stream *s) { int window_id; @@ -778,7 +778,7 @@ process_server_window_delete(struct mod *mod, struct stream *s) /******************************************************************************/ /* return error */ -static int APP_CC +static int process_server_window_show(struct mod* mod, struct stream* s) { int window_id; @@ -797,7 +797,7 @@ process_server_window_show(struct mod* mod, struct stream* s) /******************************************************************************/ /* return error */ -static int APP_CC +static int process_server_add_char(struct mod *mod, struct stream *s) { int rv; @@ -825,7 +825,7 @@ process_server_add_char(struct mod *mod, struct stream *s) /******************************************************************************/ /* return error */ -static int APP_CC +static int process_server_add_char_alpha(struct mod *mod, struct stream *s) { int rv; @@ -853,7 +853,7 @@ process_server_add_char_alpha(struct mod *mod, struct stream *s) /******************************************************************************/ /* return error */ -static int APP_CC +static int process_server_draw_text(struct mod *mod, struct stream *s) { int rv; @@ -896,7 +896,7 @@ process_server_draw_text(struct mod *mod, struct stream *s) /******************************************************************************/ /* return error */ -static int APP_CC +static int process_server_create_os_surface_bpp(struct mod *mod, struct stream *s) { int rv; @@ -916,7 +916,7 @@ process_server_create_os_surface_bpp(struct mod *mod, struct stream *s) /******************************************************************************/ /* return error */ -static int APP_CC +static int process_server_paint_rect_bpp(struct mod *mod, struct stream *s) { int rv; @@ -951,7 +951,7 @@ process_server_paint_rect_bpp(struct mod *mod, struct stream *s) /******************************************************************************/ /* return error */ -static int APP_CC +static int process_server_composite(struct mod *mod, struct stream *s) { int rv; @@ -1006,7 +1006,7 @@ process_server_composite(struct mod *mod, struct stream *s) /******************************************************************************/ /* return error */ -static int APP_CC +static int process_server_set_pointer_ex(struct mod *mod, struct stream *s) { int rv; @@ -1029,7 +1029,7 @@ process_server_set_pointer_ex(struct mod *mod, struct stream *s) /******************************************************************************/ /* return error */ -static int APP_CC +static int send_paint_rect_ack(struct mod *mod, int flags, int x, int y, int cx, int cy, int frame_id) { @@ -1057,7 +1057,7 @@ send_paint_rect_ack(struct mod *mod, int flags, int x, int y, int cx, int cy, /******************************************************************************/ /* return error */ -static int APP_CC +static int process_server_paint_rect_shmem(struct mod *amod, struct stream *s) { int rv; @@ -1122,7 +1122,7 @@ process_server_paint_rect_shmem(struct mod *amod, struct stream *s) /******************************************************************************/ /* return error */ -static int APP_CC +static int send_paint_rect_ex_ack(struct mod *mod, int flags, int frame_id) { int len; @@ -1145,7 +1145,7 @@ send_paint_rect_ex_ack(struct mod *mod, int flags, int frame_id) /******************************************************************************/ /* return error */ -static int APP_CC +static int process_server_paint_rect_shmem_ex(struct mod *amod, struct stream *s) { int num_drects; @@ -1246,7 +1246,7 @@ process_server_paint_rect_shmem_ex(struct mod *amod, struct stream *s) /******************************************************************************/ /* return error */ -static int APP_CC +static int lib_mod_process_orders(struct mod *mod, int type, struct stream *s) { int rv; @@ -1355,7 +1355,7 @@ lib_mod_process_orders(struct mod *mod, int type, struct stream *s) /******************************************************************************/ /* return error */ -static int APP_CC +static int lib_send_client_info(struct mod *mod) { struct stream *s; @@ -1379,7 +1379,7 @@ lib_send_client_info(struct mod *mod) /******************************************************************************/ /* return error */ -static int APP_CC +static int lib_mod_process_message(struct mod *mod, struct stream *s) { int num_orders; @@ -1461,7 +1461,7 @@ lib_mod_process_message(struct mod *mod, struct stream *s) /******************************************************************************/ /* return error */ -int DEFAULT_CC +int lib_mod_signal(struct mod *mod) { g_writeln("lib_mod_signal: not used"); @@ -1470,7 +1470,7 @@ lib_mod_signal(struct mod *mod) /******************************************************************************/ /* return error */ -int DEFAULT_CC +int lib_mod_end(struct mod *mod) { if (mod->screen_shmem_pixels != 0) @@ -1483,7 +1483,7 @@ lib_mod_end(struct mod *mod) /******************************************************************************/ /* return error */ -int DEFAULT_CC +int lib_mod_set_param(struct mod *mod, const char *name, const char *value) { if (g_strcasecmp(name, "username") == 0) @@ -1512,7 +1512,7 @@ lib_mod_set_param(struct mod *mod, const char *name, const char *value) /******************************************************************************/ /* return error */ -int DEFAULT_CC +int lib_mod_get_wait_objs(struct mod *mod, tbus *read_objs, int *rcount, tbus *write_objs, int *wcount, int *timeout) { @@ -1529,7 +1529,7 @@ lib_mod_get_wait_objs(struct mod *mod, tbus *read_objs, int *rcount, /******************************************************************************/ /* return error */ -int DEFAULT_CC +int lib_mod_check_wait_objs(struct mod *mod) { int rv; @@ -1548,7 +1548,7 @@ lib_mod_check_wait_objs(struct mod *mod) /******************************************************************************/ /* return error */ -int DEFAULT_CC +int lib_mod_frame_ack(struct mod *amod, int flags, int frame_id) { LLOGLN(10, ("lib_mod_frame_ack: flags 0x%8.8x frame_id %d", flags, frame_id)); |