diff options
author | Felix von Leitner <felix-libowfat@fefe.de> | 2003-02-27 17:23:14 +0000 |
---|---|---|
committer | Felix von Leitner <felix-libowfat@fefe.de> | 2003-02-27 17:23:14 +0000 |
commit | 23247995b1b1f0a37f9811071f8fd3e4ed3dacfc (patch) | |
tree | f29a8e9edda336406d6bee4ff451897da9fa5fad /textcode.h | |
parent | 4d21334deebe5d31bd22de7cad3888ef216cb200 (diff) | |
download | libowfat-23247995b1b1f0a37f9811071f8fd3e4ed3dacfc.tar.gz libowfat-23247995b1b1f0a37f9811071f8fd3e4ed3dacfc.zip |
add stralloc versions of textcode (Kai Ruemmler)
Diffstat (limited to 'textcode.h')
-rw-r--r-- | textcode.h | 24 |
1 files changed, 24 insertions, 0 deletions
@@ -20,6 +20,30 @@ unsigned int scan_urlencoded(const char *src,char *dest,unsigned int *destlen); unsigned int scan_yenc(const char *src,char *dest,unsigned int *destlen); unsigned int scan_hexdump(const char *src,char *dest,unsigned int *destlen); +#ifdef STRALLOC_H +/* These take len bytes from src and write them in encoded form to sa. + * As the stralloc_* functions do, 1 + * is returned. If they run out of memory, sa contains the bytes already + * written and 0 is returned. */ +int fmt_quotedprintable_sa(stralloc *sa,const char* src,unsigned int len); +int fmt_base64_sa(stralloc *sa,const char* src,unsigned int len); +int fmt_uuencoded_sa(stralloc *sa,const char* src,unsigned int len); +int fmt_urlencoded_sa(stralloc *sa,const char* src,unsigned int len); +int fmt_yenc_sa(stralloc *sa,const char* src,unsigned int len); +int fmt_hexdump_sa(stralloc *sa,const char* src,unsigned int len); + +/* These read one line from src, decoded it, and write the result to + * sa. As the stralloc_* functions do, 1 + * is returned. If they run out of memory, sa contains the bytes already + * written and 0 is returned. */ +int scan_base64_sa(const char *src,stralloc* sa); +int scan_quotedprintable_sa(const char *src,stralloc* sa); +int scan_uuencoded_sa(const char *src,stralloc *sa); +int scan_urlencoded_sa(const char *src,stralloc *sa); +int scan_yenc_sa(const char *src,stralloc *sa); +int scan_hexdump_sa(const char *src,stralloc *sa); +#endif + extern const char base64[64]; #endif |