doxygen comment test and comments added.

git-svn-id: file:///svn/unbound/trunk@11 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Wouter Wijngaards 2007-01-03 14:55:21 +00:00
parent e9a9f9ce40
commit 043f3abb2f
9 changed files with 1285 additions and 2 deletions

View file

@ -75,7 +75,7 @@ unittest: $(COMMON_OBJ) $(UNITTEST_OBJ)
clean:
rm -f *.o *.d *.lo *~ tags
rm -rf autom4te.cache .libs build
rm -rf autom4te.cache .libs build doc/html
realclean: clean
rm -f config.status config.log config.h.in config.h
@ -92,6 +92,11 @@ lint:
tags: $(srcdir)/*.c ldns/*.[ch]
ctags -f $(srcdir)/tags $(srcdir)/*.[ch] ldns/*.[ch]
doc:
ifdef doxygen
$(doxygen) $(srcdir)/doc/unbound.doxygen
endif
# Automatic dependencies.
$(BUILD)%.d: $(srcdir)/%.c
$(INFO) Depend $<

View file

@ -135,6 +135,7 @@ AC_PATH_TOOL(AR, ar, [false])
if test $AR = false; then
AC_MSG_ERROR([Cannot find 'ar', please extend PATH to include it])
fi
AC_CHECK_PROG(doxygen, doxygen, doxygen)
# avoid libtool max commandline length test on systems that fork slowly.
AC_CANONICAL_HOST
if echo "$host_os" | grep "sunos4" >/dev/null; then

View file

@ -7,9 +7,20 @@
*
*/
/**
* \file
*
* Main program to start the DNS resolver daemon.
*/
#include "config.h"
#include "util/log.h"
/**
* main program. Set options given commandline arguments.
* @param argc: number of commandline arguments.
* @param argv: array of commandline arguments.
*/
int
main(int argc, char* argv[])
{

View file

@ -8,6 +8,8 @@
- minimal logging service (to stderr).
- added postcommit hook that serves emails.
- added first test 00-lint. postcommit also checks if build succeeds.
- 01-doc: doxygen doc target added for html docs. And stringent test
on documented files, functions and parameters.
15 December 2006: Wouter
- Created Makefile.in and configure.ac.

1237
doc/unbound.doxygen Normal file

File diff suppressed because it is too large Load diff

View file

@ -6,9 +6,19 @@
* See LICENSE for the license.
*
*/
/**
* \file
* Unit test main program. Calls all the other unit tests.
* Exits with code 1 on a failure. 0 if all unit tests are successfull.
*/
#include "config.h"
/**
* Main unit test program. Setup, teardown and report errors.
* @param argc: arg count.
* @param argv: array of commandline arguments.
*/
int main(int argc, char* argv[])
{
if(argc != 1) {

BIN
testdata/01-doc.tpkg vendored Normal file

Binary file not shown.

View file

@ -6,6 +6,10 @@
* See LICENSE for the license.
*
*/
/**
* \file
* Implementation of log.h.
*/
#include "config.h"
#include "util/log.h"
@ -28,6 +32,10 @@ log_vmsg(const char *format, va_list args)
(int)time(NULL), ident, (int)getpid(), message);
}
/**
* implementation of log_info
* @param format: format string printf-style.
*/
void
log_info(const char *format, ...)
{

View file

@ -7,6 +7,12 @@
*
*/
/**
* \file
*
* This file contains logging functions.
*/
#ifndef UTIL_LOG_H
#define UTIL_LOG_H
@ -16,17 +22,20 @@
#endif
/**
* call this to initialize logging services
* call this to initialize logging services.
*/
void log_init();
/**
* Pass printf formatted arguments. No trailing newline is needed.
* @param format: printf-style format string. Arguments follow.
*/
void log_info(const char* format, ...) ATTR_FORMAT(printf, 1, 2);
/**
* va_list argument version of log_info.
* @param format: the printf style format to print. no newline.
* @param args: arguments for format string.
*/
void log_vmsg(const char *format, va_list args);