]> diplodocus.org Git - nmh/blobdiff - sbr/concat.c
Put, rather than print, single characters.
[nmh] / sbr / concat.c
index 82979f5aa0229e529000fe293279be5b4cc70e45..234d17519987fc676c202ec91d2fa96eba7ee8b2 100644 (file)
 #include <h/utils.h>
 
 
+/* concat returns a non-NULL malloc'd pointer to the catenation of the
+ * argument strings less their NUL terminators other than the last.  The
+ * arguments are terminated by a NULL.
+ *
+ * Example:  concat("abc", "def", "", "g", NULL) returns "abcdefg". */
 char *
-concat (char *s1, ...)
+concat (const char *s1, ...)
 {
     char *cp, *dp, *sp;
     size_t len;