Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036 #ifndef __CIF_C_H
00037 #define __CIF_C_H
00038 #ifdef __cplusplus
00039 extern "C" {
00040 #endif
00041
00042
00043
00044
00045
00046
00047 typedef unsigned int CIF_field;
00048
00049 #ifndef __inttypes_INCLUDED
00050 typedef unsigned int uint32_t;
00051 #endif
00052
00053
00054
00055
00056
00057 #define CIF_MAGIC_STRING "CIF"
00058
00059
00060
00061
00062
00063 #define CIF_C_VERSION 1U
00064
00065
00066
00067
00068
00069 #define CIF_LANGUAGE_c 1U
00070 #define CIF_LANGUAGE_cplusplus 2U
00071
00072
00073
00074
00075
00076 #define CIF_TAG_pu_def 1U
00077 #define CIF_TAG_object 2U
00078 #define CIF_TAG_basic_type 3U
00079 #define CIF_TAG_one_kid_type 4U
00080 #define CIF_TAG_two_kids_type 5U
00081 #define CIF_TAG_n_kids_type 6U
00082 #define CIF_TAG_enum_constant 7U
00083 #define CIF_TAG_source_file 8U
00084 #define CIF_TAG_macro 9U
00085 #define CIF_TAG_namespace 10U
00086 #define CIF_TAG_function 11U
00087
00088
00089
00090
00091
00092 #define CIF_OBJECT_variable 1U
00093 #define CIF_OBJECT_parameter 2U
00094 #define CIF_OBJECT_data_member 3U
00095
00096
00097
00098
00099
00100 #define CIF_ACCESS_public 1U
00101 #define CIF_ACCESS_private 2U
00102 #define CIF_ACCESS_protected 3U
00103
00104
00105
00106
00107
00108 #define CIF_BASIC_TYPE_void 1U
00109 #define CIF_BASIC_TYPE_bool 2U
00110 #define CIF_BASIC_TYPE_wchar_t 3U
00111 #define CIF_BASIC_TYPE_char 4U
00112 #define CIF_BASIC_TYPE_int 5U
00113 #define CIF_BASIC_TYPE_float 6U
00114 #define CIF_BASIC_TYPE_double 7U
00115
00116
00117
00118
00119
00120 #define CIF_ONE_KID_TYPE_pointer 1U
00121 #define CIF_ONE_KID_TYPE_reference 2U
00122 #define CIF_ONE_KID_TYPE_qualified 3U
00123
00124
00125
00126
00127
00128 #define CIF_TWO_KIDS_TYPE_array 1U
00129 #define CIF_TWO_KIDS_TYPE_ptr_to_mbr 2U
00130 #define CIF_TWO_KIDS_TYPE_typedef 3U
00131
00132
00133
00134
00135
00136 #define CIF_N_KIDS_TYPE_class 1U
00137 #define CIF_N_KIDS_TYPE_struct 2U
00138 #define CIF_N_KIDS_TYPE_union 3U
00139 #define CIF_N_KIDS_TYPE_enum 4U
00140 #define CIF_N_KIDS_TYPE_function 5U
00141
00142
00143
00144
00145
00146 #define CIF_KID_base_class 1U
00147 #define CIF_KID_member_variable 2U
00148 #define CIF_KID_member_function 3U
00149 #define CIF_KID_member_type 4U
00150 #define CIF_KID_friend_class 5U
00151 #define CIF_KID_friend_function 6U
00152 #define CIF_KID_enum_constant 7U
00153 #define CIF_KID_nested_namespace 8U
00154 #define CIF_KID_return_type 9U
00155 #define CIF_KID_parameter_type 10U
00156 #define CIF_KID_exception_type 11U
00157
00158
00159
00160
00161
00162
00163
00164 #define CIF_USAGE_CODE_declaration 0x1U
00165 #define CIF_USAGE_CODE_definition 0x2U
00166 #define CIF_USAGE_CODE_reference 0x4U
00167 #define CIF_USAGE_CODE_use 0x8U
00168 #define CIF_USAGE_CODE_modification 0x10U
00169 #define CIF_USAGE_CODE_address_taken 0x20U
00170 #define CIF_USAGE_CODE_error 0x40U
00171 #define CIF_USAGE_CODE_implicit 0x80U
00172
00173
00174
00175
00176
00177 typedef struct CIF_file_header {
00178
00179 CIF_field magic_number;
00180 CIF_field cif_version;
00181 CIF_field language;
00182 CIF_field cif_level;
00183
00184 CIF_field comp_dir_offset;
00185 CIF_field cmd_line_offset;
00186
00187 CIF_field num_pu_defs;
00188 CIF_field pu_def_offset;
00189
00190 CIF_field num_src_files;
00191 CIF_field src_file_list;
00192
00193 CIF_field num_macros;
00194 CIF_field macro_offset;
00195
00196 CIF_field num_namespaces;
00197 CIF_field namespace_offset;
00198
00199 CIF_field num_nonlocal_vars;
00200 CIF_field nonlocal_var_offset;
00201
00202 CIF_field num_nonlocal_types;
00203 CIF_field nonlocal_type_offset;
00204
00205 CIF_field num_unnamed_types;
00206 CIF_field unnamed_type_offset;
00207
00208 CIF_field num_functions;
00209 CIF_field function_offset;
00210
00211 CIF_field hash_table_size;
00212 CIF_field hash_table_offset;
00213
00214 CIF_field hash_chain_size;
00215 CIF_field hash_chain_offset;
00216
00217 CIF_field id_map_size;
00218 CIF_field id_map_offset;
00219
00220 CIF_field string_table_size;
00221 CIF_field string_table_offset;
00222
00223 } CIF_file_header;
00224
00225
00226
00227
00228
00229
00230 typedef struct CIF_pu_def {
00231 CIF_field cif_tag:8;
00232 CIF_field cif_id:24;
00233 CIF_field start_file_index:16;
00234 CIF_field start_column:16;
00235 CIF_field start_line_num:32;
00236 CIF_field end_file_index:16;
00237 CIF_field end_column:16;
00238 CIF_field end_line_num:32;
00239 CIF_field num_callees:32;
00240 } CIF_pu_def;
00241
00242
00243
00244
00245
00246 typedef struct CIF_object {
00247 CIF_field cif_tag:8;
00248 CIF_field cif_id:24;
00249 CIF_field parent_id:24;
00250 CIF_field object_kind:2;
00251 CIF_field access_kind:2;
00252 CIF_field is_extern:1;
00253 CIF_field is_static:1;
00254 CIF_field is_auto:1;
00255 CIF_field is_bitfield:1;
00256 CIF_field type_id:32;
00257 CIF_field num_usages:32;
00258 } CIF_object;
00259
00260
00261
00262
00263
00264 typedef struct CIF_basic_type {
00265 CIF_field cif_tag:8;
00266 CIF_field cif_id:24;
00267 CIF_field size:16;
00268 CIF_field type_kind:8;
00269 CIF_field is_short:1;
00270 CIF_field is_long:1;
00271 CIF_field is_longlong:1;
00272 CIF_field is_signed:1;
00273 CIF_field is_unsigned:1;
00274 CIF_field align_dummy:3;
00275 } CIF_basic_type;
00276
00277
00278
00279
00280
00281 typedef struct CIF_one_kid_type {
00282 CIF_field cif_tag:8;
00283 CIF_field cif_id:24;
00284 CIF_field size:32;
00285 CIF_field base_type:24;
00286 CIF_field type_kind:2;
00287 CIF_field is_const:1;
00288 CIF_field is_volatile:1;
00289 CIF_field is_restrict:1;
00290 CIF_field align_dummy:3;
00291 } CIF_one_kid_type;
00292
00293
00294
00295
00296
00297 typedef struct CIF_two_kids_type {
00298 CIF_field cif_tag:8;
00299 CIF_field cif_id:24;
00300 CIF_field size:32;
00301 CIF_field base_type:24;
00302 CIF_field type_kind:8;
00303 union {
00304 CIF_field num_elems:32;
00305 CIF_field class_id:32;
00306 CIF_field parent_id:32;
00307 } other_kid;
00308 CIF_field num_usages:32;
00309 } CIF_two_kids_type;
00310
00311
00312
00313
00314
00315 typedef struct CIF_n_kids_type {
00316 CIF_field cif_tag:8;
00317 CIF_field cif_id:24;
00318 CIF_field parent_id:24;
00319 CIF_field type_kind:8;
00320 CIF_field size:32;
00321 CIF_field num_kids:32;
00322 CIF_field num_usages:32;
00323 } CIF_n_kids_type;
00324
00325
00326
00327
00328
00329 typedef struct CIF_enum_constant {
00330 CIF_field cif_tag:8;
00331 CIF_field cif_id:24;
00332 CIF_field parent_id:32;
00333 CIF_field value:32;
00334 CIF_field num_usages:32;
00335 } CIF_enum_constant;
00336
00337
00338
00339
00340
00341 typedef struct CIF_source_file {
00342 CIF_field cif_tag:8;
00343 CIF_field cif_id:24;
00344 CIF_field parent_index:30;
00345 CIF_field is_include:1;
00346 CIF_field is_sys_include:1;
00347 CIF_field include_line:32;
00348 CIF_field name_offset:32;
00349 } CIF_source_file;
00350
00351
00352
00353
00354
00355 typedef struct CIF_macro {
00356 CIF_field cif_tag:8;
00357 CIF_field cif_id:24;
00358 CIF_field num_usages:32;
00359 } CIF_macro;
00360
00361
00362
00363
00364
00365 typedef struct CIF_namespace {
00366 CIF_field cif_tag:8;
00367 CIF_field cif_id:24;
00368 CIF_field parent_id:24;
00369 CIF_field is_alias:8;
00370 union {
00371 CIF_field alias_of:32;
00372 CIF_field num_kids:32;
00373 } extra_info;
00374 CIF_field num_usages:32;
00375 } CIF_namespace;
00376
00377
00378
00379
00380
00381 typedef struct CIF_function {
00382 CIF_field cif_tag:8;
00383 CIF_field cif_id:24;
00384 CIF_field parent_id:24;
00385 CIF_field access_kind:2;
00386 CIF_field func_flags:6;
00387 CIF_field type_id:24;
00388 CIF_field is_defined:1;
00389 CIF_field is_extern:1;
00390 CIF_field is_static:1;
00391 CIF_field is_inline:1;
00392 CIF_field is_virtual:1;
00393 CIF_field is_operator:1;
00394 CIF_field is_constructor:1;
00395 CIF_field is_destructor:1;
00396 CIF_field pu_def_offset:32;
00397 CIF_field num_usages:32;
00398 } CIF_function;
00399
00400
00401
00402
00403
00404 typedef struct CIF_kid {
00405 CIF_field kid_kind:4;
00406 CIF_field access_kind:2;
00407 CIF_field is_virtual:1;
00408 CIF_field is_static:1;
00409 CIF_field cif_id:24;
00410 } CIF_kid;
00411
00412
00413
00414
00415
00416 typedef struct CIF_usage {
00417 CIF_field file_index:16;
00418 CIF_field column_number:16;
00419 CIF_field line_number:24;
00420 CIF_field usage_code:8;
00421 } CIF_usage;
00422
00423
00424
00425
00426
00427 typedef struct CIF_func_usage {
00428 CIF_field caller_id;
00429 CIF_field file_index:16;
00430 CIF_field column_number:16;
00431 CIF_field line_number:24;
00432 CIF_field usage_code:8;
00433 } CIF_func_usage;
00434
00435
00436
00437
00438
00439
00440
00441 typedef struct CIF_index_entry {
00442 CIF_field cif_tag:5;
00443 CIF_field name_offset:27;
00444 CIF_field record_offset:32;
00445 } CIF_index_entry;
00446
00447
00448
00449
00450
00451
00452
00453
00454 typedef struct CIF_hash_entry {
00455 CIF_field cif_tag:8;
00456 CIF_field cif_id:24;
00457 CIF_field next_in_chain:32;
00458
00459 } CIF_hash_entry;
00460
00461
00462
00463
00464
00465 typedef struct CIF_generic {
00466 CIF_field cif_tag:8;
00467 CIF_field cif_id:24;
00468 } CIF_generic;
00469
00470
00471 typedef CIF_field CIF_id;
00472 typedef CIF_field CIF_tag;
00473 typedef CIF_field CIF_offset;
00474 typedef CIF_field CIF_kid_kind;
00475 typedef CIF_field CIF_type_kind;
00476 typedef CIF_field CIF_object_kind;
00477 typedef CIF_field CIF_access_kind;
00478 typedef CIF_field CIF_usage_code;
00479
00480
00481
00482
00483
00484
00485
00486 #define CIF_LANGUAGE(hdr) ((hdr)->language)
00487
00488 #define CIF_NUM_PU_DEFS(hdr) ((hdr)->num_pu_defs)
00489 #define CIF_PU_DEF_LIST(hdr) ((hdr)->pu_def_offset)
00490
00491 #define CIF_NUM_SRC_FILES(hdr) ((hdr)->num_src_files)
00492 #define CIF_SRC_FILE_LIST(hdr) ((hdr)->src_file_list)
00493
00494 #define CIF_NUM_MACROS(hdr) ((hdr)->num_macros)
00495 #define CIF_MACRO_LIST(hdr) ((hdr)->macro_offset)
00496
00497 #define CIF_NUM_NAMESPACES(hdr) ((hdr)->num_namespaces)
00498 #define CIF_NAMESPACE_LIST(hdr) ((hdr)->namespace_offset)
00499
00500 #define CIF_NUM_NONLOCAL_VARS(hdr) ((hdr)->num_nonlocal_vars)
00501 #define CIF_NONLOCAL_VAR_LIST(hdr) ((hdr)->nonlocal_var_offset)
00502
00503 #define CIF_NUM_NONLOCAL_TYPES(hdr) ((hdr)->num_nonlocal_types)
00504 #define CIF_NONLOCAL_TYPE_LIST(hdr) ((hdr)->nonlocal_type_offset)
00505
00506 #define CIF_NUM_UNNAMED_TYPES(hdr) ((hdr)->num_unnamed_types)
00507 #define CIF_UNNAMED_TYPE_LIST(hdr) ((hdr)->unnamed_type_offset)
00508
00509 #define CIF_NUM_FUNCTIONS(hdr) ((hdr)->num_functions)
00510 #define CIF_FUNCTION_LIST(hdr) ((hdr)->function_offset)
00511
00512 #define CIF_HASH_TABLE_SIZE(hdr) ((hdr)->hash_table_size)
00513 #define CIF_HASH_TABLE_OFFSET(hdr) ((hdr)->hash_table_offset)
00514
00515 #define CIF_HASH_CHAIN_SIZE(hdr) ((hdr)->hash_chain_size)
00516 #define CIF_HASH_CHAIN_OFFSET(hdr) ((hdr)->hash_chain_offset)
00517
00518 #define CIF_ID_MAP_SIZE(hdr) ((hdr)->id_map_size)
00519 #define CIF_ID_MAP_OFFSET(hdr) ((hdr)->id_map_offset)
00520
00521 #define CIF_STR_TABLE_SIZE(hdr) ((hdr)->string_table_size)
00522 #define CIF_STR_TABLE_OFFSET(hdr) ((hdr)->string_table_offset)
00523
00524 #define CIF_STRING_TABLE(hdr) ((char*)(hdr) + CIF_STR_TABLE_OFFSET(hdr))
00525
00526
00527
00528 #define CIF_INDEX_ENTRY(hdr,id) \
00529 ((CIF_index_entry*)(((char*)(hdr)) + CIF_ID_MAP_OFFSET(hdr)) + id)
00530
00531
00532 #define CIF_HASH_TABLE_ENTRY(hdr,index) \
00533 ((CIF_hash_entry*)(((char*)(hdr)) + CIF_HASH_TABLE_OFFSET(hdr)) + index)
00534
00535
00536 #define CIF_HASH_CHAIN_ENTRY(hdr,index) \
00537 ((CIF_hash_entry*)(((char*)(hdr)) + CIF_HASH_CHAIN_OFFSET(hdr)) + index)
00538
00539
00540
00541 #define CIF_SRC_FILE(hdr,index) \
00542 ((CIF_source_file*)((char*)(hdr) + CIF_SRC_FILE_LIST(hdr)) + index)
00543
00544
00545
00546 #define CIF_ID(record) ((record)->cif_id)
00547 #define CIF_TAG(record) ((record)->cif_tag)
00548 #define CIF_TYPE(record) ((record)->type_id)
00549 #define CIF_PARENT(record) ((record)->parent_id)
00550 #define CIF_NUM_USAGES(record) ((record)->num_usages)
00551 #define CIF_ACCESS_KIND(record) ((record)->access_kind)
00552 #define CIF_NAME_OFFSET(record) ((record)->name_offset)
00553
00554
00555
00556 #define CIF_RECORD_OFFSET(entry) ((entry)->record_offset)
00557
00558
00559
00560 #define CIF_NEXT_IN_CHAIN(entry) ((entry)->next_in_chain)
00561
00562
00563
00564
00565
00566 #define CIF_PU_DEF_START_FILE(pu) ((pu)->start_file_index)
00567 #define CIF_PU_DEF_START_LINE(pu) ((pu)->start_line_num)
00568 #define CIF_PU_DEF_START_COL(pu) ((pu)->start_column)
00569 #define CIF_PU_DEF_END_FILE(pu) ((pu)->end_file_index)
00570 #define CIF_PU_DEF_END_LINE(pu) ((pu)->end_line_num)
00571 #define CIF_PU_DEF_END_COL(pu) ((pu)->end_column)
00572 #define CIF_PU_DEF_NUM_CALLEES(pu) ((pu)->num_callees)
00573 #define CIF_PU_DEF_CALLEES(pu) ((CIF_id*)((pu)+1))
00574 #define CIF_PU_DEF_START_FILE_ID(hdr,pu) \
00575 CIF_ID(CIF_SRC_FILE((hdr), CIF_PU_DEF_START_FILE(pu)))
00576 #define CIF_PU_DEF_END_FILE_ID(hdr,pu) \
00577 CIF_ID(CIF_SRC_FILE((hdr), CIF_PU_DEF_END_FILE(pu)))
00578
00579
00580
00581 #define CIF_OBJECT_KIND(obj) ((obj)->object_kind)
00582 #define CIF_MEMBER_STATIC(obj) ((obj)->is_static)
00583
00584
00585
00586 #define CIF_TYPE_KIND(type) ((type)->type_kind)
00587 #define CIF_TYPE_SIZE(type) ((type)->size)
00588 #define CIF_TYPE_SHORT(type) ((type)->is_short)
00589 #define CIF_TYPE_LONG(type) ((type)->is_long)
00590 #define CIF_TYPE_LONGLONG(type) ((type)->is_longlong)
00591 #define CIF_TYPE_SIGNED(type) ((type)->is_signed)
00592 #define CIF_TYPE_UNSIGNED(type) ((type)->is_unsigned)
00593 #define CIF_TYPE_CONST(type) ((type)->is_const)
00594 #define CIF_TYPE_VOLATILE(type) ((type)->is_volatile)
00595 #define CIF_TYPE_RESTRICT(type) ((type)->is_restrict)
00596 #define CIF_TYPE_BASE(type) ((type)->base_type)
00597 #define CIF_TYPE_NUM_KIDS(type) ((type)->num_kids)
00598
00599 #define CIF_ARRAY_NUM_ELEMS(array) ((array)->other_kid.num_elems)
00600 #define CIF_PTR_TO_MBR_CLASS(ptr) ((ptr)->other_kid.class_id)
00601 #define CIF_TYPEDEF_PARENT(type) ((type)->other_kid.parent_id)
00602
00603
00604
00605 #define CIF_ENUM_VALUE(constant) ((constant)->value)
00606
00607
00608
00609
00610
00611 #define CIF_SRC_FILE_PARENT_INDEX(file) ((file)->parent_index)
00612 #define CIF_SRC_FILE_IS_INCLUDE(file) ((file)->is_include)
00613 #define CIF_SRC_FILE_SYS_INCLUDE(file) ((file)->is_sys_include)
00614 #define CIF_SRC_FILE_INCLUDE_LINE(file) ((file)->include_line)
00615
00616
00617
00618
00619 #define CIF_SRC_FILE_PARENT_ID(hdr,file) \
00620 CIF_ID(CIF_SRC_FILE((hdr), CIF_SRC_FILE_PARENT_INDEX(file)))
00621 #define CIF_SRC_FILE_FULL_NAME(hdr,file) \
00622 (CIF_STRING_TABLE(hdr) + CIF_NAME_OFFSET(file))
00623
00624
00625
00626 #define CIF_NSP_IS_ALIAS(nsp) ((nsp)->is_alias)
00627 #define CIF_NSP_ALIAS_OF(nsp) ((nsp)->extra_info.alias_of)
00628 #define CIF_NSP_NUM_KIDS(nsp) ((nsp)->extra_info.num_kids)
00629
00630
00631
00632 #define CIF_FUNC_DEF_OFFSET(func) ((func)->pu_def_offset)
00633 #define CIF_FUNC_VIRTUAL(func) ((func)->is_virtual)
00634 #define CIF_FUNC_INLINE(func) ((func)->is_inline)
00635 #define CIF_FUNC_CTOR(func) ((func)->is_constructor)
00636 #define CIF_FUNC_DTOR(func) ((func)->is_destructor)
00637 #define CIF_FUNC_OPERATOR(func) ((func)->is_operator)
00638 #define CIF_FUNC_DEFINED(func) ((func)->is_defined)
00639 #define CIF_FUNC_USAGES(func) ((CIF_func_usage*)((func)+1))
00640
00641
00642 #define CIF_FUNC_PU_DEF(hdr,func) \
00643 ((CIF_pu_def*)((char*)((hdr)) + CIF_FUNC_DEF_OFFSET(func)))
00644
00645
00646
00647 #define CIF_KID_ID(kid) ((kid)->cif_id)
00648 #define CIF_KID_KIND(kid) ((kid)->kid_kind)
00649 #define CIF_KID_VIRTUAL(kid) ((kid)->is_virtual)
00650 #define CIF_KID_STATIC(kid) ((kid)->is_static)
00651
00652
00653
00654
00655
00656 #define CIF_USAGE_CALLER(usage) ((usage)->caller_id)
00657 #define CIF_USAGE_FILE_INDEX(usage) ((usage)->file_index)
00658 #define CIF_USAGE_LINE(usage) ((usage)->line_number)
00659 #define CIF_USAGE_COLUMN(usage) ((usage)->column_number)
00660 #define CIF_USAGE_CODE(usage) ((usage)->usage_code)
00661 #define CIF_USAGE_FILE_ID(hdr,usage) \
00662 CIF_ID(CIF_SRC_FILE((hdr), CIF_USAGE_FILE_INDEX(usage)))
00663
00664
00665
00666 #define CIF_INDEX_ENTRY_NAME(hdr,entry) \
00667 (CIF_STRING_TABLE(hdr) + CIF_NAME_OFFSET(entry))
00668
00669
00670 #define CIF_HASH_ENTRY_NAME(hdr,entry) \
00671 CIF_INDEX_ENTRY_NAME(hdr, CIF_INDEX_ENTRY(hdr, CIF_ID(entry)))
00672
00673
00674 #define CIF_ERROR 0
00675
00676
00677
00678
00679
00680 #if defined(__CIF_C_CONSUMER__) || defined(__CIF_C_PRODUCER__)
00681 #ifndef __STRING_H__
00682 #include <string.h>
00683 #endif
00684 #ifdef __cplusplus
00685 inline
00686 #else
00687 static
00688 #endif
00689 CIF_field
00690 cif_hash (const char* name)
00691 {
00692 #define CIF_HASH_FACTOR ((CIF_field) 73)
00693 CIF_field hash_value = 0;
00694 const char* ptr = name;
00695 size_t length = strlen(name);
00696
00697 if (length > 9) {
00698 hash_value = (CIF_field)*ptr++;
00699 hash_value = (hash_value * CIF_HASH_FACTOR) + (CIF_field)*ptr++;
00700 hash_value = (hash_value * CIF_HASH_FACTOR) + (CIF_field)*ptr;
00701 ptr = name + (length >> 1) - 1;
00702 hash_value = (hash_value * CIF_HASH_FACTOR) + (CIF_field)*ptr++;
00703 hash_value = (hash_value * CIF_HASH_FACTOR) + (CIF_field)*ptr++;
00704 hash_value = (hash_value * CIF_HASH_FACTOR) + (CIF_field)*ptr;
00705 ptr = name + length - 3;
00706 hash_value = (hash_value * CIF_HASH_FACTOR) + (CIF_field)*ptr++;
00707 hash_value = (hash_value * CIF_HASH_FACTOR) + (CIF_field)*ptr++;
00708 hash_value = (hash_value * CIF_HASH_FACTOR) + (CIF_field)*ptr;
00709 }
00710 else {
00711 size_t i;
00712 for (i = 0; i < length; ++i) {
00713 hash_value = (hash_value * CIF_HASH_FACTOR) + (CIF_field)*ptr++;
00714 }
00715 }
00716
00717 return hash_value;
00718 }
00719 #endif
00720
00721
00722 #ifdef __cplusplus
00723 }
00724 #endif
00725 #endif