Ignore:
Timestamp:
2012-02-28T13:59:00+13:00 (12 years ago)
Author:
kjdon
Message:

merged 64_bit_Greenstone branch into trunk, rev 25139

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/common-src/indexers/mg/lib/rx.h

    r16583 r25147  
    2222/*  t. lord Wed Sep 23 18:20:57 1992    */
    2323
    24 
    25 
    26 
    27 
    28 
    29 
    30 
     24#include "mglong.h"
    3125
    3226#ifndef RX_WANT_SE_DEFS
     
    9185  struct rx_hash_item * next_same_hash;
    9286  struct rx_hash * table;
    93   unsigned long hash;
     87  mg_u_long hash;
    9488  void * data;
    9589  void * binding;
     
    273267   */
    274268  void * buffer;
    275   unsigned long allocated;
     269  mg_u_long allocated;
    276270
    277271  /* Clients of RX can ask for some extra storage in the space pointed
     
    280274   * at (buffer + allocated - reserved)
    281275   */
    282   unsigned long reserved;
     276  mg_u_long reserved;
    283277
    284278  /* --------- The remaining fields are for internal use only. --------- */
     
    12741268
    12751269  void * buffer;        /* Malloced memory for the nfa. */
    1276   unsigned long allocated;  /* Size of that memory. */
     1270  mg_u_long allocated;  /* Size of that memory. */
    12771271
    12781272  /* Pointer to a fastmap, if any, otherwise zero.  re_search uses
     
    15801574                      rx_Bitset a, rx_Bitset b);
    15811575RX_DECL void rx_bitset_xor (int size, rx_Bitset a, rx_Bitset b);
    1582 RX_DECL unsigned long rx_bitset_hash (int size, rx_Bitset b);
     1576RX_DECL mg_u_long rx_bitset_hash (int size, rx_Bitset b);
    15831577RX_DECL struct rx_hash_item * rx_hash_find (struct rx_hash * table,
    1584                         unsigned long hash,
     1578                        mg_u_long hash,
    15851579                        void * value,
    15861580                        struct rx_hash_rules * rules);
    15871581RX_DECL struct rx_hash_item * rx_hash_store (struct rx_hash * table,
    1588                          unsigned long hash,
     1582                         mg_u_long hash,
    15891583                         void * value,
    15901584                         struct rx_hash_rules * rules);
     
    16371631RX_DECL void rx_delete_epsilon_transitions (struct rx *rx);
    16381632RX_DECL int rx_compactify_nfa (struct rx *rx,
    1639                    void **mem, unsigned long *size);
     1633                   void **mem, mg_u_long *size);
    16401634RX_DECL void rx_release_superset (struct rx *rx,
    16411635                  struct rx_superset *set);
     
    16651659RX_DECL void rx_bitset_revdifference ();
    16661660RX_DECL void rx_bitset_xor ();
    1667 RX_DECL unsigned long rx_bitset_hash ();
     1661RX_DECL mg_u_long rx_bitset_hash ();
    16681662RX_DECL struct rx_hash_item * rx_hash_find ();
    16691663RX_DECL struct rx_hash_item * rx_hash_store ();
     
    22302224
    22312225
    2232 
    22332226/* How many characters in the character set.  */
    22342227#define CHAR_SET_SIZE (1 << CHARBITS)
     
    23442337RX_DECL __inline__ int
    23452338rx_search  (struct re_pattern_buffer * rxb,
    2346         int startpos,
     2339        intptr_t startpos,
    23472340        int range,
    23482341        int stop,
     
    23612354        app_closure, regs, resume_state, save_state)
    23622355     struct re_pattern_buffer * rxb;
    2363      int startpos;
     2356     intptr_t startpos;
    23642357     int range;
    23652358     int stop;
     
    27392732  {
    27402733    enum rx_test_match_entry test_pc;
    2741     int inx;
     2734    intptr_t inx;
    27422735    test_pc = search_state.test_match_resume_pt;
    27432736    if (test_pc == rx_test_start)
     
    28392832            ((struct rx_superstate *)
    28402833             ((char *)this_tr_table
    2841               - ((unsigned long)
     2834              - ((mg_u_long)
    28422835             ((struct rx_superstate *)0)->transitions)));
    28432836         
     
    29042897        ((struct rx_superstate *)
    29052898         ((char *)this_tr_table
    2906           - ((unsigned long)
     2899          - ((uintptr_t)
    29072900         ((struct rx_superstate *)0)->transitions)));
    29082901    }
     
    29112904     * Dispatch that instruction:
    29122905     */
    2913     inx = (int)search_state.ifr->inx;
     2906    inx = (intptr_t)search_state.ifr->inx;
    29142907#ifdef RX_DEBUG_0
    29152908    if (rx_debug_trace)
     
    29492942          while (el)
    29502943        {
    2951           long effect;
    2952           effect = (long)el->car;
     2944          intptr_t effect;
     2945          effect = (intptr_t)el->car;
    29532946          if (effect < 0)
    29542947            {
     
    29902983                = ((struct rx_superstate *)
    29912984                   ((char *)search_state.ifr->data
    2992                 - (long)(((struct rx_superstate *)0)
     2985                - (intptr_t)(((struct rx_superstate *)0)
    29932986                     ->transitions)));
    29942987              goto top_of_cycle;
Note: See TracChangeset for help on using the changeset viewer.