telegrafista
This commit is contained in:
parent
f93486a71a
commit
a984fdfa3a
15
a5/program.c
15
a5/program.c
@ -59,12 +59,6 @@ void search(struct morsetree* root, char* decode){
|
||||
struct morsetree* this = root;
|
||||
int i = 0;
|
||||
for(i == 0; i <= strlen(decode); i++){
|
||||
/*if((i == strlen(decode) && decode[strlen(decode)-1] == ' ') ||
|
||||
(i == strlen(decode) && decode[strlen(decode)-1] == '/'
|
||||
&& decode[strlen(decode)-2] == ' ')){
|
||||
printf("\n");
|
||||
return;
|
||||
}*/
|
||||
if(decode[i] == ' ' || decode[i] == '\n' || decode[i] == '\0'){
|
||||
if(i == strlen(decode)){
|
||||
printf("\n");
|
||||
@ -76,7 +70,7 @@ void search(struct morsetree* root, char* decode){
|
||||
if(decode[i] == '/'){
|
||||
printf(" ");
|
||||
}
|
||||
else if(decode[i] != ' '){
|
||||
else{
|
||||
if(decode[i] == '.'){
|
||||
this = this->dot;
|
||||
}
|
||||
@ -86,7 +80,7 @@ void search(struct morsetree* root, char* decode){
|
||||
}
|
||||
|
||||
}
|
||||
//printf("\n");
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -141,10 +135,9 @@ int main (){
|
||||
return 0;
|
||||
}
|
||||
search(root, line);
|
||||
//printf("\n");
|
||||
//printf("\n");
|
||||
|
||||
}
|
||||
|
||||
//destroy(root);
|
||||
destroy(root);
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user