chiark / gitweb /
Dynamic string pool system, based on an idea from the `sw-tools'
[mLib] / base64.c
index 5f5009a9a86854eb71b5040f86fcd0e6269763a1..10ce91e5c96f98b57e005f9c903171bafb59fd8e 100644 (file)
--- a/base64.c
+++ b/base64.c
@@ -1,6 +1,6 @@
 /* -*-c-*-
  *
- * $Id: base64.c,v 1.2 1999/05/18 21:45:27 mdw Exp $
+ * $Id: base64.c,v 1.3 1999/05/21 22:14:30 mdw Exp $
  *
  * Base64 encoding and decoding.
  *
@@ -30,6 +30,9 @@
 /*----- Revision history --------------------------------------------------*
  *
  * $Log: base64.c,v $
+ * Revision 1.3  1999/05/21 22:14:30  mdw
+ * Take advantage of the new dynamic string macros.
+ *
  * Revision 1.2  1999/05/18 21:45:27  mdw
  * Allow Base64 encode and decode of arbitrary rubbish.
  *
@@ -251,12 +254,11 @@ void base64_init(base64_ctx *ctx)
 int main(int argc, char *argv[])
 {
   unsigned char buf[BUFSIZ];
-  dstr d;
+  dstr d = DSTR_INIT;
   base64_ctx ctx;
   void (*proc)(base64_ctx *, const unsigned char *, size_t, dstr *);
   size_t sz;
 
-  dstr_create(&d);
   base64_init(&ctx);
 
   if (argc > 1 && strcmp(argv[1], "-d") == 0)