Apply minor fixes from patches@, SF tracker, and others.
[ircu2.10.12-pk.git] / include / ircd_snprintf.h
index 28bcc5cce4eb5c5e262cc63af80e5ceeca0eb6ac..520c0cc15bc38c1a0e192023e1a37ce8af58267d 100644 (file)
@@ -20,9 +20,6 @@
  *
  * $Id$
  */
-#ifndef INCLUDED_config_h
-#include "config.h"
-#endif
 #ifndef INCLUDED_sys_types_h
 #include <sys/types.h>
 #define INCLUDED_sys_types_h
@@ -42,6 +39,14 @@ struct VarData {
   va_list      vd_args;        /* arguments for %v */
 };
 
+#ifndef HAVE_VA_COPY
+#if HAVE___VA_COPY
+#define va_copy(DEST, SRC) __va_copy(DEST, SRC)
+#else
+#define va_copy(DEST, SRC) memcpy(&(DEST), &(SRC), sizeof(DEST))
+#endif
+#endif
+
 extern int ircd_snprintf(struct Client *dest, char *buf, size_t buf_len,
                         const char *format, ...);
 extern int ircd_vsnprintf(struct Client *dest, char *buf, size_t buf_len,
@@ -108,7 +113,9 @@ extern int ircd_vsnprintf(struct Client *dest, char *buf, size_t buf_len,
 **     (normally, a decimal point appears in the results of those
 **     conversions only if a digit follows).  For g and G
 **     conversions, trailing zeros are not removed from the result as
-**     they would otherwise be.
+**     they would otherwise be.  For C conversions, if the
+**     destination is local and the origin is a user, the
+**     nick!user@host form is used.
 **
 **   0 specifying zero padding.  For all conversions except n, the
 **     converted value is padded on the left with zeros rather than
@@ -129,6 +136,9 @@ extern int ircd_vsnprintf(struct Client *dest, char *buf, size_t buf_len,
 **     produced by a signed conversion.  A + overrides a space if
 **     both are used.
 **
+**   : specifying that a struct Client name should be preceded by a
+**     ':' character if the destination is a user
+**
 ** * An optional decimal digit string specifying a minimum field
 **   width.  If the converted value has fewer characters than the
 **   field width, it will be padded with spaces on the left (or right,
@@ -256,6 +266,9 @@ extern int ircd_vsnprintf(struct Client *dest, char *buf, size_t buf_len,
 **             is printed; otherwise, the client's network numeric is
 **             printed.
 **
+** H           The channel argument identifier (channel name) is
+**             printed.
+**
 ** v           The argument given must be a pointer to a struct
 **             VarData with vd_format and vd_args must be initialized
 **             appropriately.  On return, vd_chars will contain the