
RCS file: RCS/GPL.txt,v
Working file: GPL.txt
head: 1.1
branch:
locks: strict
	maoyam: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;	selected revisions: 1
description:
GNU General Public License
----------------------------
revision 1.1	locked by: maoyam;
date: 2005/10/18 17:48:50;  author: maoyam;  state: Exp;
Initial revision
=============================================================================

RCS file: RCS/Makefile,v
Working file: Makefile
head: 1.3
branch:
locks: strict
	maoyam: 1.3
access list:
symbolic names:
keyword substitution: kv
total revisions: 3;	selected revisions: 3
description:
Makefile for building the unit test profram 'unit_test' that is designed to
*test the 'simple_hashing.c' API-s.
----------------------------
revision 1.3	locked by: maoyam;
date: 2007/01/07 18:15:53;  author: maoyam;  state: Exp;  lines: +10 -1
MOD: checked with in `splint (secure program lint)'
----------------------------
revision 1.2
date: 2006/04/08 17:46:42;  author: maoyam;  state: Exp;  lines: +2 -2
Mod: added -Werror opriont
----------------------------
revision 1.1
date: 2005/05/03 20:57:23;  author: maoyam;  state: Exp;
Initial revision
=============================================================================

RCS file: RCS/index.html,v
Working file: index.html
head: 1.16
branch:
locks: strict
	maoyam: 1.16
access list:
symbolic names:
keyword substitution: kv
total revisions: 16;	selected revisions: 16
description:
The documentation of "simple_hashing.c" and "unit_test.c" in HTML4.01.
----------------------------
revision 1.16	locked by: maoyam;
date: 2005/06/26 07:43:03;  author: maoyam;  state: Exp;  lines: +185 -440
Add: machine translation link.
----------------------------
revision 1.15
date: 2005/06/04 12:58:35;  author: maoyam;  state: Exp;  lines: +3 -3
Changed: typos of   comments usign 'aspell check'.
----------------------------
revision 1.14
date: 2005/05/21 02:57:31;  author: maoyam;  state: Exp;  lines: +171 -57
Changed: results of perdormance tests.
Changed: create_hash_table() API explains.
----------------------------
revision 1.13
date: 2005/05/17 13:33:46;  author: maoyam;  state: Exp;  lines: +4 -6
Changed: bsearch_array() never outputs -1 to *pos.
----------------------------
revision 1.12
date: 2005/05/16 12:11:56;  author: maoyam;  state: Exp;  lines: +18 -18
Changed: results of performance test.
----------------------------
revision 1.11
date: 2005/05/15 15:09:44;  author: maoyam;  state: Exp;  lines: +208 -14
Add: section of "simple_hashing.c API performance test results".
Add: get_allocated_size_hash_table() API explains.
----------------------------
revision 1.10
date: 2005/05/13 16:18:13;  author: maoyam;  state: Exp;  lines: +3 -2
Changed: e HASHTABLE_SYSTEM_PAGESIZE_DEFAULT macro explais.
----------------------------
revision 1.9
date: 2005/05/13 15:56:03;  author: maoyam;  state: Exp;  lines: +43 -1
Added: member explains: Hashtable_t structure (elem_cnt_per_page, max_insert_cnt, alloc_base_cnt and elems_ext_cnt : all members are typed ssize_t).
----------------------------
revision 1.8
date: 2005/05/13 12:28:29;  author: maoyam;  state: Exp;  lines: +50 -18
Changed: UnitTest describes "performance test" results. te result explains fixing the performance bugs in 2005/05/12 found.
Changed: create_hash_table(), insert_hash_table() and replace_hash_table() API reference for 'elements' extension hint mechanism.
----------------------------
revision 1.7
date: 2005/05/12 12:58:30;  author: maoyam;  state: Exp;  lines: +4 -3
Cahnged: delete_hash_table() API explains: elem argument accepts NULL.
----------------------------
revision 1.6
date: 2005/05/08 16:43:19;  author: maoyam;  state: Exp;  lines: +17 -0
Added: performance test describes.
----------------------------
revision 1.5
date: 2005/05/08 13:01:19;  author: maoyam;  state: Exp;  lines: +6 -0
Changed: add the <HR> tags at the secrion delimitts.
----------------------------
revision 1.4
date: 2005/05/06 08:29:37;  author: maoyam;  state: Exp;  lines: +46 -38
a  Changed: all API explains argument means and  purposes.
----------------------------
revision 1.3
date: 2005/05/05 13:07:28;  author: maoyam;  state: Exp;  lines: +21 -12
Changed: typo:     serveral typos.
Changed: bsearch_array() API explains: When the aruguments are illegal, this API returns zero and set 'errno' to EINVAL.
----------------------------
revision 1.2
date: 2005/05/04 18:32:30;  author: maoyam;  state: Exp;  lines: +2 -2
Changed: bsearch_array(): pos_cmp_result explains mis-explains are fixed.
----------------------------
revision 1.1
date: 2005/05/04 18:11:56;  author: maoyam;  state: Exp;
Initial revision
=============================================================================

RCS file: RCS/simple_hashing.c,v
Working file: simple_hashing.c
head: 1.19
branch:
locks: strict
	maoyam: 1.19
access list:
symbolic names:
keyword substitution: kv
total revisions: 19;	selected revisions: 19
description:
Simple hashing API
----------------------------
revision 1.19	locked by: maoyam;
date: 2007/01/07 18:16:11;  author: maoyam;  state: Exp;  lines: +49 -42
MOD: checked within `splint (secure program lint)'
----------------------------
revision 1.18
date: 2006/06/25 01:26:32;  author: maoyam;  state: Exp;  lines: +9 -4
BUG-FIXED: binary search: `mid' calculating "(hi + lo) /2" causes "integer range overflow" bug. Changed it to "((size_t)hi + (size_t)lo) >> 1".
----------------------------
revision 1.17
date: 2005/10/18 17:49:02;  author: maoyam;  state: Exp;  lines: +22 -1
MOD: initalize errno in external functions.
----------------------------
revision 1.16
date: 2005/06/04 12:57:10;  author: maoyam;  state: Exp;  lines: +49 -48
Changed: ttypos of comments. checked usign   'aspell check'.
----------------------------
revision 1.15
date: 2005/05/21 02:55:06;  author: maoyam;  state: Exp;  lines: +2 -2
Changed:    error output comments
----------------------------
revision 1.14
date: 2005/05/17 13:32:23;  author: maoyam;  state: Exp;  lines: +16 -19
Changed: bsearch_array(): never output -1 to *pos.
----------------------------
revision 1.13
date: 2005/05/16 12:11:23;  author: maoyam;  state: Exp;  lines: +4 -1
BUG-FIX: _insert_hash_table(): free(old_elements); old_elements = NULL;
----------------------------
revision 1.12
date: 2005/05/15 14:57:14;  author: maoyam;  state: Exp;  lines: +109 -55
Changed: IS_HASHTABLE_TABLES_FULL and IS_HASHTABLE_ELEMS_ELEMENTS_FULL macros arguments takes pointer to Hashtable_t and Hashtable_elems_t.
Add: IS_HASHTABLE_ELEMS_ELEMENTS_ALLOCATED macro.
Add: get_allocated_size_hash_table() API returns size of allocated areas of the hash table.
BUG-FIX: get_elems   get_elem_by_hashtable_cursor(): direct is HASHTABLE_CURSOR_NEXT and HASHTABLE_CURSOR_PREVIOUS, mistaken.
----------------------------
revision 1.11
date: 2005/05/13 15:53:41;  author: maoyam;  state: Exp;  lines: +8 -3
Changed: eval_hint(): system default page size defined HASHTABLE_SYSTEM_PAGESIZE_DEFAULT (= 4096 Kbye  Kbytes)
----------------------------
revision 1.10
date: 2005/05/13 12:17:04;  author: maoyam;  state: Exp;  lines: +237 -13
Added: Hasntable_extend_hint_t ('elements' array extension hints) evaluate 'eval_hint()' and calculate extend datum counts 'get_extend_elem_cnt()' sim   private methods.
Added: min() and adjust_allocate_base_cnt() provate methods.
Changed: create_hash_table() API: 'hint' argument and invoke     invoking 'eval_hint()'.
Changed: insert_hash_table() and replace_hash_table(): If hint.elems_ext_cnt is zero, these API-s returns error and set 'errno' to 'ENOMEM' (it'ts mea   (it means "NEVER EXTEND ELEMENTS ARRAY").
Changed: _insert_hash_table(): refer the hint informations for extend the 'elements' array areas.
----------------------------
revision 1.9
date: 2005/05/12 12:55:24;  author: maoyam;  state: Exp;  lines: +3 -4
Changed: delete_hash_table(): elem argument is NULL, this API delete the matched datum in hashtable.
----------------------------
revision 1.8
date: 2005/05/08 16:34:28;  author: maoyam;  state: Exp;  lines: +7 -7
BUG-FIXED: find_element(): 'elements_idx' type is changed to 'ssize_t *'.
BUG-FIXED: find_element(): invoke 'bsearch_array()' .
BUG-FIXED: _insert_hash_table(), het_elem_hash_table(), delete_hash_table():
               'elements_idx' and 'rest_elements_cnt' type s are changed 'ssize_t'.
----------------------------
revision 1.7
date: 2005/05/08 12:42:36;  author: maoyam;  state: Exp;  lines: +62 -32
BUG-FIXED: find_element(): When the 'duplicated_cnt' is zero, initialize '*elements_idx' to zero (insert position is the first), and initialize '*pos_cmp_result' to -1 (insert the head of the first   previous of the first).
Changed: _insert_hash_table(): optimized to move the datum in    inserted to the expanded 'elements' array.
----------------------------
revision 1.6
date: 2005/05/05 13:02:12;  author: maoyam;  state: Exp;  lines: +29 -15
Changed: is_sane_hash_table(): depth isn't tested. tab

Changed: is_sane_hash_table(): tables address isn't tested. used_cnt is tested.
Added: severalc comments.
Changed: bsearch_array(): When the arguments are illegal, this returns 0 and set 'errno' to EINVAL.
----------------------------
revision 1.5
date: 2005/05/04 18:04:43;  author: maoyam;  state: Exp;  lines: +18 -16
Changed: simple_hash_value(): check the illegal arguments (*keys != NULL).
Changed: get_XXXX_cnt_xxxx(): illegal argument: returns ILLEGAL_HASH_VAL to INT_MIN.
         or LONG_MIN, ULONG_MAX.
Changed: delete_hash_table(): check the found datum address equals the deleting datyum.
Changed: bsearch_array(): Ileg   illegal arhuments: return INT_MIN comment.
----------------------------
revision 1.4
date: 2005/05/03 20:42:27;  author: maoyam;  state: Exp;  lines: +441 -1471
Added comments for API explains.
Changed searching method for 'elements' array. linear search --> binbary search using 'bsearch_array()' API.
Fixed bugs: 'errno' reset.
Added cursor mechanism for this hash table API
Added binary a search API 'bsearch_array()'.
Changed unit test program codes exported to 'unit_test.c' new source file.
Changed 'make_hashval()' unit test function to external function in simple_hashing.c
----------------------------
revision 1.3
date: 2005/05/01 05:19:59;  author: maoyam;  state: Exp;  lines: +6 -6
Changed 'simple_hash_value()' making hash value method (non-strnumeric keys).
----------------------------
revision 1.2
date: 2005/04/30 18:58:10;  author: maoyam;  state: Exp;  lines: +50 -40
Changed 'simple_hash_value()' process non-numeric string method.
----------------------------
revision 1.1
date: 2005/04/30 15:29:30;  author: maoyam;  state: Exp;
Initial revision
=============================================================================

RCS file: RCS/simple_hashing.h,v
Working file: simple_hashing.h
head: 1.11
branch:
locks: strict
	maoyam: 1.11
access list:
symbolic names:
keyword substitution: kv
total revisions: 11;	selected revisions: 11
description:
Simple Hashing API's header file.
----------------------------
revision 1.11	locked by: maoyam;
date: 2007/01/07 18:16:29;  author: maoyam;  state: Exp;  lines: +3 -2
MOD: checked with in `splint (secure program lint)'
----------------------------
revision 1.10
date: 2005/06/04 12:57:42;  author: maoyam;  state: Exp;  lines: +23 -23
Changed: typos of comments. usign   'aspell check'.
----------------------------
revision 1.9
date: 2005/05/21 02:56:20;  author: maoyam;  state: Exp;  lines: +2 -2
Changed: error output comments.
----------------------------
revision 1.8
date: 2005/05/17 13:33:03;  author: maoyam;  state: Exp;  lines: +7 -7
Changed: bsearch_array(): never output -1 to *pos.
----------------------------
revision 1.7
date: 2005/05/15 15:03:16;  author: maoyam;  state: Exp;  lines: +21 -5
Changed: IS_HASHTABLE_ELEMS_ELEMENTS_FULL and IS_HASHTABLE_ELEMS_ELEMENTS_FULL
Change: IS_JASJTABLE_ELEMS_ELEMENTS_FULL and IS_HASHTABLE_TABLES_FULL macros take pointer to Hashtable_t and    to Hashtable_elems_t and Hashtable_t.
Add: IS_HASHTABLE_ELEMS_ELEMENTS_ALLOCATED macro.
Add: get_allocated_size_hash_tabke  table() API returns size of the allocated areas of the hash table.
----------------------------
revision 1.6
date: 2005/05/13 16:04:20;  author: maoyam;  state: Exp;  lines: +2 -2
Changed: HashTABLE_SYSTEM_PAGESIZE_DEFAULT macro (4 * 1024).
----------------------------
revision 1.5
date: 2005/05/13 15:55:16;  author: maoyam;  state: Exp;  lines: +2 -1
Changed: HASHTABLE_SYSTEM_PAGESIZE_DEFAULT (- = 4096kbytes).
----------------------------
revision 1.4
date: 2005/05/13 12:22:50;  author: maoyam;  state: Exp;  lines: +53 -10
Added: Hashtable_extend_hint_t strucuturet   structure for 'create_hash_table()' and 'insert_hash_table()' and 'replace_hash_table()' API-s.
       this structure indicates thmaximum insert datum counts, the first allocation datum array    counts and th  extension datum counts.
Changed: create_hash_table() prototyping: arg4 'hint' typed Hashtable_extend_t is added.
Change: insert_hash_table() and replace_hash_table(): error information 'errno' ENOMEM is set, when the hint for 'create_hash_table()7 means "NEVER EXTEND ELEMENTS ARRAY", too.
----------------------------
revision 1.3
date: 2005/05/04 18:08:44;  author: maoyam;  state: Exp;  lines: +7 -6
Change: type miss: n_eys --> n_keys in comment.
Changes: comments: ILLEGAL_HASH_VAL --> LONG_MIN.
Changed: comments: ULONG_MAX --> LONG_MIN.
Changed:comments: bsearch_array(): illegal arguments returns INT_MIN.
----------------------------
revision 1.2
date: 2005/05/03 20:51:07;  author: maoyam;  state: Exp;  lines: +190 -19
Added comments for explaining API-s (arguments meaning).
Added binary search API 'bsearch_array()'.
Added unit test function 'make_v 'make_hashval()'.
Changed types unsigned size type to signed size 'ssize_t':
     duplicated_cnt, elements_len.  And changed several API0-s prototypings.
Added cursor mechanis API 'get_elem_by_hashtable_cursor()' and
     cursor structure 'Hashtable_cursor_t' and 'Hashtable_cursur_dir_t'.
----------------------------
revision 1.1
date: 2005/04/30 15:28:25;  author: maoyam;  state: Exp;
Initial revision
=============================================================================

RCS file: RCS/unit_test.c,v
Working file: unit_test.c
head: 1.13
branch:
locks: strict
	maoyam: 1.13
access list:
symbolic names:
keyword substitution: kv
total revisions: 13;	selected revisions: 13
description:
Unit test program codes for 'simple_hashing.c' API-s.
this codes were extracted from 'simple_?hashing.c', but 'make_hashval()' becomes
an external function in 'simpel 'simple_hashing.c' for unit testing.
----------------------------
revision 1.13	locked by: maoyam;
date: 2007/01/07 18:16:47;  author: maoyam;  state: Exp;  lines: +557 -433
MOD: checked within `splint (secure program lint)'
----------------------------
revision 1.12
date: 2006/04/08 17:47:23;  author: maoyam;  state: Exp;  lines: +415 -379
Mod; printf format (type casting)
----------------------------
revision 1.11
date: 2005/06/04 12:58:01;  author: maoyam;  state: Exp;  lines: +5 -5
Changed: typos of comments,   using 'aspell check'.
----------------------------
revision 1.10
date: 2005/05/21 02:56:50;  author: maoyam;  state: Exp;  lines: +293 -117
Changed: performance tests.
----------------------------
revision 1.9
date: 2005/05/17 13:33:26;  author: maoyam;  state: Exp;  lines: +2 -2
Changed: bsearch_array(): never output -1 to *pos.
----------------------------
revision 1.8
date: 2005/05/16 13:00:10;  author: maoyam;  state: Exp;  lines: +2 -1
BUG-FIXED: performance test clears the 'elem' pointer.
----------------------------
revision 1.7
date: 2005/05/15 15:06:41;  author: maoyam;  state: Exp;  lines: +220 -10
Add: get_allocated_size_hash_table() unit tests.
Changed: get_elem_by_hashtable_cursor() unit test: direct is HASHTABLE_CURSOR_DIR_CURRENT and HASHTABLE_CURSOR_DIR_PREVIOUS cases. (-T).
Add.
----------------------------
revision 1.6
date: 2005/05/13 12:27:13;  author: maoyam;  state: Exp;  lines: +74 -21
Added: 'elements' extension hints mechanism tesut    tests (performance test "-P").
----------------------------
revision 1.5
date: 2005/05/12 12:56:59;  author: maoyam;  state: Exp;  lines: +31 -3
Added: delete_hash_table() test: case the elem argument is NULL. 1) no matched datum 2) key matched datum forced delet without datum address checking.
----------------------------
revision 1.4
date: 2005/05/08 16:38:39;  author: maoyam;  state: Exp;  lines: +494 -127
Added: main(): perormance test (command option "-P").
BUG-FIXED: main(): several index variables changed types to 'ssize_t' and 'size_t'.
BUG-FIXED: main(): several printf()-format strings type casts changed to (long) and (unsigned long) (%ld, %lu).
----------------------------
revision 1.3
date: 2005/05/05 13:05:31;  author: maoyam;  state: Exp;  lines: +237 -6
Added: bsearch_array() test routines in the illegal arguments test phase.
Changed: cmp_keys(): set 'errno' to zero before breaking the for-loop.
----------------------------
revision 1.2
date: 2005/05/04 18:11:00;  author: maoyam;  state: Exp;  lines: +5 -5
Changed: illegal arguments: ILLEGAL_HASH_VAL --> LONG_MIN.
----------------------------
revision 1.1
date: 2005/05/03 20:55:45;  author: maoyam;  state: Exp;
Initial revision
=============================================================================
