Revision: 2007
http://nagios.svn.sourceforge.net/nagios/?rev=2007&view=rev
Author: ageric
Date: 2012-07-05 11:39:06 +0000 (Thu, 05 Jul 2012)
Log Message:
-----------
lib/kvvec.h: Remove typedefs for structs kvvec and kvvec_buf
They add no value for non-opaque types and aren't used internally,
so we get rid of them so people know what type they're using.
Signed-off-by: Andreas Ericsson <ae@...>
Modified Paths:
--------------
nagioscore/trunk/lib/kvvec.h
Modified: nagioscore/trunk/lib/kvvec.h
===================================================================
--- nagioscore/trunk/lib/kvvec.h 2012-07-05 11:38:48 UTC (rev 2006)
+++ nagioscore/trunk/lib/kvvec.h 2012-07-05 11:39:06 UTC (rev 2007)
@@ -10,7 +10,6 @@
unsigned long buflen;
unsigned long bufsize;
};
-typedef struct kvvec_buf kvvec_buf;
struct kvvec {
struct key_value *kv;
@@ -19,7 +18,6 @@
int kvv_sorted;
int combined_len; /* used for kvvec_buf to avoid one loop */
};
-typedef struct kvvec kvvec;
/** Parameters for kvvec_destroy() */
#define KVVEC_FREE_KEYS 1
@@ -31,7 +29,7 @@
* @param hint Number of key/value pairs we expect to store
* @return Pointer to a struct kvvec, properly initialized
*/
-extern kvvec *kvvec_init(int hint);
+extern struct kvvec *kvvec_init(int hint);
/**
* Grow a key/value vector. Used internally as needed by
@@ -41,14 +39,14 @@
* @param hint The new size we should grow to
* @return 0 on success, < 0 on errors
*/
-extern int kvvec_grow(kvvec *kvv, int hint);
+extern int kvvec_grow(struct kvvec *kvv, int hint);
/**
* Sort a key/value vector alphabetically by key name
* @param kvv The key/value vector to sort
* @return 0
*/
-extern int kvvec_sort(kvvec *kvv);
+extern int kvvec_sort(struct kvvec *kvv);
/**
* Add a key/value pair to an existing key/value vector, with
@@ -60,7 +58,7 @@
* @param valuelen Length of the value
* @return 0 on success, < 0 on errors
*/
-extern int kvvec_addkv_wlen(kvvec *kvv, char *key, int keylen, char *value, int valuelen);
+extern int kvvec_addkv_wlen(struct kvvec *kvv, char *key, int keylen, char *value, int valuelen);
/**
* Shortcut to kvvec_addkv_wlen() when lengths aren't known
@@ -81,7 +79,7 @@
* @param callback Callback function
* @return 0 on success, < 0 on errors
*/
-extern int kvvec_foreach(kvvec *kvv, void *arg, int (*callback)(struct key_value *, void *));
+extern int kvvec_foreach(struct kvvec *kvv, void *arg, int (*callback)(struct key_value *, void *));
/**
* Destroy a key/value vector
@@ -89,7 +87,7 @@
* @param flags or'ed combination of KVVEC_FREE_{KEYS,VALUES}, or KVVEC_FREE_ALL
* @return 0 on success, < 0 on errors
*/
-extern int kvvec_destroy(kvvec *kvv, int flags);
+extern int kvvec_destroy(struct kvvec *kvv, int flags);
/**
* Create a linear buffer of all the key/value pairs and
@@ -106,7 +104,7 @@
* nul bytes.
* @return A pointer to a newly created kvvec_buf structure
*/
-extern kvvec_buf *kvvec2buf(kvvec *kvv, char kv_sep, char pair_sep, int overalloc);
+extern struct kvvec_buf *kvvec2buf(struct kvvec *kvv, char kv_sep, char pair_sep, int overalloc);
/**
* Create a key/value vector from a pre-parsed buffer. Immensely
@@ -117,6 +115,6 @@
* @param kv_sep Character separating key and value
* @param pair_sep Character separating key/value pairs
*/
-extern kvvec *buf2kvvec(const char *str, unsigned int len, const char kvsep, const char pair_sep);
+extern struct kvvec *buf2kvvec(const char *str, unsigned int len, const char kvsep, const char pair_sep);
#endif /* INCLUDE_kvvec_h__ */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|