|
@@ -57,33 +57,6 @@ static inline int tr_strz_to_int(char *_bp)
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
-static inline char* tr_trim(char* _s)
|
|
|
|
-{
|
|
|
|
- int len;
|
|
|
|
- char* end;
|
|
|
|
-
|
|
|
|
- /* Null pointer, there is nothing to do */
|
|
|
|
- if (!_s) return _s;
|
|
|
|
-
|
|
|
|
- /* Remove spaces and tabs from the beginning of string */
|
|
|
|
- while ((*_s == ' ') || (*_s == '\t')) _s++;
|
|
|
|
-
|
|
|
|
- len = strlen(_s);
|
|
|
|
-
|
|
|
|
- end = _s + len - 1;
|
|
|
|
-
|
|
|
|
- /* Remove trailing spaces and tabs */
|
|
|
|
- while ((*end == ' ') || (*end == '\t')) end--;
|
|
|
|
- if (end != (_s + len - 1)) {
|
|
|
|
- *(end+1) = '\0';
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- return _s;
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
/**
|
|
/**
|
|
* ===== imported from "ac_tm.c"
|
|
* ===== imported from "ac_tm.c"
|
|
*/
|
|
*/
|