diff options
author | lexborisov <lex.borisov@gmail.com> | 2017-03-21 09:56:42 +0300 |
---|---|---|
committer | lexborisov <lex.borisov@gmail.com> | 2017-03-21 09:56:42 +0300 |
commit | 7024458c55c0baedfb29c2f9db213d3b0474c851 (patch) | |
tree | 7ec10676fc5a24bffed67d9f6f89ba14130ea781 /source/myhtml/utils/mhash.h | |
parent | 0708dba577f51a9cb504db1feeb094aa9badd795 (diff) |
Merge branch 'master' into coverity_scancoverity_scan
Diffstat (limited to 'source/myhtml/utils/mhash.h')
-rw-r--r-- | source/myhtml/utils/mhash.h | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/source/myhtml/utils/mhash.h b/source/myhtml/utils/mhash.h deleted file mode 100644 index c3c8aec..0000000 --- a/source/myhtml/utils/mhash.h +++ /dev/null @@ -1,65 +0,0 @@ -/* - Copyright (C) 2017 Alexander Borisov - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin avl_treet, Fifth Floor, Boston, MA 02110-1301 USA - - Author: lex.borisov@gmail.com (Alexander Borisov) -*/ - -#ifndef html_mhash_h -#define html_mhash_h - -#include "myhtml/myosi.h" -#include "myhtml/utils/mchar_async.h" - -typedef struct myhtml_utils_mhash_entry myhtml_utils_mhash_entry_t; - -struct myhtml_utils_mhash_entry { - char* key; - size_t key_length; - - void *value; - - myhtml_utils_mhash_entry_t* next; -}; - -struct myhtml_utils_mhash { - mchar_async_t* mchar_obj; - size_t mchar_node; - - myhtml_utils_mhash_entry_t** table; - size_t table_size; - size_t table_length; - - size_t table_max_depth; -} -typedef myhtml_utils_mhash_t; - -myhtml_utils_mhash_t * myhtml_utils_mhash_create(void); -myhtml_status_t myhtml_utils_mhash_init(myhtml_utils_mhash_t* mhash, size_t table_size, size_t depth); -void myhtml_utils_mhash_clean(myhtml_utils_mhash_t* mhash); -myhtml_utils_mhash_t * myhtml_utils_mhash_destroy(myhtml_utils_mhash_t* mhash, bool self_destroy); -myhtml_utils_mhash_entry_t * myhtml_utils_mhash_create_entry(myhtml_utils_mhash_t* mhash, const char* key, size_t key_size, void* value); - -myhtml_utils_mhash_entry_t * myhtml_utils_mhash_add(myhtml_utils_mhash_t* mhash, const char* key, size_t key_size, void* value); -myhtml_utils_mhash_entry_t * myhtml_utils_mhash_search(myhtml_utils_mhash_t* mhash, const char* key, size_t key_size, void* value); -myhtml_utils_mhash_entry_t * myhtml_utils_mhash_add_with_choice(myhtml_utils_mhash_t* mhash, const char* key, size_t key_size); - -myhtml_utils_mhash_entry_t * myhtml_utils_mhash_entry_by_id(myhtml_utils_mhash_t* mhash, size_t id); -size_t myhtml_utils_mhash_get_table_size(myhtml_utils_mhash_t* mhash); - -myhtml_utils_mhash_entry_t ** myhtml_utils_mhash_rebuld(myhtml_utils_mhash_t* mhash); - -#endif |