Changeset 25147 for main/trunk/greenstone2/common-src/indexers/mg/lib/rx.h
- Timestamp:
- 2012-02-28T13:59:00+13:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/common-src/indexers/mg/lib/rx.h
r16583 r25147 22 22 /* t. lord Wed Sep 23 18:20:57 1992 */ 23 23 24 25 26 27 28 29 30 24 #include "mglong.h" 31 25 32 26 #ifndef RX_WANT_SE_DEFS … … 91 85 struct rx_hash_item * next_same_hash; 92 86 struct rx_hash * table; 93 unsignedlong hash;87 mg_u_long hash; 94 88 void * data; 95 89 void * binding; … … 273 267 */ 274 268 void * buffer; 275 unsignedlong allocated;269 mg_u_long allocated; 276 270 277 271 /* Clients of RX can ask for some extra storage in the space pointed … … 280 274 * at (buffer + allocated - reserved) 281 275 */ 282 unsignedlong reserved;276 mg_u_long reserved; 283 277 284 278 /* --------- The remaining fields are for internal use only. --------- */ … … 1274 1268 1275 1269 void * buffer; /* Malloced memory for the nfa. */ 1276 unsignedlong allocated; /* Size of that memory. */1270 mg_u_long allocated; /* Size of that memory. */ 1277 1271 1278 1272 /* Pointer to a fastmap, if any, otherwise zero. re_search uses … … 1580 1574 rx_Bitset a, rx_Bitset b); 1581 1575 RX_DECL void rx_bitset_xor (int size, rx_Bitset a, rx_Bitset b); 1582 RX_DECL unsignedlong rx_bitset_hash (int size, rx_Bitset b);1576 RX_DECL mg_u_long rx_bitset_hash (int size, rx_Bitset b); 1583 1577 RX_DECL struct rx_hash_item * rx_hash_find (struct rx_hash * table, 1584 unsignedlong hash,1578 mg_u_long hash, 1585 1579 void * value, 1586 1580 struct rx_hash_rules * rules); 1587 1581 RX_DECL struct rx_hash_item * rx_hash_store (struct rx_hash * table, 1588 unsignedlong hash,1582 mg_u_long hash, 1589 1583 void * value, 1590 1584 struct rx_hash_rules * rules); … … 1637 1631 RX_DECL void rx_delete_epsilon_transitions (struct rx *rx); 1638 1632 RX_DECL int rx_compactify_nfa (struct rx *rx, 1639 void **mem, unsignedlong *size);1633 void **mem, mg_u_long *size); 1640 1634 RX_DECL void rx_release_superset (struct rx *rx, 1641 1635 struct rx_superset *set); … … 1665 1659 RX_DECL void rx_bitset_revdifference (); 1666 1660 RX_DECL void rx_bitset_xor (); 1667 RX_DECL unsignedlong rx_bitset_hash ();1661 RX_DECL mg_u_long rx_bitset_hash (); 1668 1662 RX_DECL struct rx_hash_item * rx_hash_find (); 1669 1663 RX_DECL struct rx_hash_item * rx_hash_store (); … … 2230 2224 2231 2225 2232 2233 2226 /* How many characters in the character set. */ 2234 2227 #define CHAR_SET_SIZE (1 << CHARBITS) … … 2344 2337 RX_DECL __inline__ int 2345 2338 rx_search (struct re_pattern_buffer * rxb, 2346 int startpos,2339 intptr_t startpos, 2347 2340 int range, 2348 2341 int stop, … … 2361 2354 app_closure, regs, resume_state, save_state) 2362 2355 struct re_pattern_buffer * rxb; 2363 int startpos;2356 intptr_t startpos; 2364 2357 int range; 2365 2358 int stop; … … 2739 2732 { 2740 2733 enum rx_test_match_entry test_pc; 2741 int inx;2734 intptr_t inx; 2742 2735 test_pc = search_state.test_match_resume_pt; 2743 2736 if (test_pc == rx_test_start) … … 2839 2832 ((struct rx_superstate *) 2840 2833 ((char *)this_tr_table 2841 - (( unsignedlong)2834 - ((mg_u_long) 2842 2835 ((struct rx_superstate *)0)->transitions))); 2843 2836 … … 2904 2897 ((struct rx_superstate *) 2905 2898 ((char *)this_tr_table 2906 - ((u nsigned long)2899 - ((uintptr_t) 2907 2900 ((struct rx_superstate *)0)->transitions))); 2908 2901 } … … 2911 2904 * Dispatch that instruction: 2912 2905 */ 2913 inx = (int )search_state.ifr->inx;2906 inx = (intptr_t)search_state.ifr->inx; 2914 2907 #ifdef RX_DEBUG_0 2915 2908 if (rx_debug_trace) … … 2949 2942 while (el) 2950 2943 { 2951 longeffect;2952 effect = ( long)el->car;2944 intptr_t effect; 2945 effect = (intptr_t)el->car; 2953 2946 if (effect < 0) 2954 2947 { … … 2990 2983 = ((struct rx_superstate *) 2991 2984 ((char *)search_state.ifr->data 2992 - ( long)(((struct rx_superstate *)0)2985 - (intptr_t)(((struct rx_superstate *)0) 2993 2986 ->transitions))); 2994 2987 goto top_of_cycle;
Note:
See TracChangeset
for help on using the changeset viewer.