IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 24, 2010, 11:22:25 AM (16 years ago)
Author:
eugene
Message:

large update merging in changes for Ohana to support large files

Location:
trunk/Ohana
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana

  • trunk/Ohana/src/imregister/imreg/unique.c

    r16045 r27435  
    22# include "imreg.h"
    33
    4 void sortstr (char **S, int *X, int N) {
     4void sortstr (char **S, off_t *X, off_t N) {
    55
    66# define SWAPFUNC(A,B){ \
    7   char *tmp = S[A]; S[A] = S[B]; S[B] = tmp; \
    8   int itmp = X[A]; X[A] = X[B]; X[B] = itmp; \
     7  char  *tmp = S[A]; S[A] = S[B]; S[B] = tmp; \
     8  off_t itmp = X[A]; X[A] = X[B]; X[B] = itmp; \
    99}
    1010# define COMPARE(A,B)(strcmp(S[A], S[B]) < 0)
     
    1818
    1919/* input is a subset index of image list, output is a new subset */
    20 int *unique_entries (RegImage *image, int Nimage, int *subset, int *Nmatch) {
     20off_t *unique_entries (RegImage *image, off_t Nimage, off_t *subset, off_t *Nmatch) {
    2121
    22   int i, j, k, m, Nsubset;
    23   int N, NMATCH;
    24   int *match, *entry;
     22  off_t i, j, k, m, Nsubset;
     23  off_t N, NMATCH;
     24  off_t *match, *entry;
    2525  char idxline[128];
    2626  char **index;
     
    3131  N = 0;
    3232  NMATCH = 1000;
    33   ALLOCATE (match, int, NMATCH);
     33  ALLOCATE (match, off_t, NMATCH);
    3434
    3535  Nsubset = *Nmatch;
     
    3737  /* index = filename.ccd */
    3838  ALLOCATE (index, char *, Nsubset);
    39   ALLOCATE (entry, int, Nsubset);
     39  ALLOCATE (entry, off_t, Nsubset);
    4040  for (i = 0; i < Nsubset; i++) {
    4141    sprintf (idxline, "%s.%02d", image[subset[i]].filename, image[subset[i]].ccd);
     
    6363    if (N == NMATCH) {
    6464      NMATCH += 1000;
    65       REALLOCATE (match, int, NMATCH);
     65      REALLOCATE (match, off_t, NMATCH);
    6666    }
    6767
Note: See TracChangeset for help on using the changeset viewer.