Added preliminary Symbian support.
[silc.git] / lib / silcutil / silcstrutil.h
index 0e20e98f91a17ca4d6b65f9066861e18ff0ea78d..1fdc0fd16b486c89242d7e91c14d8d17324cbb1a 100644 (file)
@@ -4,7 +4,7 @@
 
   Author: Pekka Riikonen <priikone@silcnet.org>
 
-  Copyright (C) 2002 - 2006 Pekka Riikonen
+  Copyright (C) 2002 - 2007 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
@@ -111,6 +111,26 @@ char *silc_pem_encode_file(unsigned char *data, SilcUInt32 data_len);
 unsigned char *silc_pem_decode(unsigned char *pem, SilcUInt32 pem_len,
                               SilcUInt32 *ret_len);
 
+/****f* silcutil/SilcStrStrUtilAPI/silc_snprintf
+ *
+ * SYNOPSIS
+ *
+ *    int silc_snprintf(char *str, SilcUInt32 size, const char *format, ...);
+ *
+ * DESCRIPTION
+ *
+ *    Produces output string according to the `format'.  The formatting
+ *    is equivalent to silc_snprintf(3) and sprintf(3).  Returns the number of
+ *    characters output into `str', at most `size' characters including the
+ *    trailing '\0' character.  Returns negative value on error.
+ *
+ ***/
+#ifndef SILC_SNPRINTF
+int silc_snprintf(char *str, SilcUInt32 size, const char *format, ...);
+#else
+#define silc_snprintf snprintf
+#endif /* SILC_SNPRINTF */
+
 /****f* silcutil/SilcStrStrUtilAPI/silc_strncat
  *
  * SYNOPSIS