diff options
author | Felix von Leitner <felix-libowfat@fefe.de> | 2006-05-18 06:02:43 +0000 |
---|---|---|
committer | Felix von Leitner <felix-libowfat@fefe.de> | 2006-05-18 06:02:43 +0000 |
commit | 071df9ee4ad2f3bf2571e9fee5baedc7963664b3 (patch) | |
tree | 29ba550d1ec15fd5571651e28b3893553f3ec9aa /textcode.h | |
parent | 1341bf04de828b1242be11847cb6cfee70fd535a (diff) | |
download | libowfat-071df9ee4ad2f3bf2571e9fee5baedc7963664b3.tar.gz libowfat-071df9ee4ad2f3bf2571e9fee5baedc7963664b3.zip |
make socket_(tc|ud)p[46] actually return non-blocking sockets as
documented (Richard Lyons)
Diffstat (limited to 'textcode.h')
-rw-r--r-- | textcode.h | 18 |
1 files changed, 16 insertions, 2 deletions
@@ -3,22 +3,35 @@ /* These take len bytes from src and write them in encoded form to * dest (if dest != NULL), returning the number of bytes written. */ + +/* needs len/3*4 bytes */ unsigned long fmt_uuencoded(char* dest,const char* src,unsigned long len); +/* needs len/3*4 bytes */ unsigned long fmt_base64(char* dest,const char* src,unsigned long len); +/* worst case: len*3 */ unsigned long fmt_quotedprintable(char* dest,const char* src,unsigned long len); +/* worst case: len*3 */ unsigned long fmt_quotedprintable2(char* dest,const char* src,unsigned long len,const char* escapeme); +/* worst case: len*3 */ unsigned long fmt_urlencoded(char* dest,const char* src,unsigned long len); +/* worst case: len*3 */ unsigned long fmt_urlencoded2(char* dest,const char* src,unsigned long len,const char* escapeme); +/* worst case: len*2 */ unsigned long fmt_yenc(char* dest,const char* src,unsigned long len); +/* needs len*2 bytes */ unsigned long fmt_hexdump(char* dest,const char* src,unsigned long len); -/* this changes '<' to '<' and '&' to '&' */ +/* change '<' to '<' and '&' to '&'; worst case: len*5 */ unsigned long fmt_html(char* dest,const char* src,unsigned long len); -/* change '\' to "\\", '\n' to "\n", ^A to "\x01" etc */ +/* change '\' to "\\", '\n' to "\n", ^A to "\x01" etc; worst case: len*4 */ unsigned long fmt_cescape(char* dest,const char* src,unsigned long len); +/* worst case: len*4 */ unsigned long fmt_cescape2(char* dest,const char* src,unsigned long len,const char* escapeme); /* fold awk whitespace to '_'; this is great for writing fields with * white spaces to a log file and still allow awk to do log analysis */ +/* worst case: same size */ unsigned long fmt_foldwhitespace(char* dest,const char* src,unsigned long len); +/* worst case: len*3 */ +unsigned long fmt_ldapescape(char* dest,const char* src,unsigned long len); /* These read one line from src, decoded it, and write the result to * dest. The number of decoded bytes is written to destlen. dest @@ -32,6 +45,7 @@ unsigned long scan_yenc(const char *src,char *dest,unsigned long *destlen); unsigned long scan_hexdump(const char *src,char *dest,unsigned long *destlen); unsigned long scan_html(const char *src,char *dest,unsigned long *destlen); unsigned long scan_cescape(const char *src,char *dest,unsigned long *destlen); +unsigned long scan_ldapescape(const char* src,char* dest,unsigned long *destlen); #ifdef STRALLOC_H /* WARNING: these functions _append_ to the stralloc, not overwrite! */ |