From abd3118d2280ffe01b4ff3a7b36428b7b5c91827 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Thu, 20 Apr 2006 20:50:51 +0000 Subject: [PATCH] More Doxygen stuff; for auto-generated code too --- include/yaz/ill.h | 8 +++++++- include/yaz/test.h | 19 ++++++++++++++++--- include/yaz/xmlquery.h | 8 ++++++-- src/charconv.tcl | 11 ++++++++--- src/csvtodiag.tcl | 8 +++++--- src/mime.c | 11 +++++++++-- src/mime.h | 9 +++++++-- src/test.c | 7 ++++++- src/xmlquery.c | 4 ++-- src/z3950oid.c | 8 ++++++-- 10 files changed, 72 insertions(+), 21 deletions(-) diff --git a/include/yaz/ill.h b/include/yaz/ill.h index a2577b5..2016d06 100644 --- a/include/yaz/ill.h +++ b/include/yaz/ill.h @@ -2,8 +2,14 @@ * Copyright (C) 1995-2005, Index Data ApS * See the file LICENSE for details. * - * $Id: ill.h,v 1.8 2005-06-25 15:46:02 adam Exp $ + * $Id: ill.h,v 1.9 2006-04-20 20:50:51 adam Exp $ */ + +/** + * \file ill.h + * \brief ILL Package utilities + */ + #ifndef ILL_H #define ILL_H diff --git a/include/yaz/test.h b/include/yaz/test.h index ac4f879..a40e0f6 100644 --- a/include/yaz/test.h +++ b/include/yaz/test.h @@ -1,19 +1,26 @@ /* - * Copyright (C) 1995-2005, Index Data ApS + * Copyright (C) 1995-2006, Index Data ApS * See the file LICENSE for details. * - * $Id: test.h,v 1.4 2006-01-30 14:02:06 adam Exp $ + * $Id: test.h,v 1.5 2006-04-20 20:50:51 adam Exp $ */ +/** \file test.h + \brief Unit Test for YAZ +*/ + #ifndef YAZ_TEST_H #define YAZ_TEST_H #include #include +/** \brief Test OK */ #define YAZ_TEST_TYPE_OK 1 +/** \brief Test failed */ #define YAZ_TEST_TYPE_FAIL 2 +/** \brief boolean test. as only evaluated once */ #define YAZ_CHECK(as) { \ if (as) { \ yaz_check_print1(YAZ_TEST_TYPE_OK, __FILE__, __LINE__, #as); \ @@ -22,6 +29,7 @@ } \ } +/** \brief equality test. left, right only evaluated once */ #define YAZ_CHECK_EQ(left, right) { \ int lval = left; \ int rval = right; \ @@ -34,18 +42,23 @@ } \ } +/** \brief Macro to initialize the system (in start of main typically) */ #define YAZ_CHECK_INIT(argc, argv) yaz_check_init1(&argc, &argv) +/** \brief Macro to terminate the system (end of main, normally) */ #define YAZ_CHECK_TERM yaz_check_term1(); return 0 YAZ_BEGIN_CDECL +/** \brief used by macro. Should not be called directly */ YAZ_EXPORT void yaz_check_init1(int *argc, char ***argv); +/** \brief used by macro. Should not be called directly */ YAZ_EXPORT void yaz_check_term1(void); +/** \brief used by macro. Should not be called directly */ YAZ_EXPORT void yaz_check_print1(int type, const char *file, int line, const char *expr); +/** \brief used by macro. Should not be called directly */ YAZ_EXPORT void yaz_check_eq1(int type, const char *file, int line, const char *left, const char *right, int lval, int rval); - YAZ_END_CDECL #endif diff --git a/include/yaz/xmlquery.h b/include/yaz/xmlquery.h index d2ce219..7eb13ef 100644 --- a/include/yaz/xmlquery.h +++ b/include/yaz/xmlquery.h @@ -1,10 +1,14 @@ /* - * Copyright (C) 1995-2005, Index Data ApS + * Copyright (C) 1995-2006, Index Data ApS * See the file LICENSE for details. * - * $Id: xmlquery.h,v 1.3 2006-02-19 18:44:23 adam Exp $ + * $Id: xmlquery.h,v 1.4 2006-04-20 20:50:51 adam Exp $ */ +/** \file xmlquery.h + \brief Query / XML conversions +*/ + #ifndef YAZ_XMLQUERY_H #define YAZ_XMLQUERY_H diff --git a/src/charconv.tcl b/src/charconv.tcl index f43c815..b43f12b 100755 --- a/src/charconv.tcl +++ b/src/charconv.tcl @@ -2,18 +2,23 @@ # the next line restats using tclsh \ exec tclsh "$0" "$@" # -# $Id: charconv.tcl,v 1.12 2006-04-19 23:15:39 adam Exp $ +# $Id: charconv.tcl,v 1.13 2006-04-20 20:50:51 adam Exp $ proc usage {} { puts {charconv.tcl: [-p prefix] [-s split] [-o ofile] file ... } exit 1 } -proc preamble_trie {ofilehandle} { +proc preamble_trie {ofilehandle ifiles ofile} { set f $ofilehandle set totype {unsigned } + puts $f "/** \\file $ofile" + puts $f " \\brief Character conversion, generated from [lindex $ifiles 0]" + puts $f "" + puts $f " Generated automatically by charconv.tcl" + puts $f "*/" puts $f "\#include " puts $f " struct yaz_iconv_trie_flat { @@ -390,7 +395,7 @@ if {![info exists ifiles]} { } set ofilehandle [open $ofile w] -preamble_trie $ofilehandle +preamble_trie $ofilehandle $ifiles $ofile foreach ifile $ifiles { readfile $ifile $ofilehandle $prefix $omits $reverse_map diff --git a/src/csvtodiag.tcl b/src/csvtodiag.tcl index 0066a3f..3224647 100644 --- a/src/csvtodiag.tcl +++ b/src/csvtodiag.tcl @@ -1,8 +1,8 @@ # This file is part of the YAZ toolkit -# Copyright (c) Index Data 1996-2005 +# Copyright (c) Index Data 1996-2006 # See the file LICENSE for details. # -# $Id: csvtodiag.tcl,v 1.2 2005-04-22 14:51:11 adam Exp $ +# $Id: csvtodiag.tcl,v 1.3 2006-04-20 20:50:51 adam Exp $ # # Converts a CSV file with diagnostics to C+H file for easy # maintenance @@ -17,7 +17,9 @@ proc csvtodiag {ifiles name alias} { set cfile [open [lindex $ifiles 1] w] set hfile [open [lindex $ifiles 2] w] set lineno 0 - set preamble "/* Generated automatically by csvtodiag.tcl from [lindex $ifiles 0] */" + puts $cfile "/** \\file [lindex $ifiles 1]" + puts $hfile "/** \\file [lindex $ifiles 2]" + set preamble " \\brief Diagnostics: Generated by csvtodiag.tcl from [lindex $ifiles 0] */" puts $cfile $preamble puts $cfile " #include \"diag-entry.h\" diff --git a/src/mime.c b/src/mime.c index f964861..2a82c7d 100644 --- a/src/mime.c +++ b/src/mime.c @@ -1,10 +1,17 @@ /* - * Copyright (C) 1995-2005, Index Data ApS + * Copyright (C) 1995-2006, Index Data ApS * See the file LICENSE for details. * - * $Id: mime.c,v 1.1 2006-03-15 13:32:05 adam Exp $ + * $Id: mime.c,v 1.2 2006-04-20 20:50:51 adam Exp $ */ +/** \file mime.c + \brief Small utility to manage MIME types +*/ + +#if HAVE_CONFIG_H +#include +#endif #include #include diff --git a/src/mime.h b/src/mime.h index 1ef5401..e331d5a 100644 --- a/src/mime.h +++ b/src/mime.h @@ -1,9 +1,14 @@ /* - * Copyright (C) 1995-2005, Index Data ApS + * Copyright (C) 1995-2006, Index Data ApS * See the file LICENSE for details. * - * $Id: mime.h,v 1.1 2006-03-15 13:32:05 adam Exp $ + * $Id: mime.h,v 1.2 2006-04-20 20:50:51 adam Exp $ */ + +/** \file mime.h + \brief Small utility to manage MIME types +*/ + #ifndef MIME_H #define MIME_H diff --git a/src/test.c b/src/test.c index 0138056..1fc47c2 100644 --- a/src/test.c +++ b/src/test.c @@ -2,8 +2,13 @@ * Copyright (C) 1995-2005, Index Data ApS * See the file LICENSE for details. * - * $Id: test.c,v 1.4 2006-01-30 14:02:07 adam Exp $ + * $Id: test.c,v 1.5 2006-04-20 20:50:51 adam Exp $ */ + +/** \file test.c + \brief Unit Test for YAZ +*/ + #if HAVE_CONFIG_H #include #endif diff --git a/src/xmlquery.c b/src/xmlquery.c index 77184ee..4b15a36 100644 --- a/src/xmlquery.c +++ b/src/xmlquery.c @@ -1,8 +1,8 @@ /* - * Copyright (C) 1995-2005, Index Data ApS + * Copyright (C) 1995-2006, Index Data ApS * All rights reserved. * - * $Id: xmlquery.c,v 1.7 2006-04-19 10:05:03 adam Exp $ + * $Id: xmlquery.c,v 1.8 2006-04-20 20:50:51 adam Exp $ */ /** \file xmlquery.c diff --git a/src/z3950oid.c b/src/z3950oid.c index 435ed4e..1da2652 100644 --- a/src/z3950oid.c +++ b/src/z3950oid.c @@ -1,10 +1,14 @@ /* - * Copyright (C) 1995-2005, Index Data ApS + * Copyright (C) 1995-2006, Index Data ApS * See the file LICENSE for details. * - * $Id: z3950oid.c,v 1.4 2005-06-25 15:46:06 adam Exp $ + * $Id: z3950oid.c,v 1.5 2006-04-20 20:50:51 adam Exp $ */ +/** \file z3950oid.c + \brief Z3950 OID conversion utilities +*/ + #if HAVE_CONFIG_H #include #endif -- 1.7.10.4