From: Christian Grothoff Date: Wed, 30 Sep 2009 21:08:54 +0000 (+0000) Subject: some doxygen fixes X-Git-Tag: initial-import-from-subversion-38251~23449 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=60c2c502f0a4581a6f25386a8d54adb9cc8b6003;p=oweals%2Fgnunet.git some doxygen fixes --- diff --git a/m4/argz.m4 b/m4/argz.m4 index 37c1b11e4..edc99bbce 100644 --- a/m4/argz.m4 +++ b/m4/argz.m4 @@ -28,14 +28,14 @@ ARGZ_H= AC_CHECK_FUNCS([argz_add argz_append argz_count argz_create_sep argz_insert \ argz_next argz_stringify], [], [ARGZ_H=argz.h; AC_LIBOBJ([argz])]) -dnl if have system argz functions, allow forced use of +dnl if have system argz functions, allow forced use of dnl libltdl-supplied implementation (and default to do so dnl on "known bad" systems). Could use a runtime check, but dnl (a) detecting malloc issues is notoriously unreliable dnl (b) only known system that declares argz functions, dnl provides them, yet they are broken, is cygwin dnl releases prior to 16-Mar-2007 (1.5.24 and earlier) -dnl So, it's more straightforward simply to special case +dnl So, it's more straightforward simply to special case dnl this for known bad systems. AS_IF([test -z "$ARGZ_H"], [AC_CACHE_CHECK( diff --git a/m4/libtool.m4 b/m4/libtool.m4 index 1e7ea47c0..6e86e5b43 100644 --- a/m4/libtool.m4 +++ b/m4/libtool.m4 @@ -380,12 +380,12 @@ m4_define([lt_decl_dquote_varnames], # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_varnames_tagged], -[m4_assert([$# <= 2])dnl -_$0(m4_quote(m4_default([$1], [[, ]])), - m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), - m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) -m4_define([_lt_decl_varnames_tagged], -[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) +[_$0(m4_quote(m4_default([$1], [[, ]])), + m4_quote(m4_if([$2], [], + m4_quote(lt_decl_tag_varnames), + m4_quote(m4_shift($@)))), + m4_split(m4_normalize(m4_quote(_LT_TAGS))))]) +m4_define([_lt_decl_varnames_tagged], [lt_combine([$1], [$2], [_], $3)]) # lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) @@ -945,10 +945,10 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on + darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? + # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; @@ -990,11 +990,7 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES], _LT_TAGVAR(whole_archive_flag_spec, $1)='' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" - case $cc_basename in - ifort*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test "$_lt_dar_can_shared" = "yes"; then + if test "$GCC" = "yes"; then output_verbose_link_cmd=echo _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" @@ -1516,7 +1512,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl lt_cv_sys_max_cmd_len=-1; ;; - cygwin* | mingw* | cegcc*) + cygwin* | mingw*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, @@ -1684,6 +1680,10 @@ else # endif #endif +#ifdef __cplusplus +extern "C" void exit (int); +#endif + void fnord() { int i=42;} int main () { @@ -1699,7 +1699,7 @@ int main () else puts (dlerror ()); - return status; + exit (status); }] _LT_EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then @@ -1738,7 +1738,7 @@ else lt_cv_dlopen_self=yes ;; - mingw* | pw32* | cegcc*) + mingw* | pw32*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; @@ -2035,7 +2035,6 @@ m4_defun([_LT_SYS_DYNAMIC_LINKER], [AC_REQUIRE([AC_CANONICAL_HOST])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], @@ -2200,14 +2199,14 @@ bsdi[[45]]*) # libtool to hard-code these into programs ;; -cygwin* | mingw* | pw32* | cegcc*) +cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) + yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ @@ -2230,7 +2229,7 @@ cygwin* | mingw* | pw32* | cegcc*) soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; - mingw* | cegcc*) + mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` @@ -2668,7 +2667,7 @@ tpf*) version_type=linux need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + library_name_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes @@ -2692,7 +2691,7 @@ variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi - + if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi @@ -2969,7 +2968,6 @@ _LT_DECL([], [reload_cmds], [2])dnl # -- PORTME fill in with the dynamic library characteristics m4_defun([_LT_CHECK_MAGIC_METHOD], [m4_require([_LT_DECL_EGREP]) -m4_require([_LT_DECL_OBJDUMP]) AC_CACHE_CHECK([how to recognize dependent libraries], lt_cv_deplibs_check_method, [lt_cv_file_magic_cmd='$MAGIC_CMD' @@ -3020,12 +3018,6 @@ mingw* | pw32*) fi ;; -cegcc) - # use the weaker test based on 'objdump'. See mingw*. - lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - ;; - darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; @@ -3337,7 +3329,7 @@ case $host_os in aix*) symcode='[[BCDT]]' ;; -cygwin* | mingw* | pw32* | cegcc*) +cygwin* | mingw* | pw32*) symcode='[[ABCDGISTW]]' ;; hpux*) @@ -3583,7 +3575,7 @@ m4_if([$1], [CXX], [ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; - mingw* | cygwin* | os2* | pw32* | cegcc*) + mingw* | cygwin* | os2* | pw32*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style @@ -3610,11 +3602,10 @@ m4_if([$1], [CXX], [ fi ;; hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. case $host_cpu in - hppa*64*) + hppa*64*|ia64*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' @@ -3712,19 +3703,12 @@ m4_if([$1], [CXX], [ _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; - ecpc* ) - # old Intel C++ for x86_64 which still supported -KPIC. + icpc* | ecpc* ) + # Intel C++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; - icpc* ) - # Intel C++, used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' @@ -3890,7 +3874,7 @@ m4_if([$1], [CXX], [ # PIC is the default for these OSes. ;; - mingw* | cygwin* | pw32* | os2* | cegcc*) + mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style @@ -3906,11 +3890,10 @@ m4_if([$1], [CXX], [ ;; hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. case $host_cpu in - hppa*64*) + hppa*64*|ia64*) # +Z the default ;; *) @@ -3960,7 +3943,7 @@ m4_if([$1], [CXX], [ fi ;; - mingw* | cygwin* | pw32* | os2* | cegcc*) + mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], @@ -3991,25 +3974,11 @@ m4_if([$1], [CXX], [ linux* | k*bsd*-gnu) case $cc_basename in - # old Intel for x86_64 which still supported -KPIC. - ecc*) + icc* | ecc* | ifort*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; - # icc used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - icc* | ifort*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - # Lahey Fortran 8.1. - lf95*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' - _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' - ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) @@ -4191,7 +4160,7 @@ m4_if([$1], [CXX], [ pw32*) _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; - cygwin* | mingw* | cegcc*) + cygwin* | mingw*) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' ;; linux* | k*bsd*-gnu) @@ -4246,7 +4215,7 @@ dnl Note also adjust exclude_expsyms for C++ above. extract_expsyms_cmds= case $host_os in - cygwin* | mingw* | pw32* | cegcc*) + cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. @@ -4261,9 +4230,6 @@ dnl Note also adjust exclude_expsyms for C++ above. openbsd*) with_gnu_ld=no ;; - linux* | k*bsd*-gnu) - _LT_TAGVAR(link_all_deplibs, $1)=no - ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes @@ -4336,7 +4302,7 @@ _LT_EOF fi ;; - cygwin* | mingw* | pw32* | cegcc*) + cygwin* | mingw* | pw32*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' @@ -4402,9 +4368,6 @@ _LT_EOF tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; - lf95*) # Lahey Fortran 8.1 - _LT_TAGVAR(whole_archive_flag_spec, $1)= - tmp_sharedflag='--shared' ;; xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; @@ -4637,7 +4600,6 @@ _LT_EOF fi fi - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_TAGVAR(always_export_symbols, $1)=yes @@ -4692,7 +4654,7 @@ _LT_EOF _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; - cygwin* | mingw* | pw32* | cegcc*) + cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is @@ -4796,7 +4758,7 @@ _LT_EOF _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' @@ -5581,7 +5543,6 @@ if test "$_lt_caught_CXX_error" != yes; then fi fi - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. @@ -5640,7 +5601,7 @@ if test "$_lt_caught_CXX_error" != yes; then esac ;; - cygwin* | mingw* | pw32* | cegcc*) + cygwin* | mingw* | pw32*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' @@ -7025,18 +6986,6 @@ AC_SUBST([GREP]) ]) -# _LT_DECL_OBJDUMP -# -------------- -# If we don't have a new enough Autoconf to choose the best objdump -# available, choose the one first in the user's PATH. -m4_defun([_LT_DECL_OBJDUMP], -[AC_CHECK_TOOL(OBJDUMP, objdump, false) -test -z "$OBJDUMP" && OBJDUMP=objdump -_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) -AC_SUBST([OBJDUMP]) -]) - - # _LT_DECL_SED # ------------ # Check for a fully-functional sed program, that truncates diff --git a/m4/ltdl.m4 b/m4/ltdl.m4 index 46535e2e1..eb8db0cd1 100644 --- a/m4/ltdl.m4 +++ b/m4/ltdl.m4 @@ -7,7 +7,7 @@ # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. -# serial 17 LTDL_INIT +# serial 15 LTDL_INIT # LT_CONFIG_LTDL_DIR(DIRECTORY, [LTDL-MODE]) # ------------------------------------------ @@ -212,10 +212,26 @@ m4_define([$0], []) # of into LIBOBJS. AC_DEFUN([_LT_LIBOBJ], [ m4_pattern_allow([^_LT_LIBOBJS$]) + AS_LITERAL_IF([$1], [_LT_LIBSOURCES([$1.c])])dnl _LT_LIBOBJS="$_LT_LIBOBJS $1.$ac_objext" ])# _LT_LIBOBJS +# _LT_LIBSOURCES(MODULE_NAMES) +# ---------------------------- +# Like AC_LIBSOURCES, except the directory where the libltdl source files +# are expected is distinct from the user LIBOBJ directory. +AC_DEFUN([_LT_LIBSOURCES], [ + m4_foreach([_LTNAME], [$1], [ + m4_syscmd([test -r "$lt_libobj_prefix]_LTNAME[" || + test -z "$lt_libobj_prefix" || + test ! -d "$lt_libobj_prefix"])dnl + m4_if(m4_sysval, [0], [], + [AC_FATAL([missing $lt_libobj_prefix/]_LTNAME)]) + ]) +])# _LT_LIBSOURCES + + # LTDL_INIT([OPTIONS]) # -------------------- # Clients of libltdl can use this macro to allow the installer to @@ -229,9 +245,9 @@ _LT_SET_OPTIONS([$0], [$1]) dnl We need to keep our own list of libobjs separate from our parent project, dnl and the easiest way to do that is redefine the AC_LIBOBJs macro while -dnl we look for our own LIBOBJs. +dnl we look for our own LIBOBJs. Definitions in ltdl-libobj.m4. m4_pushdef([AC_LIBOBJ], m4_defn([_LT_LIBOBJ])) -m4_pushdef([AC_LIBSOURCES]) +m4_pushdef([AC_LIBSOURCES], m4_defn([_LT_LIBSOURCES])) dnl If not otherwise defined, default to the 1.5.x compatible subproject mode: m4_if(_LTDL_MODE, [], @@ -248,7 +264,7 @@ if test "x$with_included_ltdl" != xyes; then # decide whether there is a useful installed version we can use. AC_CHECK_HEADER([ltdl.h], [AC_CHECK_DECL([lt_dlinterface_register], - [AC_CHECK_LIB([ltdl], [lt_dladvise_preload], + [AC_CHECK_LIB([ltdl], [lt_dlinterface_register], [with_included_ltdl=no], [with_included_ltdl=yes])], [with_included_ltdl=yes], @@ -380,6 +396,12 @@ m4_require([_LT_HEADER_DLFCN])dnl m4_require([_LT_CHECK_DLPREOPEN])dnl m4_require([_LT_DECL_SED])dnl +# lt_cv_dlopen_self gets defined by LT_SYS_DLOPEN_SELF, called by LT_INIT +if test "$lt_cv_dlopen_self" = yes; then + AC_DEFINE([LTDL_DLOPEN_SELF_WORKS], [1], + [Define if dlopen(NULL) is able to resolve symbols from the main program.]) +fi + dnl Don't require this, or it will be expanded earlier than the code dnl that sets the variables it relies on: _LT_ENABLE_INSTALL @@ -407,8 +429,6 @@ AC_CHECK_HEADERS([unistd.h dl.h sys/dl.h dld.h mach-o/dyld.h dirent.h], AC_CHECK_FUNCS([closedir opendir readdir], [], [AC_LIBOBJ([lt__dirent])]) AC_CHECK_FUNCS([strlcat strlcpy], [], [AC_LIBOBJ([lt__strl])]) -AC_DEFINE_UNQUOTED([LT_LIBEXT],["$libext"],[The archive extension]) - name=ltdl LTDLOPEN=`eval "\\$ECHO \"$libname_spec\""` AC_SUBST([LTDLOPEN]) diff --git a/m4/ltoptions.m4 b/m4/ltoptions.m4 index 34151a3ba..e97011948 100644 --- a/m4/ltoptions.m4 +++ b/m4/ltoptions.m4 @@ -125,7 +125,7 @@ LT_OPTION_DEFINE([LT_INIT], [win32-dll], [enable_win32_dll=yes case $host in -*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) +*-*-cygwin* | *-*-mingw* | *-*-pw32*) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) diff --git a/m4/ltsugar.m4 b/m4/ltsugar.m4 index 9000a057d..0d258e070 100644 --- a/m4/ltsugar.m4 +++ b/m4/ltsugar.m4 @@ -1,13 +1,13 @@ # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # -# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. -# Written by Gary V. Vaughan, 2004 +# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc. +# Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. -# serial 6 ltsugar.m4 +# serial 5 ltsugar.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) @@ -63,14 +63,14 @@ m4_define([lt_append], # Produce a SEP delimited list of all paired combinations of elements of # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list # has the form PREFIXmINFIXSUFFIXn. -# Needed until we can rely on m4_combine added in Autoconf 2.62. m4_define([lt_combine], -[m4_if(m4_eval([$# > 3]), [1], - [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl -[[m4_foreach([_Lt_prefix], [$2], - [m4_foreach([_Lt_suffix], - ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, - [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) +[m4_if([$2], [], [], + [m4_if([$4], [], [], + [lt_join(m4_quote(m4_default([$1], [[, ]])), + lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_prefix, [$2], + [m4_foreach(_Lt_suffix, lt_car([m4_shiftn(3, $@)]), + [_Lt_prefix[]$3[]_Lt_suffix ])])))))])])dnl +]) # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) diff --git a/m4/ltversion.m4 b/m4/ltversion.m4 index b8e154fe6..45cb1557c 100644 --- a/m4/ltversion.m4 +++ b/m4/ltversion.m4 @@ -9,15 +9,15 @@ # Generated from ltversion.in. -# serial 3012 ltversion.m4 +# serial 2976 ltversion.m4 # This file is part of GNU Libtool -m4_define([LT_PACKAGE_VERSION], [2.2.6]) -m4_define([LT_PACKAGE_REVISION], [1.3012]) +m4_define([LT_PACKAGE_VERSION], [2.2.4]) +m4_define([LT_PACKAGE_REVISION], [1.2976]) AC_DEFUN([LTVERSION_VERSION], -[macro_version='2.2.6' -macro_revision='1.3012' +[macro_version='2.2.4' +macro_revision='1.2976' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) diff --git a/src/datastore/plugin_datastore_template.c b/src/datastore/plugin_datastore_template.c index 7f31ff703..6439bc019 100644 --- a/src/datastore/plugin_datastore_template.c +++ b/src/datastore/plugin_datastore_template.c @@ -194,6 +194,7 @@ template_plugin_iter_low_priority (void *cls, * Select a subset of the items in the datastore and call * the given iterator for each of them. * + * @param cls our "struct Plugin*" * @param type entries of which type should be considered? * Use 0 for any type. * @param iter function to call on each matching value; diff --git a/src/fs/fs_file_information.c b/src/fs/fs_file_information.c index e173b1149..84b79866a 100644 --- a/src/fs/fs_file_information.c +++ b/src/fs/fs_file_information.c @@ -53,11 +53,11 @@ GNUNET_FS_file_information_sync (struct GNUNET_FS_FileInformation * fi) * Load file information from the file to which * it was sync'ed. * - * @param filename name of the file to use + * @param fn name of the file to use * @return NULL on error */ struct GNUNET_FS_FileInformation * -GNUNET_FS_file_information_recover (const char *name) +GNUNET_FS_file_information_recover (const char *fn) { struct GNUNET_FS_FileInformation *ret; ret = NULL; @@ -173,6 +173,7 @@ data_reader_file(void *cls, /** * Create an entry for a file in a publish-structure. * + * @param client_info initial value for the client-info value for this entry * @param filename name of the file or directory to publish * @param keywords under which keywords should this file be available * directly; can be NULL @@ -258,6 +259,7 @@ data_reader_copy(void *cls, /** * Create an entry for a file in a publish-structure. * + * @param client_info initial value for the client-info value for this entry * @param length length of the file * @param data data for the file (should not be used afterwards by * the caller; caller will "free") @@ -300,6 +302,7 @@ GNUNET_FS_file_information_create_from_data (void *client_info, /** * Create an entry for a file in a publish-structure. * + * @param client_info initial value for the client-info value for this entry * @param length length of the file * @param reader function that can be used to obtain the data for the file * @param reader_cls closure for "reader" @@ -575,6 +578,7 @@ dirproc (void *cls, * passed (GNUNET_FS_directory_scanner_default). This is strictly a * convenience function. * + * @param client_info initial value for the client-info value for this entry * @param filename name of the top-level file or directory * @param scanner function used to get a list of files in a directory * @param scanner_cls closure for scanner @@ -642,6 +646,7 @@ GNUNET_FS_file_information_create_from_directory (void *client_info, * use of "GNUNET_FS_file_information_create_from_directory" * is not appropriate. * + * @param client_info initial value for the client-info value for this entry * @param meta metadata for the directory * @param keywords under which keywords should this directory be available * directly; can be NULL diff --git a/src/fs/fs_publish.c b/src/fs/fs_publish.c index 9ef691d2f..3ccc3c97a 100644 --- a/src/fs/fs_publish.c +++ b/src/fs/fs_publish.c @@ -94,7 +94,7 @@ struct PutContCtx * Fill in all of the generic fields for * a publish event. * - * @param pc structure to fill in + * @param pi structure to fill in * @param sc overall publishing context * @param p file information for the file being published * @param offset where in the file are we so far @@ -129,7 +129,7 @@ make_publish_status (struct GNUNET_FS_ProgressInfo *pi, * Cleanup the publish context, we're done * with it. * - * @param pc struct to clean up after + * @param sc struct to clean up after */ static void publish_cleanup (struct GNUNET_FS_PublishContext *sc) @@ -461,6 +461,7 @@ encode_cont (void *cls, * * @param cls closure * @param query the query for the block (key for lookup in the datastore) + * @param offset offset of the block in the file * @param type type of the block (IBLOCK or DBLOCK) * @param block the (encrypted) block * @param block_size size of block (in bytes) diff --git a/src/fs/gnunet-service-fs.c b/src/fs/gnunet-service-fs.c index 3264fdbc7..1e57ef73d 100644 --- a/src/fs/gnunet-service-fs.c +++ b/src/fs/gnunet-service-fs.c @@ -2659,7 +2659,7 @@ ds_get_request (void *cls, * value for the ttl that can be requested. * * @param ttl_in requested ttl - * @param priority given priority + * @param prio given priority * @return ttl_in if ttl_in is below the limit, * otherwise the ttl-limit for the given priority */ @@ -2702,7 +2702,7 @@ bound_priority (uint32_t prio_in, * Handle P2P "GET" request. * * @param cls closure, always NULL - * @param peer the other peer involved (sender or receiver, NULL + * @param other the other peer involved (sender or receiver, NULL * for loopback messages where we are both sender and receiver) * @param message the actual message * @return GNUNET_OK to keep the connection open, @@ -3135,7 +3135,7 @@ check_sblock (const struct SBlock *sb, * Handle P2P "PUT" request. * * @param cls closure, always NULL - * @param peer the other peer involved (sender or receiver, NULL + * @param other the other peer involved (sender or receiver, NULL * for loopback messages where we are both sender and receiver) * @param message the actual message * @return GNUNET_OK to keep the connection open, @@ -3243,6 +3243,11 @@ core_connect_task (void *cls, /** * Function called by the core after we've * connected. + * + * @param cls closure, unused + * @param server handle to the core service + * @param my_identity our peer identity (unused) + * @param publicKey our public key (unused) */ static void core_start_cb (void *cls, @@ -3297,9 +3302,9 @@ core_connect_task (void *cls, * Process fs requests. * * @param cls closure - * @param sched scheduler to use + * @param s scheduler to use * @param server the initialized server - * @param cfg configuration to use + * @param c configuration to use */ static void run (void *cls, diff --git a/src/fs/gnunet-unindex.c b/src/fs/gnunet-unindex.c index 9b335eec0..e6af09172 100644 --- a/src/fs/gnunet-unindex.c +++ b/src/fs/gnunet-unindex.c @@ -99,7 +99,7 @@ progress_cb (void *cls, * @param sched the scheduler to use * @param args remaining command-line arguments * @param cfgfile name of the configuration file used (for saving, can be NULL!) - * @param cfg configuration + * @param c configuration */ static void run (void *cls, diff --git a/src/hostlist/hostlist-client.c b/src/hostlist/hostlist-client.c index cc24dc135..9b385c8ff 100644 --- a/src/hostlist/hostlist-client.c +++ b/src/hostlist/hostlist-client.c @@ -307,7 +307,8 @@ clean_up () * Task that is run when we are ready to receive more data from the hostlist * server. * - * @param tc + * @param cls closure, unused + * @param tc task context, unused */ static void multi_ready (void *cls, diff --git a/src/hostlist/hostlist-client.h b/src/hostlist/hostlist-client.h index 8adf67af9..26c013505 100644 --- a/src/hostlist/hostlist-client.h +++ b/src/hostlist/hostlist-client.h @@ -35,6 +35,9 @@ /** * Start downloading hostlists from hostlist servers as necessary. * + * @param c the configuration to use + * @param s the scheduler to use + * @param st hande for publishing statistics * @param ch set to handler for connect notifications * @param dh set to handler for disconnect notifications * @return GNUNET_OK on success diff --git a/src/include/gnunet_configuration_lib.h b/src/include/gnunet_configuration_lib.h index 84c20bde0..8e2f8e6d9 100644 --- a/src/include/gnunet_configuration_lib.h +++ b/src/include/gnunet_configuration_lib.h @@ -156,6 +156,7 @@ int GNUNET_CONFIGURATION_get_value_number (const struct GNUNET_CONFIGURATION_Han const char *option, unsigned long long *number); + /** * Get a configuration value that should be a relative time. * @@ -170,6 +171,7 @@ int GNUNET_CONFIGURATION_get_value_time (const struct GNUNET_CONFIGURATION_Handl const char *option, struct GNUNET_TIME_Relative *time); + /** * Test if we have a value for a particular option * @@ -181,6 +183,7 @@ int GNUNET_CONFIGURATION_get_value_time (const struct GNUNET_CONFIGURATION_Handl int GNUNET_CONFIGURATION_have_value (const struct GNUNET_CONFIGURATION_Handle *cfg, const char *section, const char *option); + /** * Get a configuration value that should be a string. * @@ -195,6 +198,7 @@ int GNUNET_CONFIGURATION_get_value_string (const struct GNUNET_CONFIGURATION_Han *cfg, const char *section, const char *option, char **value); + /** * Get a configuration value that should be the name of a file * or directory. @@ -267,11 +271,12 @@ int GNUNET_CONFIGURATION_get_value_yesno (const struct GNUNET_CONFIGURATION_Hand * "FOO" is set to "DIRECTORY". * * @param cfg configuration to use for path expansion - * @param old string to $-expand (will be freed!) + * @param orig string to $-expand (will be freed!) * @return $-expanded string */ char *GNUNET_CONFIGURATION_expand_dollar (const struct GNUNET_CONFIGURATION_Handle - *cfg, char *old); + *cfg, char *orig); + /** * Set a configuration value that should be a number. diff --git a/src/include/gnunet_container_lib.h b/src/include/gnunet_container_lib.h index bd4f9b032..bbf1ba2cf 100644 --- a/src/include/gnunet_container_lib.h +++ b/src/include/gnunet_container_lib.h @@ -491,7 +491,6 @@ typedef int (*GNUNET_CONTAINER_HashMapIterator) (void *cls, /** * Create a multi hash map. * - * @param map the map * @param len initial size (map will grow as needed) * @return NULL on error */ diff --git a/src/include/gnunet_fs_service.h b/src/include/gnunet_fs_service.h index 3f603e581..ae1b46a89 100644 --- a/src/include/gnunet_fs_service.h +++ b/src/include/gnunet_fs_service.h @@ -1525,11 +1525,11 @@ typedef int (*GNUNET_FS_FileInformationProcessor)(void *cls, /** * Recover file information structure from disk. * - * @param name filename for the structure on disk + * @param fn filename for the structure on disk * @return NULL on error */ struct GNUNET_FS_FileInformation * -GNUNET_FS_file_information_recover (const char *name); +GNUNET_FS_file_information_recover (const char *fn); /** diff --git a/src/include/gnunet_network_lib.h b/src/include/gnunet_network_lib.h index 492713c46..d966c3afe 100644 --- a/src/include/gnunet_network_lib.h +++ b/src/include/gnunet_network_lib.h @@ -68,17 +68,18 @@ GNUNET_NETWORK_socket_accept (const struct GNUNET_NETWORK_Handle *desc, * Make a non-inheritable to child processes (sets the * close-on-exec flag). * - * @param socket + * @param h the socket to make non-inheritable * @return GNUNET_OK on success, GNUNET_SYSERR otherwise * @warning Not implemented on Windows */ int GNUNET_NETWORK_socket_set_inheritable (const struct GNUNET_NETWORK_Handle - *desc); + *h); /** * Bind to a connected socket - * @param desc socket + * + * @param desc socket to bind * @param address address to be bound * @param address_len length of address * @return GNUNET_OK on success, GNUNET_SYSERR otherwise @@ -88,14 +89,16 @@ int GNUNET_NETWORK_socket_bind (struct GNUNET_NETWORK_Handle *desc, /** * Close a socket - * @param desc socket + * + * @param desc socket to close * @return GNUNET_OK on success, GNUNET_SYSERR otherwise */ int GNUNET_NETWORK_socket_close (struct GNUNET_NETWORK_Handle *desc); /** * Connect a socket - * @param desc socket + * + * @param desc socket to connect * @param address peer address * @param length of address * @return GNUNET_OK on success, GNUNET_SYSERR otherwise @@ -103,9 +106,11 @@ int GNUNET_NETWORK_socket_close (struct GNUNET_NETWORK_Handle *desc); int GNUNET_NETWORK_socket_connect (const struct GNUNET_NETWORK_Handle *desc, const struct sockaddr *address, socklen_t address_len); + /** * Get socket options - * @param desc socket + * + * @param desc socket to inspect * @param level protocol level of the option * @param optname identifier of the option * @param optval options @@ -115,9 +120,11 @@ int GNUNET_NETWORK_socket_connect (const struct GNUNET_NETWORK_Handle *desc, int GNUNET_NETWORK_socket_getsockopt(const struct GNUNET_NETWORK_Handle *desc, int level, int optname, void *optval, socklen_t *optlen); + /** * Listen on a socket - * @param desc socket + * + * @param desc socket to start listening on * @param backlog length of the listen queue * @return GNUNET_OK on success, GNUNET_SYSERR otherwise */ diff --git a/src/util/client.c b/src/util/client.c index 82ab35d21..9a2f47678 100644 --- a/src/util/client.c +++ b/src/util/client.c @@ -303,25 +303,25 @@ receive_task (void *scls, const struct GNUNET_SCHEDULER_TaskContext *tc) * * @param sock the service * @param handler function to call with the message - * @param cls closure for handler + * @param handler_cls closure for handler * @param timeout how long to wait until timing out */ void GNUNET_CLIENT_receive (struct GNUNET_CLIENT_Connection *sock, GNUNET_CLIENT_MessageHandler handler, - void *cls, struct GNUNET_TIME_Relative timeout) + void *handler_cls, struct GNUNET_TIME_Relative timeout) { if (sock->sock == NULL) { /* already disconnected, fail instantly! */ GNUNET_break (0); /* this should not happen in well-written code! */ - handler (cls, NULL); + handler (handler_cls, NULL); return; } GNUNET_assert (sock->receiver_task == GNUNET_SCHEDULER_NO_TASK); sock->receiver_handler = handler; - sock->receiver_handler_cls = cls; + sock->receiver_handler_cls = handler_cls; sock->receive_timeout = GNUNET_TIME_relative_to_absolute (timeout); if (GNUNET_YES == sock->msg_complete) sock->receiver_task = GNUNET_SCHEDULER_add_after (sock->sched, @@ -331,9 +331,9 @@ GNUNET_CLIENT_receive (struct GNUNET_CLIENT_Connection *sock, &receive_task, sock); else sock->receiver_task = GNUNET_CONNECTION_receive (sock->sock, - GNUNET_SERVER_MAX_MESSAGE_SIZE, - timeout, - &receive_helper, sock); + GNUNET_SERVER_MAX_MESSAGE_SIZE, + timeout, + &receive_helper, sock); } diff --git a/src/util/common_logging.c b/src/util/common_logging.c index 436e009ab..ea3ab4f78 100644 --- a/src/util/common_logging.c +++ b/src/util/common_logging.c @@ -123,12 +123,17 @@ static struct CustomLogger *loggers; */ static unsigned int skip_log; +/** + * File descriptor to use for "stderr", or NULL for none. + */ static FILE *GNUNET_stderr; /** * Convert a textual description of a loglevel * to the respective GNUNET_GE_KIND. - * @returns GNUNET_GE_INVALID if log does not parse + * + * @param log loglevel to parse + * @return GNUNET_GE_INVALID if log does not parse */ static enum GNUNET_ErrorType get_type (const char *log) @@ -144,6 +149,7 @@ get_type (const char *log) return GNUNET_ERROR_TYPE_INVALID; } + /** * Setup logging. * @@ -219,6 +225,15 @@ GNUNET_logger_remove (GNUNET_Logger logger, void *logger_cls) GNUNET_free (pos); } + +/** + * Actually output the log message. + * + * @param kind how severe was the issue + * @param comp component responsible + * @param datestr current date/time + * @param msg the actual message + */ static void output_message (enum GNUNET_ErrorType kind, const char *comp, const char *datestr, const char *msg) @@ -235,6 +250,12 @@ output_message (enum GNUNET_ErrorType kind, } } + +/** + * Flush an existing bulk report to the output. + * + * @param datastr our current timestamp + */ static void flush_bulk (const char *datestr) { @@ -294,6 +315,14 @@ GNUNET_log_skip (unsigned int n, int check_reset) } +/** + * Output a log message using the default mechanism. + * + * @param kind how severe was the issue + * @param comp component responsible + * @param message the actual message + * @param va arguments to the format string "message" + */ static void mylog (enum GNUNET_ErrorType kind, const char *comp, const char *message, va_list va) @@ -346,6 +375,13 @@ mylog (enum GNUNET_ErrorType kind, } +/** + * Main log function. + * + * @param kind how serious is the error? + * @param message what is the message (format string) + * @param ... arguments for format string + */ void GNUNET_log (enum GNUNET_ErrorType kind, const char *message, ...) { @@ -356,6 +392,15 @@ GNUNET_log (enum GNUNET_ErrorType kind, const char *message, ...) } +/** + * Log function that specifies an alternative component. + * This function should be used by plugins. + * + * @param kind how serious is the error? + * @param comp component responsible for generating the message + * @param message what is the message (format string) + * @param ... arguments for format string + */ void GNUNET_log_from (enum GNUNET_ErrorType kind, const char *comp, const char *message, ...) @@ -368,7 +413,10 @@ GNUNET_log_from (enum GNUNET_ErrorType kind, /** - * Convert KIND to String + * Convert error type to string. + * + * @param kind type to convert + * @return string corresponding to the type */ const char * GNUNET_error_type_to_string (enum GNUNET_ErrorType kind) diff --git a/src/util/configuration.c b/src/util/configuration.c index 8c32618e2..569c4adcf 100644 --- a/src/util/configuration.c +++ b/src/util/configuration.c @@ -33,6 +33,7 @@ #include "gnunet_os_lib.h" #include "gnunet_strings_lib.h" + /** * @brief configuration entry */ @@ -55,6 +56,7 @@ struct ConfigEntry char *val; }; + /** * @brief configuration section */ @@ -76,6 +78,7 @@ struct ConfigSection char *name; }; + /** * @brief configuration data */ @@ -95,8 +98,11 @@ struct GNUNET_CONFIGURATION_Handle }; + /** - * Create a GNUNET_CONFIGURATION_Configuration. + * Create a GNUNET_CONFIGURATION_Handle. + * + * @return fresh configuration object */ struct GNUNET_CONFIGURATION_Handle * GNUNET_CONFIGURATION_create () @@ -104,6 +110,12 @@ GNUNET_CONFIGURATION_create () return GNUNET_malloc (sizeof (struct GNUNET_CONFIGURATION_Handle)); } + +/** + * Destroy configuration object. + * + * @param cfg configuration to destroy + */ void GNUNET_CONFIGURATION_destroy (struct GNUNET_CONFIGURATION_Handle *cfg) { @@ -126,6 +138,15 @@ GNUNET_CONFIGURATION_destroy (struct GNUNET_CONFIGURATION_Handle *cfg) GNUNET_free (cfg); } + +/** + * Parse a configuration file, add all of the options in the + * file to the configuration environment. + * + * @param cfg configuration to update + * @param filename name of the configuration file + * @return GNUNET_OK on success, GNUNET_SYSERR on error + */ int GNUNET_CONFIGURATION_parse (struct GNUNET_CONFIGURATION_Handle *cfg, const char *filename) @@ -234,12 +255,28 @@ GNUNET_CONFIGURATION_parse (struct GNUNET_CONFIGURATION_Handle *cfg, return ret; } + +/** + * Test if there are configuration options that were + * changed since the last save. + * + * @param cfg configuration to inspect + * @return GNUNET_NO if clean, GNUNET_YES if dirty, GNUNET_SYSERR on error (i.e. last save failed) + */ int -GNUNET_CONFIGURATION_test_dirty (const struct GNUNET_CONFIGURATION_Handle *cfg) +GNUNET_CONFIGURATION_is_dirty (const struct GNUNET_CONFIGURATION_Handle *cfg) { return cfg->dirty; } + +/** + * Write configuration file. + * + * @param cfg configuration to write + * @param filename where to write the configuration + * @return GNUNET_OK on success, GNUNET_SYSERR on error + */ int GNUNET_CONFIGURATION_write (struct GNUNET_CONFIGURATION_Handle *data, const char *filename) @@ -315,6 +352,13 @@ GNUNET_CONFIGURATION_write (struct GNUNET_CONFIGURATION_Handle *data, } +/** + * Iterate over all options in the configuration. + * + * @param cfg configuration to inspect + * @param iter function to call on each option + * @param iter_cls closure for iter + */ void GNUNET_CONFIGURATION_iterate (const struct GNUNET_CONFIGURATION_Handle *cfg, GNUNET_CONFIGURATION_Iterator iter, void *iter_cls) @@ -336,6 +380,14 @@ void GNUNET_CONFIGURATION_iterate (const struct GNUNET_CONFIGURATION_Handle *cfg } +/** + * FIXME. + * + * @param cls the destination configuration (struct GNUNET_CONFIGURATION_Handle*) + * @param section FIXME + * @param option FIXME + * @param value FIXME + */ static void copy_entry (void *cls, const char *section, @@ -347,6 +399,12 @@ copy_entry (void *cls, } +/** + * Duplicate an existing configuration object. + * + * @param c configuration to duplicate + * @return duplicate configuration + */ struct GNUNET_CONFIGURATION_Handle * GNUNET_CONFIGURATION_dup (const struct GNUNET_CONFIGURATION_Handle *cfg) { @@ -358,6 +416,13 @@ GNUNET_CONFIGURATION_dup (const struct GNUNET_CONFIGURATION_Handle *cfg) } +/** + * FIXME. + * + * @param data FIXME + * @param section FIXME + * @return matching entry, NULL if not found + */ static struct ConfigSection * findSection (const struct GNUNET_CONFIGURATION_Handle *data, const char *section) { @@ -370,6 +435,14 @@ findSection (const struct GNUNET_CONFIGURATION_Handle *data, const char *section } +/** + * FIXME. + * + * @param data FIXME + * @param section FIXME + * @param key FIXME + * @return matching entry, NULL if not found + */ static struct ConfigEntry * findEntry (const struct GNUNET_CONFIGURATION_Handle *data, const char *section, const char *key) @@ -386,6 +459,15 @@ findEntry (const struct GNUNET_CONFIGURATION_Handle *data, return pos; } + +/** + * Set a configuration value that should be a string. + * + * @param cfg configuration to update + * @param section section of interest + * @param option option of interest + * @param value value to set + */ void GNUNET_CONFIGURATION_set_value_string (struct GNUNET_CONFIGURATION_Handle *data, @@ -417,6 +499,15 @@ GNUNET_CONFIGURATION_set_value_string (struct GNUNET_CONFIGURATION_Handle sec->entries = e; } + +/** + * Set a configuration value that should be a number. + * + * @param cfg configuration to update + * @param section section of interest + * @param option option of interest + * @param number value to set + */ void GNUNET_CONFIGURATION_set_value_number (struct GNUNET_CONFIGURATION_Handle *cfg, const char *section, @@ -428,6 +519,16 @@ GNUNET_CONFIGURATION_set_value_number (struct GNUNET_CONFIGURATION_Handle GNUNET_CONFIGURATION_set_value_string (cfg, section, option, s); } + +/** + * Get a configuration value that should be a number. + * + * @param cfg configuration to inspect + * @param section section of interest + * @param option option of interest + * @param number where to store the numeric value of the option + * @return GNUNET_OK on success, GNUNET_SYSERR on error + */ int GNUNET_CONFIGURATION_get_value_number (const struct GNUNET_CONFIGURATION_Handle *cfg, const char *section, @@ -444,6 +545,16 @@ GNUNET_CONFIGURATION_get_value_number (const struct GNUNET_CONFIGURATION_Handle return GNUNET_OK; } + +/** + * Get a configuration value that should be a relative time. + * + * @param cfg configuration to inspect + * @param section section of interest + * @param option option of interest + * @param time set to the time value stored in the configuration + * @return GNUNET_OK on success, GNUNET_SYSERR on error + */ int GNUNET_CONFIGURATION_get_value_time (const struct GNUNET_CONFIGURATION_Handle *cfg, const char *section, @@ -462,6 +573,17 @@ GNUNET_CONFIGURATION_get_value_time (const struct GNUNET_CONFIGURATION_Handle return ret; } + +/** + * Get a configuration value that should be a string. + * + * @param cfg configuration to inspect + * @param section section of interest + * @param option option of interest + * @param value will be set to a freshly allocated configuration + * value, or NULL if option is not specified + * @return GNUNET_OK on success, GNUNET_SYSERR on error + */ int GNUNET_CONFIGURATION_get_value_string (const struct GNUNET_CONFIGURATION_Handle *cfg, const char *section, @@ -479,6 +601,19 @@ GNUNET_CONFIGURATION_get_value_string (const struct GNUNET_CONFIGURATION_Handle return GNUNET_OK; } + +/** + * Get a configuration value that should be in a set of + * predefined strings + * + * @param cfg configuration to inspect + * @param section section of interest + * @param option option of interest + * @param choices NULL-terminated list of legal values + * @param value will be set to an entry in the legal list, + * or NULL if option is not specified and no default given + * @return GNUNET_OK on success, GNUNET_SYSERR on error + */ int GNUNET_CONFIGURATION_get_value_choice (const struct GNUNET_CONFIGURATION_Handle *cfg, const char *section, @@ -511,8 +646,12 @@ GNUNET_CONFIGURATION_get_value_choice (const struct GNUNET_CONFIGURATION_Handle return GNUNET_OK; } + /** * Test if we have a value for a particular option + * @param cfg configuration to inspect + * @param section section of interest + * @param option option of interest * @return GNUNET_YES if so, GNUNET_NO if not. */ int @@ -525,11 +664,13 @@ GNUNET_CONFIGURATION_have_value (const struct GNUNET_CONFIGURATION_Handle *cfg, return GNUNET_YES; } + /** * Expand an expression of the form "$FOO/BAR" to "DIRECTORY/BAR" * where either in the "PATHS" section or the environtment * "FOO" is set to "DIRECTORY". * + * @param cfg configuration to use for path expansion * @param old string to $-expand (will be freed!) * @return $-expanded string */ @@ -579,8 +720,13 @@ GNUNET_CONFIGURATION_expand_dollar (const struct GNUNET_CONFIGURATION_Handle *cf return result; } + /** * Get a configuration value that should be a string. + * + * @param cfg configuration to inspect + * @param section section of interest + * @param option option of interest * @param value will be set to a freshly allocated configuration * value, or NULL if option is not specified * @return GNUNET_OK on success, GNUNET_SYSERR on error @@ -612,10 +758,14 @@ GNUNET_CONFIGURATION_get_value_filename (const struct GNUNET_CONFIGURATION_Handl return ret; } + /** * Get a configuration value that should be in a set of * "GNUNET_YES" or "GNUNET_NO". * + * @param cfg configuration to inspect + * @param section section of interest + * @param option option of interest * @return GNUNET_YES, GNUNET_NO or GNUNET_SYSERR */ int @@ -639,15 +789,20 @@ GNUNET_CONFIGURATION_get_value_yesno (const struct GNUNET_CONFIGURATION_Handle * /** * Iterate over the set of filenames stored in a configuration value. * + * @param cfg configuration to inspect + * @param section section of interest + * @param option option of interest + * @param cb function to call on each filename + * @param cb_cls closure for cb * @return number of filenames iterated over, -1 on error */ int GNUNET_CONFIGURATION_iterate_value_filenames (const struct GNUNET_CONFIGURATION_Handle *cfg, const char *section, - const char *option, + const char *option, GNUNET_FileNameCallback cb, - void *cls) + void *cb_cls) { char *list; char *pos; @@ -692,7 +847,7 @@ GNUNET_CONFIGURATION_iterate_value_filenames (const struct if (strlen (pos) > 0) { ret++; - if ((cb != NULL) && (GNUNET_OK != cb (cls, pos))) + if ((cb != NULL) && (GNUNET_OK != cb (cb_cls, pos))) { ret = GNUNET_SYSERR; break; @@ -706,6 +861,13 @@ GNUNET_CONFIGURATION_iterate_value_filenames (const struct return ret; } + +/** + * FIXME. + * + * @param value FIXME + * @return FIXME + */ static char * escape_name (const char *value) { @@ -736,6 +898,14 @@ escape_name (const char *value) return escaped; } + +/** + * FIXME. + * + * @param cls string we compare with (const char*) + * @param fn filename we are currently looking at + * @return GNUNET_OK if the names do not match, GNUNET_SYSERR if they do + */ static int test_match (void *cls, const char *fn) { @@ -743,10 +913,14 @@ test_match (void *cls, const char *fn) return (0 == strcmp (of, fn)) ? GNUNET_SYSERR : GNUNET_OK; } + /** * Append a filename to a configuration value that * represents a list of filenames * + * @param cfg configuration to update + * @param section section of interest + * @param option option of interest * @param value filename to append * @return GNUNET_OK on success, * GNUNET_NO if the filename already in the list @@ -790,6 +964,9 @@ GNUNET_CONFIGURATION_append_value_filename (struct GNUNET_CONFIGURATION_Handle * Remove a filename from a configuration value that * represents a list of filenames * + * @param cfg configuration to update + * @param section section of interest + * @param option option of interest * @param value filename to remove * @return GNUNET_OK on success, * GNUNET_NO if the filename is not in the list, @@ -870,6 +1047,10 @@ GNUNET_CONFIGURATION_remove_value_filename (struct GNUNET_CONFIGURATION_Handle /** * Load configuration (starts with defaults, then loads * system-specific configuration). + * + * @param cfg configuration to update + * @param filename name of the configuration file + * @return GNUNET_OK on success, GNUNET_SYSERR on error */ int GNUNET_CONFIGURATION_load (struct GNUNET_CONFIGURATION_Handle *cfg, diff --git a/src/util/disk.c b/src/util/disk.c index 9f2f8dcf7..a3d5db097 100644 --- a/src/util/disk.c +++ b/src/util/disk.c @@ -230,7 +230,7 @@ int GNUNET_DISK_file_get_identifiers (const char *filename, /** * Create an (empty) temporary file on disk. * - * @param template component to use for the name; + * @param t component to use for the name; * does NOT contain "XXXXXX" or "/tmp/". * @return NULL on error, otherwise name of fresh * file on disk in directory for temporary files @@ -480,7 +480,7 @@ GNUNET_DISK_directory_create (const char *dir) * Create the directory structure for storing * a file. * - * @param filename name of a file in the directory + * @param dir name of a file in the directory * @returns GNUNET_OK on success, * GNUNET_SYSERR on failure, * GNUNET_NO if the directory @@ -1058,8 +1058,8 @@ GNUNET_DISK_file_lock (struct GNUNET_DISK_FileHandle *fh, off_t lockStart, /** * Unlock a part of a file * @param fh file handle - * @param lockStart absolute position from where to unlock - * @param lockEnd absolute position until where to unlock + * @param unlockStart absolute position from where to unlock + * @param unlockEnd absolute position until where to unlock * @return GNUNET_OK on success, GNUNET_SYSERR on error */ int diff --git a/src/util/getopt.c b/src/util/getopt.c index 799146e77..e37390a3a 100644 --- a/src/util/getopt.c +++ b/src/util/getopt.c @@ -987,8 +987,7 @@ GNgetopt_long (int argc, /** * Parse the command line. * - * @param binaryName name of the binary / application with options - * @param cfg for storing/accessing configuration data + * @param binaryOptions name of this binary / application * @param allOptions defined options and handlers * @param argc number of arguments * @param argv actual arguments diff --git a/src/util/network.c b/src/util/network.c index e112d9093..4ac46fa0b 100644 --- a/src/util/network.c +++ b/src/util/network.c @@ -169,7 +169,7 @@ GNUNET_NETWORK_socket_close (struct GNUNET_NETWORK_Handle *desc) * Connect a socket * @param desc socket * @param address peer address - * @param length of address + * @param address_len length of address * @return GNUNET_OK on success, GNUNET_SYSERR otherwise */ int @@ -406,6 +406,7 @@ GNUNET_NETWORK_socket_set_inheritable (const struct GNUNET_NETWORK_Handle #endif } + /** * Reset FD set * @param fds fd set @@ -422,6 +423,7 @@ GNUNET_NETWORK_fdset_zero (struct GNUNET_NETWORK_FDSet *fds) #endif } + /** * Add a socket to the FD set * @param fds fd set @@ -437,10 +439,12 @@ GNUNET_NETWORK_fdset_set (struct GNUNET_NETWORK_FDSet *fds, fds->nsds = desc->fd + 1; } + /** * Check whether a socket is part of the fd set * @param fds fd set * @param desc socket + * @return 0 if the FD is not set */ int GNUNET_NETWORK_fdset_isset (const struct GNUNET_NETWORK_FDSet *fds, @@ -449,6 +453,7 @@ GNUNET_NETWORK_fdset_isset (const struct GNUNET_NETWORK_FDSet *fds, return FD_ISSET (desc->fd, &fds->sds); } + /** * Add one fd set to another * @param dst the fd set to add to @@ -469,6 +474,7 @@ GNUNET_NETWORK_fdset_add (struct GNUNET_NETWORK_FDSet *dst, } } + /** * Copy one fd set to another * @param to destination @@ -494,11 +500,12 @@ GNUNET_NETWORK_fdset_copy (struct GNUNET_NETWORK_FDSet *to, #endif } + /** * Copy a native fd set * @param to destination * @param from native source set - * @param the biggest socket number in from + 1 + * @param nfds the biggest socket number in from + 1 */ void GNUNET_NETWORK_fdset_copy_native (struct GNUNET_NETWORK_FDSet *to, @@ -508,6 +515,7 @@ GNUNET_NETWORK_fdset_copy_native (struct GNUNET_NETWORK_FDSet *to, to->nsds = nfds; } + /** * Add a file handle to the fd set * @param fds fd set @@ -591,6 +599,7 @@ GNUNET_NETWORK_fdset_create () return fds; } + /** * Releases the associated memory of an fd set * @param fds fd set @@ -604,6 +613,7 @@ GNUNET_NETWORK_fdset_destroy (struct GNUNET_NETWORK_FDSet *fds) GNUNET_free (fds); } + /** * Check if sockets meet certain conditions * @param rfds set of sockets to be checked for readability @@ -821,4 +831,5 @@ GNUNET_NETWORK_socket_select (struct GNUNET_NETWORK_FDSet *rfds, #endif } + /* end of network.c */ diff --git a/src/util/os_network.c b/src/util/os_network.c index c872350c5..c78dc71c5 100644 --- a/src/util/os_network.c +++ b/src/util/os_network.c @@ -33,7 +33,9 @@ /** * @brief Enumerate all network interfaces - * @param callback the callback function + * + * @param proc the callback function + * @param cls closure for proc */ void GNUNET_OS_network_interfaces_list (GNUNET_OS_NetworkInterfaceProcessor proc, diff --git a/src/util/pseudonym.c b/src/util/pseudonym.c index 5d9750f5b..8687b5c4d 100644 --- a/src/util/pseudonym.c +++ b/src/util/pseudonym.c @@ -592,7 +592,7 @@ merge_meta_helper (void *cls, * * @param cfg overall configuration * @param id the pseudonym identifier - * @param metadata for the pseudonym + * @param meta metadata for the pseudonym */ void GNUNET_PSEUDONYM_add (const struct GNUNET_CONFIGURATION_Handle *cfg,