/* string-extras-asm.S */
/*
This file is part of the AVR-Huffman.
- Copyright (C) 2009 Daniel Otte (daniel.otte@rub.de)
+ Copyright (C) 2006-2015 Daniel Otte (bg@nerilex.org)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/******************************************************************************/
/*
- 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(;;){
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++;
/******************************************************************************/
/*
- char* strstrip(char* str){
+ char *strstrip(char *str){
if(!str)
return str;
- char* endptr;
+ char *endptr;
while(*str && (*str==' ' || *str=='\t'))
++str;
endptr=str;