Changeset 3210 for pjproject/branches/projects/cli/pjlib/src/pj/string.c
- Timestamp:
- Jun 18, 2010 3:37:28 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/projects/cli/pjlib/src/pj/string.c
r3207 r3210 70 70 PJ_DEF(pj_str_t*) pj_strltrim( pj_str_t *str ) 71 71 { 72 char *end = str->ptr + str->slen;73 72 register char *p = str->ptr; 74 while (p < end && pj_isspace(*p))73 while (pj_isspace(*p)) 75 74 ++p; 76 75 str->slen -= (p - str->ptr); … … 110 109 } 111 110 111 PJ_DEF(long) pj_strtol(const pj_str_t *str) 112 { 113 PJ_CHECK_STACK(); 114 115 if (str->slen > 0 && (str->ptr[0] == '+' || str->ptr[0] == '-')) { 116 pj_str_t s; 117 118 s.ptr = str->ptr + 1; 119 s.slen = str->slen - 1; 120 return (str->ptr[0] == '-'? -(long)pj_strtoul(&s) : pj_strtoul(&s)); 121 } else 122 return pj_strtoul(str); 123 } 112 124 113 125 PJ_DEF(unsigned long) pj_strtoul(const pj_str_t *str)
Note: See TracChangeset
for help on using the changeset viewer.