diff options
author | jsorg71 <jsorg71> | 2006-11-04 22:05:06 +0000 |
---|---|---|
committer | jsorg71 <jsorg71> | 2006-11-04 22:05:06 +0000 |
commit | 00d8b7106f8b25f313af03c7ef9949873071a6b8 (patch) | |
tree | 561d325577a27d1941114611c670a5c82f9582a6 /common/os_calls.h | |
parent | 02118ba0a17d7f3c784ff657e4b107185d3af53e (diff) | |
download | xrdp-proprietary-00d8b7106f8b25f313af03c7ef9949873071a6b8.tar.gz xrdp-proprietary-00d8b7106f8b25f313af03c7ef9949873071a6b8.zip |
commit patch 1589325, slightly modified - code cleanup
Diffstat (limited to 'common/os_calls.h')
-rw-r--r-- | common/os_calls.h | 79 |
1 files changed, 35 insertions, 44 deletions
diff --git a/common/os_calls.h b/common/os_calls.h index 26c7cb09..a833569a 100644 --- a/common/os_calls.h +++ b/common/os_calls.h @@ -30,13 +30,13 @@ g_malloc(int size, int zero); void g_free(void* ptr); void -g_printf(char *format, ...); +g_printf(const char *format, ...); void -g_sprintf(char* dest, char* format, ...); +g_sprintf(char* dest, const char* format, ...); void -g_writeln(char* format, ...); +g_writeln(const char* format, ...); void -g_write(char* format, ...); +g_write(const char* format, ...); void g_hexdump(char* p, int len); void @@ -54,7 +54,7 @@ g_tcp_local_socket(void); void g_tcp_close(int sck); int -g_tcp_connect(int sck, char* address, char* port); +g_tcp_connect(int sck, const char* address, const char* port); int g_tcp_force_send(int sck, char* data, int len); int @@ -72,7 +72,7 @@ g_tcp_accept(int sck); int g_tcp_recv(int sck, void* ptr, int len, int flags); 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 g_tcp_last_error_would_block(int sck); int @@ -84,9 +84,9 @@ g_random(char* data, int len); int g_abs(int i); int -g_memcmp(void* s1, void* s2, int len); +g_memcmp(const void* s1, const void* s2, int len); int -g_file_open(char* file_name); +g_file_open(const char* file_name); int g_file_close(int fd); int @@ -98,70 +98,61 @@ g_file_seek(int fd, int offset); int g_file_lock(int fd, int start, int len); int -g_set_file_rights(char* filename, int read, int write); +g_set_file_rights(const char* filename, int read, int write); int -g_chmod_hex(char* filename, int flags); +g_chmod_hex(const char* filename, int flags); int -g_mkdir(char* dirname); +g_mkdir(const char* dirname); char* g_get_current_dir(char* dirname, int maxlen); int g_set_current_dir(char* dirname); int -g_file_exist(char* filename); +g_file_exist(const char* filename); int -g_directory_exist(char* dirname); +g_directory_exist(const char* dirname); int -g_create_dir(char* dirname); +g_create_dir(const char* dirname); int -g_remove_dir(char* dirname); +g_remove_dir(const char* dirname); int -g_file_delete(char* filename); +g_file_delete(const char* filename); int -g_strlen(char* text); +g_strlen(const char* text); char* -g_strcpy(char* dest, char* src); +g_strcpy(char* dest, const char* src); char* -g_strncpy(char* dest, char* src, int len); +g_strncpy(char* dest, const char* src, int len); char* -g_strcat(char* dest, char* src); +g_strcat(char* dest, const char* src); char* -g_strdup(char* in); +g_strdup(const char* in); int -g_strcmp(char* c1, char* c2); +g_strcmp(const char* c1, const char* c2); int -g_strncmp(char* c1, char* c2, int len); +g_strncmp(const char* c1, const char* c2, int len); int -g_strcasecmp(char* c1, char* c2); +g_strcasecmp(const char* c1, const char* c2); int -g_strncasecmp(char* c1, char* c2, int len); +g_strncasecmp(const char* c1, const char* c2, int len); int g_atoi(char* str); int -g_pos(char* str, char* to_find); +g_pos(char* str, const char* to_find); long g_load_library(char* in); int g_free_library(long lib); void* -g_get_proc_address(long lib, char* name); +g_get_proc_address(long lib, const char* name); int g_system(char* aexec); char* g_get_strerror(void); int -g_execvp(char* p1, char* args[]); +g_execvp(const char* p1, char* args[]); int -g_execlp(int num_params, char* param1, ...); -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); +g_execlp3(const char* a1, const char* a2, const char* a3); void g_signal(int sig_num, void (*func)(int)); void @@ -183,9 +174,9 @@ g_waitpid(int pid); void g_clearenv(void); int -g_setenv(char* name, char* value, int rewrite); +g_setenv(const char* name, const char* value, int rewrite); char* -g_getenv(char* name); +g_getenv(const char* name); int g_exit(int exit_code); int @@ -193,12 +184,12 @@ g_getpid(void); int g_sigterm(int pid); int -g_getuser_info(char* username, int* gid, int* uid, char* shell, char* dir, - char* gecos); +g_getuser_info(const char* username, int* gid, int* uid, char* shell, + char* dir, char* gecos); int -g_getgroup_info(char* groupname, int* gid); +g_getgroup_info(const char* groupname, int* gid); 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 g_time1(void); |