Added SILC Server library.
[silc.git] / lib / silcutil / silcvcard.c
index 6776a31c13e49273c380441b1b30b76d0b91a4b8..dad057e1f3a038671e8c2b6c67adce3d1672940f 100644 (file)
@@ -4,7 +4,7 @@
 
   Author: Pekka Riikonen <priikone@silcnet.org>
 
-  Copyright (C) 2002 Pekka Riikonen
+  Copyright (C) 2002 - 2005 Pekka Riikonen
 
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -19,7 +19,7 @@
 /* $Id$ */
 /* Implementation of the VCard (RFC 2426) */
 
-#include "silcincludes.h"
+#include "silc.h"
 
 #define VCARD_HEADER "BEGIN:VCARD\n"
 #define VCARD_VERSION "VERSION:3.0\n"
@@ -120,7 +120,7 @@ unsigned char *silc_vcard_encode(SilcVCard vcard, SilcUInt32 *vcard_len)
   silc_buffer_strformat(&buffer, VCARD_FOOTER, SILC_STRFMT_END);
 
   if (vcard_len)
-    *vcard_len = buffer.truelen;
+    *vcard_len = silc_buffer_truelen(&buffer);
 
   return buffer.head;
 }
@@ -168,11 +168,11 @@ do {                                                      \
 
 /* Decode VCard */
 
-bool silc_vcard_decode(const unsigned char *data, SilcUInt32 data_len,
+SilcBool silc_vcard_decode(const unsigned char *data, SilcUInt32 data_len,
                       SilcVCard vcard)
 {
   unsigned char *val;
-  bool has_begin = FALSE, has_end = FALSE;
+  SilcBool has_begin = FALSE, has_end = FALSE;
   int len, i, off = 0;
 
   val = (unsigned char *)data;