mirror of /home/gitosis/repositories/libowfat.git
Mirror of :pserver:cvs@cvs.fefe.de:/cvs libowfat
https://www.fefe.de/libowfat/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
476 B
21 lines
476 B
#include "fmt.h" |
|
#include "stralloc.h" |
|
#include "textcode.h" |
|
|
|
int scan_yenc_sa(const char *src,stralloc *sa) { |
|
register const unsigned char* s=(const unsigned char*) src; |
|
unsigned long i; |
|
for (i=0; s[i]; ++i) { |
|
char dest; |
|
if (s[i]=='=') { |
|
++i; |
|
if (s[i]=='y') break; |
|
dest=s[i]-64-42; |
|
} else if (s[i]=='\n' || s[i]=='\r' || s[i]=='\0') |
|
break; |
|
else |
|
dest=s[i]-42; |
|
if (!stralloc_catb(sa,&dest,1)) return 0; |
|
} |
|
return 1; |
|
}
|
|
|