- 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/perf_hash.c
r16583 r25147 42 42 43 43 /* Random Number stuff */ 44 static long seed[] = {0, 0};44 static mg_s_long seed[] = {0, 0}; 45 45 #define RANDOM() irandm(seed) 46 46 #define SEED_RANDOM(the_seed) do{ seed[0] = the_seed; }while(0) … … 105 105 106 106 #ifndef STRUCT 107 static long **tb0, **tb1, **tb2;107 static mg_s_long **tb0, **tb1, **tb2; 108 108 #else 109 109 struct tb_entry **tb; … … 128 128 { /* deletes edge e from list of v */ 129 129 130 int b; 131 130 int b, norm_b; 132 131 b = FIRST[v]; 133 132 assert (norm (b) != 0); … … 700 699 { 701 700 if (tb0) 702 if (!(tb0[i] = Xmalloc (sizeof ( long) * MAX_L)))701 if (!(tb0[i] = Xmalloc (sizeof (mg_s_long) * MAX_L))) 703 702 ok = 0; 704 703 if (tb1) 705 if (!(tb1[i] = Xmalloc (sizeof ( long) * MAX_L)))704 if (!(tb1[i] = Xmalloc (sizeof (mg_s_long) * MAX_L))) 706 705 ok = 0; 707 706 if (tb2) 708 if (!(tb2[i] = Xmalloc (sizeof ( long) * MAX_L)))707 if (!(tb2[i] = Xmalloc (sizeof (mg_s_long) * MAX_L))) 709 708 ok = 0; 710 709 } … … 744 743 745 744 if (r <= 0) 746 SEED_RANDOM (( long) time ((time_t *) NULL));745 SEED_RANDOM ((mg_s_long) time ((time_t *) NULL)); 747 746 else 748 747 SEED_RANDOM (r); … … 907 906 { 908 907 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))) 910 909 ok = 0; 911 910 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))) 913 912 ok = 0; 914 913 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))) 916 915 ok = 0; 917 916 } … … 951 950 int j; 952 951 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) * 954 953 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) * 956 955 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) * 958 957 sizeof (int); 959 958
Note:
See TracChangeset
for help on using the changeset viewer.