summaryrefslogtreecommitdiff
path: root/utils.c
diff options
context:
space:
mode:
authorMark Spencer <markster@digium.com>2004-10-05 06:46:11 +0000
committerMark Spencer <markster@digium.com>2004-10-05 06:46:11 +0000
commitebb18daf223b7c8bcf226d17b87bfa0cc9b3c112 (patch)
tree1f9acecb29a22d0f2906c87338b105289ddef857 /utils.c
parent1a2ba48fa1161c5b8bd6ddf7da1d333a98e8f6bb (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: https://origsvn.digium.com/svn/asterisk/trunk@3914 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'utils.c')
-rwxr-xr-xutils.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/utils.c b/utils.c
index 2557c3180..a454ea4bf 100755
--- a/utils.c
+++ b/utils.c
@@ -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... */