X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fsearch.in.h;h=f7b68282fc1c067860cb091e7b1c402dd9f01eee;hb=4779b635ef35c7b0bc4044fcb5bc746d06f158c4;hp=638e93aaa2a16dd32e00c3aba0db8a5190784cb6;hpb=968e74c2c0e0e74869e210e093f0aa9265b1e5b5;p=gnulib.git diff --git a/lib/search.in.h b/lib/search.in.h index 638e93aaa..f7b68282f 100644 --- a/lib/search.in.h +++ b/lib/search.in.h @@ -1,6 +1,6 @@ /* A GNU-like . - Copyright (C) 2007-2010 Free Software Foundation, Inc. + Copyright (C) 2007-2013 Free Software Foundation, Inc. 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 @@ -15,7 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef _GL_SEARCH_H +#ifndef _@GUARD_PREFIX@_SEARCH_H #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ @@ -27,8 +27,8 @@ # @INCLUDE_NEXT@ @NEXT_SEARCH_H@ #endif -#ifndef _GL_SEARCH_H -#define _GL_SEARCH_H +#ifndef _@GUARD_PREFIX@_SEARCH_H +#define _@GUARD_PREFIX@_SEARCH_H /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ @@ -53,6 +53,7 @@ for details. */ # if !@HAVE_TSEARCH@ +# if !GNULIB_defined_search_types typedef enum { preorder, @@ -61,13 +62,18 @@ typedef enum leaf } VISIT; +# define GNULIB_defined_search_types 1 +# endif # endif # ifdef __cplusplus extern "C" { # endif +# if !GNULIB_defined_search_fn_types typedef int (*_gl_search_compar_fn) (const void *, const void *); typedef void (*_gl_search_action_fn) (const void *, VISIT, int); +# define GNULIB_defined_search_fn_types 1 +# endif # ifdef __cplusplus } # endif @@ -152,7 +158,7 @@ _GL_CXXALIASWARN (tdelete); and after the right subtree traversal, - for leaf nodes: once. The arguments passed to ACTION are: - 1. the node; it can be casted to a 'const void * const *', i.e. into a + 1. the node; it can be cast to a 'const void * const *', i.e. into a pointer to the key, 2. an indicator which visit of the node this is, 3. the level of the node in the tree (0 for the root). */ @@ -197,5 +203,5 @@ _GL_WARN_ON_USE (twalk, "twalk is unportable - " #endif -#endif /* _GL_SEARCH_H */ -#endif /* _GL_SEARCH_H */ +#endif /* _@GUARD_PREFIX@_SEARCH_H */ +#endif /* _@GUARD_PREFIX@_SEARCH_H */