You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@etch.apache.org by jd...@apache.org on 2009/04/22 19:25:51 UTC

svn commit: r767594 [1/43] - in /incubator/etch/trunk/binding-c/runtime/c: ./ ext/ ext/hashtab/ ext/lib/ inc/ lib/ project/ project/$etchstop/ project/bin/ project/etch/ project/logcli/ project/logsrv/ project/notes/ project/test/ project/test/logcli/ ...

Author: jdecocq
Date: Wed Apr 22 17:25:43 2009
New Revision: 767594

URL: http://svn.apache.org/viewvc?rev=767594&view=rev
Log: (empty)

Added:
    incubator/etch/trunk/binding-c/runtime/c/
    incubator/etch/trunk/binding-c/runtime/c/apr_private_common.h
    incubator/etch/trunk/binding-c/runtime/c/ext/
    incubator/etch/trunk/binding-c/runtime/c/ext/hashtab/
    incubator/etch/trunk/binding-c/runtime/c/ext/hashtab/jenkfasthash.c
    incubator/etch/trunk/binding-c/runtime/c/ext/hashtab/jenkhash.sln
    incubator/etch/trunk/binding-c/runtime/c/ext/hashtab/jenkhash.vcproj
    incubator/etch/trunk/binding-c/runtime/c/ext/hashtab/jenkhtab.c
    incubator/etch/trunk/binding-c/runtime/c/ext/hashtab/jenkhtab.h
    incubator/etch/trunk/binding-c/runtime/c/ext/hashtab/jenklook.c
    incubator/etch/trunk/binding-c/runtime/c/ext/hashtab/jenklook.h
    incubator/etch/trunk/binding-c/runtime/c/ext/hashtab/jenkmake.txt
    incubator/etch/trunk/binding-c/runtime/c/ext/hashtab/jenkrecy.c
    incubator/etch/trunk/binding-c/runtime/c/ext/hashtab/jenkrecy.h
    incubator/etch/trunk/binding-c/runtime/c/ext/hashtab/jenkstd.h
    incubator/etch/trunk/binding-c/runtime/c/ext/hashtab/jenktest.c
    incubator/etch/trunk/binding-c/runtime/c/ext/hashtab/jenktest.txt
    incubator/etch/trunk/binding-c/runtime/c/ext/hashtab/postbuild.bat
    incubator/etch/trunk/binding-c/runtime/c/ext/hashtab/readme-jenk.txt
    incubator/etch/trunk/binding-c/runtime/c/ext/lib/
    incubator/etch/trunk/binding-c/runtime/c/ext/lib/jenkhash.lib   (with props)
    incubator/etch/trunk/binding-c/runtime/c/inc/
    incubator/etch/trunk/binding-c/runtime/c/inc/apr_arch_thread_cond.h
    incubator/etch/trunk/binding-c/runtime/c/inc/apr_private.h
    incubator/etch/trunk/binding-c/runtime/c/inc/etch.h
    incubator/etch/trunk/binding-c/runtime/c/inc/etch_apr.h
    incubator/etch/trunk/binding-c/runtime/c/inc/etch_arraylist.h
    incubator/etch/trunk/binding-c/runtime/c/inc/etch_arrayval.h
    incubator/etch/trunk/binding-c/runtime/c/inc/etch_binary_tdi.h
    incubator/etch/trunk/binding-c/runtime/c/inc/etch_binary_tdo.h
    incubator/etch/trunk/binding-c/runtime/c/inc/etch_collection.h
    incubator/etch/trunk/binding-c/runtime/c/inc/etch_config.h
    incubator/etch/trunk/binding-c/runtime/c/inc/etch_connection.h
    incubator/etch/trunk/binding-c/runtime/c/inc/etch_defvalufact.h
    incubator/etch/trunk/binding-c/runtime/c/inc/etch_encoding.h
    incubator/etch/trunk/binding-c/runtime/c/inc/etch_field.h
    incubator/etch/trunk/binding-c/runtime/c/inc/etch_global.h
    incubator/etch/trunk/binding-c/runtime/c/inc/etch_id_name.h
    incubator/etch/trunk/binding-c/runtime/c/inc/etch_linklist.h
    incubator/etch/trunk/binding-c/runtime/c/inc/etch_mailboxint.h
    incubator/etch/trunk/binding-c/runtime/c/inc/etch_mailboxmgr.h
    incubator/etch/trunk/binding-c/runtime/c/inc/etch_message.h
    incubator/etch/trunk/binding-c/runtime/c/inc/etch_messagizer.h
    incubator/etch/trunk/binding-c/runtime/c/inc/etch_objects.h
    incubator/etch/trunk/binding-c/runtime/c/inc/etch_packetizer.h
    incubator/etch/trunk/binding-c/runtime/c/inc/etch_plainmailbox.h
    incubator/etch/trunk/binding-c/runtime/c/inc/etch_plainmboxmgr.h
    incubator/etch/trunk/binding-c/runtime/c/inc/etch_queue.h
    incubator/etch/trunk/binding-c/runtime/c/inc/etch_queue_apr.h
    incubator/etch/trunk/binding-c/runtime/c/inc/etch_remote.h
    incubator/etch/trunk/binding-c/runtime/c/inc/etch_resources.h
    incubator/etch/trunk/binding-c/runtime/c/inc/etch_serializer.h
    incubator/etch/trunk/binding-c/runtime/c/inc/etch_sessiondata.h
    incubator/etch/trunk/binding-c/runtime/c/inc/etch_sessionint.h
    incubator/etch/trunk/binding-c/runtime/c/inc/etch_sessionlisten.h
    incubator/etch/trunk/binding-c/runtime/c/inc/etch_sessionmsg.h
    incubator/etch/trunk/binding-c/runtime/c/inc/etch_sessionpkt.h
    incubator/etch/trunk/binding-c/runtime/c/inc/etch_simpletimer.h
    incubator/etch/trunk/binding-c/runtime/c/inc/etch_sourceint.h
    incubator/etch/trunk/binding-c/runtime/c/inc/etch_structval.h
    incubator/etch/trunk/binding-c/runtime/c/inc/etch_stub.h
    incubator/etch/trunk/binding-c/runtime/c/inc/etch_svcobj_masks.h
    incubator/etch/trunk/binding-c/runtime/c/inc/etch_syncobj.h
    incubator/etch/trunk/binding-c/runtime/c/inc/etch_tagdata.h
    incubator/etch/trunk/binding-c/runtime/c/inc/etch_tagdata_inp.h
    incubator/etch/trunk/binding-c/runtime/c/inc/etch_tagdata_out.h
    incubator/etch/trunk/binding-c/runtime/c/inc/etch_tcpconxn.h
    incubator/etch/trunk/binding-c/runtime/c/inc/etch_tcpserver.h
    incubator/etch/trunk/binding-c/runtime/c/inc/etch_tdformat.h
    incubator/etch/trunk/binding-c/runtime/c/inc/etch_threadpool_apr.h
    incubator/etch/trunk/binding-c/runtime/c/inc/etch_transport.h
    incubator/etch/trunk/binding-c/runtime/c/inc/etch_transportdata.h
    incubator/etch/trunk/binding-c/runtime/c/inc/etch_transportint.h
    incubator/etch/trunk/binding-c/runtime/c/inc/etch_transportmsg.h
    incubator/etch/trunk/binding-c/runtime/c/inc/etch_transportpkt.h
    incubator/etch/trunk/binding-c/runtime/c/inc/etch_type.h
    incubator/etch/trunk/binding-c/runtime/c/inc/etch_url.h
    incubator/etch/trunk/binding-c/runtime/c/inc/etch_validator.h
    incubator/etch/trunk/binding-c/runtime/c/inc/etch_valuefact.h
    incubator/etch/trunk/binding-c/runtime/c/inc/etch_valufact.h
    incubator/etch/trunk/binding-c/runtime/c/inc/etchdefs.h
    incubator/etch/trunk/binding-c/runtime/c/inc/etchexcp.h
    incubator/etch/trunk/binding-c/runtime/c/inc/etchflexbuf.h
    incubator/etch/trunk/binding-c/runtime/c/inc/etchhash.h
    incubator/etch/trunk/binding-c/runtime/c/inc/etchlog.h
    incubator/etch/trunk/binding-c/runtime/c/inc/etchmap.h
    incubator/etch/trunk/binding-c/runtime/c/inc/etchmem.h
    incubator/etch/trunk/binding-c/runtime/c/inc/etchmsgutl.h
    incubator/etch/trunk/binding-c/runtime/c/inc/etchmutex.h
    incubator/etch/trunk/binding-c/runtime/c/inc/etchobj.h
    incubator/etch/trunk/binding-c/runtime/c/inc/etchobjtypes.h
    incubator/etch/trunk/binding-c/runtime/c/inc/etchrun.h
    incubator/etch/trunk/binding-c/runtime/c/inc/etchthread.h
    incubator/etch/trunk/binding-c/runtime/c/inc/etchutl.h
    incubator/etch/trunk/binding-c/runtime/c/inc/etchwarn.h
    incubator/etch/trunk/binding-c/runtime/c/lib/
    incubator/etch/trunk/binding-c/runtime/c/project/
    incubator/etch/trunk/binding-c/runtime/c/project/$etchstop/
    incubator/etch/trunk/binding-c/runtime/c/project/$etchstop/$etchstop.vcproj
    incubator/etch/trunk/binding-c/runtime/c/project/bin/
    incubator/etch/trunk/binding-c/runtime/c/project/debugnotes.txt
    incubator/etch/trunk/binding-c/runtime/c/project/etch/
    incubator/etch/trunk/binding-c/runtime/c/project/etch-c-client.properties
    incubator/etch/trunk/binding-c/runtime/c/project/etch-c-server.properties
    incubator/etch/trunk/binding-c/runtime/c/project/etch-c.sln
    incubator/etch/trunk/binding-c/runtime/c/project/etch/etch.vcproj
    incubator/etch/trunk/binding-c/runtime/c/project/logcli/
    incubator/etch/trunk/binding-c/runtime/c/project/logsrv/
    incubator/etch/trunk/binding-c/runtime/c/project/notes/
    incubator/etch/trunk/binding-c/runtime/c/project/notes/accepted.txt
    incubator/etch/trunk/binding-c/runtime/c/project/notes/array.txt
    incubator/etch/trunk/binding-c/runtime/c/project/notes/assignable.txt
    incubator/etch/trunk/binding-c/runtime/c/project/notes/clientsession.txt
    incubator/etch/trunk/binding-c/runtime/c/project/notes/hashmods.txt
    incubator/etch/trunk/binding-c/runtime/c/project/notes/packet.txt
    incubator/etch/trunk/binding-c/runtime/c/project/notes/run.txt
    incubator/etch/trunk/binding-c/runtime/c/project/notes/servexe.txt
    incubator/etch/trunk/binding-c/runtime/c/project/notes/todo.txt
    incubator/etch/trunk/binding-c/runtime/c/project/readmefirst.txt
    incubator/etch/trunk/binding-c/runtime/c/project/test/
    incubator/etch/trunk/binding-c/runtime/c/project/test/logcli/
    incubator/etch/trunk/binding-c/runtime/c/project/test/test-readme-first.txt
    incubator/etch/trunk/binding-c/runtime/c/project/test/test_allocator/
    incubator/etch/trunk/binding-c/runtime/c/project/test/test_allocator/test_allocator.vcproj
    incubator/etch/trunk/binding-c/runtime/c/project/test/test_arraylist/
    incubator/etch/trunk/binding-c/runtime/c/project/test/test_arraylist/test_arraylist.vcproj
    incubator/etch/trunk/binding-c/runtime/c/project/test/test_arrayvalue/
    incubator/etch/trunk/binding-c/runtime/c/project/test/test_arrayvalue/test_arrayvalue.vcproj
    incubator/etch/trunk/binding-c/runtime/c/project/test/test_assignment/
    incubator/etch/trunk/binding-c/runtime/c/project/test/test_assignment/test_assignment.vcproj
    incubator/etch/trunk/binding-c/runtime/c/project/test/test_binarytditdo/
    incubator/etch/trunk/binding-c/runtime/c/project/test/test_binarytditdo/test_binarytditdo.vcproj
    incubator/etch/trunk/binding-c/runtime/c/project/test/test_cache/
    incubator/etch/trunk/binding-c/runtime/c/project/test/test_cache/test_cache.vcproj
    incubator/etch/trunk/binding-c/runtime/c/project/test/test_defvalufact/
    incubator/etch/trunk/binding-c/runtime/c/project/test/test_defvalufact/test_defvalufact.c
    incubator/etch/trunk/binding-c/runtime/c/project/test/test_defvalufact/test_defvalufact.vcproj
    incubator/etch/trunk/binding-c/runtime/c/project/test/test_etchobject/
    incubator/etch/trunk/binding-c/runtime/c/project/test/test_etchobject/test_etchobject.vcproj
    incubator/etch/trunk/binding-c/runtime/c/project/test/test_field/
    incubator/etch/trunk/binding-c/runtime/c/project/test/test_field/test_field.vcproj
    incubator/etch/trunk/binding-c/runtime/c/project/test/test_flexbuf/
    incubator/etch/trunk/binding-c/runtime/c/project/test/test_flexbuf/test_flexbuf.vcproj
    incubator/etch/trunk/binding-c/runtime/c/project/test/test_hashing/
    incubator/etch/trunk/binding-c/runtime/c/project/test/test_hashing/test_hashing.vcproj
    incubator/etch/trunk/binding-c/runtime/c/project/test/test_hashtable/
    incubator/etch/trunk/binding-c/runtime/c/project/test/test_hashtable/jenktest.txt
    incubator/etch/trunk/binding-c/runtime/c/project/test/test_hashtable/test_hashtable.vcproj
    incubator/etch/trunk/binding-c/runtime/c/project/test/test_idname/
    incubator/etch/trunk/binding-c/runtime/c/project/test/test_idname/test_idname.vcproj
    incubator/etch/trunk/binding-c/runtime/c/project/test/test_iterator/
    incubator/etch/trunk/binding-c/runtime/c/project/test/test_iterator/test_iterator.vcproj
    incubator/etch/trunk/binding-c/runtime/c/project/test/test_mailboxmgr/
    incubator/etch/trunk/binding-c/runtime/c/project/test/test_mailboxmgr/test_mailboxmgr.vcproj
    incubator/etch/trunk/binding-c/runtime/c/project/test/test_message/
    incubator/etch/trunk/binding-c/runtime/c/project/test/test_message/test_message.vcproj
    incubator/etch/trunk/binding-c/runtime/c/project/test/test_messagizer/
    incubator/etch/trunk/binding-c/runtime/c/project/test/test_messagizer/test_messagizer.vcproj
    incubator/etch/trunk/binding-c/runtime/c/project/test/test_objects/
    incubator/etch/trunk/binding-c/runtime/c/project/test/test_objects/test_objects.vcproj
    incubator/etch/trunk/binding-c/runtime/c/project/test/test_packetizer/
    incubator/etch/trunk/binding-c/runtime/c/project/test/test_packetizer/test_packetizer.vcproj
    incubator/etch/trunk/binding-c/runtime/c/project/test/test_plainmailbox/
    incubator/etch/trunk/binding-c/runtime/c/project/test/test_plainmailbox/test_plainmailbox.vcproj
    incubator/etch/trunk/binding-c/runtime/c/project/test/test_queue/
    incubator/etch/trunk/binding-c/runtime/c/project/test/test_queue/test_queue.vcproj
    incubator/etch/trunk/binding-c/runtime/c/project/test/test_remote/
    incubator/etch/trunk/binding-c/runtime/c/project/test/test_remote/test_remote.vcproj
    incubator/etch/trunk/binding-c/runtime/c/project/test/test_structvalue/
    incubator/etch/trunk/binding-c/runtime/c/project/test/test_structvalue/test_structvalue.vcproj
    incubator/etch/trunk/binding-c/runtime/c/project/test/test_stub/
    incubator/etch/trunk/binding-c/runtime/c/project/test/test_stub/test_stub.vcproj
    incubator/etch/trunk/binding-c/runtime/c/project/test/test_tcpconn/
    incubator/etch/trunk/binding-c/runtime/c/project/test/test_tcpconn/test_tcpconn.c
    incubator/etch/trunk/binding-c/runtime/c/project/test/test_tcpconn/test_tcpconn.vcproj
    incubator/etch/trunk/binding-c/runtime/c/project/test/test_threadpool/
    incubator/etch/trunk/binding-c/runtime/c/project/test/test_threadpool/test_threadpool.c
    incubator/etch/trunk/binding-c/runtime/c/project/test/test_threadpool/test_threadpool.vcproj
    incubator/etch/trunk/binding-c/runtime/c/project/test/test_transport/
    incubator/etch/trunk/binding-c/runtime/c/project/test/test_transport/test_transport.vcproj
    incubator/etch/trunk/binding-c/runtime/c/project/test/test_type/
    incubator/etch/trunk/binding-c/runtime/c/project/test/test_type/test_type.vcproj
    incubator/etch/trunk/binding-c/runtime/c/project/test/test_url/
    incubator/etch/trunk/binding-c/runtime/c/project/test/test_url/test_url.vcproj
    incubator/etch/trunk/binding-c/runtime/c/project/test/test_validator/
    incubator/etch/trunk/binding-c/runtime/c/project/test/test_validator/test_validator.vcproj
    incubator/etch/trunk/binding-c/runtime/c/project/test/xmpl_perf/
    incubator/etch/trunk/binding-c/runtime/c/project/test/xmpl_perf/xmpl_perf.vcproj
    incubator/etch/trunk/binding-c/runtime/c/project/xamples/
    incubator/etch/trunk/binding-c/runtime/c/project/xamples/xmpl_perf/
    incubator/etch/trunk/binding-c/runtime/c/project/xamples/xmpl_perf/etch-c-client.properties
    incubator/etch/trunk/binding-c/runtime/c/project/xamples/xmpl_perf/etch-c-server.properties
    incubator/etch/trunk/binding-c/runtime/c/project/xamples/xmpl_perf/logcli/
    incubator/etch/trunk/binding-c/runtime/c/project/xamples/xmpl_perf/logsrv/
    incubator/etch/trunk/binding-c/runtime/c/project/xamples/xmpl_perf/readmefirst.txt
    incubator/etch/trunk/binding-c/runtime/c/project/xamples/xmpl_perf/xmpl_perf_client/
    incubator/etch/trunk/binding-c/runtime/c/project/xamples/xmpl_perf/xmpl_perf_client/xmpl_perf_client.vcproj
    incubator/etch/trunk/binding-c/runtime/c/project/xamples/xmpl_perf/xmpl_perf_server/
    incubator/etch/trunk/binding-c/runtime/c/project/xamples/xmpl_perf/xmpl_perf_server/etchtest.log
    incubator/etch/trunk/binding-c/runtime/c/project/xamples/xmpl_perf/xmpl_perf_server/xmpl_perf_server.vcproj
    incubator/etch/trunk/binding-c/runtime/c/project/xamples/xmpl_perf/xmpl_perflib/
    incubator/etch/trunk/binding-c/runtime/c/project/xamples/xmpl_perf/xmpl_perflib/xmpl_perflib.vcproj
    incubator/etch/trunk/binding-c/runtime/c/src/
    incubator/etch/trunk/binding-c/runtime/c/src/bindings/
    incubator/etch/trunk/binding-c/runtime/c/src/bindings/msg/
    incubator/etch/trunk/binding-c/runtime/c/src/bindings/msg/etch_arrayval.c
    incubator/etch/trunk/binding-c/runtime/c/src/bindings/msg/etch_binary_tdi.c
    incubator/etch/trunk/binding-c/runtime/c/src/bindings/msg/etch_binary_tdo.c
    incubator/etch/trunk/binding-c/runtime/c/src/bindings/msg/etch_defvalufact.c
    incubator/etch/trunk/binding-c/runtime/c/src/bindings/msg/etch_field.c
    incubator/etch/trunk/binding-c/runtime/c/src/bindings/msg/etch_id_name.c
    incubator/etch/trunk/binding-c/runtime/c/src/bindings/msg/etch_message.c
    incubator/etch/trunk/binding-c/runtime/c/src/bindings/msg/etch_structval.c
    incubator/etch/trunk/binding-c/runtime/c/src/bindings/msg/etch_tagdata.c
    incubator/etch/trunk/binding-c/runtime/c/src/bindings/msg/etch_tagdata_inp.c
    incubator/etch/trunk/binding-c/runtime/c/src/bindings/msg/etch_tagdata_out.c
    incubator/etch/trunk/binding-c/runtime/c/src/bindings/msg/etch_type.c
    incubator/etch/trunk/binding-c/runtime/c/src/bindings/msg/etch_validator.c
    incubator/etch/trunk/binding-c/runtime/c/src/bindings/msg/etch_valufact.c
    incubator/etch/trunk/binding-c/runtime/c/src/bindings/support/
    incubator/etch/trunk/binding-c/runtime/c/src/bindings/support/default_valufact.c
    incubator/etch/trunk/binding-c/runtime/c/src/bindings/support/etch_resources.c
    incubator/etch/trunk/binding-c/runtime/c/src/common/
    incubator/etch/trunk/binding-c/runtime/c/src/common/etch_apr.c
    incubator/etch/trunk/binding-c/runtime/c/src/common/etch_arraylist.c
    incubator/etch/trunk/binding-c/runtime/c/src/common/etch_collection.c
    incubator/etch/trunk/binding-c/runtime/c/src/common/etch_config.c
    incubator/etch/trunk/binding-c/runtime/c/src/common/etch_encoding.c
    incubator/etch/trunk/binding-c/runtime/c/src/common/etch_global.c
    incubator/etch/trunk/binding-c/runtime/c/src/common/etch_linklist.c
    incubator/etch/trunk/binding-c/runtime/c/src/common/etch_natarray.c
    incubator/etch/trunk/binding-c/runtime/c/src/common/etch_objects.c
    incubator/etch/trunk/binding-c/runtime/c/src/common/etchexcp.c
    incubator/etch/trunk/binding-c/runtime/c/src/common/etchflexbuf.c
    incubator/etch/trunk/binding-c/runtime/c/src/common/etchhash.c
    incubator/etch/trunk/binding-c/runtime/c/src/common/etchhashfunc.c
    incubator/etch/trunk/binding-c/runtime/c/src/common/etchlog.c
    incubator/etch/trunk/binding-c/runtime/c/src/common/etchmap.c
    incubator/etch/trunk/binding-c/runtime/c/src/common/etchmem.c
    incubator/etch/trunk/binding-c/runtime/c/src/common/etchobj.c
    incubator/etch/trunk/binding-c/runtime/c/src/common/etchrun.c
    incubator/etch/trunk/binding-c/runtime/c/src/common/etchutl.c
    incubator/etch/trunk/binding-c/runtime/c/src/support/
    incubator/etch/trunk/binding-c/runtime/c/src/support/etch_mailboxint.c
    incubator/etch/trunk/binding-c/runtime/c/src/support/etch_queue_apr.c
    incubator/etch/trunk/binding-c/runtime/c/src/support/etch_remote.c
    incubator/etch/trunk/binding-c/runtime/c/src/support/etch_serializer.c
    incubator/etch/trunk/binding-c/runtime/c/src/support/etch_sessionint.c
    incubator/etch/trunk/binding-c/runtime/c/src/support/etch_simpletimer.c
    incubator/etch/trunk/binding-c/runtime/c/src/support/etch_sourceint.c
    incubator/etch/trunk/binding-c/runtime/c/src/support/etch_stop.c
    incubator/etch/trunk/binding-c/runtime/c/src/support/etch_stub.c
    incubator/etch/trunk/binding-c/runtime/c/src/support/etch_threadpool_apr.c
    incubator/etch/trunk/binding-c/runtime/c/src/support/etch_transportint.c
    incubator/etch/trunk/binding-c/runtime/c/src/test/
    incubator/etch/trunk/binding-c/runtime/c/src/test/common/
    incubator/etch/trunk/binding-c/runtime/c/src/test/common/test_allocator.c
    incubator/etch/trunk/binding-c/runtime/c/src/test/common/test_arraylist.c
    incubator/etch/trunk/binding-c/runtime/c/src/test/common/test_assignment.c
    incubator/etch/trunk/binding-c/runtime/c/src/test/common/test_cache.c
    incubator/etch/trunk/binding-c/runtime/c/src/test/common/test_conn.c
    incubator/etch/trunk/binding-c/runtime/c/src/test/common/test_etchobject.c
    incubator/etch/trunk/binding-c/runtime/c/src/test/common/test_flexbuf.c
    incubator/etch/trunk/binding-c/runtime/c/src/test/common/test_hashing.c
    incubator/etch/trunk/binding-c/runtime/c/src/test/common/test_hashtable.c
    incubator/etch/trunk/binding-c/runtime/c/src/test/common/test_iterator.c
    incubator/etch/trunk/binding-c/runtime/c/src/test/common/test_objects.c
    incubator/etch/trunk/binding-c/runtime/c/src/test/message/
    incubator/etch/trunk/binding-c/runtime/c/src/test/message/test_arrayvalue.c
    incubator/etch/trunk/binding-c/runtime/c/src/test/message/test_binarytditdo.c
    incubator/etch/trunk/binding-c/runtime/c/src/test/message/test_field.c
    incubator/etch/trunk/binding-c/runtime/c/src/test/message/test_idname.c
    incubator/etch/trunk/binding-c/runtime/c/src/test/message/test_message.c
    incubator/etch/trunk/binding-c/runtime/c/src/test/message/test_structvalue.c
    incubator/etch/trunk/binding-c/runtime/c/src/test/message/test_type.c
    incubator/etch/trunk/binding-c/runtime/c/src/test/message/test_validator.c
    incubator/etch/trunk/binding-c/runtime/c/src/test/message/test_validator_b.c
    incubator/etch/trunk/binding-c/runtime/c/src/test/support/
    incubator/etch/trunk/binding-c/runtime/c/src/test/support/test_remote.c
    incubator/etch/trunk/binding-c/runtime/c/src/test/support/test_stub.c
    incubator/etch/trunk/binding-c/runtime/c/src/test/transport/
    incubator/etch/trunk/binding-c/runtime/c/src/test/transport/test_mailboxmgr.c
    incubator/etch/trunk/binding-c/runtime/c/src/test/transport/test_messagizer.c
    incubator/etch/trunk/binding-c/runtime/c/src/test/transport/test_packetizer.c
    incubator/etch/trunk/binding-c/runtime/c/src/test/transport/test_plainmailbox.c
    incubator/etch/trunk/binding-c/runtime/c/src/test/transport/test_queue.c
    incubator/etch/trunk/binding-c/runtime/c/src/test/transport/test_tcp_connection.c
    incubator/etch/trunk/binding-c/runtime/c/src/test/transport/test_tcpconn.c
    incubator/etch/trunk/binding-c/runtime/c/src/test/transport/test_transport.c
    incubator/etch/trunk/binding-c/runtime/c/src/test/transport/test_url.c
    incubator/etch/trunk/binding-c/runtime/c/src/transport/
    incubator/etch/trunk/binding-c/runtime/c/src/transport/etch_connection.c
    incubator/etch/trunk/binding-c/runtime/c/src/transport/etch_conxevent.c
    incubator/etch/trunk/binding-c/runtime/c/src/transport/etch_mailboxmgr.c
    incubator/etch/trunk/binding-c/runtime/c/src/transport/etch_messagizer.c
    incubator/etch/trunk/binding-c/runtime/c/src/transport/etch_packetizer.c
    incubator/etch/trunk/binding-c/runtime/c/src/transport/etch_plainmailbox.c
    incubator/etch/trunk/binding-c/runtime/c/src/transport/etch_plainmboxmgr.c
    incubator/etch/trunk/binding-c/runtime/c/src/transport/etch_queue.c
    incubator/etch/trunk/binding-c/runtime/c/src/transport/etch_sessiondata.c
    incubator/etch/trunk/binding-c/runtime/c/src/transport/etch_sessionlisten.c
    incubator/etch/trunk/binding-c/runtime/c/src/transport/etch_sessionmsg.c
    incubator/etch/trunk/binding-c/runtime/c/src/transport/etch_sessionpkt.c
    incubator/etch/trunk/binding-c/runtime/c/src/transport/etch_syncobj.c
    incubator/etch/trunk/binding-c/runtime/c/src/transport/etch_tcpconxn.c
    incubator/etch/trunk/binding-c/runtime/c/src/transport/etch_tcpserver.c
    incubator/etch/trunk/binding-c/runtime/c/src/transport/etch_tdformat.c
    incubator/etch/trunk/binding-c/runtime/c/src/transport/etch_transport.c
    incubator/etch/trunk/binding-c/runtime/c/src/transport/etch_transportdata.c
    incubator/etch/trunk/binding-c/runtime/c/src/transport/etch_transportmsg.c
    incubator/etch/trunk/binding-c/runtime/c/src/transport/etch_transportpkt.c
    incubator/etch/trunk/binding-c/runtime/c/src/transport/etch_url.c
    incubator/etch/trunk/binding-c/runtime/c/src/transport/etchmutex.c
    incubator/etch/trunk/binding-c/runtime/c/src/transport/etchthread.c
    incubator/etch/trunk/binding-c/runtime/c/src/xamples/
    incubator/etch/trunk/binding-c/runtime/c/src/xamples/perf/
    incubator/etch/trunk/binding-c/runtime/c/src/xamples/perf/xmpl_perf.c
    incubator/etch/trunk/binding-c/runtime/c/src/xamples/perf/xmpl_perf.h
    incubator/etch/trunk/binding-c/runtime/c/src/xamples/perf/xmpl_perf_client.c
    incubator/etch/trunk/binding-c/runtime/c/src/xamples/perf/xmpl_perf_client.h
    incubator/etch/trunk/binding-c/runtime/c/src/xamples/perf/xmpl_perf_client_impl.c
    incubator/etch/trunk/binding-c/runtime/c/src/xamples/perf/xmpl_perf_client_impl.h
    incubator/etch/trunk/binding-c/runtime/c/src/xamples/perf/xmpl_perf_client_implx.c
    incubator/etch/trunk/binding-c/runtime/c/src/xamples/perf/xmpl_perf_client_main.c
    incubator/etch/trunk/binding-c/runtime/c/src/xamples/perf/xmpl_perf_client_main.h
    incubator/etch/trunk/binding-c/runtime/c/src/xamples/perf/xmpl_perf_client_stub.c
    incubator/etch/trunk/binding-c/runtime/c/src/xamples/perf/xmpl_perf_client_stub.h
    incubator/etch/trunk/binding-c/runtime/c/src/xamples/perf/xmpl_perf_client_tests.c
    incubator/etch/trunk/binding-c/runtime/c/src/xamples/perf/xmpl_perf_helper.c
    incubator/etch/trunk/binding-c/runtime/c/src/xamples/perf/xmpl_perf_helper.h
    incubator/etch/trunk/binding-c/runtime/c/src/xamples/perf/xmpl_perf_listener_main.c
    incubator/etch/trunk/binding-c/runtime/c/src/xamples/perf/xmpl_perf_listener_main.h
    incubator/etch/trunk/binding-c/runtime/c/src/xamples/perf/xmpl_perf_remote.c
    incubator/etch/trunk/binding-c/runtime/c/src/xamples/perf/xmpl_perf_remote.h
    incubator/etch/trunk/binding-c/runtime/c/src/xamples/perf/xmpl_perf_remote_client.c
    incubator/etch/trunk/binding-c/runtime/c/src/xamples/perf/xmpl_perf_remote_client.h
    incubator/etch/trunk/binding-c/runtime/c/src/xamples/perf/xmpl_perf_remote_server.c
    incubator/etch/trunk/binding-c/runtime/c/src/xamples/perf/xmpl_perf_remote_server.h
    incubator/etch/trunk/binding-c/runtime/c/src/xamples/perf/xmpl_perf_server.c
    incubator/etch/trunk/binding-c/runtime/c/src/xamples/perf/xmpl_perf_server.h
    incubator/etch/trunk/binding-c/runtime/c/src/xamples/perf/xmpl_perf_server_impl.c
    incubator/etch/trunk/binding-c/runtime/c/src/xamples/perf/xmpl_perf_server_impl.h
    incubator/etch/trunk/binding-c/runtime/c/src/xamples/perf/xmpl_perf_server_implx.c
    incubator/etch/trunk/binding-c/runtime/c/src/xamples/perf/xmpl_perf_server_stub.c
    incubator/etch/trunk/binding-c/runtime/c/src/xamples/perf/xmpl_perf_server_stub.h
    incubator/etch/trunk/binding-c/runtime/c/src/xamples/perf/xmpl_perf_valufact.c
    incubator/etch/trunk/binding-c/runtime/c/src/xamples/perf/xmpl_perf_valufact.h

Added: incubator/etch/trunk/binding-c/runtime/c/apr_private_common.h
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-c/runtime/c/apr_private_common.h?rev=767594&view=auto
==============================================================================
--- incubator/etch/trunk/binding-c/runtime/c/apr_private_common.h (added)
+++ incubator/etch/trunk/binding-c/runtime/c/apr_private_common.h Wed Apr 22 17:25:43 2009
@@ -0,0 +1,42 @@
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/*
+ * This file contains private declarations common to all architectures.
+ */
+
+#ifndef APR_PRIVATE_COMMON_H
+#define APR_PRIVATE_COMMON_H
+
+#include "apr_pools.h"
+#include "apr_tables.h"
+
+apr_status_t apr_filepath_list_split_impl(apr_array_header_t **pathelts,
+                                          const char *liststr,
+                                          char separator,
+                                          apr_pool_t *p);
+
+apr_status_t apr_filepath_list_merge_impl(char **liststr,
+                                          apr_array_header_t *pathelts,
+                                          char separator,
+                                          apr_pool_t *p);
+
+/* temporary defines to handle 64bit compile mismatches */
+#define APR_INT_TRUNC_CAST    int
+#define APR_UINT32_TRUNC_CAST apr_uint32_t
+#define APR_UINT32_MAX        0xFFFFFFFFUL
+
+#endif  /*APR_PRIVATE_COMMON_H*/

Added: incubator/etch/trunk/binding-c/runtime/c/ext/hashtab/jenkfasthash.c
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-c/runtime/c/ext/hashtab/jenkfasthash.c?rev=767594&view=auto
==============================================================================
--- incubator/etch/trunk/binding-c/runtime/c/ext/hashtab/jenkfasthash.c (added)
+++ incubator/etch/trunk/binding-c/runtime/c/ext/hashtab/jenkfasthash.c Wed Apr 22 17:25:43 2009
@@ -0,0 +1,990 @@
+/*
+-------------------------------------------------------------------------------
+lookup3.c, by Bob Jenkins, May 2006, Public Domain.
+
+From website: "Update: I'm leaving the old hash ..., but I've got a new hash at 
+http://burtleburtle.net/bob/c/lookup3.c (this code -- JLD) that is roughly twice 
+as fast and more thorough than the one (used in lookup.c -- JLD). It's designed 
+along the same lines as the hash below, 12 byte blocks, switch statements, etc. 
+The biggest theoretical distinction is it has different mixing functions for the 
+last block than for all but the last block, at 21 and 24 instructions, instead of 
+the 36 instruction mix below that serves for both. It also has separate code paths 
+for aligned and unaligned strings, to take advantage of 2-byte and 4-byte reads 
+when it can. "
+
+These are functions for producing 32-bit hashes for hash table lookup.
+hashword(), hashlittle(), hashlittle2(), hashbig(), mix(), and final() 
+are externally useful functions.  Routines to test the hash are included 
+if SELF_TEST is defined.  You can use this free for any purpose.  It's in
+the public domain.  It has no warranty.
+
+You probably want to use hashlittle().  hashlittle() and hashbig()
+hash byte arrays.  hashlittle() is is faster than hashbig() on
+little-endian machines.  Intel and AMD are little-endian machines.
+On second thought, you probably want hashlittle2(), which is identical to
+hashlittle() except it returns two 32-bit hashes for the price of one.  
+You could implement hashbig2() if you wanted but I haven't bothered here.
+
+If you want to find a hash of, say, exactly 7 integers, do
+  a = i1;  b = i2;  c = i3;
+  mix(a,b,c);
+  a += i4; b += i5; c += i6;
+  mix(a,b,c);
+  a += i7;
+  final(a,b,c);
+then use c as the hash value.  If you have a variable length array of
+4-byte integers to hash, use hashword().  If you have a byte array (like
+a character string), use hashlittle().  If you have several byte arrays, or
+a mix of things, see the comments above hashlittle().  
+
+Why is this so big?  I read 12 bytes at a time into 3 4-byte integers, 
+then mix those integers.  This is fast (you can do a lot more thorough
+mixing with 12*3 instructions on 3 integers than you can with 3 instructions
+on 1 byte), but shoehorning those bytes into integers efficiently is messy.
+-------------------------------------------------------------------------------
+*/
+#define SELF_TEST 1
+
+#include <stdio.h>      /* defines printf for tests */
+#include <time.h>       /* defines time_t for timings in the test */
+#include <stdint.h>     /* defines uint32_t etc */
+#include <sys/param.h>  /* attempt to define endianness */
+#ifdef linux
+# include <endian.h>    /* attempt to define endianness */
+#endif
+
+/*
+ * My best guess at if you are big-endian or little-endian.  This may
+ * need adjustment.
+ */
+#if (defined(__BYTE_ORDER) && defined(__LITTLE_ENDIAN) && \
+     __BYTE_ORDER == __LITTLE_ENDIAN) || \
+    (defined(i386) || defined(__i386__) || defined(__i486__) || \
+     defined(__i586__) || defined(__i686__) || defined(vax) || defined(MIPSEL))
+# define HASH_LITTLE_ENDIAN 1
+# define HASH_BIG_ENDIAN 0
+#elif (defined(__BYTE_ORDER) && defined(__BIG_ENDIAN) && \
+       __BYTE_ORDER == __BIG_ENDIAN) || \
+      (defined(sparc) || defined(POWERPC) || defined(mc68000) || defined(sel))
+# define HASH_LITTLE_ENDIAN 0
+# define HASH_BIG_ENDIAN 1
+#else
+# define HASH_LITTLE_ENDIAN 0
+# define HASH_BIG_ENDIAN 0
+#endif
+
+#define hashsize(n) ((uint32_t)1<<(n))
+#define hashmask(n) (hashsize(n)-1)
+#define rot(x,k) (((x)<<(k)) | ((x)>>(32-(k))))
+
+/*
+-------------------------------------------------------------------------------
+mix -- mix 3 32-bit values reversibly.
+
+This is reversible, so any information in (a,b,c) before mix() is
+still in (a,b,c) after mix().
+
+If four pairs of (a,b,c) inputs are run through mix(), or through
+mix() in reverse, there are at least 32 bits of the output that
+are sometimes the same for one pair and different for another pair.
+This was tested for:
+* pairs that differed by one bit, by two bits, in any combination
+  of top bits of (a,b,c), or in any combination of bottom bits of
+  (a,b,c).
+* "differ" is defined as +, -, ^, or ~^.  For + and -, I transformed
+  the output delta to a Gray code (a^(a>>1)) so a string of 1's (as
+  is commonly produced by subtraction) look like a single 1-bit
+  difference.
+* the base values were pseudorandom, all zero but one bit set, or 
+  all zero plus a counter that starts at zero.
+
+Some k values for my "a-=c; a^=rot(c,k); c+=b;" arrangement that
+satisfy this are
+    4  6  8 16 19  4
+    9 15  3 18 27 15
+   14  9  3  7 17  3
+Well, "9 15 3 18 27 15" didn't quite get 32 bits diffing
+for "differ" defined as + with a one-bit base and a two-bit delta.  I
+used http://burtleburtle.net/bob/hash/avalanche.html to choose 
+the operations, constants, and arrangements of the variables.
+
+This does not achieve avalanche.  There are input bits of (a,b,c)
+that fail to affect some output bits of (a,b,c), especially of a.  The
+most thoroughly mixed value is c, but it doesn't really even achieve
+avalanche in c.
+
+This allows some parallelism.  Read-after-writes are good at doubling
+the number of bits affected, so the goal of mixing pulls in the opposite
+direction as the goal of parallelism.  I did what I could.  Rotates
+seem to cost as much as shifts on every machine I could lay my hands
+on, and rotates are much kinder to the top and bottom bits, so I used
+rotates.
+-------------------------------------------------------------------------------
+*/
+#define mix(a,b,c) \
+{ \
+  a -= c;  a ^= rot(c, 4);  c += b; \
+  b -= a;  b ^= rot(a, 6);  a += c; \
+  c -= b;  c ^= rot(b, 8);  b += a; \
+  a -= c;  a ^= rot(c,16);  c += b; \
+  b -= a;  b ^= rot(a,19);  a += c; \
+  c -= b;  c ^= rot(b, 4);  b += a; \
+}
+
+/*
+-------------------------------------------------------------------------------
+final -- final mixing of 3 32-bit values (a,b,c) into c
+
+Pairs of (a,b,c) values differing in only a few bits will usually
+produce values of c that look totally different.  This was tested for
+* pairs that differed by one bit, by two bits, in any combination
+  of top bits of (a,b,c), or in any combination of bottom bits of
+  (a,b,c).
+* "differ" is defined as +, -, ^, or ~^.  For + and -, I transformed
+  the output delta to a Gray code (a^(a>>1)) so a string of 1's (as
+  is commonly produced by subtraction) look like a single 1-bit
+  difference.
+* the base values were pseudorandom, all zero but one bit set, or 
+  all zero plus a counter that starts at zero.
+
+These constants passed:
+ 14 11 25 16 4 14 24
+ 12 14 25 16 4 14 24
+and these came close:
+  4  8 15 26 3 22 24
+ 10  8 15 26 3 22 24
+ 11  8 15 26 3 22 24
+-------------------------------------------------------------------------------
+*/
+#define final(a,b,c) \
+{ \
+  c ^= b; c -= rot(b,14); \
+  a ^= c; a -= rot(c,11); \
+  b ^= a; b -= rot(a,25); \
+  c ^= b; c -= rot(b,16); \
+  a ^= c; a -= rot(c,4);  \
+  b ^= a; b -= rot(a,14); \
+  c ^= b; c -= rot(b,24); \
+}
+
+/*
+--------------------------------------------------------------------
+ This works on all machines.  To be useful, it requires
+ -- that the key be an array of uint32_t's, and
+ -- that the length be the number of uint32_t's in the key
+
+ The function hashword() is identical to hashlittle() on little-endian
+ machines, and identical to hashbig() on big-endian machines,
+ except that the length has to be measured in uint32_ts rather than in
+ bytes.  hashlittle() is more complicated than hashword() only because
+ hashlittle() has to dance around fitting the key bytes into registers.
+--------------------------------------------------------------------
+*/
+uint32_t hashword(
+const uint32_t *k,                   /* the key, an array of uint32_t values */
+size_t          length,               /* the length of the key, in uint32_ts */
+uint32_t        initval)         /* the previous hash, or an arbitrary value */
+{
+  uint32_t a,b,c;
+
+  /* Set up the internal state */
+  a = b = c = 0xdeadbeef + (((uint32_t)length)<<2) + initval;
+
+  /*------------------------------------------------- handle most of the key */
+  while (length > 3)
+  {
+    a += k[0];
+    b += k[1];
+    c += k[2];
+    mix(a,b,c);
+    length -= 3;
+    k += 3;
+  }
+
+  /*------------------------------------------- handle the last 3 uint32_t's */
+  switch(length)                     /* all the case statements fall through */
+  { 
+  case 3 : c+=k[2];
+  case 2 : b+=k[1];
+  case 1 : a+=k[0];
+    final(a,b,c);
+  case 0:     /* case 0: nothing left to add */
+    break;
+  }
+  /*------------------------------------------------------ report the result */
+  return c;
+}
+
+
+/*
+--------------------------------------------------------------------
+hashword2() -- same as hashword(), but take two seeds and return two
+32-bit values.  pc and pb must both be nonnull, and *pc and *pb must
+both be initialized with seeds.  If you pass in (*pb)==0, the output 
+(*pc) will be the same as the return value from hashword().
+--------------------------------------------------------------------
+*/
+void hashword2 (
+const uint32_t *k,                   /* the key, an array of uint32_t values */
+size_t          length,               /* the length of the key, in uint32_ts */
+uint32_t       *pc,                      /* IN: seed OUT: primary hash value */
+uint32_t       *pb)               /* IN: more seed OUT: secondary hash value */
+{
+  uint32_t a,b,c;
+
+  /* Set up the internal state */
+  a = b = c = 0xdeadbeef + ((uint32_t)(length<<2)) + *pc;
+  c += *pb;
+
+  /*------------------------------------------------- handle most of the key */
+  while (length > 3)
+  {
+    a += k[0];
+    b += k[1];
+    c += k[2];
+    mix(a,b,c);
+    length -= 3;
+    k += 3;
+  }
+
+  /*------------------------------------------- handle the last 3 uint32_t's */
+  switch(length)                     /* all the case statements fall through */
+  { 
+  case 3 : c+=k[2];
+  case 2 : b+=k[1];
+  case 1 : a+=k[0];
+    final(a,b,c);
+  case 0:     /* case 0: nothing left to add */
+    break;
+  }
+  /*------------------------------------------------------ report the result */
+  *pc=c; *pb=b;
+}
+
+
+/*
+-------------------------------------------------------------------------------
+hashlittle() -- hash a variable-length key into a 32-bit value
+  k       : the key (the unaligned variable-length array of bytes)
+  length  : the length of the key, counting by bytes
+  initval : can be any 4-byte value
+Returns a 32-bit value.  Every bit of the key affects every bit of
+the return value.  Two keys differing by one or two bits will have
+totally different hash values.
+
+The best hash table sizes are powers of 2.  There is no need to do
+mod a prime (mod is sooo slow!).  If you need less than 32 bits,
+use a bitmask.  For example, if you need only 10 bits, do
+  h = (h & hashmask(10));
+In which case, the hash table should have hashsize(10) elements.
+
+If you are hashing n strings (uint8_t **)k, do it like this:
+  for (i=0, h=0; i<n; ++i) h = hashlittle( k[i], len[i], h);
+
+By Bob Jenkins, 2006.  bob_jenkins@burtleburtle.net.  You may use this
+code any way you wish, private, educational, or commercial.  It's free.
+
+Use for hash table lookup, or anything where one collision in 2^^32 is
+acceptable.  Do NOT use for cryptographic purposes.
+-------------------------------------------------------------------------------
+*/
+
+uint32_t hashlittle( const void *key, size_t length, uint32_t initval)
+{
+  uint32_t a,b,c;                                          /* internal state */
+  union { const void *ptr; size_t i; } u;     /* needed for Mac Powerbook G4 */
+
+  /* Set up the internal state */
+  a = b = c = 0xdeadbeef + ((uint32_t)length) + initval;
+
+  u.ptr = key;
+  if (HASH_LITTLE_ENDIAN && ((u.i & 0x3) == 0)) {
+    const uint32_t *k = (const uint32_t *)key;         /* read 32-bit chunks */
+    const uint8_t  *k8;
+
+    /*------ all but last block: aligned reads and affect 32 bits of (a,b,c) */
+    while (length > 12)
+    {
+      a += k[0];
+      b += k[1];
+      c += k[2];
+      mix(a,b,c);
+      length -= 12;
+      k += 3;
+    }
+
+    /*----------------------------- handle the last (probably partial) block */
+    /* 
+     * "k[2]&0xffffff" actually reads beyond the end of the string, but
+     * then masks off the part it's not allowed to read.  Because the
+     * string is aligned, the masked-off tail is in the same word as the
+     * rest of the string.  Every machine with memory protection I've seen
+     * does it on word boundaries, so is OK with this.  But VALGRIND will
+     * still catch it and complain.  The masking trick does make the hash
+     * noticably faster for short strings (like English words).
+     */
+#ifndef VALGRIND
+
+    switch(length)
+    {
+    case 12: c+=k[2]; b+=k[1]; a+=k[0]; break;
+    case 11: c+=k[2]&0xffffff; b+=k[1]; a+=k[0]; break;
+    case 10: c+=k[2]&0xffff; b+=k[1]; a+=k[0]; break;
+    case 9 : c+=k[2]&0xff; b+=k[1]; a+=k[0]; break;
+    case 8 : b+=k[1]; a+=k[0]; break;
+    case 7 : b+=k[1]&0xffffff; a+=k[0]; break;
+    case 6 : b+=k[1]&0xffff; a+=k[0]; break;
+    case 5 : b+=k[1]&0xff; a+=k[0]; break;
+    case 4 : a+=k[0]; break;
+    case 3 : a+=k[0]&0xffffff; break;
+    case 2 : a+=k[0]&0xffff; break;
+    case 1 : a+=k[0]&0xff; break;
+    case 0 : return c;              /* zero length strings require no mixing */
+    }
+
+#else /* make valgrind happy */
+
+    k8 = (const uint8_t *)k;
+    switch(length)
+    {
+    case 12: c+=k[2]; b+=k[1]; a+=k[0]; break;
+    case 11: c+=((uint32_t)k8[10])<<16;  /* fall through */
+    case 10: c+=((uint32_t)k8[9])<<8;    /* fall through */
+    case 9 : c+=k8[8];                   /* fall through */
+    case 8 : b+=k[1]; a+=k[0]; break;
+    case 7 : b+=((uint32_t)k8[6])<<16;   /* fall through */
+    case 6 : b+=((uint32_t)k8[5])<<8;    /* fall through */
+    case 5 : b+=k8[4];                   /* fall through */
+    case 4 : a+=k[0]; break;
+    case 3 : a+=((uint32_t)k8[2])<<16;   /* fall through */
+    case 2 : a+=((uint32_t)k8[1])<<8;    /* fall through */
+    case 1 : a+=k8[0]; break;
+    case 0 : return c;
+    }
+
+#endif /* !valgrind */
+
+  } else if (HASH_LITTLE_ENDIAN && ((u.i & 0x1) == 0)) {
+    const uint16_t *k = (const uint16_t *)key;         /* read 16-bit chunks */
+    const uint8_t  *k8;
+
+    /*--------------- all but last block: aligned reads and different mixing */
+    while (length > 12)
+    {
+      a += k[0] + (((uint32_t)k[1])<<16);
+      b += k[2] + (((uint32_t)k[3])<<16);
+      c += k[4] + (((uint32_t)k[5])<<16);
+      mix(a,b,c);
+      length -= 12;
+      k += 6;
+    }
+
+    /*----------------------------- handle the last (probably partial) block */
+    k8 = (const uint8_t *)k;
+    switch(length)
+    {
+    case 12: c+=k[4]+(((uint32_t)k[5])<<16);
+             b+=k[2]+(((uint32_t)k[3])<<16);
+             a+=k[0]+(((uint32_t)k[1])<<16);
+             break;
+    case 11: c+=((uint32_t)k8[10])<<16;     /* fall through */
+    case 10: c+=k[4];
+             b+=k[2]+(((uint32_t)k[3])<<16);
+             a+=k[0]+(((uint32_t)k[1])<<16);
+             break;
+    case 9 : c+=k8[8];                      /* fall through */
+    case 8 : b+=k[2]+(((uint32_t)k[3])<<16);
+             a+=k[0]+(((uint32_t)k[1])<<16);
+             break;
+    case 7 : b+=((uint32_t)k8[6])<<16;      /* fall through */
+    case 6 : b+=k[2];
+             a+=k[0]+(((uint32_t)k[1])<<16);
+             break;
+    case 5 : b+=k8[4];                      /* fall through */
+    case 4 : a+=k[0]+(((uint32_t)k[1])<<16);
+             break;
+    case 3 : a+=((uint32_t)k8[2])<<16;      /* fall through */
+    case 2 : a+=k[0];
+             break;
+    case 1 : a+=k8[0];
+             break;
+    case 0 : return c;                     /* zero length requires no mixing */
+    }
+
+  } else {                        /* need to read the key one byte at a time */
+    const uint8_t *k = (const uint8_t *)key;
+
+    /*--------------- all but the last block: affect some 32 bits of (a,b,c) */
+    while (length > 12)
+    {
+      a += k[0];
+      a += ((uint32_t)k[1])<<8;
+      a += ((uint32_t)k[2])<<16;
+      a += ((uint32_t)k[3])<<24;
+      b += k[4];
+      b += ((uint32_t)k[5])<<8;
+      b += ((uint32_t)k[6])<<16;
+      b += ((uint32_t)k[7])<<24;
+      c += k[8];
+      c += ((uint32_t)k[9])<<8;
+      c += ((uint32_t)k[10])<<16;
+      c += ((uint32_t)k[11])<<24;
+      mix(a,b,c);
+      length -= 12;
+      k += 12;
+    }
+
+    /*-------------------------------- last block: affect all 32 bits of (c) */
+    switch(length)                   /* all the case statements fall through */
+    {
+    case 12: c+=((uint32_t)k[11])<<24;
+    case 11: c+=((uint32_t)k[10])<<16;
+    case 10: c+=((uint32_t)k[9])<<8;
+    case 9 : c+=k[8];
+    case 8 : b+=((uint32_t)k[7])<<24;
+    case 7 : b+=((uint32_t)k[6])<<16;
+    case 6 : b+=((uint32_t)k[5])<<8;
+    case 5 : b+=k[4];
+    case 4 : a+=((uint32_t)k[3])<<24;
+    case 3 : a+=((uint32_t)k[2])<<16;
+    case 2 : a+=((uint32_t)k[1])<<8;
+    case 1 : a+=k[0];
+             break;
+    case 0 : return c;
+    }
+  }
+
+  final(a,b,c);
+  return c;
+}
+
+
+/*
+ * hashlittle2: return 2 32-bit hash values
+ *
+ * This is identical to hashlittle(), except it returns two 32-bit hash
+ * values instead of just one.  This is good enough for hash table
+ * lookup with 2^^64 buckets, or if you want a second hash if you're not
+ * happy with the first, or if you want a probably-unique 64-bit ID for
+ * the key.  *pc is better mixed than *pb, so use *pc first.  If you want
+ * a 64-bit value do something like "*pc + (((uint64_t)*pb)<<32)".
+ */
+void hashlittle2( 
+  const void *key,       /* the key to hash */
+  size_t      length,    /* length of the key */
+  uint32_t   *pc,        /* IN: primary initval, OUT: primary hash */
+  uint32_t   *pb)        /* IN: secondary initval, OUT: secondary hash */
+{
+  uint32_t a,b,c;                                          /* internal state */
+  union { const void *ptr; size_t i; } u;     /* needed for Mac Powerbook G4 */
+
+  /* Set up the internal state */
+  a = b = c = 0xdeadbeef + ((uint32_t)length) + *pc;
+  c += *pb;
+
+  u.ptr = key;
+  if (HASH_LITTLE_ENDIAN && ((u.i & 0x3) == 0)) {
+    const uint32_t *k = (const uint32_t *)key;         /* read 32-bit chunks */
+    const uint8_t  *k8;
+
+    /*------ all but last block: aligned reads and affect 32 bits of (a,b,c) */
+    while (length > 12)
+    {
+      a += k[0];
+      b += k[1];
+      c += k[2];
+      mix(a,b,c);
+      length -= 12;
+      k += 3;
+    }
+
+    /*----------------------------- handle the last (probably partial) block */
+    /* 
+     * "k[2]&0xffffff" actually reads beyond the end of the string, but
+     * then masks off the part it's not allowed to read.  Because the
+     * string is aligned, the masked-off tail is in the same word as the
+     * rest of the string.  Every machine with memory protection I've seen
+     * does it on word boundaries, so is OK with this.  But VALGRIND will
+     * still catch it and complain.  The masking trick does make the hash
+     * noticably faster for short strings (like English words).
+     */
+#ifndef VALGRIND
+
+    switch(length)
+    {
+    case 12: c+=k[2]; b+=k[1]; a+=k[0]; break;
+    case 11: c+=k[2]&0xffffff; b+=k[1]; a+=k[0]; break;
+    case 10: c+=k[2]&0xffff; b+=k[1]; a+=k[0]; break;
+    case 9 : c+=k[2]&0xff; b+=k[1]; a+=k[0]; break;
+    case 8 : b+=k[1]; a+=k[0]; break;
+    case 7 : b+=k[1]&0xffffff; a+=k[0]; break;
+    case 6 : b+=k[1]&0xffff; a+=k[0]; break;
+    case 5 : b+=k[1]&0xff; a+=k[0]; break;
+    case 4 : a+=k[0]; break;
+    case 3 : a+=k[0]&0xffffff; break;
+    case 2 : a+=k[0]&0xffff; break;
+    case 1 : a+=k[0]&0xff; break;
+    case 0 : *pc=c; *pb=b; return;  /* zero length strings require no mixing */
+    }
+
+#else /* make valgrind happy */
+
+    k8 = (const uint8_t *)k;
+    switch(length)
+    {
+    case 12: c+=k[2]; b+=k[1]; a+=k[0]; break;
+    case 11: c+=((uint32_t)k8[10])<<16;  /* fall through */
+    case 10: c+=((uint32_t)k8[9])<<8;    /* fall through */
+    case 9 : c+=k8[8];                   /* fall through */
+    case 8 : b+=k[1]; a+=k[0]; break;
+    case 7 : b+=((uint32_t)k8[6])<<16;   /* fall through */
+    case 6 : b+=((uint32_t)k8[5])<<8;    /* fall through */
+    case 5 : b+=k8[4];                   /* fall through */
+    case 4 : a+=k[0]; break;
+    case 3 : a+=((uint32_t)k8[2])<<16;   /* fall through */
+    case 2 : a+=((uint32_t)k8[1])<<8;    /* fall through */
+    case 1 : a+=k8[0]; break;
+    case 0 : *pc=c; *pb=b; return;  /* zero length strings require no mixing */
+    }
+
+#endif /* !valgrind */
+
+  } else if (HASH_LITTLE_ENDIAN && ((u.i & 0x1) == 0)) {
+    const uint16_t *k = (const uint16_t *)key;         /* read 16-bit chunks */
+    const uint8_t  *k8;
+
+    /*--------------- all but last block: aligned reads and different mixing */
+    while (length > 12)
+    {
+      a += k[0] + (((uint32_t)k[1])<<16);
+      b += k[2] + (((uint32_t)k[3])<<16);
+      c += k[4] + (((uint32_t)k[5])<<16);
+      mix(a,b,c);
+      length -= 12;
+      k += 6;
+    }
+
+    /*----------------------------- handle the last (probably partial) block */
+    k8 = (const uint8_t *)k;
+    switch(length)
+    {
+    case 12: c+=k[4]+(((uint32_t)k[5])<<16);
+             b+=k[2]+(((uint32_t)k[3])<<16);
+             a+=k[0]+(((uint32_t)k[1])<<16);
+             break;
+    case 11: c+=((uint32_t)k8[10])<<16;     /* fall through */
+    case 10: c+=k[4];
+             b+=k[2]+(((uint32_t)k[3])<<16);
+             a+=k[0]+(((uint32_t)k[1])<<16);
+             break;
+    case 9 : c+=k8[8];                      /* fall through */
+    case 8 : b+=k[2]+(((uint32_t)k[3])<<16);
+             a+=k[0]+(((uint32_t)k[1])<<16);
+             break;
+    case 7 : b+=((uint32_t)k8[6])<<16;      /* fall through */
+    case 6 : b+=k[2];
+             a+=k[0]+(((uint32_t)k[1])<<16);
+             break;
+    case 5 : b+=k8[4];                      /* fall through */
+    case 4 : a+=k[0]+(((uint32_t)k[1])<<16);
+             break;
+    case 3 : a+=((uint32_t)k8[2])<<16;      /* fall through */
+    case 2 : a+=k[0];
+             break;
+    case 1 : a+=k8[0];
+             break;
+    case 0 : *pc=c; *pb=b; return;  /* zero length strings require no mixing */
+    }
+
+  } else {                        /* need to read the key one byte at a time */
+    const uint8_t *k = (const uint8_t *)key;
+
+    /*--------------- all but the last block: affect some 32 bits of (a,b,c) */
+    while (length > 12)
+    {
+      a += k[0];
+      a += ((uint32_t)k[1])<<8;
+      a += ((uint32_t)k[2])<<16;
+      a += ((uint32_t)k[3])<<24;
+      b += k[4];
+      b += ((uint32_t)k[5])<<8;
+      b += ((uint32_t)k[6])<<16;
+      b += ((uint32_t)k[7])<<24;
+      c += k[8];
+      c += ((uint32_t)k[9])<<8;
+      c += ((uint32_t)k[10])<<16;
+      c += ((uint32_t)k[11])<<24;
+      mix(a,b,c);
+      length -= 12;
+      k += 12;
+    }
+
+    /*-------------------------------- last block: affect all 32 bits of (c) */
+    switch(length)                   /* all the case statements fall through */
+    {
+    case 12: c+=((uint32_t)k[11])<<24;
+    case 11: c+=((uint32_t)k[10])<<16;
+    case 10: c+=((uint32_t)k[9])<<8;
+    case 9 : c+=k[8];
+    case 8 : b+=((uint32_t)k[7])<<24;
+    case 7 : b+=((uint32_t)k[6])<<16;
+    case 6 : b+=((uint32_t)k[5])<<8;
+    case 5 : b+=k[4];
+    case 4 : a+=((uint32_t)k[3])<<24;
+    case 3 : a+=((uint32_t)k[2])<<16;
+    case 2 : a+=((uint32_t)k[1])<<8;
+    case 1 : a+=k[0];
+             break;
+    case 0 : *pc=c; *pb=b; return;  /* zero length strings require no mixing */
+    }
+  }
+
+  final(a,b,c);
+  *pc=c; *pb=b;
+}
+
+
+
+/*
+ * hashbig():
+ * This is the same as hashword() on big-endian machines.  It is different
+ * from hashlittle() on all machines.  hashbig() takes advantage of
+ * big-endian byte ordering. 
+ */
+uint32_t hashbig( const void *key, size_t length, uint32_t initval)
+{
+  uint32_t a,b,c;
+  union { const void *ptr; size_t i; } u; /* to cast key to (size_t) happily */
+
+  /* Set up the internal state */
+  a = b = c = 0xdeadbeef + ((uint32_t)length) + initval;
+
+  u.ptr = key;
+  if (HASH_BIG_ENDIAN && ((u.i & 0x3) == 0)) {
+    const uint32_t *k = (const uint32_t *)key;         /* read 32-bit chunks */
+    const uint8_t  *k8;
+
+    /*------ all but last block: aligned reads and affect 32 bits of (a,b,c) */
+    while (length > 12)
+    {
+      a += k[0];
+      b += k[1];
+      c += k[2];
+      mix(a,b,c);
+      length -= 12;
+      k += 3;
+    }
+
+    /*----------------------------- handle the last (probably partial) block */
+    /* 
+     * "k[2]<<8" actually reads beyond the end of the string, but
+     * then shifts out the part it's not allowed to read.  Because the
+     * string is aligned, the illegal read is in the same word as the
+     * rest of the string.  Every machine with memory protection I've seen
+     * does it on word boundaries, so is OK with this.  But VALGRIND will
+     * still catch it and complain.  The masking trick does make the hash
+     * noticably faster for short strings (like English words).
+     */
+#ifndef VALGRIND
+
+    switch(length)
+    {
+    case 12: c+=k[2]; b+=k[1]; a+=k[0]; break;
+    case 11: c+=k[2]&0xffffff00; b+=k[1]; a+=k[0]; break;
+    case 10: c+=k[2]&0xffff0000; b+=k[1]; a+=k[0]; break;
+    case 9 : c+=k[2]&0xff000000; b+=k[1]; a+=k[0]; break;
+    case 8 : b+=k[1]; a+=k[0]; break;
+    case 7 : b+=k[1]&0xffffff00; a+=k[0]; break;
+    case 6 : b+=k[1]&0xffff0000; a+=k[0]; break;
+    case 5 : b+=k[1]&0xff000000; a+=k[0]; break;
+    case 4 : a+=k[0]; break;
+    case 3 : a+=k[0]&0xffffff00; break;
+    case 2 : a+=k[0]&0xffff0000; break;
+    case 1 : a+=k[0]&0xff000000; break;
+    case 0 : return c;              /* zero length strings require no mixing */
+    }
+
+#else  /* make valgrind happy */
+
+    k8 = (const uint8_t *)k;
+    switch(length)                   /* all the case statements fall through */
+    {
+    case 12: c+=k[2]; b+=k[1]; a+=k[0]; break;
+    case 11: c+=((uint32_t)k8[10])<<8;  /* fall through */
+    case 10: c+=((uint32_t)k8[9])<<16;  /* fall through */
+    case 9 : c+=((uint32_t)k8[8])<<24;  /* fall through */
+    case 8 : b+=k[1]; a+=k[0]; break;
+    case 7 : b+=((uint32_t)k8[6])<<8;   /* fall through */
+    case 6 : b+=((uint32_t)k8[5])<<16;  /* fall through */
+    case 5 : b+=((uint32_t)k8[4])<<24;  /* fall through */
+    case 4 : a+=k[0]; break;
+    case 3 : a+=((uint32_t)k8[2])<<8;   /* fall through */
+    case 2 : a+=((uint32_t)k8[1])<<16;  /* fall through */
+    case 1 : a+=((uint32_t)k8[0])<<24; break;
+    case 0 : return c;
+    }
+
+#endif /* !VALGRIND */
+
+  } else {                        /* need to read the key one byte at a time */
+    const uint8_t *k = (const uint8_t *)key;
+
+    /*--------------- all but the last block: affect some 32 bits of (a,b,c) */
+    while (length > 12)
+    {
+      a += ((uint32_t)k[0])<<24;
+      a += ((uint32_t)k[1])<<16;
+      a += ((uint32_t)k[2])<<8;
+      a += ((uint32_t)k[3]);
+      b += ((uint32_t)k[4])<<24;
+      b += ((uint32_t)k[5])<<16;
+      b += ((uint32_t)k[6])<<8;
+      b += ((uint32_t)k[7]);
+      c += ((uint32_t)k[8])<<24;
+      c += ((uint32_t)k[9])<<16;
+      c += ((uint32_t)k[10])<<8;
+      c += ((uint32_t)k[11]);
+      mix(a,b,c);
+      length -= 12;
+      k += 12;
+    }
+
+    /*-------------------------------- last block: affect all 32 bits of (c) */
+    switch(length)                   /* all the case statements fall through */
+    {
+    case 12: c+=k[11];
+    case 11: c+=((uint32_t)k[10])<<8;
+    case 10: c+=((uint32_t)k[9])<<16;
+    case 9 : c+=((uint32_t)k[8])<<24;
+    case 8 : b+=k[7];
+    case 7 : b+=((uint32_t)k[6])<<8;
+    case 6 : b+=((uint32_t)k[5])<<16;
+    case 5 : b+=((uint32_t)k[4])<<24;
+    case 4 : a+=k[3];
+    case 3 : a+=((uint32_t)k[2])<<8;
+    case 2 : a+=((uint32_t)k[1])<<16;
+    case 1 : a+=((uint32_t)k[0])<<24;
+             break;
+    case 0 : return c;
+    }
+  }
+
+  final(a,b,c);
+  return c;
+}
+
+
+#ifdef SELF_TEST
+
+/* used for timings */
+void driver1()
+{
+  uint8_t buf[256];
+  uint32_t i;
+  uint32_t h=0;
+  time_t a,z;
+
+  time(&a);
+  for (i=0; i<256; ++i) buf[i] = 'x';
+  for (i=0; i<1; ++i) 
+  {
+    h = hashlittle(&buf[0],1,h);
+  }
+  time(&z);
+  if (z-a > 0) printf("time %d %.8x\n", z-a, h);
+}
+
+/* check that every input bit changes every output bit half the time */
+#define HASHSTATE 1
+#define HASHLEN   1
+#define MAXPAIR 60
+#define MAXLEN  70
+void driver2()
+{
+  uint8_t qa[MAXLEN+1], qb[MAXLEN+2], *a = &qa[0], *b = &qb[1];
+  uint32_t c[HASHSTATE], d[HASHSTATE], i=0, j=0, k, l, m=0, z;
+  uint32_t e[HASHSTATE],f[HASHSTATE],g[HASHSTATE],h[HASHSTATE];
+  uint32_t x[HASHSTATE],y[HASHSTATE];
+  uint32_t hlen;
+
+  printf("No more than %d trials should ever be needed \n",MAXPAIR/2);
+  for (hlen=0; hlen < MAXLEN; ++hlen)
+  {
+    z=0;
+    for (i=0; i<hlen; ++i)  /*----------------------- for each input byte, */
+    {
+      for (j=0; j<8; ++j)   /*------------------------ for each input bit, */
+      {
+	for (m=1; m<8; ++m) /*------------ for serveral possible initvals, */
+	{
+	  for (l=0; l<HASHSTATE; ++l)
+	    e[l]=f[l]=g[l]=h[l]=x[l]=y[l]=~((uint32_t)0);
+
+      	  /*---- check that every output bit is affected by that input bit */
+	  for (k=0; k<MAXPAIR; k+=2)
+	  { 
+	    uint32_t finished=1;
+	    /* keys have one bit different */
+	    for (l=0; l<hlen+1; ++l) {a[l] = b[l] = (uint8_t)0;}
+	    /* have a and b be two keys differing in only one bit */
+	    a[i] ^= (k<<j);
+	    a[i] ^= (k>>(8-j));
+	     c[0] = hashlittle(a, hlen, m);
+	    b[i] ^= ((k+1)<<j);
+	    b[i] ^= ((k+1)>>(8-j));
+	     d[0] = hashlittle(b, hlen, m);
+	    /* check every bit is 1, 0, set, and not set at least once */
+	    for (l=0; l<HASHSTATE; ++l)
+	    {
+	      e[l] &= (c[l]^d[l]);
+	      f[l] &= ~(c[l]^d[l]);
+	      g[l] &= c[l];
+	      h[l] &= ~c[l];
+	      x[l] &= d[l];
+	      y[l] &= ~d[l];
+	      if (e[l]|f[l]|g[l]|h[l]|x[l]|y[l]) finished=0;
+	    }
+	    if (finished) break;
+	  }
+	  if (k>z) z=k;
+	  if (k==MAXPAIR) 
+	  {
+	     printf("Some bit didn't change: ");
+	     printf("%.8x %.8x %.8x %.8x %.8x %.8x  ",
+	            e[0],f[0],g[0],h[0],x[0],y[0]);
+	     printf("i %d j %d m %d len %d\n", i, j, m, hlen);
+	  }
+	  if (z==MAXPAIR) goto done;
+	}
+      }
+    }
+   done:
+    if (z < MAXPAIR)
+    {
+      printf("Mix success  %2d bytes  %2d initvals  ",i,m);
+      printf("required  %d  trials\n", z/2);
+    }
+  }
+  printf("\n");
+}
+
+/* Check for reading beyond the end of the buffer and alignment problems */
+void driver3()
+{
+  uint8_t buf[MAXLEN+20], *b;
+  uint32_t len;
+  uint8_t q[] = "This is the time for all good men to come to the aid of their country...";
+  uint32_t h;
+  uint8_t qq[] = "xThis is the time for all good men to come to the aid of their country...";
+  uint32_t i;
+  uint8_t qqq[] = "xxThis is the time for all good men to come to the aid of their country...";
+  uint32_t j;
+  uint8_t qqqq[] = "xxxThis is the time for all good men to come to the aid of their country...";
+  uint32_t ref,x,y;
+  uint8_t *p;
+
+  printf("Endianness.  These lines should all be the same (for values filled in):\n");
+  printf("%.8x                            %.8x                            %.8x\n",
+         hashword((const uint32_t *)q, (sizeof(q)-1)/4, 13),
+         hashword((const uint32_t *)q, (sizeof(q)-5)/4, 13),
+         hashword((const uint32_t *)q, (sizeof(q)-9)/4, 13));
+  p = q;
+  printf("%.8x %.8x %.8x %.8x %.8x %.8x %.8x %.8x %.8x %.8x %.8x %.8x\n",
+         hashlittle(p, sizeof(q)-1, 13), hashlittle(p, sizeof(q)-2, 13),
+         hashlittle(p, sizeof(q)-3, 13), hashlittle(p, sizeof(q)-4, 13),
+         hashlittle(p, sizeof(q)-5, 13), hashlittle(p, sizeof(q)-6, 13),
+         hashlittle(p, sizeof(q)-7, 13), hashlittle(p, sizeof(q)-8, 13),
+         hashlittle(p, sizeof(q)-9, 13), hashlittle(p, sizeof(q)-10, 13),
+         hashlittle(p, sizeof(q)-11, 13), hashlittle(p, sizeof(q)-12, 13));
+  p = &qq[1];
+  printf("%.8x %.8x %.8x %.8x %.8x %.8x %.8x %.8x %.8x %.8x %.8x %.8x\n",
+         hashlittle(p, sizeof(q)-1, 13), hashlittle(p, sizeof(q)-2, 13),
+         hashlittle(p, sizeof(q)-3, 13), hashlittle(p, sizeof(q)-4, 13),
+         hashlittle(p, sizeof(q)-5, 13), hashlittle(p, sizeof(q)-6, 13),
+         hashlittle(p, sizeof(q)-7, 13), hashlittle(p, sizeof(q)-8, 13),
+         hashlittle(p, sizeof(q)-9, 13), hashlittle(p, sizeof(q)-10, 13),
+         hashlittle(p, sizeof(q)-11, 13), hashlittle(p, sizeof(q)-12, 13));
+  p = &qqq[2];
+  printf("%.8x %.8x %.8x %.8x %.8x %.8x %.8x %.8x %.8x %.8x %.8x %.8x\n",
+         hashlittle(p, sizeof(q)-1, 13), hashlittle(p, sizeof(q)-2, 13),
+         hashlittle(p, sizeof(q)-3, 13), hashlittle(p, sizeof(q)-4, 13),
+         hashlittle(p, sizeof(q)-5, 13), hashlittle(p, sizeof(q)-6, 13),
+         hashlittle(p, sizeof(q)-7, 13), hashlittle(p, sizeof(q)-8, 13),
+         hashlittle(p, sizeof(q)-9, 13), hashlittle(p, sizeof(q)-10, 13),
+         hashlittle(p, sizeof(q)-11, 13), hashlittle(p, sizeof(q)-12, 13));
+  p = &qqqq[3];
+  printf("%.8x %.8x %.8x %.8x %.8x %.8x %.8x %.8x %.8x %.8x %.8x %.8x\n",
+         hashlittle(p, sizeof(q)-1, 13), hashlittle(p, sizeof(q)-2, 13),
+         hashlittle(p, sizeof(q)-3, 13), hashlittle(p, sizeof(q)-4, 13),
+         hashlittle(p, sizeof(q)-5, 13), hashlittle(p, sizeof(q)-6, 13),
+         hashlittle(p, sizeof(q)-7, 13), hashlittle(p, sizeof(q)-8, 13),
+         hashlittle(p, sizeof(q)-9, 13), hashlittle(p, sizeof(q)-10, 13),
+         hashlittle(p, sizeof(q)-11, 13), hashlittle(p, sizeof(q)-12, 13));
+  printf("\n");
+
+  /* check that hashlittle2 and hashlittle produce the same results */
+  i=47; j=0;
+  hashlittle2(q, sizeof(q), &i, &j);
+  if (hashlittle(q, sizeof(q), 47) != i)
+    printf("hashlittle2 and hashlittle mismatch\n");
+
+  /* check that hashword2 and hashword produce the same results */
+  len = 0xdeadbeef;
+  i=47, j=0;
+  hashword2(&len, 1, &i, &j);
+  if (hashword(&len, 1, 47) != i)
+    printf("hashword2 and hashword mismatch %x %x\n", 
+	   i, hashword(&len, 1, 47));
+
+  /* check hashlittle doesn't read before or after the ends of the string */
+  for (h=0, b=buf+1; h<8; ++h, ++b)
+  {
+    for (i=0; i<MAXLEN; ++i)
+    {
+      len = i;
+      for (j=0; j<i; ++j) *(b+j)=0;
+
+      /* these should all be equal */
+      ref = hashlittle(b, len, (uint32_t)1);
+      *(b+i)=(uint8_t)~0;
+      *(b-1)=(uint8_t)~0;
+      x = hashlittle(b, len, (uint32_t)1);
+      y = hashlittle(b, len, (uint32_t)1);
+      if ((ref != x) || (ref != y)) 
+      {
+	printf("alignment error: %.8x %.8x %.8x %d %d\n",ref,x,y,
+               h, i);
+      }
+    }
+  }
+}
+
+/* check for problems with nulls */
+ void driver4()
+{
+  uint8_t buf[1];
+  uint32_t h,i,state[HASHSTATE];
+
+
+  buf[0] = ~0;
+  for (i=0; i<HASHSTATE; ++i) state[i] = 1;
+  printf("These should all be different\n");
+  for (i=0, h=0; i<8; ++i)
+  {
+    h = hashlittle(buf, 0, h);
+    printf("%2ld  0-byte strings, hash is  %.8x\n", i, h);
+  }
+}
+
+
+int main()
+{
+  driver1();   /* test that the key is hashed: used for timings */
+  driver2();   /* test that whole key is hashed thoroughly */
+  driver3();   /* test that nothing but the key is hashed */
+  driver4();   /* test hashing multiple buffers (all buffers are null) */
+  return 1;
+}
+
+#endif  /* SELF_TEST */
+

Added: incubator/etch/trunk/binding-c/runtime/c/ext/hashtab/jenkhash.sln
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-c/runtime/c/ext/hashtab/jenkhash.sln?rev=767594&view=auto
==============================================================================
--- incubator/etch/trunk/binding-c/runtime/c/ext/hashtab/jenkhash.sln (added)
+++ incubator/etch/trunk/binding-c/runtime/c/ext/hashtab/jenkhash.sln Wed Apr 22 17:25:43 2009
@@ -0,0 +1,20 @@
+
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jenkhash", "jenkhash.vcproj", "{CC75FED8-5D1B-4323-B73A-36C41FD1CC66}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Win32 = Debug|Win32
+		Release|Win32 = Release|Win32
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{CC75FED8-5D1B-4323-B73A-36C41FD1CC66}.Debug|Win32.ActiveCfg = Debug|Win32
+		{CC75FED8-5D1B-4323-B73A-36C41FD1CC66}.Debug|Win32.Build.0 = Debug|Win32
+		{CC75FED8-5D1B-4323-B73A-36C41FD1CC66}.Release|Win32.ActiveCfg = Release|Win32
+		{CC75FED8-5D1B-4323-B73A-36C41FD1CC66}.Release|Win32.Build.0 = Release|Win32
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal

Added: incubator/etch/trunk/binding-c/runtime/c/ext/hashtab/jenkhash.vcproj
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-c/runtime/c/ext/hashtab/jenkhash.vcproj?rev=767594&view=auto
==============================================================================
--- incubator/etch/trunk/binding-c/runtime/c/ext/hashtab/jenkhash.vcproj (added)
+++ incubator/etch/trunk/binding-c/runtime/c/ext/hashtab/jenkhash.vcproj Wed Apr 22 17:25:43 2009
@@ -0,0 +1,217 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="jenkhash"
+	ProjectGUID="{CC75FED8-5D1B-4323-B73A-36C41FD1CC66}"
+	RootNamespace="jenkhash"
+	Keyword="Win32Proj"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
+			ConfigurationType="4"
+			CharacterSet="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				PreprocessorDefinitions="WIN32;_DEBUG;_LIB"
+				MinimalRebuild="false"
+				ExceptionHandling="0"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="1"
+				CompileAs="1"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="..\lib\$(ProjectName).lib"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				CommandLine=".\postbuild.bat"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
+			ConfigurationType="4"
+			CharacterSet="1"
+			WholeProgramOptimization="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
+				RuntimeLibrary="2"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+			>
+			<File
+				RelativePath=".\jenkhtab.c"
+				>
+			</File>
+			<File
+				RelativePath=".\jenklook.c"
+				>
+			</File>
+			<File
+				RelativePath=".\jenkrecy.c"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+			>
+			<File
+				RelativePath=".\jenkhtab.h"
+				>
+			</File>
+			<File
+				RelativePath=".\jenklook.h"
+				>
+			</File>
+			<File
+				RelativePath=".\jenkrecy.h"
+				>
+			</File>
+			<File
+				RelativePath=".\jenkstd.h"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+			>
+		</Filter>
+		<Filter
+			Name="Postbuild"
+			>
+			<File
+				RelativePath=".\postbuild.bat"
+				>
+			</File>
+		</Filter>
+		<File
+			RelativePath=".\jenkmake.txt"
+			>
+		</File>
+		<File
+			RelativePath=".\jenkread.txt"
+			>
+		</File>
+		<File
+			RelativePath=".\jenktest.txt"
+			>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>

Added: incubator/etch/trunk/binding-c/runtime/c/ext/hashtab/jenkhtab.c
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-c/runtime/c/ext/hashtab/jenkhtab.c?rev=767594&view=auto
==============================================================================
--- incubator/etch/trunk/binding-c/runtime/c/ext/hashtab/jenkhtab.c (added)
+++ incubator/etch/trunk/binding-c/runtime/c/ext/hashtab/jenkhtab.c Wed Apr 22 17:25:43 2009
@@ -0,0 +1,462 @@
+/* $Id$ 
+ * 
+ * Licensed to the Apache Software Foundation (ASF) under one or more 
+ * contributor license agreements. See the NOTICE file distributed with  
+ * this work for additional information regarding copyright ownership. 
+ * The ASF licenses this file to you under the Apache License, Version  
+ * 2.0 (the "License"); you may not use this file except in compliance  
+ * with the License. You may obtain a copy of the License at 
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0 
+ * 
+ * Unless required by applicable law or agreed to in writing, software 
+ * distributed under the License is distributed on an "AS IS" BASIS, 
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and 
+ * limitations under the License. 
+ */ 
+
+/*
+--------------------------------------------------------------------
+By Bob Jenkins.  hashtab.c.  Public Domain.
+
+This implements a hash table.
+* Keys are unique.  Adding an item fails if the key is already there.
+* Keys and items are pointed at, not copied.  If you change the value
+  of the key after it is inserted then hfind will not be able to find it.
+* The hash table maintains a position that can be set and queried.
+* The table length doubles dynamically and never shrinks.  The insert
+  that causes table doubling may take a long time.
+* The table length splits when the table length equals the number of items
+  Comparisons usually take 7 instructions.
+  Computing a hash value takes 35+6n instructions for an n-byte key.
+
+  hcreate  - create a hash table
+  hdestroy - destroy a hash table
+   hcount  - The number of items in the hash table
+   hkey    - key at the current position
+   hkeyl   - key length at the current position
+   hstuff  - stuff at the current position
+  hfind    - find an item in the table
+   hadd    - insert an item into the table
+   hdel    - delete an item from the table
+  hstat    - print statistics about the table
+   hfirst  - position at the first item in the table
+   hnext   - move the position to the next item in the table
+--------------------------------------------------------------------
+*/
+
+#include <stddef.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "jenkstd.h"
+#include "jenklook.h"
+#include "jenkhtab.h"
+#include "jenkrecy.h"
+
+
+/* sanity check -- make sure ipos, apos, and count make sense */
+static void hsanity(htab *t)
+{
+  ub4 i, end, counter;
+  hitem *h;
+
+  /* test that apos makes sense */
+  end = (ub4) 1 << (t->logsize);
+  if (end < t->apos)
+      printf("error:  end %ld  apos %ld\n", end, t->apos);
+
+  /* test that ipos is in bucket apos */
+  if (t->ipos)
+  {
+    for (h=t->table[t->apos];  h && h != t->ipos;  h = h->next)
+      ;
+    if (h != t->ipos)
+        printf("error:ipos not in apos, apos is %ld\n", t->apos);
+  }
+
+  /* test that t->count is the number of elements in the table */
+  counter=0;
+  for (counter=0, i=0;  i<end;  ++i)
+       for (h=t->table[i];  h;  h = h->next) ++counter;
+
+  if (counter != t->count)
+      printf("error: counter %ld  t->count %ld\n", counter, t->count);
+}
+
+
+/*
+ * hgrow - Double the size of a hash table.
+ * Allocate a new, 2x bigger array,
+ * move everything from the old array to the new array, then free the old array.
+ */
+static void hgrow(htab *t)
+{
+  register ub4 newsize = (ub4)1<<(++t->logsize);
+  register ub4 newmask = newsize-1;
+  register ub4 i;
+  register hitem **oldtab = t->table;
+  register hitem **newtab = (hitem **) malloc(newsize*sizeof(hitem *));
+
+  /* make sure newtab is cleared */
+  for (i=0; i<newsize; ++i) newtab[i] = (hitem *)0;
+  t->table = newtab;
+  t->mask = newmask;
+
+  /* Walk through old table putting entries in new table */
+  for (i=newsize>>1; i--;)
+  {
+    register hitem *pthis, *pthat, **newplace;
+    for (pthis = oldtab[i]; pthis;)
+    {
+      pthat = pthis;
+      pthis = pthis->next;
+      newplace = &newtab[(pthat->hval & newmask)];
+      pthat->next = *newplace;
+      *newplace = pthat;
+    }
+  }
+
+  /* position the hash table on some existing item */
+  hfirst(t);
+
+  /* free the old array */
+  free((char*)oldtab);
+}
+
+
+/* hcreate - create a hash table initially of size power(2,logsize) */
+htab *hcreate(intx logsize)/* = log base 2 of the size of the hash table */   
+{
+  ub4  i, len;
+  htab *t = (htab*) malloc(sizeof(htab));
+
+  len = ((ub4) 1 << logsize);
+  t->table = (hitem **) malloc(sizeof(hitem *)*(ub4)len);
+  for (i=0; i < len; ++i) t->table[i] = (hitem *)0;
+  t->logsize = logsize;
+  t->mask = len-1;
+  t->count = 0;
+  t->apos = (ub4)0;
+  t->ipos = (hitem *)0;
+  t->space = remkroot(sizeof(hitem));
+  t->bcount = 0;
+  return t;
+}
+
+
+/* hdestroy - destroy the hash table and free all its memory */
+void hdestroy(htab* t)
+{
+  /* hitem *h; // unreferenced local var wng */
+  refree(t->space);
+  free((char *)t->table);
+  free((char *)t);
+}
+
+
+/* hcount() is a macro, see hashtab.h */
+/* hkey()   is a macro, see hashtab.h */
+/* hkeyl()  is a macro, see hashtab.h */
+/* hstuff() is a macro, see hashtab.h */
+
+
+/**
+ * hfind - find an item with a given key in a hash table.
+ * if found, point at the item and return TRUE, otherwise FALSE. 
+ */
+intx hfind(htab* t, ub1* key, ub4 keylen)
+{
+  hitem *h;
+  ub4    x = lookup(key,keylen,0); /* hash */
+  ub4    y;
+
+  for (h = t->table[y=(x&t->mask)]; h; h = h->next)
+  {
+    if ((x == h->hval) && (keylen == h->keyl) && !memcmp(key, h->key, keylen))
+    {
+      t->apos = y;
+      t->ipos = h;
+      return TRUE;
+    }
+  }
+  return FALSE;
+}
+
+
+/**
+ * hfindx - find an item with a given hashed key in a hash table.
+ * this function was added by JLD, Cisco CUAE.
+ * keylen is byte length of original key, not of the hash.
+ * if found, point at the item and return TRUE, otherwise FALSE. 
+ */
+intx hfindx(htab* t, const ub4 hashval)
+{
+  intx result = FALSE;
+  ub4    i = hashval & t->mask;
+  hitem *h = t->table[i];
+
+  for (; h; h = h->next)   
+    if (hashval == h->hval)
+    { t->apos = i;
+      t->ipos = h;
+      result  = TRUE;
+      break;
+    }
+   
+  return result;
+}
+
+
+
+/**
+ * hadd - add an item to a hash table.
+ * return FALSE if key is already in the table, otherwise TRUE.
+ */
+intx hadd(htab *t, ub1 *key, ub4 keylen, void* stuff)
+{
+  register hitem *h, **hp;
+  register ub4 y;
+  register ub4 x = lookup(key,keylen,0);
+
+  /* make sure the key is not already there */
+  for (h = t->table[(y = (x & t->mask))]; h; h = h->next)
+  {
+    if ((x == h->hval) && (keylen == h->keyl) && !memcmp(key, h->key, keylen))
+    {
+      t->apos = y;
+      t->ipos = h;
+      return FALSE;
+    }
+  }
+
+  /* find space for a new item */
+  /* JLD pointer assumed same size as int -- ouch! */
+  h = (hitem*) renew (t->space);   
+
+  /* make the hash table bigger if it is getting full */
+  if (++t->count > (ub4) 1 << (t->logsize))
+  {
+    hgrow(t);
+    y = (x&t->mask);
+  }
+
+  /* add the new key to the table */
+  h->key   = key;
+  h->keyl  = keylen;
+  h->stuff = stuff;
+  h->hval  = x;      /* hash */
+  hp = &t->table[y];
+  h->next = *hp;
+  *hp = h;
+  t->ipos = h;
+  t->apos = y;
+
+  #ifdef HSANITY
+  hsanity(t);
+  #endif  /* HSANITY */
+
+  return TRUE;
+}
+
+
+/**
+ * haddx - add an item to a hash table.
+ * this is a version of hadd which expects a pre-calculated hashed key 
+ * in the initial 4 bytes of the key object. 
+ * return FALSE if key is already in the table, otherwise TRUE.
+ * this function was added by JLD, Cisco CUAE
+ */
+intx haddx(htab *t, void* keyobj, void* valobj)
+{
+  register hitem *h, **hp;
+  register ub4 y;              
+  register ub4 hashval = *((ub4*) keyobj);  
+  const ub4 KEYLEN = sizeof(void*);
+  if (0 == hashval) return FALSE;
+
+  for (h = t->table[(y = (hashval & t->mask))]; h; h = h->next)
+  {
+    if ((hashval == h->hval) && (KEYLEN == h->keyl) && !memcmp(keyobj, h->key, KEYLEN))
+    {
+      t->apos = y;
+      t->ipos = h;
+      return FALSE;
+    }
+  }
+
+  /* find space for a new item */
+  h = (hitem*) renew (t->space);   
+
+  /* make the hashval table bigger if it is getting full */
+  if (++t->count > (ub4) 1 << (t->logsize))
+  {
+    hgrow(t);
+    y = (hashval&t->mask);
+  }
+
+  /* add the new key and value to the table */
+  h->key   = keyobj;
+  h->keyl  = KEYLEN;
+  h->stuff = valobj;
+  h->hval  = hashval;      
+  hp = &t->table[y];
+  h->next = *hp;
+  *hp = h;
+  t->ipos = h;
+  t->apos = y;
+
+  #ifdef HSANITY
+  hsanity(t);
+  #endif  /* HSANITY */
+
+  return TRUE;
+}
+
+
+/* hdel - delete the item at the current position */
+intx hdel(htab* t)
+{
+  hitem  *h;    /* item being deleted */
+  hitem **ip;   /* a counter */
+
+  /* check for item not existing */
+  if (!(h = t->ipos)) return FALSE;
+
+  /* remove item from its list */
+  for (ip = &t->table[t->apos]; *ip != h; ip = &(*ip)->next)
+    ;
+  *ip = (*ip)->next;
+  --(t->count);
+
+  /* adjust position to something that exists */
+  if (!(t->ipos = h->next)) hnbucket(t);
+
+  /* recycle the deleted hitem node */
+  redel(t->space, h);
+
+  #ifdef HSANITY
+  hsanity(t);
+  #endif  /* HSANITY */
+
+  return TRUE;
+}
+
+
+/* hfirst - position on the first element in the table */
+intx hfirst(htab *t)
+{
+  t->apos = (ub4) t->mask;
+  (void)hnbucket(t);
+  return (t->ipos != (hitem *)0);
+}
+
+
+/* hnext() is a macro, see hashtab.h */
+
+
+
+/*
+ * hnbucket - Move position to the first item in the next bucket.
+ * Return TRUE if we did not wrap around to the beginning of the table
+ */
+intx hnbucket(htab *t)
+{
+  ub4  oldapos = t->apos;
+  ub4  end = (ub4) 1 << (t->logsize);
+  ub4  i;
+
+  /* see if the element can be found without wrapping around */
+  for (i=oldapos+1; i<end; ++i)
+  {
+    if (t->table[i&t->mask])
+    {
+      t->apos = i;
+      t->ipos = t->table[i];
+      return TRUE;
+    }
+  }
+
+  /* must have to wrap around to find the last element */
+  for (i=0; i <= oldapos; ++i)
+  {
+    if (t->table[i])
+    {
+      t->apos = i;
+      t->ipos = t->table[i];
+      return FALSE;
+    }
+  }
+
+  return FALSE;
+}
+
+
+/**
+     hstat: report table statistics
+*/
+void hstat(htab *t)
+{
+  ub4     i,j;
+  double  total = 0.0;
+  hitem  *h;
+  hitem  *walk, *walk2, *stat = (hitem *)0;
+
+  /* in stat, keyl will store length of list, hval the number of buckets */
+  for (i=0; i <= t->mask; ++i)
+  {
+    for (h=t->table[i], j=0; h; ++j, h=h->next)
+      ;
+    for (walk=stat; walk && (walk->keyl != j); walk=walk->next)
+      ;
+    if (walk)
+    {
+      ++(walk->hval);
+    }
+    else
+    {
+      walk = (hitem *)renew(t->space);
+      walk->keyl = j;
+      walk->hval = 1;
+      if (!stat || stat->keyl > j) {walk->next=stat; stat=walk;}
+      else
+      {
+        for (walk2=stat;
+             walk2->next && (walk2->next->keyl<j);
+             walk2=walk2->next)
+          ;
+        walk->next = walk2->next;
+        walk2->next = walk;
+      }
+    }
+  }
+
+  /* figure out average list length for existing elements */
+  for (walk=stat; walk; walk=walk->next)
+  {
+    total += (double)walk->hval * (double)walk->keyl * (double)walk->keyl;
+  }
+
+  if  (t->count) 
+       total /= (double)t->count;
+  else total = 0.0;
+
+  /* print statistics */
+  printf("** hashtable stats follow\n");
+  for (walk=stat; walk; walk=walk->next)
+       printf("** items %ld: %ld buckets\n", walk->keyl, walk->hval);   
+  printf("** buckets: %ld items: %ld existing: %g\n\n",
+         ((ub4)1<<t->logsize), t->count, total);
+
+  /* clean up */
+  while (stat)
+  {
+    walk = stat->next;
+    redel(t->space, stat);
+    stat = walk;
+  }
+}
+
+