X-Git-Url: https://git.cryptolib.org/?a=blobdiff_plain;f=test_src%2Fstring-extras-asm.S;h=92467919bd41c471684d3970653e0407f62dfc5e;hb=22985930c9c2c610ae18e2d8df0f3ea78a082134;hp=c40e442b6c1d56ef2027b13e0158718286cfb09e;hpb=52ec168ece9d61bd9cb652235dfe8faee6232a11;p=avr-crypto-lib.git diff --git a/test_src/string-extras-asm.S b/test_src/string-extras-asm.S index c40e442..9246791 100644 --- a/test_src/string-extras-asm.S +++ b/test_src/string-extras-asm.S @@ -21,7 +21,7 @@ /******************************************************************************/ /* - uint16_t stridentcnt_P(char* a, PGM_P b){ + uint16_t stridentcnt_P(char *a, PGM_P b){ uint16_t i=0; char c; for(;;){ @@ -46,16 +46,16 @@ stridentcnt_P: ld r22, X+ lpm r23, Z+ cpse r22, r23 - ret - cpse r22, r1 - ret +2: ret + tst r22 + breq 2b adiw r24, 1 rjmp 1b /******************************************************************************/ /* - uint16_t firstword_length(char* s){ + uint16_t firstword_length(char *s){ uint16_t ret=0; while(isgraph(*s++)) ret++; @@ -91,10 +91,10 @@ firstword_length: /******************************************************************************/ /* - char* strstrip(char* str){ + char *strstrip(char *str){ if(!str) return str; - char* endptr; + char *endptr; while(*str && (*str==' ' || *str=='\t')) ++str; endptr=str;