ucx/map.h

changeset 152
62921b370c60
parent 124
80609f9675f1
--- a/ucx/map.h	Wed Nov 22 12:59:13 2017 +0100
+++ b/ucx/map.h	Sun Jan 21 12:13:09 2018 +0100
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 2015 Olaf Wintermann. All rights reserved.
+ * Copyright 2016 Olaf Wintermann. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:
@@ -59,7 +59,7 @@
  * 
  * @param key the variable name for the key
  * @param value the variable name for the value
- * @param iter an UcxMapIterator
+ * @param iter a UcxMapIterator
  * @see ucx_map_iterator()
  */
 #define UCX_MAP_FOREACH(key,value,iter) \
@@ -68,13 +68,13 @@
 /** Type for the UCX map. @see UcxMap */
 typedef struct UcxMap          UcxMap;
 
-/** Type for a key of an UcxMap. @see UcxKey */
+/** Type for a key of a UcxMap. @see UcxKey */
 typedef struct UcxKey          UcxKey;
 
-/** Type for an element of an UcxMap. @see UcxMapElement */
+/** Type for an element of a UcxMap. @see UcxMapElement */
 typedef struct UcxMapElement   UcxMapElement;
 
-/** Type for an iterator over an UcxMap. @see UcxMapIterator */
+/** Type for an iterator over a UcxMap. @see UcxMapIterator */
 typedef struct UcxMapIterator  UcxMapIterator;
 
 /** Structure for the UCX map. */
@@ -89,7 +89,7 @@
     size_t        count;
 };
 
-/** Structure for a key of an UcxMap. */
+/** Structure for a key of a UcxMap. */
 struct UcxKey {
     /** The key data. */
     void   *data;
@@ -99,7 +99,7 @@
     int    hash;
 };
 
-/** Structure for an element of an UcxMap. */
+/** Structure for an element of a UcxMap. */
 struct UcxMapElement {
     /** The value data. */
     void          *data;
@@ -111,7 +111,7 @@
     UcxKey        key;
 };
 
-/** Structure for an iterator over an UcxMap. */
+/** Structure for an iterator over a UcxMap. */
 struct UcxMapIterator {
     /** The map to iterate over. */
     UcxMap        *map;
@@ -136,7 +136,7 @@
 UcxMap *ucx_map_new(size_t size);
 
 /**
- * Creates a new hash map with the specified size using an UcxAllocator.
+ * Creates a new hash map with the specified size using a UcxAllocator.
  * @param allocator the allocator to use
  * @param size the size of the hash map
  * @return a pointer to the new hash map
@@ -357,13 +357,13 @@
     ucx_map_remove(map, ucx_key((void*)&key, sizeof(key)))
 
 /**
- * Creates an UcxKey based on the given data.
+ * Creates a UcxKey based on the given data.
  * 
  * This function implicitly computes the hash.
  * 
  * @param data the data for the key
  * @param len the length of the data
- * @return an UcxKey with implicitly computed hash
+ * @return a UcxKey with implicitly computed hash
  * @see ucx_hash()
  */
 UcxKey ucx_key(void *data, size_t len);
@@ -380,14 +380,14 @@
 /**
  * Creates an iterator for a map.
  * 
- * <b>Note:</b> An UcxMapIterator iterates over all elements in all element
+ * <b>Note:</b> A UcxMapIterator iterates over all elements in all element
  * lists successively. Therefore the order highly depends on the key hashes and
  * may vary under different map sizes. So generally you may <b>NOT</b> rely on
  * the iteration order.
  * 
  * <b>Note:</b> The iterator is <b>NOT</b> initialized. You need to call
  * ucx_map_iter_next() at least once before accessing any information. However,
- * it is not recommended to access the fields of an UcxMapIterator directly.
+ * it is not recommended to access the fields of a UcxMapIterator directly.
  * 
  * @param map the map to create the iterator for
  * @return an iterator initialized on the first element of the

mercurial