summaryrefslogtreecommitdiffstats
path: root/filter.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2017-08-09 06:25:14 -0700
committerKaz Kylheku <kaz@kylheku.com>2017-08-09 06:25:14 -0700
commite63c561a145103a94efbc49e7c6a1061dd8464f4 (patch)
tree39f295a7e09d052c51765f60f7ac77a6905f8b93 /filter.h
parent46bc67ee1b42f8f7587e87b0ba604e0541bd24f1 (diff)
downloadtxr-e63c561a145103a94efbc49e7c6a1061dd8464f4.tar.gz
txr-e63c561a145103a94efbc49e7c6a1061dd8464f4.tar.bz2
txr-e63c561a145103a94efbc49e7c6a1061dd8464f4.zip
base64 funtions: factor out stream filtering internals.
The base64_encode and base64_decode functions internally work with streams. This change factors out those internals into separate functions (with the intent that these will be usefully exposed, in another commit). * filter.c (base64_stream_enc): New function, made out of the internals of base64_encode. (base64_encode): Simple wrapper for base64_stream_enc. (base64_stream_dec): New function, made out of the internals of base64_decode. (base64_decode): Simple wrapper for base64_stream_dec. * filter.h (base64_stream_enc, base64_stream_dec): Declared.
Diffstat (limited to 'filter.h')
-rw-r--r--filter.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/filter.h b/filter.h
index a8507b9c..6aaae66c 100644
--- a/filter.h
+++ b/filter.h
@@ -44,6 +44,9 @@ val register_filter(val sym, val table);
val url_encode(val str, val space_plus);
val url_decode(val str, val space_plus);
+val base64_stream_enc(val out_stream, val in_stream, val nbytes, val wrap_cols);
+val base64_stream_dec(val out_stream, val in_stream, val nchars);
+
val base64_encode(val str, val wrap_cols);
val base64_decode(val str);