diff --git a/doc/html/README_8md_source.html b/doc/html/README_8md_source.html
index ae38e463..1834e058 100644
--- a/doc/html/README_8md_source.html
+++ b/doc/html/README_8md_source.html
@@ -200,23 +200,24 @@
The following people have helped with suggestions, ideas, code or fixing bugs: (in alphabetical order by first name)
+- Alexandre Lucchesi
- Anthony Tseng
- Cesar
- Colin
diff --git a/doc/html/navtreeindex1.js b/doc/html/navtreeindex1.js
index 1566afbe..69976ff1 100644
--- a/doc/html/navtreeindex1.js
+++ b/doc/html/navtreeindex1.js
@@ -132,14 +132,17 @@ var NAVTREEINDEX1 =
"qsystem_8c.html#a572fee0d88280a0dd1f5ab0905296eea":[0,0,4,7,0],
"qsystem_8c_source.html":[0,0,4,7],
"qtime_8c.html":[0,0,4,8],
-"qtime_8c.html#a0feed44026ab24d9d366c5997a2173b4":[0,0,4,8,1],
-"qtime_8c.html#a1a3f24d676b909313177459cefa78899":[0,0,4,8,4],
-"qtime_8c.html#a689f608f871f45fb772266bf1f18cdd7":[0,0,4,8,0],
-"qtime_8c.html#a6c536941cca900b390fc199eb3b50c6b":[0,0,4,8,7],
-"qtime_8c.html#a7e54e9b38d82df0fe112440a89b372dc":[0,0,4,8,6],
-"qtime_8c.html#a89b28885c2bb13906855cd6c34cfaed7":[0,0,4,8,2],
-"qtime_8c.html#acbacded92c55a0674eec7590b65d7a3d":[0,0,4,8,5],
-"qtime_8c.html#adf628449c7e5425b5c16b61f14a51eaf":[0,0,4,8,3],
+"qtime_8c.html#a0feed44026ab24d9d366c5997a2173b4":[0,0,4,8,4],
+"qtime_8c.html#a1a3f24d676b909313177459cefa78899":[0,0,4,8,7],
+"qtime_8c.html#a689f608f871f45fb772266bf1f18cdd7":[0,0,4,8,3],
+"qtime_8c.html#a6c536941cca900b390fc199eb3b50c6b":[0,0,4,8,10],
+"qtime_8c.html#a78c99ffd76a7bb3c8c74db76207e9ab4":[0,0,4,8,1],
+"qtime_8c.html#a7e54e9b38d82df0fe112440a89b372dc":[0,0,4,8,9],
+"qtime_8c.html#a8773045a81f883f2ab00761f45e8642c":[0,0,4,8,0],
+"qtime_8c.html#a89b28885c2bb13906855cd6c34cfaed7":[0,0,4,8,5],
+"qtime_8c.html#acbacded92c55a0674eec7590b65d7a3d":[0,0,4,8,8],
+"qtime_8c.html#ad3d8a3bd0c0b677acef144f2c2ef6d73":[0,0,4,8,2],
+"qtime_8c.html#adf628449c7e5425b5c16b61f14a51eaf":[0,0,4,8,6],
"qtime_8c_source.html":[0,0,4,8],
"qtokenbucket_8c.html":[0,0,1,5],
"qtokenbucket_8c.html#a5464647c7e3874f8517fdbe787ee6ce3":[0,0,1,5,2],
diff --git a/doc/html/qhashtbl_8c.html b/doc/html/qhashtbl_8c.html
index ca22e2cb..c34a8474 100644
--- a/doc/html/qhashtbl_8c.html
+++ b/doc/html/qhashtbl_8c.html
@@ -305,7 +305,7 @@
-Definition at line 199 of file qhashtbl.c.
+Definition at line 198 of file qhashtbl.c.
@@ -360,7 +360,7 @@
-Definition at line 280 of file qhashtbl.c.
+Definition at line 279 of file qhashtbl.c.
@@ -421,7 +421,7 @@
-Definition at line 296 of file qhashtbl.c.
+Definition at line 295 of file qhashtbl.c.
@@ -477,7 +477,7 @@
- Note
- The integer will be converted to a string object and stored as string object.
-Definition at line 324 of file qhashtbl.c.
+Definition at line 323 of file qhashtbl.c.
@@ -552,7 +552,7 @@
free(data);
- Note
- If newmem flag is set, returned data will be malloced and should be deallocated by user. Otherwise returned pointer will point internal buffer directly and should not be de-allocated by user. In thread-safe mode, newmem flag must be set to true always.
-Definition at line 364 of file qhashtbl.c.
+Definition at line 363 of file qhashtbl.c.
@@ -609,7 +609,7 @@
- Note
- If newmem flag is set, returned data will be malloced and should be deallocated by user.
-Definition at line 423 of file qhashtbl.c.
+Definition at line 422 of file qhashtbl.c.
@@ -658,7 +658,7 @@
-Definition at line 440 of file qhashtbl.c.
+Definition at line 439 of file qhashtbl.c.
@@ -706,7 +706,7 @@
-Definition at line 462 of file qhashtbl.c.
+Definition at line 461 of file qhashtbl.c.
@@ -775,7 +775,7 @@
tbl->unlock(tbl);
- Note
- locking must be provided on user code when all element scan must be guaranteed where multiple threads concurrently update the table. It's ok not to lock the table on the user code even in thread condition, when concurreny is importand and all element scan in a path doesn't need to be guaranteed. In this case, new data inserted during the traversal will be show up in this scan or next scan. Make sure newmem flag is set if deletion is expected during the scan. Object obj should be initialized with 0 by using memset() before first call.
-Definition at line 544 of file qhashtbl.c.
+Definition at line 543 of file qhashtbl.c.
@@ -802,7 +802,7 @@
- Returns
- number of elements stored
-Definition at line 614 of file qhashtbl.c.
+Definition at line 613 of file qhashtbl.c.
@@ -828,7 +828,7 @@
-Definition at line 623 of file qhashtbl.c.
+Definition at line 622 of file qhashtbl.c.
@@ -875,7 +875,7 @@
-Definition at line 655 of file qhashtbl.c.
+Definition at line 654 of file qhashtbl.c.
@@ -904,7 +904,7 @@
-
This operation will do nothing if QHASHTBL_THREADSAFE option was not given at the initialization time.
-Definition at line 687 of file qhashtbl.c.
+Definition at line 686 of file qhashtbl.c.
@@ -931,7 +931,7 @@
- Note
- This operation will do nothing if QHASHTBL_THREADSAFE option was not given at the initialization time.
-Definition at line 700 of file qhashtbl.c.
+Definition at line 699 of file qhashtbl.c.
@@ -957,7 +957,7 @@
-Definition at line 709 of file qhashtbl.c.
+Definition at line 708 of file qhashtbl.c.
diff --git a/doc/html/qhashtbl_8c_source.html b/doc/html/qhashtbl_8c_source.html
index 2d72b073..33fb77f3 100644
--- a/doc/html/qhashtbl_8c_source.html
+++ b/doc/html/qhashtbl_8c_source.html
@@ -243,562 +243,561 @@
-
- 180 assert(tbl->qmutex == NULL);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 201 if (name == NULL || data == NULL) {
-
-
-
-
-
-
- 208 int idx = hash % tbl->range;
-
-
-
-
-
- 214 for (obj = tbl->slots[idx]; obj != NULL; obj = obj->next) {
- 215 if (obj->hash == hash && !strcmp(obj->name, name)) {
-
-
-
-
-
- 221 char *dupname = strdup(name);
- 222 void *dupdata = malloc(size);
- 223 if (dupname == NULL || dupdata == NULL) {
-
-
-
-
-
-
- 230 memcpy(dupdata, data, size);
-
-
-
-
- 235 obj = (qhashtbl_obj_t *) calloc(1,
sizeof(qhashtbl_obj_t));
-
-
-
-
-
-
-
-
- 244 if (tbl->slots[idx] != NULL) {
-
- 246 obj->next = tbl->slots[idx];
-
- 248 tbl->slots[idx] = obj;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 281 return qhashtbl_put(tbl, name, str, (str != NULL) ? (strlen(str) + 1) : 0);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 298 DYNAMIC_VSPRINTF(str, format);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 326 snprintf(str,
sizeof(str),
"%"PRId64, num);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 364 void *
qhashtbl_get(qhashtbl_t *tbl,
const char *name,
size_t *size,
bool newmem) {
-
-
-
-
-
-
- 371 int idx = hash % tbl->range;
-
-
-
-
-
- 377 for (obj = tbl->slots[idx]; obj != NULL; obj = obj->next) {
- 378 if (obj->hash == hash && !strcmp(obj->name, name)) {
-
-
-
-
-
-
- 385 if (newmem ==
false) {
-
-
- 388 data = malloc(obj->size);
-
-
-
-
- 393 memcpy(data, obj->data, obj->size);
-
- 395 if (size != NULL && data != NULL)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 471 int idx = hash % tbl->range;
-
-
-
- 475 qhashtbl_obj_t *prev = NULL;
-
- 477 for (obj = tbl->slots[idx]; obj != NULL; obj = obj->next) {
- 478 if (obj->hash == hash && !strcmp(obj->name, name)) {
-
-
- 481 tbl->slots[idx] = obj->next;
-
- 483 prev->next = obj->next;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 554 qhashtbl_obj_t *cursor = NULL;
-
- 556 if (obj->name != NULL) {
- 557 idx = (obj->hash % tbl->range) + 1;
-
-
-
- 561 if (cursor != NULL) {
-
-
-
-
- 566 for (; idx < tbl->range; idx++) {
- 567 if (tbl->slots[idx] != NULL) {
- 568 cursor = tbl->slots[idx];
-
-
-
-
-
-
- 575 if (cursor != NULL) {
- 576 if (newmem ==
true) {
- 577 obj->name = strdup(cursor->name);
- 578 obj->data = malloc(cursor->size);
- 579 if (obj->name == NULL || obj->data == NULL) {
- 580 DEBUG(
"getnext(): Unable to allocate memory.");
-
-
-
-
-
-
- 587 memcpy(obj->data, cursor->data, cursor->size);
- 588 obj->size = cursor->size;
-
- 590 obj->name = cursor->name;
- 591 obj->data = cursor->data;
-
- 593 obj->hash = cursor->hash;
- 594 obj->size = cursor->size;
- 595 obj->next = cursor->next;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 626 for (idx = 0; idx < tbl->range && tbl->num > 0; idx++) {
- 627 if (tbl->slots[idx] == NULL)
-
- 629 qhashtbl_obj_t *obj = tbl->slots[idx];
- 630 tbl->slots[idx] = NULL;
- 631 while (obj != NULL) {
- 632 qhashtbl_obj_t *next = obj->next;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 662 memset((
void *) &obj, 0,
sizeof(obj));
-
- 664 while (tbl->getnext(tbl, &obj,
false) ==
true) {
- 665 fprintf(out,
"%s=", obj.name);
- 666 _q_textout(out, obj.data, obj.size, MAX_HUMANOUT);
- 667 fprintf(out,
" (%zu, hash=%u)\n", obj.size, obj.hash);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 688 Q_MUTEX_ENTER(tbl->qmutex);
-
-
-
-
-
-
-
-
-
-
-
-
- 701 Q_MUTEX_LEAVE(tbl->qmutex);
-
-
-
-
-
-
-
-
-
-
-
-
- 714 Q_MUTEX_DESTROY(tbl->qmutex);
-
-
-bool qhashtbl_remove(qhashtbl_t *tbl, const char *name)
qhashtbl->remove(): Remove an object from this table.
-size_t qhashtbl_size(qhashtbl_t *tbl)
qhashtbl->size(): Returns the number of keys in this hashtable.
-void qhashtbl_free(qhashtbl_t *tbl)
qhashtbl->free(): De-allocate hash table
-bool qhashtbl_putint(qhashtbl_t *tbl, const char *name, const int64_t num)
qhashtbl->putint(): Put a integer into this table as string type.
-void qhashtbl_clear(qhashtbl_t *tbl)
qhashtbl->clear(): Clears this hashtable so that it contains no keys.
-bool qhashtbl_putstr(qhashtbl_t *tbl, const char *name, const char *str)
qhashtbl->putstr(): Put a string into this table.
-void qhashtbl_lock(qhashtbl_t *tbl)
qhashtbl->lock(): Enter critical section.
-int64_t qhashtbl_getint(qhashtbl_t *tbl, const char *name)
qhashtbl->getint(): Finds an object with given name and returns as integer type.
-bool qhashtbl_put(qhashtbl_t *tbl, const char *name, const void *data, size_t size)
qhashtbl->put(): Put an object into this table.
-char * qhashtbl_getstr(qhashtbl_t *tbl, const char *name, const bool newmem)
qhashtbl->getstr(): Finds an object and returns as string type.
+ 179 assert(tbl->qmutex == NULL);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 200 if (name == NULL || data == NULL) {
+
+
+
+
+
+
+ 207 int idx = hash % tbl->range;
+
+
+
+
+
+ 213 for (obj = tbl->slots[idx]; obj != NULL; obj = obj->next) {
+ 214 if (obj->hash == hash && !strcmp(obj->name, name)) {
+
+
+
+
+
+ 220 char *dupname = strdup(name);
+ 221 void *dupdata = malloc(size);
+ 222 if (dupname == NULL || dupdata == NULL) {
+
+
+
+
+
+
+ 229 memcpy(dupdata, data, size);
+
+
+
+
+ 234 obj = (qhashtbl_obj_t *) calloc(1,
sizeof(qhashtbl_obj_t));
+
+
+
+
+
+
+
+
+ 243 if (tbl->slots[idx] != NULL) {
+
+ 245 obj->next = tbl->slots[idx];
+
+ 247 tbl->slots[idx] = obj;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 280 return qhashtbl_put(tbl, name, str, (str != NULL) ? (strlen(str) + 1) : 0);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 297 DYNAMIC_VSPRINTF(str, format);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 325 snprintf(str,
sizeof(str),
"%"PRId64, num);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 363 void *
qhashtbl_get(qhashtbl_t *tbl,
const char *name,
size_t *size,
bool newmem) {
+
+
+
+
+
+
+ 370 int idx = hash % tbl->range;
+
+
+
+
+
+ 376 for (obj = tbl->slots[idx]; obj != NULL; obj = obj->next) {
+ 377 if (obj->hash == hash && !strcmp(obj->name, name)) {
+
+
+
+
+
+
+ 384 if (newmem ==
false) {
+
+
+ 387 data = malloc(obj->size);
+
+
+
+
+ 392 memcpy(data, obj->data, obj->size);
+
+ 394 if (size != NULL && data != NULL)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 470 int idx = hash % tbl->range;
+
+
+
+ 474 qhashtbl_obj_t *prev = NULL;
+
+ 476 for (obj = tbl->slots[idx]; obj != NULL; obj = obj->next) {
+ 477 if (obj->hash == hash && !strcmp(obj->name, name)) {
+
+
+ 480 tbl->slots[idx] = obj->next;
+
+ 482 prev->next = obj->next;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 553 qhashtbl_obj_t *cursor = NULL;
+
+ 555 if (obj->name != NULL) {
+ 556 idx = (obj->hash % tbl->range) + 1;
+
+
+
+ 560 if (cursor != NULL) {
+
+
+
+
+ 565 for (; idx < tbl->range; idx++) {
+ 566 if (tbl->slots[idx] != NULL) {
+ 567 cursor = tbl->slots[idx];
+
+
+
+
+
+
+ 574 if (cursor != NULL) {
+ 575 if (newmem ==
true) {
+ 576 obj->name = strdup(cursor->name);
+ 577 obj->data = malloc(cursor->size);
+ 578 if (obj->name == NULL || obj->data == NULL) {
+ 579 DEBUG(
"getnext(): Unable to allocate memory.");
+
+
+
+
+
+
+ 586 memcpy(obj->data, cursor->data, cursor->size);
+ 587 obj->size = cursor->size;
+
+ 589 obj->name = cursor->name;
+ 590 obj->data = cursor->data;
+
+ 592 obj->hash = cursor->hash;
+ 593 obj->size = cursor->size;
+ 594 obj->next = cursor->next;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 625 for (idx = 0; idx < tbl->range && tbl->num > 0; idx++) {
+ 626 if (tbl->slots[idx] == NULL)
+
+ 628 qhashtbl_obj_t *obj = tbl->slots[idx];
+ 629 tbl->slots[idx] = NULL;
+ 630 while (obj != NULL) {
+ 631 qhashtbl_obj_t *next = obj->next;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 661 memset((
void *) &obj, 0,
sizeof(obj));
+
+ 663 while (tbl->getnext(tbl, &obj,
false) ==
true) {
+ 664 fprintf(out,
"%s=", obj.name);
+ 665 _q_textout(out, obj.data, obj.size, MAX_HUMANOUT);
+ 666 fprintf(out,
" (%zu, hash=%u)\n", obj.size, obj.hash);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 687 Q_MUTEX_ENTER(tbl->qmutex);
+
+
+
+
+
+
+
+
+
+
+
+
+ 700 Q_MUTEX_LEAVE(tbl->qmutex);
+
+
+
+
+
+
+
+
+
+
+
+
+ 713 Q_MUTEX_DESTROY(tbl->qmutex);
+
+
+bool qhashtbl_remove(qhashtbl_t *tbl, const char *name)
qhashtbl->remove(): Remove an object from this table.
+size_t qhashtbl_size(qhashtbl_t *tbl)
qhashtbl->size(): Returns the number of keys in this hashtable.
+void qhashtbl_free(qhashtbl_t *tbl)
qhashtbl->free(): De-allocate hash table
+bool qhashtbl_putint(qhashtbl_t *tbl, const char *name, const int64_t num)
qhashtbl->putint(): Put a integer into this table as string type.
+void qhashtbl_clear(qhashtbl_t *tbl)
qhashtbl->clear(): Clears this hashtable so that it contains no keys.
+bool qhashtbl_putstr(qhashtbl_t *tbl, const char *name, const char *str)
qhashtbl->putstr(): Put a string into this table.
+void qhashtbl_lock(qhashtbl_t *tbl)
qhashtbl->lock(): Enter critical section.
+int64_t qhashtbl_getint(qhashtbl_t *tbl, const char *name)
qhashtbl->getint(): Finds an object with given name and returns as integer type.
+bool qhashtbl_put(qhashtbl_t *tbl, const char *name, const void *data, size_t size)
qhashtbl->put(): Put an object into this table.
+char * qhashtbl_getstr(qhashtbl_t *tbl, const char *name, const bool newmem)
qhashtbl->getstr(): Finds an object and returns as string type.
#define DEFAULT_INDEX_RANGE
uint32_t qhashmurmur3_32(const void *data, size_t nbytes)
Get 32-bit Murmur3 hash.
qhashtbl_t * qhashtbl(size_t range, int options)
Initialize hash table.
-void qhashtbl_unlock(qhashtbl_t *tbl)
qhashtbl->unlock(): Leave critical section.
-bool qhashtbl_getnext(qhashtbl_t *tbl, qhashtbl_obj_t *obj, const bool newmem)
qhashtbl->getnext(): Get next element.
-bool qhashtbl_putstrf(qhashtbl_t *tbl, const char *name, const char *format,...)
qhashtbl->putstrf(): Put a formatted string into this table.
-void * qhashtbl_get(qhashtbl_t *tbl, const char *name, size_t *size, bool newmem)
qhashtbl->get(): Get an object from this table.
-bool qhashtbl_debug(qhashtbl_t *tbl, FILE *out)
qhashtbl->debug(): Print hash table for debugging purpose
+void qhashtbl_unlock(qhashtbl_t *tbl)
qhashtbl->unlock(): Leave critical section.
+bool qhashtbl_getnext(qhashtbl_t *tbl, qhashtbl_obj_t *obj, const bool newmem)
qhashtbl->getnext(): Get next element.
+bool qhashtbl_putstrf(qhashtbl_t *tbl, const char *name, const char *format,...)
qhashtbl->putstrf(): Put a formatted string into this table.
+void * qhashtbl_get(qhashtbl_t *tbl, const char *name, size_t *size, bool newmem)
qhashtbl->get(): Get an object from this table.
+bool qhashtbl_debug(qhashtbl_t *tbl, FILE *out)
qhashtbl->debug(): Print hash table for debugging purpose
diff --git a/doc/html/qtime_8c.html b/doc/html/qtime_8c.html
index 905a76e6..a64901b5 100644
--- a/doc/html/qtime_8c.html
+++ b/doc/html/qtime_8c.html
@@ -62,6 +62,7 @@