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/perf_hash.c

    r16583 r25147  
    4242
    4343/* Random Number stuff */
    44 static long seed[] = {0, 0};
     44static mg_s_long seed[] = {0, 0};
    4545#define RANDOM() irandm(seed)
    4646#define SEED_RANDOM(the_seed) do{ seed[0] = the_seed; }while(0)
     
    105105
    106106#ifndef STRUCT
    107 static long **tb0, **tb1, **tb2;
     107static mg_s_long **tb0, **tb1, **tb2;
    108108#else
    109109struct tb_entry **tb;
     
    128128{               /* deletes edge e from list of v */
    129129
    130   int b;
    131 
     130  int b, norm_b;
    132131  b = FIRST[v];
    133132  assert (norm (b) != 0);
     
    700699    {
    701700      if (tb0)
    702     if (!(tb0[i] = Xmalloc (sizeof (long) * MAX_L)))
     701    if (!(tb0[i] = Xmalloc (sizeof (mg_s_long) * MAX_L)))
    703702        ok = 0;
    704703      if (tb1)
    705     if (!(tb1[i] = Xmalloc (sizeof (long) * MAX_L)))
     704    if (!(tb1[i] = Xmalloc (sizeof (mg_s_long) * MAX_L)))
    706705        ok = 0;
    707706      if (tb2)
    708     if (!(tb2[i] = Xmalloc (sizeof (long) * MAX_L)))
     707    if (!(tb2[i] = Xmalloc (sizeof (mg_s_long) * MAX_L)))
    709708        ok = 0;
    710709    }
     
    744743
    745744  if (r <= 0)
    746     SEED_RANDOM ((long) time ((time_t *) NULL));
     745    SEED_RANDOM ((mg_s_long) time ((time_t *) NULL));
    747746  else
    748747    SEED_RANDOM (r);
     
    907906    {
    908907      if (phd->tb0)
    909     if (!(phd->tb0[i] = Xmalloc (sizeof (long) * phd->MAX_L)))
     908    if (!(phd->tb0[i] = Xmalloc (sizeof (mg_s_long) * phd->MAX_L)))
    910909        ok = 0;
    911910      if (phd->tb1)
    912     if (!(phd->tb1[i] = Xmalloc (sizeof (long) * phd->MAX_L)))
     911    if (!(phd->tb1[i] = Xmalloc (sizeof (mg_s_long) * phd->MAX_L)))
    913912        ok = 0;
    914913      if (phd->tb2)
    915     if (!(phd->tb2[i] = Xmalloc (sizeof (long) * phd->MAX_L)))
     914    if (!(phd->tb2[i] = Xmalloc (sizeof (mg_s_long) * phd->MAX_L)))
    916915        ok = 0;
    917916    }
     
    951950      int j;
    952951
    953       tot += fread ((char *) phd->tb0[i], sizeof (long), phd->MAX_L, f) *
     952      tot += fread ((char *) phd->tb0[i], sizeof (mg_s_long), phd->MAX_L, f) *
    954953        sizeof (int);
    955       tot += fread ((char *) phd->tb1[i], sizeof (long), phd->MAX_L, f) *
     954      tot += fread ((char *) phd->tb1[i], sizeof (mg_s_long), phd->MAX_L, f) *
    956955        sizeof (int);
    957       tot += fread ((char *) phd->tb2[i], sizeof (long), phd->MAX_L, f) *
     956      tot += fread ((char *) phd->tb2[i], sizeof (mg_s_long), phd->MAX_L, f) *
    958957        sizeof (int);
    959958
Note: See TracChangeset for help on using the changeset viewer.