chiark / gitweb /
codec/{base32,hex}.h: Include `codec.h'.
[mLib] / codec / base64.h
index 4a0a19d45203056b7aa0a28f5ba0634082f2b0c6..e868781b15bb9d2feba4c8b8ff45f626fe49fae9 100644 (file)
 
 /*----- Header files ------------------------------------------------------*/
 
+#ifndef MLIB_CODEC_H
+#  include "codec.h"
+#endif
+
 #ifndef MLIB_DSTR_H
 #  include "dstr.h"
 #endif
@@ -44,7 +48,7 @@ typedef struct base64_ctx {
   unsigned long acc;                   /* Accumulator for output data */
   unsigned qsz;                                /* Length of data queued */
   unsigned lnlen;                      /* Length of the current line */
-  const char *indent;                  /* Newline-and-indent string */
+  char *indent;                                /* Newline-and-indent string */
   unsigned maxline;                    /* Maximum permitted line length */
 } base64_ctx;
 
@@ -95,6 +99,10 @@ extern void base64_decode(base64_ctx */*ctx*/,
 
 extern void base64_init(base64_ctx */*ctx*/);
 
+/*----- Codec object interface --------------------------------------------*/
+
+extern const codec_class base64_class, file64_class, base64url_class;
+
 /*----- That's all, folks -------------------------------------------------*/
 
 #ifdef __cplusplus