]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/portab/strlcpy.c
Update copyright notices of recently changed files
[ngircd-alex.git] / src / portab / strlcpy.c
index 5e2c72228c1c6429d85f290abc0a4cd5e225f4c7..1f86a93304fcec3d2246374d3fe2d7815fca638e 100644 (file)
@@ -1,14 +1,20 @@
 /*
  * ngIRCd -- The Next Generation IRC Daemon
- * Copyright (c)2001-2005 Alexander Barton (alex@barton.de)
+ * Copyright (c)2001-2014 Alexander Barton (alex@barton.de) and Contributors.
  *
  * 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
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
  * Please read the file COPYING, README and AUTHORS for more information.
- *
+ */
+
+#include "portab.h"
+
+/**
+ * @file
  * strlcpy() and strlcat() replacement functions.
+ *
  * See <http://www.openbsd.org/papers/strlcpy-paper.ps> for details.
  *
  * Code partially borrowed from compat.c of rsync, written by Andrew
  * <http://cvs.samba.org/cgi-bin/cvsweb/rsync/lib/compat.c>
  */
 
-
-#include "portab.h"
-
-static char UNUSED id[] = "$Id: strlcpy.c,v 1.4 2005/02/27 09:29:13 alex Exp $";
-
-#include "imp.h"
 #include <string.h>
 #include <sys/types.h>
 
-#include "exp.h"
-
-
 #ifndef HAVE_STRLCAT
 
 GLOBAL size_t
-strlcat( CHAR *dst, CONST CHAR *src, size_t size )
+strlcat( char *dst, const char *src, size_t size )
 {
        /* Like strncat() but does not 0 fill the buffer and
         * always null terminates. */
@@ -51,11 +48,10 @@ strlcat( CHAR *dst, CONST CHAR *src, size_t size )
 
 #endif
 
-
 #ifndef HAVE_STRLCPY
 
 GLOBAL size_t
-strlcpy( CHAR *dst, CONST CHAR *src, size_t size )
+strlcpy( char *dst, const char *src, size_t size )
 {
        /* Like strncpy but does not 0 fill the buffer and
         * always null terminates. */
@@ -73,5 +69,4 @@ strlcpy( CHAR *dst, CONST CHAR *src, size_t size )
 
 #endif
 
-
 /* -eof- */