Changeset 4440 for pjproject/trunk/pjlib/src/pj/string.c
- Timestamp:
- Mar 14, 2013 7:18:13 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjlib/src/pj/string.c
r3553 r4440 110 110 } 111 111 112 PJ_DEF(long) pj_strtol(const pj_str_t *str) 113 { 114 PJ_CHECK_STACK(); 115 116 if (str->slen > 0 && (str->ptr[0] == '+' || str->ptr[0] == '-')) { 117 pj_str_t s; 118 119 s.ptr = str->ptr + 1; 120 s.slen = str->slen - 1; 121 return (str->ptr[0] == '-'? -(long)pj_strtoul(&s) : pj_strtoul(&s)); 122 } else 123 return pj_strtoul(str); 124 } 112 125 113 126 PJ_DEF(unsigned long) pj_strtoul(const pj_str_t *str)
Note: See TracChangeset
for help on using the changeset viewer.