X-Git-Url: http://git.silcnet.org/gitweb/?p=silc.git;a=blobdiff_plain;f=lib%2Fsilcutil%2Fsilcstrutil.h;h=1fdc0fd16b486c89242d7e91c14d8d17324cbb1a;hp=0e20e98f91a17ca4d6b65f9066861e18ff0ea78d;hb=9905799a86c606304fd7df2cd401de1740a272a1;hpb=f3b43606c546a86a43b283b46464972296e1e271 diff --git a/lib/silcutil/silcstrutil.h b/lib/silcutil/silcstrutil.h index 0e20e98f..1fdc0fd1 100644 --- a/lib/silcutil/silcstrutil.h +++ b/lib/silcutil/silcstrutil.h @@ -4,7 +4,7 @@ Author: Pekka Riikonen - 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