diff options
author | Marc-André Moreau <marcandre.moreau@gmail.com> | 2012-12-20 08:04:39 -0800 |
---|---|---|
committer | Marc-André Moreau <marcandre.moreau@gmail.com> | 2012-12-20 08:04:39 -0800 |
commit | 6e7f9caea361eb50b844f8cc911adae0aff269a0 (patch) | |
tree | 33b5b38a5f1ae821fe5df0013933dd02e0f0e933 | |
parent | d1fc67102a273a8e0b170d0c613cf0d611cfa7f8 (diff) | |
parent | a52dbba1a5e988f63bc72c76fc232be5efd73df2 (diff) | |
download | xrdp-proprietary-6e7f9caea361eb50b844f8cc911adae0aff269a0.tar.gz xrdp-proprietary-6e7f9caea361eb50b844f8cc911adae0aff269a0.zip |
Merge pull request #44 from Osirium/pull/add-strchr
Add g_strchr to os_calls
-rw-r--r-- | common/os_calls.c | 13 | ||||
-rw-r--r-- | common/os_calls.h | 2 |
2 files changed, 15 insertions, 0 deletions
diff --git a/common/os_calls.c b/common/os_calls.c index c8044cba..07f378e5 100644 --- a/common/os_calls.c +++ b/common/os_calls.c @@ -1751,6 +1751,19 @@ g_strlen(const char *text) } /*****************************************************************************/ +/* locates char in text */ +char* APP_CC +g_strchr(const char* text, int c) +{ + if (text == NULL) + { + return 0; + } + + return strchr(text,c); +} + +/*****************************************************************************/ /* returns dest */ char *APP_CC g_strcpy(char *dest, const char *src) diff --git a/common/os_calls.h b/common/os_calls.h index 7ecc4699..d4b86365 100644 --- a/common/os_calls.h +++ b/common/os_calls.h @@ -172,6 +172,8 @@ g_file_get_size(const char* filename); int APP_CC g_strlen(const char* text); 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); |