diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-10-05 06:46:11 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-10-05 06:46:11 +0000 |
commit | 89e09dcdf85d029417888df4f5ad88979f9bfb97 (patch) | |
tree | 1f9acecb29a22d0f2906c87338b105289ddef857 /utils.c | |
parent | 5d45bd2ea597a9e6d27f7f0af79ceb98cf765bc6 (diff) |
Major changes to res_config to support centralized config, eliminate configuration of res_config_odbc, update config examples, integrate with iax2, remove mysql friends from iax2, put on flame retardant vest...
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@3914 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'utils.c')
-rwxr-xr-x | utils.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -28,6 +28,19 @@ static char base64[64]; static char b2a[256]; +char *ast_strip(char *buf) +{ + char *start; + /* Strip off trailing whitespace, returns, etc */ + while (!ast_strlen_zero(buf) && (buf[strlen(buf)-1]<33)) + buf[strlen(buf)-1] = '\0'; + start = buf; + /* Strip off leading whitespace, returns, etc */ + while (*start && (*start < 33)) + *start++ = '\0'; + return start; +} + #if defined(__FreeBSD__) || defined(__OpenBSD__) || defined( __NetBSD__ ) || defined(__APPLE__) /* duh? ERANGE value copied from web... */ |