From 03628dbeaf40a9de34b3eb6d5bf6dd34eed8248c Mon Sep 17 00:00:00 2001 From: Alexander Barton Date: Mon, 27 Dec 2010 17:14:14 +0100 Subject: Add Doxygen @file documentation to each source and header file --- src/portab/exp.h | 8 ++++---- src/portab/imp.h | 8 ++++---- src/portab/portab.h | 6 ++++-- src/portab/portabtest.c | 7 ++++--- src/portab/splint.h | 15 ++++++++------- src/portab/strdup.c | 13 +++++++------ src/portab/strlcpy.c | 13 +++++++------ src/portab/strtok_r.c | 12 +++++++++++- src/portab/vsnprintf.c | 12 ++++-------- src/portab/waitpid.c | 12 +++++++----- 10 files changed, 60 insertions(+), 46 deletions(-) (limited to 'src/portab') diff --git a/src/portab/exp.h b/src/portab/exp.h index 0cb2d200..db6fb7ee 100644 --- a/src/portab/exp.h +++ b/src/portab/exp.h @@ -8,12 +8,12 @@ * der Lizenz oder (wenn Sie es wuenschen) jeder spaeteren Version. * Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste * der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS. - * - * $Id: exp.h,v 1.1 2002/03/12 14:36:44 alex Exp $ - * - * exp.h: "Export Header" */ +/** + * @file + * "Export Header" which makes sure, that global functions are not "extern". + */ #undef GLOBAL #define GLOBAL diff --git a/src/portab/imp.h b/src/portab/imp.h index cc51d892..2c26e57d 100644 --- a/src/portab/imp.h +++ b/src/portab/imp.h @@ -8,12 +8,12 @@ * der Lizenz oder (wenn Sie es wuenschen) jeder spaeteren Version. * Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste * der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS. - * - * $Id: imp.h,v 1.1 2002/03/12 14:36:44 alex Exp $ - * - * imp.h: "Import Header" */ +/** + * @file + * "Import Header" which makes sure that global functions are defined "extern". + */ #undef GLOBAL #define GLOBAL extern diff --git a/src/portab/portab.h b/src/portab/portab.h index d2f769f1..cb00dfaf 100644 --- a/src/portab/portab.h +++ b/src/portab/portab.h @@ -7,14 +7,16 @@ * 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. - * - * Portability functions and declarations (header for libngbportab). */ #ifndef __PORTAB__ #define __PORTAB__ +/** + * @file + * Portability functions and declarations (header) + */ #include "config.h" diff --git a/src/portab/portabtest.c b/src/portab/portabtest.c index 0a2098ed..2675409a 100644 --- a/src/portab/portabtest.c +++ b/src/portab/portabtest.c @@ -7,14 +7,15 @@ * 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. - * - * test program for portab.h and friends ;-) */ #include "portab.h" -static char UNUSED id[] = "$Id: portabtest.c,v 1.13 2005/07/31 20:13:11 alex Exp $"; +/** + * @file + * Test program for portab.h and friends ;-) + */ #include "imp.h" #include diff --git a/src/portab/splint.h b/src/portab/splint.h index 2f606a02..74dd120f 100644 --- a/src/portab/splint.h +++ b/src/portab/splint.h @@ -8,19 +8,20 @@ * der Lizenz oder (wenn Sie es wuenschen) jeder spaeteren Version. * Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste * der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS. - * - * $Id: splint.h,v 1.1 2002/03/25 19:13:19 alex Exp $ - * - * splint.h: spezieller Header fuer SPLint Code-Check - * - * Dieser Header wird von portab.h nur dann includiert, wenn ein Code-Check - * mit SPLint laeufr (d.h. S_SPLINT_S definiert ist). */ #ifndef __splint__ #define __splint__ +/** + * @file + * Header file which is included for SPLint code checks + * + * This header is only included by portab.h if a SPLint code check is + * running (when S_SPLINT_S is defined). It makes some definitions to + * prevent SPLint from issuing false warnings. + */ #define SYSCONFDIR "/" #define LOCALSTATEDIR "/" diff --git a/src/portab/strdup.c b/src/portab/strdup.c index e7351570..7c0ee8fd 100644 --- a/src/portab/strdup.c +++ b/src/portab/strdup.c @@ -1,13 +1,16 @@ /* * ngIRCd -- The Next Generation IRC Daemon - * - * strdup() implementation. Public domain. - * - * $Id: strdup.c,v 1.1 2005/04/16 09:20:53 fw Exp $ */ #include "portab.h" +/** + * @file + * strdup() implementation. Public domain. + */ + +#ifndef HAVE_STRDUP + #include "imp.h" #include #include @@ -15,8 +18,6 @@ #include "exp.h" -#ifndef HAVE_STRDUP - GLOBAL char * strdup( const char *s ) { diff --git a/src/portab/strlcpy.c b/src/portab/strlcpy.c index ee93d1d6..ae2018bc 100644 --- a/src/portab/strlcpy.c +++ b/src/portab/strlcpy.c @@ -7,8 +7,14 @@ * 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 for details. * * Code partially borrowed from compat.c of rsync, written by Andrew @@ -16,11 +22,6 @@ * */ - -#include "portab.h" - -static char UNUSED id[] = "$Id: strlcpy.c,v 1.5 2005/03/19 18:43:50 fw Exp $"; - #include "imp.h" #include #include diff --git a/src/portab/strtok_r.c b/src/portab/strtok_r.c index 852c8f70..043898e9 100644 --- a/src/portab/strtok_r.c +++ b/src/portab/strtok_r.c @@ -1,8 +1,18 @@ +/* + * ngIRCd -- The Next Generation IRC Daemon + */ + #include "portab.h" -#include + +/** + * @file + * Implementation of strtok_r() + */ #ifndef HAVE_STRTOK_R +#include + char * strtok_r(char *str, const char *delim, char **saveptr) { diff --git a/src/portab/vsnprintf.c b/src/portab/vsnprintf.c index 3f9707b7..081152e1 100644 --- a/src/portab/vsnprintf.c +++ b/src/portab/vsnprintf.c @@ -7,19 +7,15 @@ * 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. - * - * snprintf() and vsnprintf() replacement functions */ #include "portab.h" -static char UNUSED id[] = "$Id: vsnprintf.c,v 1.5 2003/04/21 10:53:38 alex Exp $"; - -#include "imp.h" - -#include "exp.h" - +/** + * @file + * snprintf() and vsnprintf() replacement functions + */ /* * snprintf.c: Copyright Patrick Powell 1995 diff --git a/src/portab/waitpid.c b/src/portab/waitpid.c index 0c169601..5846bd8f 100644 --- a/src/portab/waitpid.c +++ b/src/portab/waitpid.c @@ -1,12 +1,16 @@ /* * ngIRCd -- The Next Generation IRC Daemon - * + */ + +#include "portab.h" + +/** + * @file * waitpid() implementation. Public domain. * Written by Steven D. Blackford for the NeXT system. - * */ -#include "portab.h" +#ifndef HAVE_WAITPID #include "imp.h" #include @@ -15,8 +19,6 @@ #include "exp.h" -#ifndef HAVE_WAITPID - GLOBAL int waitpid(pid, stat_loc, options) int pid, *stat_loc, options; -- cgit 1.4.1