summaryrefslogtreecommitdiff
path: root/textcode.h
diff options
context:
space:
mode:
authorFelix von Leitner <felix-libowfat@fefe.de>2006-05-18 06:02:43 +0000
committerFelix von Leitner <felix-libowfat@fefe.de>2006-05-18 06:02:43 +0000
commit071df9ee4ad2f3bf2571e9fee5baedc7963664b3 (patch)
tree29ba550d1ec15fd5571651e28b3893553f3ec9aa /textcode.h
parent1341bf04de828b1242be11847cb6cfee70fd535a (diff)
downloadlibowfat-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.h18
1 files changed, 16 insertions, 2 deletions
diff --git a/textcode.h b/textcode.h
index e38c806..a0735e6 100644
--- a/textcode.h
+++ b/textcode.h
@@ -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 '&lt;' and '&' to '&amp;' */
+/* change '<' to '&lt;' and '&' to '&amp;'; 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! */