commit patch 1589325, slightly modified - code cleanup

ulab-original
jsorg71 18 years ago
parent 02118ba0a1
commit 00d8b7106f

@ -180,7 +180,7 @@ file_split_name_value(char* text, char* name, char* value)
/*****************************************************************************/ /*****************************************************************************/
/* return error */ /* return error */
int APP_CC int APP_CC
file_read_section(int fd, char* section, struct list* names, file_read_section(int fd, const char* section, struct list* names,
struct list* values) struct list* values)
{ {
struct stream* s; struct stream* s;

@ -30,7 +30,7 @@
int APP_CC int APP_CC
file_read_sections(int fd, struct list* names); file_read_sections(int fd, struct list* names);
int APP_CC int APP_CC
file_read_section(int fd, char* section, struct list* names, file_read_section(int fd, const char* section, struct list* names,
struct list* values); struct list* values);
#endif #endif

@ -212,7 +212,7 @@ log_start(const char* progname, const char* logfile, const unsigned int loglvl,
} }
else else
{ {
l_cfg->log_file = g_strdup((char*) logfile); l_cfg->log_file = g_strdup(logfile);
} }
/* if progname is NULL, we use a default name */ /* if progname is NULL, we use a default name */
@ -222,7 +222,7 @@ log_start(const char* progname, const char* logfile, const unsigned int loglvl,
} }
else else
{ {
l_cfg->program_name = g_strdup((char*) progname); l_cfg->program_name = g_strdup(progname);
} }
/* setting log level */ /* setting log level */

@ -57,6 +57,9 @@
#include <stdarg.h> #include <stdarg.h>
#include <stdio.h> #include <stdio.h>
#include "os_calls.h"
#include "arch.h"
/* for clearenv() */ /* for clearenv() */
#if defined(_WIN32) #if defined(_WIN32)
#else #else
@ -102,7 +105,7 @@ g_free(void* ptr)
/* output text to stdout, try to use g_write / g_writeln instead to avoid /* output text to stdout, try to use g_write / g_writeln instead to avoid
linux / windows EOL problems */ linux / windows EOL problems */
void void
g_printf(char* format, ...) g_printf(const char* format, ...)
{ {
va_list ap; va_list ap;
@ -113,7 +116,7 @@ g_printf(char* format, ...)
/*****************************************************************************/ /*****************************************************************************/
void void
g_sprintf(char* dest, char* format, ...) g_sprintf(char* dest, const char* format, ...)
{ {
va_list ap; va_list ap;
@ -124,7 +127,7 @@ g_sprintf(char* dest, char* format, ...)
/*****************************************************************************/ /*****************************************************************************/
void void
g_snprintf(char* dest, int len, char* format, ...) g_snprintf(char* dest, int len, const char* format, ...)
{ {
va_list ap; va_list ap;
@ -135,7 +138,7 @@ g_snprintf(char* dest, int len, char* format, ...)
/*****************************************************************************/ /*****************************************************************************/
void void
g_writeln(char* format, ...) g_writeln(const char* format, ...)
{ {
va_list ap; va_list ap;
@ -151,7 +154,7 @@ g_writeln(char* format, ...)
/*****************************************************************************/ /*****************************************************************************/
void void
g_write(char* format, ...) g_write(const char* format, ...)
{ {
va_list ap; va_list ap;
@ -289,7 +292,7 @@ g_tcp_close(int sck)
/*****************************************************************************/ /*****************************************************************************/
int int
g_tcp_connect(int sck, char* address, char* port) g_tcp_connect(int sck, const char* address, const char* port)
{ {
struct sockaddr_in s; struct sockaddr_in s;
struct hostent* h; struct hostent* h;
@ -422,10 +425,10 @@ g_tcp_recv(int sck, void* ptr, int len, int flags)
/*****************************************************************************/ /*****************************************************************************/
int int
g_tcp_send(int sck, void* ptr, int len, int flags) g_tcp_send(int sck, const void* ptr, int len, int flags)
{ {
#if defined(_WIN32) #if defined(_WIN32)
return send(sck, (char*)ptr, len, flags); return send(sck, (const char*)ptr, len, flags);
#else #else
return send(sck, ptr, len, flags); return send(sck, ptr, len, flags);
#endif #endif
@ -508,7 +511,7 @@ g_abs(int i)
/*****************************************************************************/ /*****************************************************************************/
int int
g_memcmp(void* s1, void* s2, int len) g_memcmp(const void* s1, const void* s2, int len)
{ {
return memcmp(s1, s2, len); return memcmp(s1, s2, len);
} }
@ -516,7 +519,7 @@ g_memcmp(void* s1, void* s2, int len)
/*****************************************************************************/ /*****************************************************************************/
/* returns -1 on error, else return handle or file descriptor */ /* returns -1 on error, else return handle or file descriptor */
int int
g_file_open(char* file_name) g_file_open(const char* file_name)
{ {
#if defined(_WIN32) #if defined(_WIN32)
return (int)CreateFile(file_name, GENERIC_READ | GENERIC_WRITE, return (int)CreateFile(file_name, GENERIC_READ | GENERIC_WRITE,
@ -634,7 +637,7 @@ g_file_lock(int fd, int start, int len)
/*****************************************************************************/ /*****************************************************************************/
/* returns error, always zero */ /* returns error, always zero */
int int
g_set_file_rights(char* filename, int read, int write) g_set_file_rights(const char* filename, int read, int write)
{ {
#if defined(_WIN32) #if defined(_WIN32)
return 0; return 0;
@ -651,7 +654,7 @@ g_set_file_rights(char* filename, int read, int write)
/*****************************************************************************/ /*****************************************************************************/
/* returns error */ /* returns error */
int int
g_chmod_hex(char* filename, int flags) g_chmod_hex(const char* filename, int flags)
{ {
#if defined(_WIN32) #if defined(_WIN32)
return 0; return 0;
@ -678,7 +681,7 @@ g_chmod_hex(char* filename, int flags)
/*****************************************************************************/ /*****************************************************************************/
/* returns error, always zero */ /* returns error, always zero */
int int
g_mkdir(char* dirname) g_mkdir(const char* dirname)
{ {
#if defined(_WIN32) #if defined(_WIN32)
return 0; return 0;
@ -726,7 +729,7 @@ g_set_current_dir(char* dirname)
/*****************************************************************************/ /*****************************************************************************/
/* returns boolean, non zero if the file exists */ /* returns boolean, non zero if the file exists */
int int
g_file_exist(char* filename) g_file_exist(const char* filename)
{ {
#if defined(_WIN32) #if defined(_WIN32)
return 0; // use FileAge(filename) <> -1 return 0; // use FileAge(filename) <> -1
@ -738,7 +741,7 @@ g_file_exist(char* filename)
/*****************************************************************************/ /*****************************************************************************/
/* returns boolean, non zero if the directory exists */ /* returns boolean, non zero if the directory exists */
int int
g_directory_exist(char* dirname) g_directory_exist(const char* dirname)
{ {
#if defined(_WIN32) #if defined(_WIN32)
return 0; // use GetFileAttributes and check return value return 0; // use GetFileAttributes and check return value
@ -760,7 +763,7 @@ g_directory_exist(char* dirname)
/*****************************************************************************/ /*****************************************************************************/
/* returns boolean */ /* returns boolean */
int int
g_create_dir(char* dirname) g_create_dir(const char* dirname)
{ {
#if defined(_WIN32) #if defined(_WIN32)
return CreateDirectory(dirname, 0); // test this return CreateDirectory(dirname, 0); // test this
@ -772,7 +775,7 @@ g_create_dir(char* dirname)
/*****************************************************************************/ /*****************************************************************************/
/* returns boolean */ /* returns boolean */
int int
g_remove_dir(char* dirname) g_remove_dir(const char* dirname)
{ {
#if defined(_WIN32) #if defined(_WIN32)
return RemoveDirectory(dirname); // test this return RemoveDirectory(dirname); // test this
@ -784,7 +787,7 @@ g_remove_dir(char* dirname)
/*****************************************************************************/ /*****************************************************************************/
/* returns non zero if the file was deleted */ /* returns non zero if the file was deleted */
int int
g_file_delete(char* filename) g_file_delete(const char* filename)
{ {
#if defined(_WIN32) #if defined(_WIN32)
return DeleteFile(filename); return DeleteFile(filename);
@ -796,7 +799,7 @@ g_file_delete(char* filename)
/*****************************************************************************/ /*****************************************************************************/
/* returns length of text */ /* returns length of text */
int int
g_strlen(char* text) g_strlen(const char* text)
{ {
if (text == 0) if (text == 0)
{ {
@ -808,7 +811,7 @@ g_strlen(char* text)
/*****************************************************************************/ /*****************************************************************************/
/* returns dest */ /* returns dest */
char* char*
g_strcpy(char* dest, char* src) g_strcpy(char* dest, const char* src)
{ {
if (src == 0 && dest != 0) if (src == 0 && dest != 0)
{ {
@ -825,7 +828,7 @@ g_strcpy(char* dest, char* src)
/*****************************************************************************/ /*****************************************************************************/
/* returns dest */ /* returns dest */
char* char*
g_strncpy(char* dest, char* src, int len) g_strncpy(char* dest, const char* src, int len)
{ {
char* rv; char* rv;
@ -846,7 +849,7 @@ g_strncpy(char* dest, char* src, int len)
/*****************************************************************************/ /*****************************************************************************/
/* returns dest */ /* returns dest */
char* char*
g_strcat(char* dest, char* src) g_strcat(char* dest, const char* src)
{ {
if (dest == 0 || src == 0) if (dest == 0 || src == 0)
{ {
@ -858,7 +861,7 @@ g_strcat(char* dest, char* src)
/*****************************************************************************/ /*****************************************************************************/
/* if in = 0, return 0 else return newly alloced copy of in */ /* if in = 0, return 0 else return newly alloced copy of in */
char* char*
g_strdup(char* in) g_strdup(const char* in)
{ {
int len; int len;
char* p; char* p;
@ -875,21 +878,21 @@ g_strdup(char* in)
/*****************************************************************************/ /*****************************************************************************/
int int
g_strcmp(char* c1, char* c2) g_strcmp(const char* c1, const char* c2)
{ {
return strcmp(c1, c2); return strcmp(c1, c2);
} }
/*****************************************************************************/ /*****************************************************************************/
int int
g_strncmp(char* c1, char* c2, int len) g_strncmp(const char* c1, const char* c2, int len)
{ {
return strncmp(c1, c2, len); return strncmp(c1, c2, len);
} }
/*****************************************************************************/ /*****************************************************************************/
int int
g_strcasecmp(char* c1, char* c2) g_strcasecmp(const char* c1, const char* c2)
{ {
#if defined(_WIN32) #if defined(_WIN32)
return stricmp(c1, c2); return stricmp(c1, c2);
@ -900,7 +903,7 @@ g_strcasecmp(char* c1, char* c2)
/*****************************************************************************/ /*****************************************************************************/
int int
g_strncasecmp(char* c1, char* c2, int len) g_strncasecmp(const char* c1, const char* c2, int len)
{ {
#if defined(_WIN32) #if defined(_WIN32)
return strnicmp(c1, c2, len); return strnicmp(c1, c2, len);
@ -918,7 +921,7 @@ g_atoi(char* str)
/*****************************************************************************/ /*****************************************************************************/
int int
g_pos(char* str, char* to_find) g_pos(char* str, const char* to_find)
{ {
char* pp; char* pp;
@ -959,7 +962,7 @@ g_free_library(long lib)
/*****************************************************************************/ /*****************************************************************************/
/* returns NULL if not found */ /* returns NULL if not found */
void* void*
g_get_proc_address(long lib, char* name) g_get_proc_address(long lib, const char* name)
{ {
if (lib == 0) if (lib == 0)
{ {
@ -996,7 +999,7 @@ g_get_strerror(void)
/*****************************************************************************/ /*****************************************************************************/
int int
g_execvp(char* p1, char* args[]) g_execvp(const char* p1, char* args[])
{ {
#if defined(_WIN32) #if defined(_WIN32)
return 0; return 0;
@ -1005,41 +1008,9 @@ g_execvp(char* p1, char* args[])
#endif #endif
} }
/*****************************************************************************/
/* takes up to 30 parameters */
int
g_execlp(int num_params, char* param1, ...)
{
#if defined(_WIN32)
return 0;
#else
va_list ap;
char* p[32];
int index;
if (num_params > 30)
{
return 0;
}
memset(p, 0, sizeof(p));
p[0] = param1;
va_start(ap, param1);
for (index = 1; index < num_params; index++)
{
p[index] = va_arg(ap, char*);
}
va_end(ap);
return execlp(p[0], p[1], p[2], p[3], p[4], p[5], p[6], p[7],
p[8], p[9], p[10], p[11], p[12], p[13], p[14], p[15],
p[16], p[17], p[18], p[19], p[20], p[21], p[22], p[23],
p[24], p[25], p[26], p[27], p[28], p[29], p[30], p[31],
(void*)0);
#endif
}
/*****************************************************************************/ /*****************************************************************************/
int int
g_execlp3(char* a1, char* a2, char* a3) g_execlp3(const char* a1, const char* a2, const char* a3)
{ {
#if defined(_WIN32) #if defined(_WIN32)
return 0; return 0;
@ -1048,32 +1019,6 @@ g_execlp3(char* a1, char* a2, char* a3)
#endif #endif
} }
/*****************************************************************************/
int
g_execlp11(char* a1, char* a2, char* a3, char* a4, char* a5, char* a6,
char* a7, char* a8, char* a9, char* a10, char* a11)
{
#if defined(_WIN32)
return 0;
#else
return execlp(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, (void*)0);
#endif
}
/*****************************************************************************/
int
g_execlp13(char* a1, char* a2, char* a3, char* a4, char* a5, char* a6,
char* a7, char* a8, char* a9, char* a10, char* a11,
char* a12, char* a13)
{
#if defined(_WIN32)
return 0;
#else
return execlp(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11,
a12, a13, (void*)0);
#endif
}
/*****************************************************************************/ /*****************************************************************************/
void void
g_signal(int sig_num, void (*func)(int)) g_signal(int sig_num, void (*func)(int))
@ -1188,7 +1133,7 @@ g_clearenv(void)
/*****************************************************************************/ /*****************************************************************************/
int int
g_setenv(char* name, char* value, int rewrite) g_setenv(const char* name, const char* value, int rewrite)
{ {
#if defined(_WIN32) #if defined(_WIN32)
return 0; return 0;
@ -1199,7 +1144,7 @@ g_setenv(char* name, char* value, int rewrite)
/*****************************************************************************/ /*****************************************************************************/
char* char*
g_getenv(char* name) g_getenv(const char* name)
{ {
#if defined(_WIN32) #if defined(_WIN32)
return 0; return 0;
@ -1241,8 +1186,8 @@ g_sigterm(int pid)
/*****************************************************************************/ /*****************************************************************************/
/* returns 0 if ok */ /* returns 0 if ok */
int int
g_getuser_info(char* username, int* gid, int* uid, char* shell, char* dir, g_getuser_info(const char* username, int* gid, int* uid, char* shell,
char* gecos) char* dir, char* gecos)
{ {
#if defined(_WIN32) #if defined(_WIN32)
return 1; return 1;
@ -1281,7 +1226,7 @@ g_getuser_info(char* username, int* gid, int* uid, char* shell, char* dir,
/*****************************************************************************/ /*****************************************************************************/
/* returns 0 if ok */ /* returns 0 if ok */
int int
g_getgroup_info(char* groupname, int* gid) g_getgroup_info(const char* groupname, int* gid)
{ {
#if defined(_WIN32) #if defined(_WIN32)
return 1; return 1;
@ -1305,7 +1250,7 @@ g_getgroup_info(char* groupname, int* gid)
/* returns error */ /* returns error */
/* if zero is returned, then ok is set */ /* if zero is returned, then ok is set */
int int
g_check_user_in_group(char* username, int gid, int* ok) g_check_user_in_group(const char* username, int gid, int* ok)
{ {
#if defined(_WIN32) #if defined(_WIN32)
return 1; return 1;

@ -30,13 +30,13 @@ g_malloc(int size, int zero);
void void
g_free(void* ptr); g_free(void* ptr);
void void
g_printf(char *format, ...); g_printf(const char *format, ...);
void void
g_sprintf(char* dest, char* format, ...); g_sprintf(char* dest, const char* format, ...);
void void
g_writeln(char* format, ...); g_writeln(const char* format, ...);
void void
g_write(char* format, ...); g_write(const char* format, ...);
void void
g_hexdump(char* p, int len); g_hexdump(char* p, int len);
void void
@ -54,7 +54,7 @@ g_tcp_local_socket(void);
void void
g_tcp_close(int sck); g_tcp_close(int sck);
int int
g_tcp_connect(int sck, char* address, char* port); g_tcp_connect(int sck, const char* address, const char* port);
int int
g_tcp_force_send(int sck, char* data, int len); g_tcp_force_send(int sck, char* data, int len);
int int
@ -72,7 +72,7 @@ g_tcp_accept(int sck);
int int
g_tcp_recv(int sck, void* ptr, int len, int flags); g_tcp_recv(int sck, void* ptr, int len, int flags);
int int
g_tcp_send(int sck, void* ptr, int len, int flags); g_tcp_send(int sck, const void* ptr, int len, int flags);
int int
g_tcp_last_error_would_block(int sck); g_tcp_last_error_would_block(int sck);
int int
@ -84,9 +84,9 @@ g_random(char* data, int len);
int int
g_abs(int i); g_abs(int i);
int int
g_memcmp(void* s1, void* s2, int len); g_memcmp(const void* s1, const void* s2, int len);
int int
g_file_open(char* file_name); g_file_open(const char* file_name);
int int
g_file_close(int fd); g_file_close(int fd);
int int
@ -98,70 +98,61 @@ g_file_seek(int fd, int offset);
int int
g_file_lock(int fd, int start, int len); g_file_lock(int fd, int start, int len);
int int
g_set_file_rights(char* filename, int read, int write); g_set_file_rights(const char* filename, int read, int write);
int int
g_chmod_hex(char* filename, int flags); g_chmod_hex(const char* filename, int flags);
int int
g_mkdir(char* dirname); g_mkdir(const char* dirname);
char* char*
g_get_current_dir(char* dirname, int maxlen); g_get_current_dir(char* dirname, int maxlen);
int int
g_set_current_dir(char* dirname); g_set_current_dir(char* dirname);
int int
g_file_exist(char* filename); g_file_exist(const char* filename);
int int
g_directory_exist(char* dirname); g_directory_exist(const char* dirname);
int int
g_create_dir(char* dirname); g_create_dir(const char* dirname);
int int
g_remove_dir(char* dirname); g_remove_dir(const char* dirname);
int int
g_file_delete(char* filename); g_file_delete(const char* filename);
int int
g_strlen(char* text); g_strlen(const char* text);
char* char*
g_strcpy(char* dest, char* src); g_strcpy(char* dest, const char* src);
char* char*
g_strncpy(char* dest, char* src, int len); g_strncpy(char* dest, const char* src, int len);
char* char*
g_strcat(char* dest, char* src); g_strcat(char* dest, const char* src);
char* char*
g_strdup(char* in); g_strdup(const char* in);
int int
g_strcmp(char* c1, char* c2); g_strcmp(const char* c1, const char* c2);
int int
g_strncmp(char* c1, char* c2, int len); g_strncmp(const char* c1, const char* c2, int len);
int int
g_strcasecmp(char* c1, char* c2); g_strcasecmp(const char* c1, const char* c2);
int int
g_strncasecmp(char* c1, char* c2, int len); g_strncasecmp(const char* c1, const char* c2, int len);
int int
g_atoi(char* str); g_atoi(char* str);
int int
g_pos(char* str, char* to_find); g_pos(char* str, const char* to_find);
long long
g_load_library(char* in); g_load_library(char* in);
int int
g_free_library(long lib); g_free_library(long lib);
void* void*
g_get_proc_address(long lib, char* name); g_get_proc_address(long lib, const char* name);
int int
g_system(char* aexec); g_system(char* aexec);
char* char*
g_get_strerror(void); g_get_strerror(void);
int int
g_execvp(char* p1, char* args[]); g_execvp(const char* p1, char* args[]);
int int
g_execlp(int num_params, char* param1, ...); g_execlp3(const char* a1, const char* a2, const char* a3);
int
g_execlp3(char* a1, char* a2, char* a3);
int
g_execlp11(char* a1, char* a2, char* a3, char* a4, char* a5, char* a6,
char* a7, char* a8, char* a9, char* a10, char* a11);
int
g_execlp13(char* a1, char* a2, char* a3, char* a4, char* a5, char* a6,
char* a7, char* a8, char* a9, char* a10, char* a11,
char* a12, char* a13);
void void
g_signal(int sig_num, void (*func)(int)); g_signal(int sig_num, void (*func)(int));
void void
@ -183,9 +174,9 @@ g_waitpid(int pid);
void void
g_clearenv(void); g_clearenv(void);
int int
g_setenv(char* name, char* value, int rewrite); g_setenv(const char* name, const char* value, int rewrite);
char* char*
g_getenv(char* name); g_getenv(const char* name);
int int
g_exit(int exit_code); g_exit(int exit_code);
int int
@ -193,12 +184,12 @@ g_getpid(void);
int int
g_sigterm(int pid); g_sigterm(int pid);
int int
g_getuser_info(char* username, int* gid, int* uid, char* shell, char* dir, g_getuser_info(const char* username, int* gid, int* uid, char* shell,
char* gecos); char* dir, char* gecos);
int int
g_getgroup_info(char* groupname, int* gid); g_getgroup_info(const char* groupname, int* gid);
int int
g_check_user_in_group(char* username, int gid, int* ok); g_check_user_in_group(const char* username, int gid, int* ok);
int int
g_time1(void); g_time1(void);

@ -20,15 +20,16 @@
*/ */
#include "os_calls.h"
#include "arch.h"
#include <stdlib.h> /* needed for openssl headers */ #include <stdlib.h> /* needed for openssl headers */
#include <openssl/rc4.h> #include <openssl/rc4.h>
#include <openssl/md5.h> #include <openssl/md5.h>
#include <openssl/sha.h> #include <openssl/sha.h>
#include <openssl/bn.h> #include <openssl/bn.h>
#include "os_calls.h"
#include "arch.h"
#include "ssl_calls.h"
/* rc4 stuff */ /* rc4 stuff */
/*****************************************************************************/ /*****************************************************************************/

@ -21,6 +21,8 @@
#if !defined(SSL_CALLS_H) #if !defined(SSL_CALLS_H)
#define SSL_CALLS_H #define SSL_CALLS_H
#include "arch.h"
void* APP_CC void* APP_CC
ssl_rc4_info_create(void); ssl_rc4_info_create(void);
void APP_CC void APP_CC

@ -26,6 +26,7 @@
#include <pthread.h> #include <pthread.h>
#endif #endif
#include "arch.h" #include "arch.h"
#include "thread_calls.h"
/*****************************************************************************/ /*****************************************************************************/
/* returns error */ /* returns error */

@ -21,6 +21,8 @@
#if !defined(THREAD_CALLS_H) #if !defined(THREAD_CALLS_H)
#define THREAD_CALLS_H #define THREAD_CALLS_H
#include "arch.h"
int APP_CC int APP_CC
g_thread_create(THREAD_RV (THREAD_CC * start_routine)(void*), void* arg); g_thread_create(THREAD_RV (THREAD_CC * start_routine)(void*), void* arg);
long APP_CC long APP_CC

@ -197,7 +197,7 @@ remove_char_at(char* text, int index)
/*****************************************************************************/ /*****************************************************************************/
int APP_CC int APP_CC
set_string(char** in_str, char* in) set_string(char** in_str, const char* in)
{ {
if (in_str == 0) if (in_str == 0)
{ {

@ -169,7 +169,7 @@ xrdp_bitmap_set_focus(struct xrdp_bitmap* self, int focused);
int APP_CC int APP_CC
xrdp_bitmap_resize(struct xrdp_bitmap* self, int width, int height); xrdp_bitmap_resize(struct xrdp_bitmap* self, int width, int height);
int APP_CC int APP_CC
xrdp_bitmap_load(struct xrdp_bitmap* self, char* filename, int* palette); xrdp_bitmap_load(struct xrdp_bitmap* self, const char* filename, int* palette);
int APP_CC int APP_CC
xrdp_bitmap_get_pixel(struct xrdp_bitmap* self, int x, int y); xrdp_bitmap_get_pixel(struct xrdp_bitmap* self, int x, int y);
int APP_CC int APP_CC
@ -239,7 +239,7 @@ xrdp_painter_text_height(struct xrdp_painter* self, char* text);
int APP_CC int APP_CC
xrdp_painter_draw_text(struct xrdp_painter* self, xrdp_painter_draw_text(struct xrdp_painter* self,
struct xrdp_bitmap* bitmap, struct xrdp_bitmap* bitmap,
int x, int y, char* text); int x, int y, const char* text);
int APP_CC int APP_CC
xrdp_painter_draw_text2(struct xrdp_painter* self, xrdp_painter_draw_text2(struct xrdp_painter* self,
struct xrdp_bitmap* bitmap, struct xrdp_bitmap* bitmap,
@ -285,7 +285,7 @@ add_char_at(char* text, char ch, int index);
int APP_CC int APP_CC
remove_char_at(char* text, int index); remove_char_at(char* text, int index);
int APP_CC int APP_CC
set_string(char** in_str, char* in); set_string(char** in_str, const char* in);
/* in lang.c */ /* in lang.c */
char APP_CC char APP_CC

@ -330,7 +330,7 @@ xrdp_bitmap_resize(struct xrdp_bitmap* self, int width, int height)
/* return 0 ok */ /* return 0 ok */
/* return 1 error */ /* return 1 error */
int APP_CC int APP_CC
xrdp_bitmap_load(struct xrdp_bitmap* self, char* filename, int* palette) xrdp_bitmap_load(struct xrdp_bitmap* self, const char* filename, int* palette)
{ {
int fd; int fd;
int i; int i;

@ -326,7 +326,7 @@ xrdp_painter_fill_rect(struct xrdp_painter* self,
int APP_CC int APP_CC
xrdp_painter_draw_text(struct xrdp_painter* self, xrdp_painter_draw_text(struct xrdp_painter* self,
struct xrdp_bitmap* bitmap, struct xrdp_bitmap* bitmap,
int x, int y, char* text) int x, int y, const char* text)
{ {
int i; int i;
int f; int f;

Loading…
Cancel
Save