- Timestamp:
- 07/09/2017 05:04:43 PM (7 years ago)
- Branches:
- master
- Children:
- 9519422
- Parents:
- bc11fc1
- Location:
- libsm
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
libsm/strcat.c
rbc11fc1 r7848656 11 11 int8_t *strcat(int8_t *s1, int8_t *s2) 12 12 { 13 13 register int8_t *os1; 14 14 15 15 os1 = s1; 16 16 17 18 17 while(*s1++) 18 ; 19 19 20 20 --s1; 21 21 22 23 22 while(*s1++ = *s2++) 23 ; 24 24 25 25 return(os1); 26 26 } -
libsm/strccpy.c
rbc11fc1 r7848656 18 18 int8_t *strccpy(int8_t *s1, int8_t *s2, int8_t c) 19 19 { 20 20 register int8_t *os1; 21 21 register int8_t x; 22 22 23 23 os1 = s1; 24 24 25 25 while(c != (x = *s1++)) 26 26 *s2++ = x; 27 27 28 28 return(os1); 29 29 } -
libsm/strcspn.c
rbc11fc1 r7848656 11 11 int16_t strcspn(int8_t *string, int8_t *charset) 12 12 { 13 13 register int8_t *p, *q; 14 14 register int16_t n = 0; 15 15 16 16 for(q = string; *q != '\0'; ++q , ++n) { 17 17 18 19 18 for(p = charset; *p != '\0' && *p != *q; ++p) 19 ; 20 20 21 22 23 21 if(*p != '\0') 22 break; 23 } 24 24 25 25 return(n); 26 26 } -
libsm/strlen.c
rbc11fc1 r7848656 11 11 int16_t strlen(int8_t *s) 12 12 { 13 13 register int16_t n = 0; 14 14 15 16 15 while (*s++ != '\0') 16 ++n; 17 17 18 18 return (n); 19 19 } -
libsm/strtok.c
rbc11fc1 r7848656 23 23 /* first or subsequent call ? */ 24 24 25 25 p = (string == NULL) ? savept : string; 26 26 27 27 if (p == 0) /* return if no tokens remain */
Note:
See TracChangeset
for help on using the changeset viewer.