libcollectdclient: Document the used macros.
authorFlorian Forster <octo@leeloo.lan.home.verplant.org>
Sat, 8 Nov 2008 17:04:21 +0000 (18:04 +0100)
committerFlorian Forster <octo@leeloo.lan.home.verplant.org>
Sat, 8 Nov 2008 17:04:21 +0000 (18:04 +0100)
They're probably not obvious unless you've doe quite
some C coding.

src/libcollectdclient/client.c

index 2ec2774..baffe99 100644 (file)
 
 #include "client.h"
 
+/* Secure/static macros. They work like `strcpy' and `strcat', but assure null
+ * termination. They work for static buffers only, because they use `sizeof'.
+ * The `SSTRCATF' combines the functionality of `snprintf' and `strcat' which
+ * is very useful to add formatted stuff to the end of a buffer. */
 #define SSTRCPY(d,s) do { \
     strncpy ((d), (s), sizeof (d)); \
     (d)[sizeof (d) - 1] = 0; \