IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 34088


Ignore:
Timestamp:
Jun 26, 2012, 11:46:01 AM (14 years ago)
Author:
eugene
Message:

updates for pedantic gcc, mods to relphot average mags to handle GPC1 stacks

Location:
trunk/Ohana
Files:
152 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/configure.tcsh

    r31669 r34088  
    1010set optimize = 0
    1111set pedantic = 1
     12set no_as_needed = 0
     13set debug_build = 0
    1214set memcheck = 0
    1315set use_tcmalloc = 0
     
    3133while ("$1" != "")
    3234 switch ("$1")
    33   # options passed by jhbuild or others which we ignore
     35  # options passed by build systems which we ignore
    3436  case --enable-maintainer-mode
    3537  case --no-create
    3638  case --no-recursion
     39  case --disable-shared
     40  case --enable-shared
     41  case --disable-static
     42  case --enable-static
     43   breaksw;
     44  # key/value options passed by build systems which we ignore
    3745  case --sbindir*
    3846  case --libexecdir*
     
    4957   endif
    5058   breaksw;
    51   case --disable-shared
    52   case --enable-shared
    53   case --disable-static
    54   case --enable-static
    55     echo ""
    56     echo "WARNING: Ohana can't turn shared/static builds on/off."
    57     echo ""
    58     breaksw;
     59  case --enable-no-as-needed
     60   set no_as_needed = 1
     61   breaksw;
     62  case --enable-debug-build
     63   set debug_build = 1
     64   set pedantic = 0
     65   echo "disabling pedantic build"
     66   endif   
     67   breaksw;
     68  # options used by Ohana, but not gpcsw
    5969  case --vararch
    6070   set vararch = 1
     
    8090  case --pedantic
    8191   set pedantic = 1
     92   if ($debug_build) then
     93    echo "--pedantic and --enable-debug-build are mutually exclusive"
     94    exit 2;
     95   endif   
    8296   breaksw;
    8397  case --no-pedantic
     
    203217  set CPPFLAGS = ""
    204218endif 
     219
    205220if ($pedantic) set CPPFLAGS = "$CPPFLAGS -Wall -Werror"
     221if ($debug_build) set CPPFLAGS = "$CPPFLAGS -Wall"
    206222if ($memcheck) set CPPFLAGS = "$CPPFLAGS -DOHANA_MEMORY"
    207223
     
    211227if ($profile) set LDFLAGS = "$LDFLAGS -Wl,--start-group -Wl,-Bstatic -Wl,-Bdynamic"
    212228
     229if ($no_as_needed) set LDFLAGS = "$LDFLAGS -Wl,--no-as-needed"
     230
    213231set syslibpath = "/lib /usr/lib /usr/X11R6/lib /usr/local/lib"
     232set xtrlibpath = `checkpaths.pl lib`
     233set syslibpath = "$syslibpath $xtrlibpath"
     234
    214235set needlibs   = ""
    215236set needlibs   = "$needlibs png"
     
    226247
    227248set sysincpath = "/usr/include /usr/local/include /usr/X11R6/include"
     249set xtrincpath = `checkpaths.pl include`
     250set sysincpath = "$sysincpath $xtrincpath"
    228251
    229252set needincs = ""
     
    334357echo "setting architecture to: $arch"
    335358
     359# add
     360
    336361# set up the basic directory names:
    337362set root = `pwd`
     
    707732EOF
    708733 exit 2;
     734
  • trunk/Ohana/src/addstar/Makefile

    r33963 r34088  
    1313
    1414# programs may add their own internal requirements here
    15 FULL_CFLAGS   = $(BASE_CFLAGS) -Wall -Werror
     15FULL_CFLAGS   = $(BASE_CFLAGS)
    1616FULL_CPPFLAGS = $(BASE_CPPFLAGS)
    1717FULL_LDFLAGS  = -lkapa -ldvo -lFITS -lohana $(BASE_LDFLAGS)
  • trunk/Ohana/src/addstar/src/GetFileMode.c

    r31627 r34088  
    77
    88  int Naxis;
    9   int simple, extend, haveNaxis, haveCTYPE;
     9  int simple, extend;
    1010  int havePHOT_VER, haveTARG_VER;
    1111
    1212  gfits_scan_alt (header, "SIMPLE", "%t", 1, &simple);
    13   haveNaxis = gfits_scan (header, "NAXIS",  "%d", 1, &Naxis);
    14   haveCTYPE = gfits_scan (header, "CTYPE1", "%s", 1, ctype);
     13  int haveNaxis = gfits_scan (header, "NAXIS",  "%d", 1, &Naxis);
     14  int haveCTYPE = gfits_scan (header, "CTYPE1", "%s", 1, ctype);
    1515
    1616  gfits_scan_alt (header, "EXTEND", "%t", 1, &extend);
     
    2222  if (havePHOT_VER && haveTARG_VER) return SDSS_OBJ;
    2323
    24   if ((Naxis == 2) || TEXTMODE || !simple) {
    25     if (!strcmp (&ctype[4], "-WRP")) {
     24  if (haveNaxis && ((Naxis == 2) || TEXTMODE || !simple)) {
     25    if (haveCTYPE && !strcmp (&ctype[4], "-WRP")) {
    2626      return MOSAIC_CMP;
    2727    }
  • trunk/Ohana/src/addstar/src/LoadData.c

    r31669 r34088  
    11# include "addstar.h"
    2 # define DVO_IMAGE_NAME_LEN 128
    32
    43// XXX this function is somewhat specific to the elixir format output files
  • trunk/Ohana/src/addstar/src/LoadDataPMM.c

    r27435 r34088  
    11# include "addstar.h"
    2 # define DVO_IMAGE_NAME_LEN 128
    32
    43/* .asc files look like:
  • trunk/Ohana/src/addstar/src/ReadStarsSDSS.c

    r33653 r34088  
    11# include "addstar.h"
    2 # define DVO_IMAGE_NAME_LEN 128
     2
    33int SetSDSSFlags (Stars *star, unsigned int flags1, unsigned int flags2);
    44
  • trunk/Ohana/src/addstar/src/edge_check.c

    r3361 r34088  
    44
    55  double theta1, theta2;
    6   double Theta1, Theta2;
    76
    87  theta1 = opening_angle (x1[0], y1[0], x2[0], y2[0], x1[1], y1[1]);
     
    1716  }
    1817
    19   Theta1 = theta1;
    20   Theta2 = theta2;
    2118  theta1 = opening_angle (x2[0], y2[0], x1[1], y1[1], x2[1], y2[1]);
    2219  theta2 = opening_angle (x2[0], y2[0], x1[1], y1[1], x1[0], y1[0]);
  • trunk/Ohana/src/addstar/src/get2mass_full.c

    r30613 r34088  
    2323  star[0][0].measure.theta = ToShortPixels(strtod (ptr, NULL));
    2424
    25   star[2][0].measure.FWx   = star[2][0].measure.FWx   = star[0][0].measure.FWx;
    26   star[2][0].measure.FWy   = star[2][0].measure.FWy   = star[0][0].measure.FWy;
    27   star[2][0].measure.theta = star[2][0].measure.theta = star[0][0].measure.theta;
     25  star[2][0].measure.FWx   = star[1][0].measure.FWx   = star[0][0].measure.FWx;
     26  star[2][0].measure.FWy   = star[1][0].measure.FWy   = star[0][0].measure.FWy;
     27  star[2][0].measure.theta = star[1][0].measure.theta = star[0][0].measure.theta;
    2828
    2929  ptr = next2MASSfield (ptr); // designation (skip)
  • trunk/Ohana/src/addstar/src/get2mass_ops.c

    r21508 r34088  
    7373
    7474  char *ptr;
    75   char Jquality, Hquality, Kquality;
    7675  double J, dJ, H, dH, K, dK;
    7776  e_time time;
     
    9594  dK = strtod (ptr, NULL);
    9695
    97   /* filter on the ph_qual flag for this filter (field 19) */
     96  // get the time
     97  time = get2mass_time (ptr, 20, Nmax - (ptr - line));
     98
     99# if (0)
     100  char Jquality, Hquality, Kquality;
     101  /* old code to filter on the ph_qual flag for this filter (field 19) */
    98102  if (SELECT_2MASS_QUALITY != NULL) {
    99103    ptr = skipNbounds (ptr, '|', 3, Nmax - (ptr - line));
     
    105109    time = get2mass_time (ptr, 20, Nmax - (ptr - line));
    106110  }
     111# endif
    107112
    108113  // how many bits are being used for the 2mass flags; can we just set photFlags based on them?
  • trunk/Ohana/src/addstar/src/load2mass_as_rawdata.c

    r24977 r34088  
    1414  int i, j, verbose;
    1515  int Nstars, NSTARS, Ntstars, NTSTARS;
    16   int Nbyte, Nextra, Ntotal, offset;
     16  int Nbyte, Nextra, offset;
    1717
    1818  double Rmin, Rmax, Dmin, Dmax;
     
    3737
    3838  Nextra = 0;  // number excess bytes from lsat partial row
    39   Ntotal = 0;  // track the total number of bytes read
    4039  while ((Nbyte = fread (&buffer[Nextra], 1, NBYTE-Nextra, f)) != 0) {
    4140    if (Nbyte == -1) Shutdown ("error reading from raw file %s", filename);
  • trunk/Ohana/src/addstar/src/load_subpix.c

    r24002 r34088  
    4545
    4646  int bin;
    47   double dy, dM;
     47  double dM;
    4848
    49   dy = y - (int)(y);
     49  // dy = y - (int)(y);
    5050  bin = 5 * (int)(x/100) + (int)(y/100);
    5151  dM = Subpix[bin].dM;
  • trunk/Ohana/src/addstar/src/loadwise_rawdata.c

    r33963 r34088  
    1414  int i, j, verbose;
    1515  int Nstars, NSTARS, Ntstars, NTSTARS;
    16   int Nbyte, Nextra, Ntotal, offset;
     16  int Nbyte, Nextra, offset;
    1717
    1818  double Rmin, Rmax, Dmin, Dmax;
     
    3737
    3838  Nextra = 0;  // number excess bytes from lsat partial row
    39   Ntotal = 0;  // track the total number of bytes read
    4039  while ((Nbyte = fread (&buffer[Nextra], 1, NBYTE-Nextra, f)) != 0) {
    4140    if (Nbyte == -1) Shutdown ("error reading from raw file %s", filename);
  • trunk/Ohana/src/addstar/src/resort_catalog.c

    r33653 r34088  
    146146  int NmeasureTotal = 0;
    147147  int measureOffsetOK = TRUE;
    148   for (i = 0; i < catalog[0].Naverage; i++) {
     148  for (i = 0; i < Naverage; i++) {
    149149    NmeasureTotal += catalog[0].average[i].Nmeasure;
    150150    if (VERBOSE && !(NmeasureTotal <= catalog[0].Nmeasure)) {
  • trunk/Ohana/src/addstar/src/sky_tessalation.c

    r33719 r34088  
    22# include "assert.h"
    33# define iSWAP(X,Y) {int tmp=(X); (X) = (Y); (Y) = tmp;}
    4 # define DVO_IMAGE_NAME_LEN 128
    54
    65// we use a static refcoords structure to avoid multiple alloc / init steps
  • trunk/Ohana/src/delstar/src/args.c

    r14590 r34088  
    2626  int N;
    2727  double trange;
    28   time_t tmp;
    2928
    3029  /* check for help request */
     
    7776    if (ohana_str_to_time (argv[N], &END)) {
    7877      if (START > END) {
     78        time_t tmp;
    7979        tmp   = START;
    8080        START = END;
    81         END   = START;
     81        END   = tmp;
    8282      }
    8383      remove_argument (N, argc, argv);
  • trunk/Ohana/src/delstar/src/find_matches.c

    r28241 r34088  
    55  int drop;
    66  off_t i, j, k, n, m, N, M, averef;
    7   off_t *next_meas, *next_miss, *ave_miss, last, last_miss;
     7  off_t *next_meas, *next_miss, *ave_miss;
    88  off_t Nave, Nmeas, NMEAS, Nmiss;
    99  off_t Nmeasfound, Nsecfilt;
     
    2929  }
    3030  next_meas[i] = -1;
    31   last = i;
    3231  /* set up pointers for linked list of missing */
    3332  for (i = 0; i < Nmiss - 1; i++) {
     
    3534  }
    3635  next_miss[i] = -1;
    37   last_miss = i;
    3836  /* set up references for missing to average */
    3937  for (i = 0; i < Nave; i++) {
  • trunk/Ohana/src/elixir/src/CheckMessages.c

    r10336 r34088  
    1010int CheckMessages () {
    1111 
    12   int status, Message;
     12  int status;
    1313  struct timeval now;
    1414  char *message, *p, *p2;
     
    2727  then = now;
    2828  if (!status) return (FALSE);
    29 
    30   Message = 0;
    3129
    3230  /* loop over all lines in message */
  • trunk/Ohana/src/gastro/src/gcenter.c

    r27611 r34088  
    88
    99  double mean, sigma, gx, gy, gx0, gy0, n, SearchRadius;
    10   int NPIX, minN, Nmin, Nmin0;
     10  int NPIX, minN, Nmin0;
    1111  int i, j, k;
    1212  double *N, *DX, *DY, *D2, *tX1, *tY1, *tX2, *tY2;
     
    154154      Fmin = Fmin0;
    155155      Smin = Smin0;
    156       Nmin = Nmin0;
    157156      Xmin = Xmin0;
    158157      Ymin = Ymin0;
  • trunk/Ohana/src/gastro/src/gstars.c

    r27435 r34088  
    2727  Header header, theader;
    2828  FILE *f;
    29   int j, Ninstar, nstar, rnumber, N, Nstars, nbytes, Nbytes;
     29  int j, Ninstar, nstar, rnumber, N, Nstars, nbytes;
    3030  SStars *stars;
    3131  char *buffer;
     
    154154  }
    155155  ALLOCATE (stars, SStars, Nstars);
    156   Nbytes = Nstars*BYTES_STAR;
    157156
    158157  /* re-open file for stars */
  • trunk/Ohana/src/gastro2/src/getusnob.c

    r27435 r34088  
    1313  double DEC1;
    1414  double uR, uD;
    15   float mB1, mB2, mR1, mR2, mB, mR;
     15  float mB1, mB2, mR1, mR2, mR, mB;
    1616  int iDEC0, iDEC1, iRA0, iRA1;
    1717  int spd, spd_start, spd_end;
     
    133133      }
    134134     
    135       stars[Nusno].M = mB;
     135      stars[Nusno].M = TRUE ? mB : mR; // optionally use blue or red (but not activated)
    136136      stars[Nusno].R += uR*(epoch - 2000.0);
    137137      stars[Nusno].D += uD*(epoch - 2000.0);
  • trunk/Ohana/src/gastro2/src/gstars2.c

    r27435 r34088  
    77  double det;
    88  off_t Nskip;
    9   int NX, NY, FoundAstrom, extend, naxis;
     9  int NX, NY, FoundAstrom, naxis;
    1010  StarData *stars;
    1111  FILE *f;
     
    125125  /* read from FITS table or from text table */
    126126  /* Is NAXIS == 0 a better test?? */
    127   extend = FALSE;
    128127  gfits_scan_alt (&Target[0].header, "NAXIS",  "%t", 1, &naxis);
    129128  if ((naxis == 0) && !TEXTMODE) {
  • trunk/Ohana/src/gastro2/src/rtext.c

    r3562 r34088  
    88
    99  char *buffer;
    10   int i, N, Nbytes, nbytes, Ninstar, Nstars, NSTARS;
     10  int i, N, nbytes, Ninstar, Nstars, NSTARS;
    1111  double dmag, type;
    1212  StarData *stars;
     
    1414  NSTARS = *nstars;
    1515  ALLOCATE (stars, StarData, MAX (NSTARS, 1));
    16   Nbytes = NSTARS*BYTES_STAR;
    1716
    1817  N = Nstars = 0;
  • trunk/Ohana/src/gcompare/src/input.c

    r2421 r34088  
    1111 
    1212  data_type data;
    13   int i, status, n, NVALUES, NBYTES, nbytes;
     13  int i, status, NVALUES, NBYTES, nbytes;
    1414  FILE *f;
    1515  char dummy_line[1000], *next;
    1616 
    17   n = 0;
    18 
    1917  if (!strcmp (filename, "-")) {
    2018    f = stdin;
  • trunk/Ohana/src/getstar/src/GetFileMode.c

    r27435 r34088  
    1414  gfits_scan_alt (header, "EXTEND", "%t", 1, &extend);
    1515   
    16   if ((Naxis == 2) || !simple) {
    17     if (!strcmp (&ctype[4], "-WRP")) {
     16  if (haveNaxis && ((Naxis == 2) || !simple)) {
     17    if (haveCTYPE && !strcmp (&ctype[4], "-WRP")) {
    1818      return MOSAIC_CMP;
    1919    }
  • trunk/Ohana/src/getstar/src/ReadImageFiles.c

    r29557 r34088  
    11# include "dvoImageOverlaps.h"
    2 # define DVO_IMAGE_NAME_LEN 128
    32
    43Image *ReadImageFiles (char *filename, off_t *Nimages) {
  • trunk/Ohana/src/getstar/src/edge_check.c

    r12774 r34088  
    44
    55  double theta1, theta2;
    6   double Theta1, Theta2;
    76
    87  theta1 = opening_angle (x1[0], y1[0], x2[0], y2[0], x1[1], y1[1]);
     
    1716  }
    1817
    19   Theta1 = theta1;
    20   Theta2 = theta2;
    2118  theta1 = opening_angle (x2[0], y2[0], x1[1], y1[1], x2[1], y2[1]);
    2219  theta2 = opening_angle (x2[0], y2[0], x1[1], y1[1], x1[0], y1[0]);
  • trunk/Ohana/src/getstar/src/select_by_region.c

    r31669 r34088  
    44int select_by_region (Catalog *output, Catalog *catalog, SkyRegion *region, int start, int end) {
    55
    6   int i, j, Nm, offset, m, Nsecfilt, code, Nsec;
     6  int i, j, offset, m, Nsecfilt, code, Nsec;
    77  int Nave, NAVE, Nmeas, NMEAS, needMeas;
    88  double R, D, AREA;
     
    140140    }
    141141
    142     Nm = 0;
    143     offset = catalog[0].average[i].measureOffset;
    144 
    145142    if (needMeas) {
     143      offset = catalog[0].average[i].measureOffset;
    146144      for (j = 0; j < catalog[0].average[i].Nmeasure; j++) {
    147145        output[0].measure[Nmeas] = catalog[0].measure[offset + j];
  • trunk/Ohana/src/imclean/src/LoadStarsChad.c

    r7080 r34088  
    1010  int status;
    1111  double x, y, m, sky, lsky;
    12   char *buffer;
    1312  int Mhist[HIST_BINS], Shist[HIST_BINS], bin, sum;
    1413  double FWHMx, FWHMy, angle, flux;
     
    1615  double saturate, complete;
    1716  char line[256];
    18 
    19   ALLOCATE (buffer, char, CHAR_LINE*NBLOCK);
    2017
    2118  f = fopen (filename, "r");
  • trunk/Ohana/src/imclean/src/LoadStarsSex.c

    r7080 r34088  
    1313  double x, y, m, dm, sky, lsky, ftype;
    1414  char *buffer;
    15   int Mhist[HIST_BINS], Shist[HIST_BINS], n[10], bin, sum, flags;
     15  int Mhist[HIST_BINS], Shist[HIST_BINS], bin, sum, flags;
    1616  double A, A2, S2, FWHMx, FWHMy, angle, Mgal, Map;
    17   int gotFWHM, satfound, done;
     17  int satfound, done;
    1818  double saturate, complete;
    1919
     
    3131  /* zero things that will sum */
    3232  N = A = A2 = S2 = 0;
    33   gotFWHM = FALSE;
    3433  for (i = 0; i < HIST_BINS; i++) { Mhist[i] = Shist[i] = 0; }
    35   for (i = 1; i <= 9; i++) { n[i] = 0; }
    3634
    3735  Nstars = 0;
  • trunk/Ohana/src/imregister/detrend/altpath.c

    r27435 r34088  
    66  int status, found;
    77  off_t i, j, n, Nlist;
    8   off_t *list, *current;
     8  off_t *list;
    99  char *dBPath, infile[256], outfile[256], line[1024];
    1010  struct stat statbuf;
    1111
    12   ALLOCATE (current, off_t, Nimage);
    1312  ALLOCATE (list, off_t, Nimage);
    1413  Nlist = 0;
  • trunk/Ohana/src/imregister/imphot/db_load.c

    r7080 r34088  
    77
    88  int Nx, Ny, Naxis;
    9   int mode, status;
     9  int mode;
    1010
    1111  /* database name must be set first */
     
    3131 
    3232  /* how do we decide if it is text or fits? must examine header */
    33   if (FITS) {
    34     status = rfits (db);
     33  if (mode == FITS) {
     34    rfits (db);
    3535  } else {
    36     status = rtext (db);
     36    rtext (db);
    3737  }
    3838  return (TRUE);
  • trunk/Ohana/src/imregister/imphot/output.c

    r27435 r34088  
    44int output (Image *image, off_t *match, off_t Nmatch) {
    55
    6   int status;
    7 
    86  /* output the selected entries */
    97  if (options.table != (char *) NULL) {
    10     status = DumpFitsTable (options.table, image, match, Nmatch);
     8    DumpFitsTable (options.table, image, match, Nmatch);
    119    return (TRUE);
    1210  }
     
    1412  /* output the selected entries */
    1513  if (options.bintable != (char *) NULL) {
    16     status = DumpFitsBintable (options.bintable, image, match, Nmatch);
     14    DumpFitsBintable (options.bintable, image, match, Nmatch);
    1715    return (TRUE);
    1816  }
  • trunk/Ohana/src/imregister/imreg/cadc.c

    r27435 r34088  
    184184off_t GetREFCCD (RegImage *image, off_t *index, off_t *entry, off_t Nindex, off_t start) {
    185185 
    186   off_t i, N, NMATCH;
    187   off_t *match;
    188 
    189   /* create output index */
    190   N = 0;
    191   NMATCH = 1000;
    192   ALLOCATE (match, off_t, NMATCH);
     186  off_t i;
    193187
    194188  /* find unique sequences */
  • trunk/Ohana/src/imregister/imreg/imregclient.c

    r27611 r34088  
    44int imregclient (char *fitsfile, char *statfile, char *datfile) {
    55
    6   int i, Nentry, Nslice, status, tmpint;
     6  int i, Nentry, Nslice, tmpint;
    77  FILE *f;
    88  RegImage *image;
     
    3535      exit (1);
    3636    }
    37     status = fscanf (f, "%d %f %f", &tmpint, &image[0].sky, &image[0].fwhm);
     37    if (fscanf (f, "%d %f %f", &tmpint, &image[0].sky, &image[0].fwhm) != 3) {
     38      fprintf (stderr, "error reading stats\n");
     39    }
    3840    image[0].ccd = tmpint;
    3941    fclose (f);
     
    4648      exit (1);
    4749    }
    48     status = 3;
    4950    Nslice = image[0].seq;
    5051    Nentry = Nslice + 1;
     
    5253    for (i = 0; i < Nentry; i++) {
    5354      image[i] = image[0];
    54       status = fscanf (f, "%d %f %f", &tmpint, &image[i].sky, &image[i].fwhm);
     55      if (fscanf (f, "%d %f %f", &tmpint, &image[i].sky, &image[i].fwhm) != 3) {
     56        fprintf (stderr, "error reading stats\n");
     57      }
    5558      image[i].seq = tmpint;
    5659      if (image[i].seq == Nslice) continue;
  • trunk/Ohana/src/imregister/imreg/modify.c

    r27435 r34088  
    66  off_t i, j, Nold;
    77  char *tmppath;
    8   char *ext, *root, *path, dist;
     8  char *ext, *root, *path;
    99
    1010  Nold = 0;
     
    1616    ALLOCATE (tmppath, char, 128);
    1717  }
    18   if (output.modify_dist) {
    19     dist = (output.dist) ? 0xff : ~IMREG_DIST;
    20   }
     18  // XXX this code is not used, why was it here?
     19  // if (output.modify_dist) {
     20  //   dist = (output.dist) ? 0xff : ~IMREG_DIST;
     21  // }
    2122
    2223  /* modify the selected entries */
  • trunk/Ohana/src/imregister/spreg/modify.c

    r27435 r34088  
    2424      if (!strncmp (spectrum[i].pathname, output.oldpath, Nold)) {
    2525        strcpy (tmppath, &spectrum[i].pathname[Nold]);
    26         snprintf (spectrum[i].pathname, 128, "%s%s", output.newpath, tmppath);
     26        snprintf (spectrum[i].pathname, 64, "%s%s", output.newpath, tmppath);
    2727      }
    2828    }
  • trunk/Ohana/src/imregister/src/imphotmerge.c

    r28241 r34088  
    1818  int VERBOSE, PHOTCODE, dbstate;
    1919  int PhotCodeSelect, Nin;
    20   char *FitsOutput, *NameSelect;
     20  char *NameSelect;
    2121  int NameSelectLength;
    2222
     
    5353  }
    5454
    55   FitsOutput = (char *) NULL;
    56   if ((N = get_argument (argc, argv, "-fits"))) {
    57     remove_argument (N, &argc, argv);
    58     FitsOutput = strcreate (argv[N]);
    59     remove_argument (N, &argc, argv);
    60   }
     55  // char *FitsOutput = (char *) NULL;
     56  // if ((N = get_argument (argc, argv, "-fits"))) {
     57  //   remove_argument (N, &argc, argv);
     58  //   FitsOutput = strcreate (argv[N]);
     59  //   remove_argument (N, &argc, argv);
     60  // }
    6161
    6262  VERBOSE = FALSE;
  • trunk/Ohana/src/kapa2/src/CheckVisual.c

    r25757 r34088  
    1010
    1111  int i, Nfound, N;
    12   int isColor, isDefault;
     12  int isDefault;
    1313  XVisualInfo *visual_list, visual_temp;
    1414  unsigned long planes[3];
     
    3535 
    3636  // set these based on selected visual
    37   isColor = isDefault = FALSE;
     37  isDefault = FALSE;
    3838
    3939  // attempt to select the most desirable type of visual: TrueColor
    4040  for (i = 0; (i < Nfound) && (visual_list[i].class != TrueColor); i++);
    4141  if (i != Nfound) {
    42     isColor = TRUE;
     42    // isColor = TRUE;
    4343    if (DEBUG) fprintf (stderr, "visual class is %d\n", visual_list[i].class);
    4444    isDefault = (graphic[0].visual == visual_list[i].visual);
     
    5252  for (i = 0; (i < Nfound) && (visual_list[i].class != DirectColor); i++);
    5353  if (i != Nfound) {
    54     isColor = TRUE;
     54    // isColor = TRUE;
    5555    if (DEBUG) fprintf (stderr, "visual class is %d\n", visual_list[i].class);
    5656    isDefault = (graphic[0].visual == visual_list[i].visual);
     
    6464  for (i = 0; (i < Nfound) && (visual_list[i].class != PseudoColor); i++);
    6565  if (i != Nfound) {
    66     isColor = TRUE;
     66    // isColor = TRUE;
    6767    if (DEBUG) fprintf (stderr, "selected visual class is %d\n", visual_list[i].class);
    6868    isDefault = (graphic[0].visual == visual_list[i].visual);
  • trunk/Ohana/src/kapa2/src/DrawFrame.c

    r32632 r34088  
    9191  int pos, dir, fontsize;
    9292  double size, n, pad;
    93   char string[64], *fontname;
     93  char string[64];
    9494
    9595  double fx  = axis->fx;
     
    130130    int xt, yt;
    131131
    132     fontname = GetRotFont (&fontsize);
     132    // char *fontname is returned by GetRotFont, but not used here
     133    GetRotFont (&fontsize);
    133134   
    134135    pad = !isnan(axis->ticktextPad) ? axis->ticktextPad*fontsize : fontsize + 4.0;
     
    231232
    232233  TickMarkData *ticks;
    233   double range, major, minor, first, value, dPixels, overshoot;
    234   int i, NTICKS, nPixels, done, ifirst, nsignif;
     234  double range, major, minor, first, value;
     235  int i, NTICKS, done, ifirst, nsignif;
    235236
    236237  *nticks = 0;
     
    249250
    250251  // length of the axis in pixels
    251   nPixels = hypot(axis->dfx, axis->dfy);
    252   dPixels = nPixels / range; // axis pixel-scale
     252  // int nPixels = hypot(axis->dfx, axis->dfy);
     253  // double dPixels = nPixels / range; // axis pixel-scale
    253254
    254255  AxisTickScale (axis, &major, &minor, &nsignif);
     
    263264 
    264265  // allow undershoot by 1 pixel
    265   overshoot = (axis->min - first) * dPixels;
     266  // double overshoot = (axis->min - first) * dPixels;
    266267  // if (overshoot > 0.5) {
    267268  //   if (range > 0) {
  • trunk/Ohana/src/kapa2/src/EraseOverlay.c

    r26891 r34088  
    44
    55  int i, N;
    6   Graphic *graphic;
    76  Section *section;
    87  KapaImageWidget *image;
     
    1110  KiiScanCommand (sock, 16, "%*s %d", &N);
    1211
    13   graphic = GetGraphic();
    1412  section = GetActiveSection();
    1513  image = section->image;
  • trunk/Ohana/src/kapa2/src/JPEGit24.c

    r29938 r34088  
    3333  int i_start, i_end, j_start, j_end;
    3434  int I_start, J_start;
    35   int dropback;  /* this is a bit of a kludge... */
    36   int dx, dy, DX, DY, inDX, inDY;
     35  int dx, dy, DX, inDX, inDY;
    3736  int quality;
    3837  int expand_in, expand_out;
    39   double expand, Ix, Iy;
     38  double Ix, Iy;
    4039  unsigned char *out_pix;
    4140  unsigned short *in_pix, *in_pix_ref;
     
    8584
    8685  assert ((image[0].picture.expand >= 1) || (image[0].picture.expand <= -2));
    87   expand = expand_in = expand_out = 1.0;
     86  expand_in = expand_out = 1.0;
    8887  if (image[0].picture.expand > 0) {
    89     expand = 1 / (1.0*image[0].picture.expand);
    9088    expand_out = image[0].picture.expand;
    9189    expand_in  = 1;
    9290  }
    9391  if (image[0].picture.expand < 0) {
    94     expand = fabs((double)image[0].picture.expand);
    9592    expand_out = 1;
    9693    expand_in  = -image[0].picture.expand;
     
    10097  dy = image[0].picture.dy;
    10198  DX = image[0].image[0].matrix.Naxis[0];
    102   DY = image[0].image[0].matrix.Naxis[1];
     99  // DY = image[0].image[0].matrix.Naxis[1];
    103100
    104101  // i_start, j_start are the closest lit screen pixel to 0,0
     
    118115  inDX = image[0].picture.flipx ? -1 : +1;
    119116  inDY = image[0].picture.flipy ? -1 : +1;
    120 
    121   dropback = expand_out - (i_end - i_start) % expand_out;
    122   if ((i_end - i_start) % expand_out == 0) dropback = 0;
    123117
    124118  /* output line buffer */
  • trunk/Ohana/src/kapa2/src/Layout.c

    r27790 r34088  
    55
    66  int N;
    7   Section *section;
    87  char *namedSocket = NULL;
    98 
     
    4342
    4443  /* create basic section, empty of image or graph */
    45   section = AddSection ("default", 0.0, 0.0, 1.0, 1.0, -1);
     44  // Section *section is returned by not used
     45  AddSection ("default", 0.0, 0.0, 1.0, 1.0, -1);
    4646}
  • trunk/Ohana/src/kapa2/src/PSFrame.c

    r29955 r34088  
    5757  int pos, dir, fontsize;
    5858  double size, n, pad;
    59   char string[64], *fontname;
     59  char string[64];
    6060
    6161  double fx  = axis->fx;
     
    9090    int xt, yt;
    9191
    92     fontname = GetRotFont (&fontsize);
     92    // char *fontname is returned by not needed
     93    GetRotFont (&fontsize);
    9394
    9495    pad = !isnan(axis->ticktextPad) ? axis->ticktextPad*fontsize : 0.8*fontsize + 1.0;
  • trunk/Ohana/src/kapa2/src/PSPixmap.c

    r32695 r34088  
    153153  int i_start, i_end, j_start, j_end;
    154154  int I_start, J_start;
    155   int dropback;  /* this is a bit of a kludge... */
    156   int dx, dy, DX, DY, inDX, inDY, Xs, Ys;
     155  int dx, dy, DX, inDX, inDY;
    157156  int expand_in, expand_out;
    158   double expand, Ix, Iy;
     157  double Ix, Iy;
    159158  unsigned short *in_pix, *in_pix_ref;
    160159  unsigned char *pixel1, *pixel2, *pixel3;
     
    174173
    175174  assert ((image[0].picture.expand >= 1) || (image[0].picture.expand <= -2));
    176   expand = expand_in = expand_out = 1.0;
     175  expand_in = expand_out = 1.0;
    177176  if (image[0].picture.expand > 0) {
    178     expand = 1 / (1.0*image[0].picture.expand);
    179177    expand_out = image[0].picture.expand;
    180178    expand_in  = 1;
    181179  }
    182180  if (image[0].picture.expand < 0) {
    183     expand = fabs((double)image[0].picture.expand);
    184181    expand_out = 1;
    185182    expand_in  = -image[0].picture.expand;
    186183  }
    187184
    188   Xs = image[0].picture.x;
    189   Ys = image[0].picture.y;
    190185  dx = image[0].picture.dx;
    191186  dy = image[0].picture.dy;
    192187  DX = image[0].image[0].matrix.Naxis[0];
    193   DY = image[0].image[0].matrix.Naxis[1];
    194188
    195189  // i_start, j_start are the closest lit screen pixel to 0,0
     
    209203  inDX = image[0].picture.flipx ? -1 : +1;
    210204  inDY = image[0].picture.flipy ? -1 : +1;
    211 
    212   dropback = expand_out - (i_end - i_start) % expand_out;
    213   if ((i_end - i_start) % expand_out == 0) dropback = 0;
    214205
    215206  in_pix_ref  = &image[0].pixmap[DX*(int)MAX(Iy,0) + (int)MAX(Ix,0)];
  • trunk/Ohana/src/kapa2/src/PaintOverlay.c

    r25757 r34088  
    55  int i;
    66  int dX, dY, dx, dy;
    7   int Xmin, Ymin, Xmax, Ymax, Xrange, Yrange;
     7  int Xmin, Ymin, Xmax, Ymax;
    88  double t, expand, X, Y, pX, pY;
    99 
     
    2323  Xmax = image[0].picture.x + image[0].picture.dx;
    2424  Ymax = image[0].picture.y + image[0].picture.dy;
    25   Xrange = image[0].picture.dx;
    26   Yrange = image[0].picture.dy;
    2725
    2826  for (i = 0; i < image[0].overlay[N].Nobjects; i++) {
  • trunk/Ohana/src/kapa2/src/Remap16.c

    r25978 r34088  
    1313  int I_start, J_start;
    1414  int dropback, inDX, inDY;
    15   int dx, dy, DX, DY;
    16   double expand, Ix, Iy;
     15  int dx, dy, DX;
     16  double Ix, Iy;
    1717  int expand_in, expand_out;
    1818  OUT_TYPE *out_pix, *out_pix2, *data;
     
    4949  if (picture[0].expand == -1) picture[0].expand = 1;
    5050  assert ((picture[0].expand >= 1) || (picture[0].expand <= -2));
    51   expand = expand_in = expand_out = 1.0;
     51  expand_in = expand_out = 1.0;
    5252  if (picture[0].expand > 0) {
    53     expand = 1 / (1.0*picture[0].expand);
    5453    expand_out = picture[0].expand;
    5554    expand_in  = 1;
    5655  }
    5756  if (picture[0].expand < 0) {
    58     expand = fabs((double)picture[0].expand);
    5957    expand_out = 1;
    6058    expand_in  = -picture[0].expand;
     
    6563  dy = picture[0].dy;
    6664  DX = matrix[0].Naxis[0];
    67   DY = matrix[0].Naxis[1];
     65  // int DY = matrix[0].Naxis[1];
    6866
    6967  // i_start, j_start are the closest lit screen pixel to 0,0
  • trunk/Ohana/src/kapa2/src/Remap24.c

    r25978 r34088  
    77  int I_start, J_start;
    88  int dropback, extra, inDX, inDY;
    9   int dx, dy, DX, DY;
    10   double expand, Ix, Iy;
     9  int dx, dy, DX;
     10  double Ix, Iy;
    1111  int expand_in, expand_out;
    1212  unsigned char *out_pix, *out_pix2, *data;
     
    3333  if (picture[0].expand == -1) picture[0].expand = 1;
    3434  assert ((picture[0].expand >= 1) || (picture[0].expand <= -2));
    35   expand = expand_in = expand_out = 1.0;
     35  expand_in = expand_out = 1.0;
    3636  if (picture[0].expand == 0) /* set up expansions */
    3737    picture[0].expand = 1;
    3838  if (picture[0].expand > 0) {
    39     expand = 1 / (1.0*picture[0].expand);
    4039    expand_out = picture[0].expand;
    4140    expand_in  = 1;
    4241  }
    4342  if (picture[0].expand < 0) {
    44     expand = fabs((double)picture[0].expand);
    4543    expand_out = 1;
    4644    expand_in  = -picture[0].expand;
     
    5048  dy = picture[0].dy;
    5149  DX = matrix[0].Naxis[0];
    52   DY = matrix[0].Naxis[1];
     50  // int DY = matrix[0].Naxis[1];
    5351
    5452  // each row is padded to a 4-byte word
  • trunk/Ohana/src/kapa2/src/Remap32.c

    r25978 r34088  
    1616  int I_start, J_start;
    1717  int dropback, inDX, inDY;
    18   int dx, dy, DX, DY;
    19   double expand, Ix, Iy;
     18  int dx, dy, DX;
     19  double Ix, Iy;
    2020  int expand_in, expand_out;
    2121  OUT_TYPE *out_pix, *out_pix2, *data;
     
    5252  if (picture[0].expand == -1) picture[0].expand = 1;
    5353  assert ((picture[0].expand >= 1) || (picture[0].expand <= -2));
    54   expand = expand_in = expand_out = 1.0;
     54  expand_in = expand_out = 1.0;
    5555  if (picture[0].expand > 0) {
    56     expand = 1 / (1.0*picture[0].expand);
    5756    expand_out = picture[0].expand;
    5857    expand_in  = 1;
    5958  }
    6059  if (picture[0].expand < 0) {
    61     expand = fabs((double)picture[0].expand);
    6260    expand_out = 1;
    6361    expand_in  = -picture[0].expand;
     
    6866  dy = picture[0].dy;
    6967  DX = matrix[0].Naxis[0];
    70   DY = matrix[0].Naxis[1];
     68  // int DY = matrix[0].Naxis[1];
    7169
    7270  // i_start, j_start are the closest lit screen pixel to 0,0
  • trunk/Ohana/src/kapa2/src/Remap8.c

    r25978 r34088  
    88  int I_start, J_start;
    99  int dropback, inDX, inDY;
    10   int dx, dy, DX, DY;
    11   double expand, Ix, Iy;
     10  int dx, dy, DX;
     11  double Ix, Iy;
    1212  int expand_in, expand_out;
    1313  OUT_TYPE *out_pix, *out_pix2, *data;
     
    3232  if (picture[0].expand == -1) picture[0].expand = 1;
    3333  assert ((picture[0].expand >= 1) || (picture[0].expand <= -2));
    34   expand = expand_in = expand_out = 1.0;
     34  expand_in = expand_out = 1.0;
    3535  if (picture[0].expand == 0) /* set up expansions */
    3636    picture[0].expand = 1;
    3737  if (picture[0].expand > 0) {
    38     expand = 1 / (1.0*picture[0].expand);
    3938    expand_out = picture[0].expand;
    4039    expand_in  = 1;
    4140  }
    4241  if (picture[0].expand < 0) {
    43     expand = fabs((double)picture[0].expand);
    4442    expand_out = 1;
    4543    expand_in  = -picture[0].expand;
     
    5048  dy = picture[0].dy;
    5149  DX = matrix[0].Naxis[0];
    52   DY = matrix[0].Naxis[1];
     50  // int DY = matrix[0].Naxis[1];
    5351
    5452  // i_start, j_start are the closest lit screen pixel to 0,0
  • trunk/Ohana/src/kapa2/src/SetGraphSize.c

    r29938 r34088  
    7777  double minPADx, maxPADx, minPADy;
    7878  double minPAD, maxPAD;
    79   char string[64], *fontname;
     79  char string[64];
    8080  KapaGraphWidget *graph;
    8181  Graphic *graphic;
     
    9797
    9898  graphic = GetGraphic ();
    99   fontname = GetRotFont (&fontsize);
     99  // char *fontname;
     100  GetRotFont (&fontsize);
    100101
    101102  minPAD = 1.0*fontsize + 0;
  • trunk/Ohana/src/kapa2/src/SetImageData.c

    r31160 r34088  
    33int SetImageData (int sock) {
    44 
    5   Graphic *graphic;
    65  Section *section;
    76  KapaImageWidget *image;
    87
    9   graphic = GetGraphic();
     8  // XXX needed for XClearWindow below
     9  // Graphic *graphic = GetGraphic();
    1010
    1111  section = GetActiveSection();
     
    5353int SetImageCoords (int sock) {
    5454 
    55   Graphic *graphic;
    5655  Section *section;
    5756  KapaImageWidget *image;
    58 
    59   graphic = GetGraphic();
    6057
    6158  section = GetActiveSection();
  • trunk/Ohana/src/kapa2/src/bDrawFrame.c

    r29955 r34088  
    6060  int pos, dir, fontsize;
    6161  double size, n, pad;
    62   char string[64], *fontname;
     62  char string[64];
    6363
    6464  double fx  = axis->fx;
     
    9393    int xt, yt;
    9494
    95     fontname = GetRotFont (&fontsize);
     95    // char *fontname is returned but ignored
     96    GetRotFont (&fontsize);
    9697
    9798    pad = !isnan(axis->ticktextPad) ? axis->ticktextPad*fontsize : 0.8*fontsize + 1.0;
  • trunk/Ohana/src/kapa2/src/bDrawImage.c

    r32695 r34088  
    1111  int i_start, i_end, j_start, j_end;
    1212  int I_start, J_start;
    13   int dropback;  /* this is a bit of a kludge... */
    14   int dx, dy, DX, DY, inDX, inDY, Xs, Ys;
     13  // int dropback;  /* this is a bit of a kludge... */
     14  int dx, dy, DX, inDX, inDY, Xs, Ys;
    1515  int expand_in, expand_out;
    16   double expand, Ix, Iy;
     16  double Ix, Iy;
    1717  unsigned char *out_pix;
    1818  unsigned short *in_pix, *in_pix_ref;
     
    3535
    3636  assert ((image[0].picture.expand >= 1) || (image[0].picture.expand <= -2));
    37   expand = expand_in = expand_out = 1.0;
     37  expand_in = expand_out = 1.0;
    3838  if (image[0].picture.expand > 0) {
    39     expand = 1 / (1.0*image[0].picture.expand);
    4039    expand_out = image[0].picture.expand;
    4140    expand_in  = 1;
    4241  }
    4342  if (image[0].picture.expand < 0) {
    44     expand = fabs((double)image[0].picture.expand);
    4543    expand_out = 1;
    4644    expand_in  = -image[0].picture.expand;
     
    5351  dy = image[0].picture.dy;
    5452  DX = image[0].image[0].matrix.Naxis[0];
    55   DY = image[0].image[0].matrix.Naxis[1];
     53  // int DY = image[0].image[0].matrix.Naxis[1];
    5654
    5755  // the created buffer is supposed to contain the output windows
     
    8280  inDY = image[0].picture.flipy ? -1 : +1;
    8381
    84   dropback = expand_out - (i_end - i_start) % expand_out;
    85   if ((i_end - i_start) % expand_out == 0) dropback = 0;
     82  // dropback = expand_out - (i_end - i_start) % expand_out;
     83  // if ((i_end - i_start) % expand_out == 0) dropback = 0;
    8684
    8785  ALLOCATE (line_buffer, bDrawColor, 3*dx);
  • trunk/Ohana/src/kapa2/src/bDrawOverlay.c

    r29938 r34088  
    88  int i;
    99  int dx, dy;
    10   int Xmin, Ymin, Xmax, Ymax, Xrange, Yrange;
     10  int Xmin, Ymin, Xmax, Ymax;
    1111  double expand, X, Y, dX, dY, pX, pY;
    1212  bDrawColor color;
     
    2828  Xmax = image[0].picture.dx;
    2929  Ymax = image[0].picture.dy;
    30   Xrange = image[0].picture.dx;
    31   Yrange = image[0].picture.dy;
    3230
    3331  if (N == INFRONT) {
  • trunk/Ohana/src/libautocode/def/common.h

    r28241 r34088  
    3232# define rawshort short
    3333
     34# define DVO_IMAGE_NAME_LEN 121
     35
    3436/*** rawshort is used to handle the broken pre-autocode photreg tables
    3537     fix the tables and remove this
  • trunk/Ohana/src/libdvo/src/ImageOps.c

    r31636 r34088  
    88{
    99
    10   int j, flipped, status, InPic;
     10  int j, flipped, status;
    1111  off_t i, n, *subset;
    1212  int npts;
     
    6565      x[2] = image[i].NX; y[2] = image[i].NY;
    6666      x[3] = 0;           y[3] = image[i].NY;
    67       InPic = flipped = FALSE;
     67      flipped = FALSE;
    6868      for (j = 0; j < 4; j++) {
    6969        XY_to_RD (&r, &d, x[j], y[j], &image[i].coords);
     
    9595      x[2] = image[i].NX; y[2] = image[i].NY;
    9696      x[3] = 0;           y[3] = image[i].NY;
    97       InPic = flipped = FALSE;
     97      flipped = FALSE;
    9898      for (j = 0; j < 4; j++) {
    9999        XY_to_RD (&r, &d, x[j], y[j], &image[i].coords);
  • trunk/Ohana/src/libdvo/src/coordops.c

    r31663 r34088  
    6868  mode = GetProjectionMode (proj);
    6969  if (proj == PROJ_NONE) return (FALSE);
    70   if (proj == PROJ_MODE_NONE) return (FALSE);
     70  if (mode == PROJ_MODE_NONE) return (FALSE);
    7171
    7272  stht = ctht = 1;
     
    201201  mode = GetProjectionMode (proj);
    202202  if (proj == PROJ_NONE) return (FALSE);
    203   if (proj == PROJ_MODE_NONE) return (FALSE);
     203  if (mode == PROJ_MODE_NONE) return (FALSE);
    204204
    205205  /**** Locally Cartesian Projections ****/
  • trunk/Ohana/src/libdvo/src/dbCmdlineFields.c

    r31636 r34088  
    136136    // XXX the ra and dec range depend on the projection.
    137137    // XXX this is wrong...
    138     int status;
    139     status = XY_to_RD (&Rmin, &Dmin, graphsky.xmin, graphsky.ymin, &graphsky.coords);
    140     status = XY_to_RD (&Rmax, &Dmax, graphsky.xmax, graphsky.ymax, &graphsky.coords);
     138    // int status;
     139    XY_to_RD (&Rmin, &Dmin, graphsky.xmin, graphsky.ymin, &graphsky.coords);
     140    XY_to_RD (&Rmax, &Dmax, graphsky.xmax, graphsky.ymax, &graphsky.coords);
    141141  }
    142142
  • trunk/Ohana/src/libdvo/src/dbRPN.c

    r31635 r34088  
    44dbStack *dbRPN (int argc, char **argv, int *nstack) {
    55 
    6   int type, Nx, Ny;
     6  int type;
    77  int i, j, Nstack, Nop_stack, NSTACK;
    88  dbStack *stack, *op_stack;
     
    1717  }
    1818 
    19   Nx = Ny = Nstack = Nop_stack = 0;
     19  Nstack = Nop_stack = 0;
    2020  for (i = 0; i < argc; i++) {
    2121   
  • trunk/Ohana/src/libdvo/src/dvo_image.c

    r33649 r34088  
    111111      exit (2);
    112112  }
    113   return (TRUE);
     113  return (status);
    114114}
    115115
  • trunk/Ohana/src/libdvo/src/dvo_tiny_values.c

    r33649 r34088  
    5151
    5252    for (i = 0; i < catalog[0].Naverage; i++) {
    53       CopyAverageToTiny (&catalog[0].averageT[i], &catalog[0].average[i]);
     53      CopyAverageToTiny (&averageT[i], &average[i]);
    5454    }
    5555  }
     
    6161
    6262    for (i = 0; i < catalog[0].Nmeasure; i++) {
    63       CopyMeasureToTiny (&catalog[0].measureT[i], &catalog[0].measure[i]);
     63      CopyMeasureToTiny (&measureT[i], &measure[i]);
    6464    }
    6565  }
  • trunk/Ohana/src/libdvo/src/skyregion_gsc.c

    r33649 r34088  
    271271  int i, j, Nz, NZ, Nregions, poleRegion;
    272272  SkyRegion *regions;
    273   SkyRegion tempregion;
    274273  SkyRegionZone *zones;
    275274  char basename[64];
     
    294293      poleRegion = SIGN(regions[i].Dmin);
    295294      Nregions --;
    296       tempregion = regions[i];
    297295      for (j = i; j < Nregions; j++) {
    298296        regions[j] = regions[j+1];
  • trunk/Ohana/src/libfits/Makefile

    r31663 r34088  
    1616
    1717# programs may add their own internal requirements here
    18 FULL_CFLAGS   = $(BASE_CFLAGS) -fPIC -Wall -Werror
     18FULL_CFLAGS   = $(BASE_CFLAGS) -fPIC
    1919FULL_CPPFLAGS = $(BASE_CPPFLAGS) -I$(EXT)
    2020FULL_LDFLAGS  = $(BASE_LDFLAGS) -lohana
  • trunk/Ohana/src/libfits/extern/fits_hdecompress.c

    r15487 r34088  
    10481048{
    10491049LONGLONG sumall;
    1050 int nel, stat;
     1050int stat;
    10511051unsigned char nbitplanes[3];
    10521052char tmagic[2];
     
    10711071        *scale=readint(infile);                         /* scale factor for digitization        */
    10721072       
    1073         nel = (*nx) * (*ny);
     1073        // nel = (*nx) * (*ny);
    10741074
    10751075        /* sum of all pixels    */
     
    10951095*/
    10961096{
    1097 int nel, stat;
     1097int stat;
    10981098LONGLONG sumall;
    10991099unsigned char nbitplanes[3];
     
    11191119        *scale=readint(infile);                         /* scale factor for digitization        */
    11201120       
    1121         nel = (*nx) * (*ny);
     1121        // nel = (*nx) * (*ny);
    11221122
    11231123        /* sum of all pixels    */
  • trunk/Ohana/src/libfits/extern/ricecomp.c

    r18269 r34088  
    5959{
    6060Buffer bufmem, *buffer = &bufmem;
    61 int bsize, i, j, thisblock;
     61int i, j, thisblock;
    6262int lastpix, nextpix, pdiff;
    6363int v, fs, fsmask, top, fsmax, fsbits, bbits;
     
    7373     * compression of short & byte images.
    7474     */
    75     bsize = 4;
     75// int bsize = 4;
    7676
    7777/*    nblock = 32; now an input parameter*/
     
    277277{
    278278Buffer bufmem, *buffer = &bufmem;
    279 int bsize, i, j, thisblock;
     279int i, j, thisblock;
    280280
    281281/*
     
    299299     * compression of short & byte images.
    300300     */
    301     bsize = 2;
     301// bsize = 2;
    302302
    303303/*    nblock = 32; now an input parameter */
     
    501501{
    502502Buffer bufmem, *buffer = &bufmem;
    503 int bsize, i, j, thisblock;
     503int i, j, thisblock;
    504504
    505505/*
     
    523523     * compression of short & byte images.
    524524     */
    525     bsize = 1;
     525    // bsize = 1;
    526526
    527527/*    nblock = 32; now an input parameter */
     
    826826             int nblock)                /* coding block size            */
    827827{
    828 int bsize, i, k, imax;
     828int i, k, imax;
    829829int nbits, nzero, fs;
    830830unsigned char *cend, bytevalue;
     
    839839     * compression of short & byte images.
    840840     */
    841     bsize = 4;
     841// bsize = 4;
    842842
    843843/*    nblock = 32; now an input parameter */
     
    10141014{
    10151015int i, imax;
    1016 int bsize, k;
     1016int k;
    10171017int nbits, nzero, fs;
    10181018unsigned char *cend, bytevalue;
     
    10281028     */
    10291029
    1030     bsize = 2;
     1030// bsize = 2;
    10311031   
    10321032/*    nblock = 32; now an input parameter */
     
    12001200{
    12011201int i, imax;
    1202 int bsize, k;
     1202int k;
    12031203int nbits, nzero, fs;
    12041204unsigned char *cend;
     
    12141214     */
    12151215
    1216     bsize = 1;
     1216// bsize = 1;
    12171217   
    12181218/*    nblock = 32; now an input parameter */
  • trunk/Ohana/src/libfits/matrix/F_compress_M.c

    r33648 r34088  
    4545  float zscale, zzero;
    4646
    47   int zdata_pixsize, odata_pixsize, idata_pixsize;
     47  int zdata_pixsize, odata_pixsize;
    4848
    4949  int *ztile = NULL;
     
    236236  zdata_pixsize = gfits_vartable_heap_pixsize (zdef.format);
    237237
    238   // size of a pixel in the final image
    239   idata_pixsize = abs(header[0].bitpix) / 8;
     238  // size of a pixel in the final image (not needed)
     239  // idata_pixsize = abs(header[0].bitpix) / 8;
    240240
    241241  // size of a pixel in the output from the decompression routine
     
    480480int gfits_compressed_is_primary (Header *header) {
    481481
    482     int has_ztension, has_zimage;
    483     int ztension, zimage;
    484 
    485     has_zimage   = gfits_scan_alt (header, "ZIMAGE",   "%t", 1, &zimage);
    486     has_ztension = gfits_scan_alt (header, "ZTENSION", "%t", 1, &ztension);
     482  int zimage = FALSE;
     483  // int ztension = FALSE;
     484
     485    int has_zimage   = gfits_scan_alt (header, "ZIMAGE",   "%t", 1, &zimage);
     486    // int has_ztension = gfits_scan_alt (header, "ZTENSION", "%t", 1, &ztension);
    487487
    488488    if (has_zimage && zimage) return (TRUE);
  • trunk/Ohana/src/libfits/table/F_copy_T.c

    r31663 r34088  
    1717int gfits_copy_vtable (VTable *in, VTable *out) {
    1818
    19   off_t i, Nx, Ny, Nrows;
     19  off_t i;
    2020
    2121  /* find buffer size */
    22   Nx = in[0].header[0].Naxis[0];
    23   Ny = in[0].header[0].Naxis[1];
     22  off_t Nx = in[0].header[0].Naxis[0];
     23  // off_t Ny = in[0].header[0].Naxis[1];
    2424
    2525  // validate these two?
     
    3232  out[0].Nrow     = in[0].Nrow;
    3333
    34   Nrows = out[0].Nrow;
     34  off_t Nrows = out[0].Nrow;
    3535
    3636  ALLOCATE (out[0].row, off_t, MAX (Nrows, 1));
  • trunk/Ohana/src/libkapa/src/DrawRotString.c

    r30603 r34088  
    7777    /* check for special characters */
    7878    if (!code && !protect) {
     79      /* subscript, starts with _ */
    7980      if (N == 94) {
    8081        SetRotFont (currentname, (int)(0.8*currentsize));
     
    8384        continue;
    8485      }
     86      /* superscript, starts with ^ */
    8587      if (N == 95) {
    8688        SetRotFont (currentname, (int)(0.8*currentsize));
     
    8991        continue;
    9092      }
     93      /* normal script, starts with | */
    9194      if (N == 124) {
    9295        SetRotFont (currentname, basesize);
     
    137140
    138141  int ii, jj, byte_line, byte, bit, flag;
    139   unsigned long int fore, back;
     142  unsigned long int fore;
    140143  double i, j, cs, sn, rscale, tmp;
    141144  int X, Y, X0, X1, X2, Y0, Y1, Y2, x0, y0;
     
    143146  if (mode) {
    144147    fore = RotForeground;
    145     back = RotBackground;
     148    // back = RotBackground;
    146149  } else {
    147150    fore = RotBackground;
    148     back = RotForeground;
     151    // back = RotForeground;
    149152  }
    150153   
  • trunk/Ohana/src/libkapa/src/KapaOpen.c

    r27988 r34088  
    252252int KapaOpenNamedSocket (char *kapa_exec, char *name) {
    253253
    254   int InitSocket, status;
     254  int InitSocket;
    255255  struct sockaddr_un Address;
    256256  socklen_t AddressLength;
     
    269269  Address.sun_family = AF_UNIX;
    270270  InitSocket = socket (AF_UNIX, SOCK_STREAM, 0);
    271   status = bind (InitSocket, (struct sockaddr *) &Address, sizeof (Address));
    272   status = listen (InitSocket, 1);
     271  bind (InitSocket, (struct sockaddr *) &Address, sizeof (Address));
     272  listen (InitSocket, 1);
    273273
    274274  if (name == NULL) {
  • trunk/Ohana/src/libkapa/src/KiiOpen.c

    r27588 r34088  
    44int KiiOpen (char *kii_exec, char *name) {
    55
    6   int InitSocket, status;
     6  int InitSocket;
    77  struct sockaddr_un Address;
    88  socklen_t AddressLength;
     
    2121  Address.sun_family = AF_UNIX;
    2222  InitSocket = socket (AF_UNIX, SOCK_STREAM, 0);
    23   status = bind (InitSocket, (struct sockaddr *) &Address, sizeof (Address));
    24   status = listen (InitSocket, 1);
     23  bind (InitSocket, (struct sockaddr *) &Address, sizeof (Address));
     24  listen (InitSocket, 1);
    2525 
    2626  if (name == NULL) {
  • trunk/Ohana/src/libkapa/src/KiiPicture.c

    r31160 r34088  
    2222
    2323  int Nwrite, Npix, Ncolors, size;
    24   float *in, min, max;
     24  float min, max;
    2525
    2626  Npix = image[0].Nx*image[0].Ny;
     
    2828  KiiSendCommand (fd, 4, "READ"); /* tell kapa to look for the incoming image */
    2929  KiiScanMessage (fd, "%d", &Ncolors);
    30 
    31   in = image[0].data1d;
    3230
    3331  /* these are for a future upgrade */
  • trunk/Ohana/src/libohana/src/config.c

    r20358 r34088  
    131131 
    132132  FILE *f;
    133   int i, done, Nbytes, NBYTES, nbytes, Nout, Ncpy, INPUT, Nlevel;
     133  int i, Nbytes, NBYTES, nbytes, Nout, Ncpy, INPUT, Nlevel;
    134134  char *ibuffer, *obuffer, *tbuffer;
    135135  char *last, *next;
     
    149149  /* load data from file */
    150150  if (f) {
    151     done = FALSE;
    152151    while ((nbytes = fread (&ibuffer[Nbytes], sizeof(char), D_NBYTES, f)) == D_NBYTES) {
    153152      Nbytes += nbytes;
     
    382381 
    383382  FILE *f;
    384   int i, done, Nbytes, NBYTES, nbytes, Ncpy;
     383  int i, Nbytes, NBYTES, nbytes, Ncpy;
    385384  char *ibuffer;
    386385  char line[256];
     
    398397   
    399398  /* load data from file */
    400   done = FALSE;
    401399  while ((nbytes = fread (&ibuffer[Nbytes], sizeof(char), D_NBYTES, f)) == D_NBYTES) {
    402400    Nbytes += nbytes;
  • trunk/Ohana/src/libohana/src/time.c

    r30602 r34088  
    9595  p1 = line;
    9696  tmp = strtod (p1, &p2);
     97  if (0) { fprintf (stderr, "tmp: %f\n", tmp); }
    9798  mode = TIME_DATE;
    9899  if (p2 == p1 + strlen (p1) - 1) {
  • trunk/Ohana/src/misc/src/mkgauss.c

    r2417 r34088  
    3838  long A, B;
    3939  double val, x, dx, dx1, dx2, dx3, df;
    40   double mean, sigma;
    4140
    4241  A = time(NULL);
     
    4948  dx2 = 2.0*dx/3.0;
    5049  dx3 = dx;
    51   mean = 0.0;
    52   sigma = 1.0;
    5350
    5451  for (i = 0, x = -7.0; (i < NGAUSS) && (x < 7.0); x += dx)  {
  • trunk/Ohana/src/mosastro/src/clip.c

    r6645 r34088  
    55  int i, j, Nscatter, Nmask, Nkeep, Nkpcp;
    66  double DL, DM, dL, dM;
    7   double sigma;
    87  StarData *raw, *ref;
    98
    109  Nmask = Nkeep = 0;
    11   sigma = GetScatter (&Nscatter, &DL, &DM, FALSE);
     10
     11  // double sigma is returned;
     12  GetScatter (&Nscatter, &DL, &DM, FALSE);
    1213
    1314  for (i = 0; i < Nchip; i++) {
  • trunk/Ohana/src/mosastro/src/getusnob.c

    r27435 r34088  
    133133      }
    134134     
    135       stars[Nusno].M = mB;
     135      stars[Nusno].M = (TRUE) ? mB : mR;
    136136      stars[Nusno].R += uR*(Year - 2000.0);
    137137      stars[Nusno].D += uD*(Year - 2000.0);
  • trunk/Ohana/src/opihi/cmd.astro

  • trunk/Ohana/src/opihi/cmd.astro/cdot.c

    r25757 r34088  
    3030
    3131  status = fRD_to_XY (&x, &y, r, d, &graphmode.coords);
    32 
     32  if (!status) return TRUE;
     33 
    3334  if (!KapaPrepPlot (kapa, 1, &graphmode)) return (FALSE);
    3435  KapaPlotVector (kapa, 1, &x, "x");
  • trunk/Ohana/src/opihi/cmd.astro/cline.c

    r30971 r34088  
    2323  graphmode.etype = 0;
    2424
     25  // need to plot to edge of picture..
    2526  status = fRD_to_XY (&x[0], &y[0], r[0], d[0], &graphmode.coords);
     27  if (!status) {
     28    return FALSE;
     29  }
    2630  status = fRD_to_XY (&x[1], &y[1], r[1], d[1], &graphmode.coords);
     31  if (!status) {
     32    return FALSE;
     33  }
    2734 
    2835  if (!KapaPrepPlot (kapa, 2, &graphmode)) return (FALSE);
  • trunk/Ohana/src/opihi/cmd.astro/fixcols.c

    r21061 r34088  
    6868int fixcols (int argc, char **argv) {
    6969 
    70   int ix, iy, Nx, Ny, Nvect, start, stop;
     70  int ix, iy, Nx, Nvect, start, stop;
    7171  float *Vin, *vect, *meds, median, stdev, sigma, Nsigma, value;
    7272  Buffer *in;
     
    8484
    8585  Nx = in[0].matrix.Naxis[0];
    86   Ny = in[0].matrix.Naxis[1];
     86  // Ny = in[0].matrix.Naxis[1];
    8787
    8888  ALLOCATE (meds, float, Nx);
  • trunk/Ohana/src/opihi/cmd.astro/fiximage.c

    r33700 r34088  
    33int fiximage (int argc, char **argv) {
    44
    5   int ix, iy, N;
     5  int ix, iy;
    66  Buffer *in, *ct, *mask;
    77
    8   int VERBOSE = FALSE;
    9   if ((N = get_argument (argc, argv, "-v"))) {
    10     VERBOSE = TRUE;
    11     remove_argument (N, &argc, argv);
    12   }
     8  // int VERBOSE = FALSE;
     9  // if ((N = get_argument (argc, argv, "-v"))) {
     10  //   VERBOSE = TRUE;
     11  //   remove_argument (N, &argc, argv);
     12  // }
    1313
    1414  if (argc != 4) {
  • trunk/Ohana/src/opihi/cmd.astro/gauss.c

    r13479 r34088  
    55  char key[20];
    66  int i, N, Npix, Nborder, Nspot;
    7   double X, Y, Z, ZP, RA, DEC, max;
     7  double X, Y, ZP, RA, DEC, max;
    88  int kapa;
    99  char *name;
     
    5858    KiiCursorRead (kapa, &X, &Y, &ZP, &RA, &DEC, key);
    5959    if (!strcasecmp (key, "Q")) break;
    60     Z = get_aperture_stats (&buf[0].matrix, (int)(X+0.5), (int)(Y+0.5), Npix, Nborder, max);
     60    get_aperture_stats (&buf[0].matrix, (int)(X+0.5), (int)(Y+0.5), Npix, Nborder, max);
    6161  }
    6262  KiiCursorOff (kapa);
  • trunk/Ohana/src/opihi/cmd.astro/getvel.c

    r19823 r34088  
    44 
    55  int i, n, Ncurve;
    6   int nx, ny;
    76  double L, V, Vo, dV, Bo, dB;
    87  double xo, yo;
     
    2928
    3029  if ((buf = SelectBuffer (argv[1], OLDBUFFER, TRUE)) == NULL) return (FALSE);
    31   nx = buf[0].matrix.Naxis[0];
    32   ny = buf[0].matrix.Naxis[1];
     30  // int nx = buf[0].matrix.Naxis[0];
     31  // int ny = buf[0].matrix.Naxis[1];
    3332
    3433  /* we expect the input image to have units of velocity, lattitude, and longitude */
  • trunk/Ohana/src/opihi/cmd.astro/imfit.c

    r20936 r34088  
    33int imfit (int argc, char **argv) {
    44
    5   int i, j, N, Npts, Save, VERBOSE, ShapeVariation;
     5  int i, j, N, Npts, Save, VERBOSE;
    66  int sx, sy, nx, ny, Nx, Ny;
    77  float chisq, ochisq, dchisq, Gain, RDnoise, SatThreshold;
     
    1616  }
    1717
    18   ShapeVariation = FALSE;
    19   if ((N = get_argument (argc, argv, "-shapes"))) {
    20     remove_argument (N, &argc, argv);
    21     ShapeVariation = TRUE;
    22   }
     18  // int ShapeVariation = FALSE;
     19  // if ((N = get_argument (argc, argv, "-shapes"))) {
     20  //   remove_argument (N, &argc, argv);
     21  //   ShapeVariation = TRUE;
     22  // }
    2323
    2424  SatThreshold = 0xffff;
  • trunk/Ohana/src/opihi/cmd.astro/imsub.c

    r12840 r34088  
    33int imsub (int argc, char **argv) {
    44
    5   int i, j, N, VERBOSE;
     5  int i, j, N;
    66  int sx, sy, nx, ny, Nx, Ny;
    77  float value;
     
    99  Buffer *buf;
    1010
    11   VERBOSE = FALSE;
    12   if ((N = get_argument (argc, argv, "-v"))) {
    13     remove_argument (N, &argc, argv);
    14     VERBOSE = TRUE;
    15   }
     11  // int VERBOSE = FALSE;
     12  // if ((N = get_argument (argc, argv, "-v"))) {
     13  //   remove_argument (N, &argc, argv);
     14  //   VERBOSE = TRUE;
     15  // }
    1616
    1717  /* set fitting function */
  • trunk/Ohana/src/opihi/cmd.astro/kronflux.c

    r33963 r34088  
    6767  int i, j;
    6868
    69   double gain;
    70   char *string = get_variable ("GAIN");
    71   if (string == (char *) NULL) {
    72     if (VERBOSE) gprint (GP_ERR, "assuming a value of 1.0\n");
    73     gain = 1.0;
    74   } else {
    75     gain = atof (string);
    76   }
     69  // double gain;
     70  // char *string = get_variable ("GAIN");
     71  // if (string == (char *) NULL) {
     72  //   if (VERBOSE) gprint (GP_ERR, "assuming a value of 1.0\n");
     73  //   gain = 1.0;
     74  // } else {
     75  //   gain = atof (string);
     76  // }
    7777
    7878  float *data = (float *) matrix->buffer;
  • trunk/Ohana/src/opihi/cmd.astro/medianmap.c

    r16006 r34088  
    66  int i, j, k, I0, I1, J0, J1, I, J, n, N;
    77  int nx, ny, Nx, Ny, NX, NY, Ignore;
    8   float Mv, Nv, Mv2, value, min, max, IgnoreValue;
     8  float value, min, max, IgnoreValue;
    99  float *In, *Out, *ip;
    1010  float fx, fy;
     
    7171  ALLOCATE (temp, float, 2*nx*ny);
    7272
    73   Nv = Mv = Mv2 = 0.0;
     73  // float Mv = Mv2 = 0.0;
    7474
    7575  for (j = 0; j < Ny; j++) {
  • trunk/Ohana/src/opihi/cmd.astro/objload.c

    r13479 r34088  
    5252    for (i = 0; i < Nline; i++) {
    5353      /* we are now using all entries on the *.obj line */
    54       status = sscanf (&buffer[i*CHAR_LINE], "%d %f %f",  &type, &overlay[Noverlay].x, &overlay[Noverlay].y);
     54      status = sscanf (&buffer[i*CHAR_LINE], "%d %f %f",  &type, &overlay[Noverlay].x, &
     55overlay[Noverlay].y);
     56      if (status != 3) continue;
    5557      if (Objtype && (Objtype != type)) continue;
    5658      overlay[Noverlay].type = KII_OVERLAY_BOX;
  • trunk/Ohana/src/opihi/cmd.astro/outline.c

    r13479 r34088  
    88int outline (int argc, char **argv) {
    99 
    10   int i, j, k, Npar, BigChange, ABigChange;
     10  int i, j, k, BigChange, ABigChange;
    1111  float Io, *in, ochisq, dchi, chisq, chisq_p, chisq_m, dp, tmp_par;
    1212  float curve, frac;
     
    1414
    1515  if (argc != 9) {
    16     gprint (GP_ERR, "USAGE: outline x y dx dy dxy Io (buffer) Npar\n");
     16    gprint (GP_ERR, "USAGE: outline x y dx dy dxy Io (buffer)\n");
    1717    return (FALSE);
    1818  }
     
    2626  par[4] = atof(argv[5]);
    2727  Io = atof(argv[6]);
    28   Npar = atof (argv[8]);
     28  // int Npar = atof (argv[8]);
    2929
    3030  dpar[0] = 10;
  • trunk/Ohana/src/opihi/cmd.astro/rotcurve.c

    r19823 r34088  
    88  double L, dL, Lo, V, Vo, dV, Bo, dB, Do, dD;
    99  double xo, yo, Xo, Yo;
    10   double sl, cl, wo, Ro, Rs, wr, r, fr, d, min;
     10  double sl, cl, wo, Ro, Rs, wr, r, d, min;
    1111  double R[100], T[100], W[100];
    1212  FILE *f;
     
    9999      }
    100100      r = (wr - W[n]) *  (R[n-1] - R[n]) / (W[n-1] - W[n]) + R[n];
    101       fr = (Ro/r);
     101      // fr = (Ro/r);
    102102      if (r < fabs(Rs)) { /* can't be on rotation curve */
    103103        continue;
  • trunk/Ohana/src/opihi/cmd.astro/spec.c

    r20936 r34088  
    33int spec (int argc, char **argv) {
    44
    5   int i, j, Xo, X1, y1, y2, Nx, Ny;
     5  int i, j, Xo, X1, y1, y2, Nx;
    66  int Nlong, Ngap, Nrow, N, Nring;
    77  float *buffer, *V;
     
    4545  if ((buf = SelectBuffer (argv[1], OLDBUFFER, TRUE)) == NULL) return (FALSE);
    4646  Nx = buf[0].matrix.Naxis[0];
    47   Ny = buf[0].matrix.Naxis[1];
     47  // int Ny = buf[0].matrix.Naxis[1];
    4848
    4949  Xo = atof (argv[2]);
  • trunk/Ohana/src/opihi/cmd.astro/star.c

    r26891 r34088  
    44
    55  int x, y, N, dx, Nborder;
    6   double Z, max;
     6  double max;
    77  Buffer *buf;
    88
     
    3636  }
    3737
    38   Z = get_aperture_stats (&buf[0].matrix, x, y, dx, Nborder, max);
     38  get_aperture_stats (&buf[0].matrix, x, y, dx, Nborder, max);
    3939 
    4040  return (TRUE);
  • trunk/Ohana/src/opihi/cmd.astro/transform.c

    r7917 r34088  
    55  int i, j, Nx, Ny;
    66  Coords coords_in, coords_out;
    7   double scale_in, scale_out;
    87  int X, Y;
    98  double x, y, r, d, dx, dy;
     
    3029  }
    3130 
    32   scale_in = sqrt(fabs(coords_in.cdelt1*coords_in.cdelt2*(coords_in.pc1_1*coords_in.pc2_2 - coords_in.pc1_2*coords_in.pc2_1)));
    33   scale_out = sqrt(fabs(coords_out.cdelt1*coords_out.cdelt2*(coords_out.pc1_1*coords_out.pc2_2 - coords_out.pc1_2*coords_out.pc2_1)));
     31  // double scale_in = sqrt(fabs(coords_in.cdelt1*coords_in.cdelt2*(coords_in.pc1_1*coords_in.pc2_2 - coords_in.pc1_2*coords_in.pc2_1)));
     32  // double scale_out = sqrt(fabs(coords_out.cdelt1*coords_out.cdelt2*(coords_out.pc1_1*coords_out.pc2_2 - coords_out.pc1_2*coords_out.pc2_1)));
    3433
    3534  Vin  = (float *) in[0].matrix.buffer;
  • trunk/Ohana/src/opihi/cmd.data/densify.c

    r31160 r34088  
    55int densify (int argc, char **argv) {
    66
    7   int i, Nx, Ny, Xb, Yb, Normalize, N, Xpix, Ypix, good, UseGraph;
     7  int i, Nx, Ny, Xb, Yb, N, Xpix, Ypix, good, UseGraph;
    88  double Xmin, Xmax, dX, Ymin, Ymax, dY;
    99  float *val;
     
    1212  opihi_flt *x, *y;
    1313
    14   Normalize = TRUE;
    15   if ((N = get_argument (argc, argv, "-raw"))) {
    16     remove_argument (N, &argc, argv);
    17     Normalize = FALSE;
    18   }
     14  // int Normalize = TRUE;
     15  // if ((N = get_argument (argc, argv, "-raw"))) {
     16  //   remove_argument (N, &argc, argv);
     17  //   Normalize = FALSE;
     18  // }
    1919
    2020  UseGraph = FALSE;
  • trunk/Ohana/src/opihi/cmd.data/gaussdeviate.c

    r20936 r34088  
    3434 
    3535  int i, Npts;
    36   double mean, sigma;
    3736  Vector *vec;
    3837
     
    4241
    4342  Npts = atoi (argv[2]);
    44   mean = atof (argv[3]);
    45   sigma = atof (argv[4]);
     43  // mean = atof (argv[3]);
     44  // sigma = atof (argv[4]);
    4645
    4746  ResetVector (vec, OPIHI_FLT, Npts);
  • trunk/Ohana/src/opihi/cmd.data/list_header.c

    r27435 r34088  
    4141    strcpy (buf[0].file, "*");
    4242    strcat (buf[0].file, filename);
     43
    4344    status = gfits_read_header (argv[2], &buf[0].header);
     45    if (!status) {
     46      gprint (GP_ERR, "failed to read header for %s\n", argv[2]);
     47      return FALSE;
     48    }
    4449    buf[0].header.bitpix = bitpix;     
    4550    buf[0].header.bzero  = bzero;     
  • trunk/Ohana/src/opihi/cmd.data/load.c

    r13479 r34088  
    33int load (int argc, char **argv) {
    44 
    5   int i, N, n, ISCEL;
     5  int i, N, ISCEL;
    66  int kapa, Noverlay, NOVERLAY;
    77  char *c, type[10], string[128], line[1024];
     
    5959
    6060  dx = dy = 0;
    61   for (n = 0; scan_line (f, line) != EOF;) {
     61  while (scan_line (f, line) != EOF) {
    6262    c = strchr (line, '#');
    6363    if (c != (char *) NULL)
  • trunk/Ohana/src/opihi/cmd.data/lookup.c

    r20936 r34088  
    3737
    3838    for (j = 0; (*ip < *xp) && (j < yv[0].Nelements); j++);
    39     *op = j;
     39    *op = *yp;
    4040  }     
    4141
  • trunk/Ohana/src/opihi/cmd.data/rotate.c

    r27435 r34088  
    33int rotate (int argc, char **argv) {
    44 
    5   int i, j, NX, NY, X, Y, Lx, Ly, N, newCenter;
     5  int i, j, NX, NY, X, Y, Lx, Ly, N;
    66  float *in_buff, *out_buff, *c;
    77  double angle, CosAngle, SinAngle, Xo, Yo, dX, dY, fx, fy, x, y, X1, Y1;
     
    1212  Yo = 0;
    1313  if ((N = get_argument (argc, argv, "-center"))) {
    14     newCenter = TRUE;
    1514    remove_argument (N, &argc, argv);
    1615    Xo  = atof(argv[N]);
     
    1918    remove_argument (N, &argc, argv);
    2019  }
    21   else
    22     newCenter  = FALSE;
    2320
    2421  if (argc != 3) {
  • trunk/Ohana/src/opihi/cmd.data/shift.c

    r9726 r34088  
    33int shift (int argc, char **argv) {
    44 
    5   int i, j, N, ROLL;
     5  int i, j;
    66  int nx, ny, dx, dy, DXin, DXot, DYin, DYot;
    77  float *Vin, *Vot;
     
    99  Buffer *in, *out;
    1010
    11   ROLL = FALSE;
    12   if ((N = get_argument (argc, argv, "-roll"))) {
    13     remove_argument (N, &argc, argv);
    14     ROLL = TRUE;
    15   }
     11  // int ROLL = FALSE;
     12  // if ((N = get_argument (argc, argv, "-roll"))) {
     13  //   remove_argument (N, &argc, argv);
     14  //   ROLL = TRUE;
     15  // }
    1616
    1717  if (argc != 5) {
  • trunk/Ohana/src/opihi/cmd.data/spline_apply.c

    r16119 r34088  
    55 
    66  int i, j, I, J;
    7   int nx, ny, Nx, Ny, xdir;
     7  int nx, ny, Nx, Ny;
    88  float rx, ry, x, y;
    99  float *Tx1, *Tx2, *Txc, *Ty1, *Ty2, *Tyc, *V, *V1, *V2;
     
    1919  if ((out = SelectBuffer (argv[3], ANYBUFFER, TRUE)) == NULL) return (FALSE);
    2020
    21   xdir = FALSE;
    22   if (!strcmp (argv[4], "x")) xdir = TRUE;
     21  // xdir = FALSE;
     22  // if (!strcmp (argv[4], "x")) xdir = TRUE;
    2323
    2424  nx = atoi (argv[5]);
  • trunk/Ohana/src/opihi/cmd.data/spline_construct.c

    r17903 r34088  
    44int spline_construct_cmd (int argc, char **argv) {
    55 
    6   int i, j, Nx, Ny, xdir;
     6  int i, j, Nx, Ny;
    77  float *Tx, *Ty, *Ty2, *V;
    88  Buffer *in, *out;
     
    3131  gfits_create_matrix (&out[0].header, &out[0].matrix);
    3232
    33   xdir = FALSE;
    34   if (!strcmp (argv[3], "x")) xdir = TRUE;
     33  // int xdir = FALSE;
     34  // if (!strcmp (argv[3], "x")) xdir = TRUE;
    3535  /* ideally, the resulting image should carry this info (in header?) */
    3636
  • trunk/Ohana/src/opihi/dvo/avextract.c

    r33963 r34088  
    55  off_t i, j, n, m;
    66  int N, Npts, NPTS, last, next, state, Nfields, Nreturn, Ncstack, Nstack;
    7   int Nsecfilt, mode, VERBOSE, needMeasures;
     7  int Nsecfilt, VERBOSE, needMeasures;
    88  char **cstack, name[1024];
    99  void *Signal;
     
    2525  skylist = NULL;
    2626  selection = NULL;
    27 
    28   mode = MAG_AVE;
    2927
    3028  if ((N = get_argument (argc, argv, "-h"))) goto help;
  • trunk/Ohana/src/opihi/dvo/calextract.c

    r27435 r34088  
    66 
    77  off_t i, Nr;
    8   int Nsecfilt, NSTAR, N, mode[2];
     8  int N, mode[2];
    99
    1010  PhotCode *code[2];
     
    2424  /* load photcode information */
    2525  if (!InitPhotcodes ()) return (FALSE);
    26   Nsecfilt = GetPhotcodeNsecfilt ();
    2726
    2827  /* command line arguments */
     
    4140  /* one unique value per star */
    4241  N = 0;
    43   NSTAR = 1;
    4442  ALLOCATE (vec, Vector *, NVEC);
    4543  if ((vec[Nd]  = SelectVector ("cal:dmag",     ANYVECTOR, TRUE)) == NULL) goto escape;
     
    7472
    7573    # if (0)
     74    int NSTAR = 1;
     75    int Nsecfilt = GetPhotcodeNsecfilt ();
    7676    /* extract values, assign to vectors */
    7777    for (i = 0; i < catalog.Naverage; i++) {
  • trunk/Ohana/src/opihi/dvo/calmextract.c

    r27435 r34088  
    77 
    88  off_t i, k, Nr;
    9   int NSTAR, Nstar, Nsecfilt, N, mode[2];
     9  int NSTAR, N, mode[2];
    1010
    1111  Catalog catalog;
     
    2525  /* load photcode information */
    2626  if (!InitPhotcodes ()) goto escape;
    27   Nsecfilt = GetPhotcodeNsecfilt ();
    2827
    2928  /* command line arguments */
     
    6160
    6261  N = 0;
    63   Nstar = 0;
    6462  NSTAR = 100;
    6563  for (k = 0; k < NVEC; k++) {
     
    8785
    8886    # if (0)
     87    int Nstar = 0;
     88    int Nsecfilt = GetPhotcodeNsecfilt ();
     89
    8990    /* extract values, assign to vectors */
    9091    for (i = 0; i < catalog.Naverage; i++) {
  • trunk/Ohana/src/opihi/dvo/ccd.c

    r27435 r34088  
    88  int mode[4];
    99  int Nsecfilt, KeepNulls;
    10   void *Signal;
    1110
    1211  Catalog catalog;
     
    6362
    6463  // grab data from all selected sky regions
    65   Signal = signal (SIGINT, handle_interrupt);
     64  signal (SIGINT, handle_interrupt);
    6665  interrupt = FALSE;
    6766
  • trunk/Ohana/src/opihi/dvo/cmd.c

    r27435 r34088  
    88  int Npts, NPTS, mode[3];
    99  int Nsecfilt, KeepNulls;
    10   void *Signal;
    1110
    1211  PhotCode *code[3];
     
    6160
    6261  // grab data from all selected sky regions
    63   Signal = signal (SIGINT, handle_interrupt);
     62  // void *Signal = signal (SIGINT, handle_interrupt);
     63  signal (SIGINT, handle_interrupt);
    6464  interrupt = FALSE;
    6565
  • trunk/Ohana/src/opihi/dvo/cmpload.c

    r27435 r34088  
    66int cmpload (int argc, char **argv) {
    77 
    8   int i, Noverlay, NOVERLAY, Nstar, N, Nin, Nextra, Objtype, type;
     8  int i, Noverlay, NOVERLAY, Nstar, N, Nextra, Objtype, type;
    99  int doneread, done, Nskip, Nbytes, nbytes, Ninstar;
    1010  char *c, *c2, *name;
     
    6363 
    6464  /* load in stars by blocks of 1000 */
    65   Nin = 0;
    6665  ALLOCATE (buffer, char, (BLOCK*BYTES_STAR) + 1);
    6766  buffer[BLOCK*BYTES_STAR] = 0;
  • trunk/Ohana/src/opihi/dvo/fitsed.c

    r28241 r34088  
    2626  off_t i, j, k, m;
    2727  int N, done, Nfit;
    28   int Nsecfilt, status;
     28  int status;
    2929  void *oldsignal;
    3030  char name[64], line[1024], key[20];
     
    4141  KapaSection magSection, resSection;
    4242
    43   Catalog catalog, outcat;
     43  Catalog catalog;
    4444  SkyList *skylist;
    4545  SkyRegionSelection *selection;
     
    5757  catalog.secfilt = NULL;
    5858
    59   outcat.average = NULL;
    60   outcat.measure = NULL;
    61   outcat.secfilt = NULL;
     59  // outcat.average = NULL;
     60  // outcat.measure = NULL;
     61  // outcat.secfilt = NULL;
    6262
    6363  SEDtable = NULL;
     
    8080  /* load photcode information */
    8181  if (!InitPhotcodes ()) goto escape;
    82   Nsecfilt = GetPhotcodeNsecfilt ();
    8382
    8483  /* interpret command-line options */
  • trunk/Ohana/src/opihi/dvo/gcat.c

    r33662 r34088  
    88  SkyTable *sky;
    99  SkyList *skylist;
    10   void *Signal;
    1110
    1211  int ShowHost = FALSE;
     
    4342
    4443  // prepare to handle interrupt signals
    45   Signal = signal (SIGINT, handle_interrupt);
     44  signal (SIGINT, handle_interrupt);
    4645  interrupt = FALSE;
    4746
  • trunk/Ohana/src/opihi/dvo/hosts.c

    r33963 r34088  
    1515  if (!strncmp(argv[1], "purge-temp", MAX(strlen(argv[1]), 3))) {
    1616    glob_t pglob;
     17    int ALL_PID = FALSE;
    1718    int PID = getpid();
    1819    int N;
     
    2021      remove_argument (N, &argc, argv);
    2122      PID = atoi(argv[N]);
     23      remove_argument (N, &argc, argv);
     24    }
     25
     26    if ((N = get_argument (argc, argv, "-all-pid"))) {
     27      remove_argument (N, &argc, argv);
     28      ALL_PID = TRUE;
    2229      remove_argument (N, &argc, argv);
    2330    }
     
    6067      pglob.gl_offs = 0;
    6168      char name[DVO_MAX_PATH];
    62       snprintf (name, DVO_MAX_PATH, "%s/dvo.results.%05d.*.fits", table->hosts[i].pathname, PID);
     69      if (ALL_PID) {
     70        snprintf (name, DVO_MAX_PATH, "%s/dvo.results.*.*.fits", table->hosts[i].pathname);
     71      } else {
     72        snprintf (name, DVO_MAX_PATH, "%s/dvo.results.%05d.*.fits", table->hosts[i].pathname, PID);
     73      }
    6374      if (VERBOSE) gprint (GP_ERR, "checking %s\n", name);
    6475      glob (name, 0, NULL, &pglob);
  • trunk/Ohana/src/opihi/dvo/images.c

    r31635 r34088  
    1313  off_t i, Nimage, Nmosaic;
    1414  int j, status, InPic, leftside, *plist, TimeSelect, ByName;
    15   int WITH_MOSAIC, SOLO_MOSAIC, HIDDEN;
     15  int WITH_MOSAIC, SOLO_MOSAIC;
    1616  time_t tzero, tend;
    1717  int N, NPTS, n, npts, Npts, kapa, *foundMosaic;
     
    4242  }
    4343
    44   HIDDEN = FALSE;
    45   if ((N = get_argument (argc, argv, "-hidden"))) {
    46     remove_argument (N, &argc, argv);
    47     HIDDEN = TRUE;
    48   }
     44  // int HIDDEN = FALSE;
     45  // if ((N = get_argument (argc, argv, "-hidden"))) {
     46  //   remove_argument (N, &argc, argv);
     47  //   HIDDEN = TRUE;
     48  // }
    4949
    5050  photcode = NULL;
  • trunk/Ohana/src/opihi/dvo/imdata.c

    r31635 r34088  
    1515  Vector *vec;
    1616  SkyRegionSelection *selection;
    17   void *Signal;
    1817
    1918  // parse skyregion options
     
    130129
    131130  // prepare to handle interrupt signals
    132   Signal = signal (SIGINT, handle_interrupt);
     131  signal (SIGINT, handle_interrupt);
    133132  interrupt = FALSE;
    134133
  • trunk/Ohana/src/opihi/dvo/imextract.c

    r31635 r34088  
    55  off_t i, j, Nimage;
    66  int n, N, Npts, NPTS, last, next, state, Nfields, Nreturn, Ncstack, Nstack;
    7   int VERBOSE;
    87  char **cstack, name[1024];
    98  void *Signal;
     
    2726  if ((N = get_argument (argc, argv, "--help"))) goto help;
    2827
    29   VERBOSE = FALSE;
    30   if ((N = get_argument (argc, argv, "-v"))) {
    31     remove_argument (N, &argc, argv);
    32     VERBOSE = TRUE;
    33   }
     28  // int VERBOSE = FALSE;
     29  // if ((N = get_argument (argc, argv, "-v"))) {
     30  //   remove_argument (N, &argc, argv);
     31  //   VERBOSE = TRUE;
     32  // }
    3433
    3534  if (!InitPhotcodes ()) goto escape;
  • trunk/Ohana/src/opihi/dvo/imlist.c

    r31635 r34088  
    44 
    55  off_t i, j, Nimage, *subset, Nsubset;
    6   int N, TimeSelect, RegionSelect, TimeFormat, NameSelect;
     6  int N, TimeSelect, TimeFormat, NameSelect;
    77  int PhotcodeSelect;
    88  time_t tzero, TimeReference;
     
    3838  }
    3939
    40   RegionSelect = FALSE;
    41   if ((N = get_argument (argc, argv, "-region"))) {
    42     remove_argument (N, &argc, argv);
    43     RegionSelect = TRUE;
    44   }
     40  // int RegionSelect = FALSE;
     41  // if ((N = get_argument (argc, argv, "-region"))) {
     42  //   remove_argument (N, &argc, argv);
     43  //   RegionSelect = TRUE;
     44  // }
    4545
    4646  PhotcodeValue = NULL;
  • trunk/Ohana/src/opihi/dvo/imphot.c

    r31635 r34088  
    99  char bufname[64];
    1010  float *p;
    11   double fx, fy, x, y;
     11  double x, y;
    1212  Image *image;
    1313  Buffer *buf;
     
    5858
    5959  if (GreyScale && Nsubset) {
    60     fx = image[subset[0]].NX / 100;
    61     fy = image[subset[0]].NY / 200;
     60    // double fx = image[subset[0]].NX / 100;
     61    // double fy = image[subset[0]].NY / 200;
    6262    p = (float *) buf[0].matrix.buffer;
    6363    for (y = 0; y < 200; y+=1.0) {
  • trunk/Ohana/src/opihi/dvo/lcurve.c

    r27435 r34088  
    77  double *RA, *DEC;
    88  int kapa, TimeFormat;
    9   int found, AutoLimits, ErrorBars, GalMag, AbsPhot, SaveVectors;
     9  int found, AutoLimits, ErrorBars, SaveVectors;
    1010  off_t i, j, m, Nstars, *N1;
    1111  int N, NPTS;
     
    3939  }
    4040
    41   AbsPhot = FALSE;
    42   if ((N = get_argument (argc, argv, "-abs"))) {
    43     remove_argument (N, &argc, argv);
    44     AbsPhot = TRUE;
    45   }
     41  // int AbsPhot = FALSE;
     42  // if ((N = get_argument (argc, argv, "-abs"))) {
     43  //   remove_argument (N, &argc, argv);
     44  //   AbsPhot = TRUE;
     45  // }
    4646
    47   GalMag = FALSE;
    48   if ((N = get_argument (argc, argv, "-gal"))) {
    49     gprint (GP_ERR, "galaxy magnitudes currently disabled\n");
    50     return (FALSE);
    51   }
     47  // int GalMag = FALSE;
     48  // if ((N = get_argument (argc, argv, "-gal"))) {
     49  //   gprint (GP_ERR, "galaxy magnitudes currently disabled\n");
     50  //   return (FALSE);
     51  // }
    5252
    5353  ErrorBars = FALSE;
  • trunk/Ohana/src/opihi/dvo/objectcoverage.c

    r31450 r34088  
    55int objectcoverage (int argc, char **argv) {
    66
    7   void *Signal;
    87  int ShowDensity;
    9   int N, status, TimeSelect, xs, ys;
    10   time_t tzero, tend;
    11   double pixscale, r, d, Xs, Ys, trange, RaCenter, DecCenter;
     8  int N, status, xs, ys;
     9  double pixscale, r, d, Xs, Ys, RaCenter, DecCenter;
    1210  char projection[16];
    1311  float *V;
     
    7775  }
    7876
    79   TimeSelect = FALSE;
    80   if ((N = get_argument (argc, argv, "-time"))) {
    81     remove_argument (N, &argc, argv);
    82     if (!ohana_str_to_time (argv[N], &tzero)) {
    83       gprint (GP_ERR, "syntax error\n");
    84       return (FALSE);
    85     }
    86     remove_argument (N, &argc, argv);
    87     if (!ohana_str_to_dtime (argv[N], &trange)) {
    88       gprint (GP_ERR, "syntax error\n");
    89       return (FALSE);
    90     }
    91     remove_argument (N, &argc, argv);
    92     if (trange < 0) {
    93       trange = fabs (trange);
    94       tzero -= trange;
    95     }
    96     TimeSelect = TRUE;
    97   }
    98   if ((N = get_argument (argc, argv, "-trange"))) {
    99     remove_argument (N, &argc, argv);
    100     if (!ohana_str_to_time (argv[N], &tzero)) {
    101       gprint (GP_ERR, "syntax error\n");
    102       return (FALSE);
    103     }
    104     remove_argument (N, &argc, argv);
    105     if (!ohana_str_to_time (argv[N], &tend)) {
    106       gprint (GP_ERR, "syntax error\n");
    107       return (FALSE);
    108     }
    109     remove_argument (N, &argc, argv);
    110     trange = tend - tzero;
    111     if (trange < 0) {
    112       trange = fabs (trange);
    113       tzero -= trange;
    114     }
    115     TimeSelect = TRUE;
    116   }
     77  // double trange;
     78  // time_t tzero, tend;
     79  // int TimeSelect = FALSE;
     80  // if ((N = get_argument (argc, argv, "-time"))) {
     81  //   remove_argument (N, &argc, argv);
     82  //   if (!ohana_str_to_time (argv[N], &tzero)) {
     83  //     gprint (GP_ERR, "syntax error\n");
     84  //     return (FALSE);
     85  //   }
     86  //   remove_argument (N, &argc, argv);
     87  //   if (!ohana_str_to_dtime (argv[N], &trange)) {
     88  //     gprint (GP_ERR, "syntax error\n");
     89  //     return (FALSE);
     90  //   }
     91  //   remove_argument (N, &argc, argv);
     92  //   if (trange < 0) {
     93  //     trange = fabs (trange);
     94  //     tzero -= trange;
     95  //   }
     96  //   TimeSelect = TRUE;
     97  // }
     98  // if ((N = get_argument (argc, argv, "-trange"))) {
     99  //   remove_argument (N, &argc, argv);
     100  //   if (!ohana_str_to_time (argv[N], &tzero)) {
     101  //     gprint (GP_ERR, "syntax error\n");
     102  //     return (FALSE);
     103  //   }
     104  //   remove_argument (N, &argc, argv);
     105  //   if (!ohana_str_to_time (argv[N], &tend)) {
     106  //     gprint (GP_ERR, "syntax error\n");
     107  //     return (FALSE);
     108  //   }
     109  //   remove_argument (N, &argc, argv);
     110  //   trange = tend - tzero;
     111  //   if (trange < 0) {
     112  //     trange = fabs (trange);
     113  //     tzero -= trange;
     114  //   }
     115  //   TimeSelect = TRUE;
     116  // }
    117117 
    118118  if (argc != 3) {
     
    178178  Nsecfilt = GetPhotcodeNsecfilt();
    179179  // grab data from all selected sky regions
    180   Signal = signal (SIGINT, handle_interrupt);
     180  signal (SIGINT, handle_interrupt);
    181181  interrupt = FALSE;
    182182
  • trunk/Ohana/src/opihi/dvo/paverage.c

    r27435 r34088  
    44int paverage (int argc, char **argv) {
    55 
    6   FILE *f;
    76  off_t i, j;
    87  int kapa, Narg, Npts, NPTS, status, VERBOSE;
     
    1211  unsigned IDclip, IDchoice, LimExclude;
    1312  float *Xvec, *Yvec, *Zvec;
    14   void *Signal;
    1513
    1614  PhotCode *photcode;
     
    2725  if (!style_args (&graphmode, &argc, argv, &kapa)) return FALSE;
    2826
    29   f = (FILE *) NULL;
    3027  Mz = 17.0;
    3128  Mr = -5.0;
     
    10299
    103100  // prepare to handle interrupt signals
    104   Signal = signal (SIGINT, handle_interrupt);
     101  signal (SIGINT, handle_interrupt);
    105102  interrupt = FALSE;
    106103
  • trunk/Ohana/src/opihi/dvo/pmeasure.c

    r27435 r34088  
    66int pmeasure (int argc, char **argv) {
    77 
    8   FILE *f;
    98  off_t i, j, k, m;
    109  int kapa, Narg, Npts, NPTS, status, VERBOSE, TimeSelect, Nloaded;
     
    1716  float *Xvec, *Yvec, *Zvec;
    1817  time_t tzero, tend;
    19   void *Signal;
    2018
    2119  SkyTable *sky;
     
    2725  if (!style_args (&graphmode, &argc, argv, &kapa)) return FALSE;
    2826
    29   f = (FILE *) NULL;
    3027  Mz = 17.0;
    3128  Mr = -5.0;
     
    175172
    176173  // prepare to handle interrupt signals
    177   Signal = signal (SIGINT, handle_interrupt);
     174  signal (SIGINT, handle_interrupt);
    178175  interrupt = FALSE;
    179176
  • trunk/Ohana/src/opihi/dvo/simage.c

    r27435 r34088  
    1212  Header header;
    1313  Coords coords;
    14   int i, j, kapa, Nstars, nstars, Nbytes, nbytes, Npts, N;
     14  int i, j, kapa, Nstars, nstars, Nbytes, nbytes, N;
    1515  Graphdata graphmode;
    1616
     
    150150  graphmode.size = -1;
    151151  graphmode.etype = 0;
    152   Npts = Xvec.Nelements;
    153152
    154153  PlotVectorTriplet (kapa, &Xvec, &Yvec, &Zvec, &graphmode);
  • trunk/Ohana/src/opihi/dvo/skycat.c

    r30612 r34088  
    1414  SkyList *skylist;
    1515  SkyRegion **regions;
    16   void *Signal;
    1716
    1817  VERBOSE = FALSE;
     
    6261
    6362  // prepare to handle interrupt signals
    64   Signal = signal (SIGINT, handle_interrupt);
     63  signal (SIGINT, handle_interrupt);
    6564  interrupt = FALSE;
    6665
  • trunk/Ohana/src/opihi/lib.data/starfuncs.c

    r29938 r34088  
    125125                    opihi_flt *zs, opihi_flt *zp, opihi_flt *sk) {
    126126
    127   double Ra2, Ri2, Ro2, rad2;
     127  double Ro2, rad2;
    128128  int i, j, Npts, Nsky;
    129129  int Xs, Xe, Ys, Ye, off, Xc, Yc;
     
    132132 
    133133  /* define circular boundaries */
    134   Ra2 = SQ(Raper);
    135   Ri2 = SQ(Rinner);
    136134  Ro2 = SQ(Router);
    137135
     
    145143/* this sample uses a circular aperture */
    146144# if (0)
     145  double Ri2 = SQ(Rinner);
    147146  Nsky = 0; 
    148147  for (j = Ys; j < Ye; j++) {
  • trunk/Ohana/src/opihi/lib.data/svdcmp.c

    r20936 r34088  
    1414int svdcmp (float *a, opihi_flt *w, float *v, int Nx, int Ny) {
    1515
    16   int flag, i, its, j, jj, k, l, nm, status;
     16  int flag, i, its, j, jj, k, l, nm;
    1717  float c, f, h, s, x, y, z;
    1818  float anorm=0.0, g = 0.0, scale = 0.0;
     
    111111  }
    112112
    113   status = 1;
     113  // int status = 1;
    114114  for (k = Nx - 1; k >= 0; k--) {
    115115    for (its = 0; its < 30; its++) {
     
    152152        break;
    153153      }
    154       if (its == 29) status = 0;
     154      // if (its == 29) status = 0;
    155155      x = w[l];
    156156      nm = k-1;
  • trunk/Ohana/src/opihi/lib.shell/convert_to_RPN.c

    r16890 r34088  
    44StackVar *convert_to_RPN (int argc, char **argv, int *nstack) {
    55 
    6   int type, Nx, Ny;
     6  int type;
    77  int i, j, Nstack, Nop_stack, NSTACK;
    88  StackVar *stack, *op_stack;
     
    1717  }
    1818 
    19   Nx = Ny = Nstack = Nop_stack = 0;
     19  Nstack = Nop_stack = 0;
    2020  for (i = 0; i < argc; i++) {
    2121   
  • trunk/Ohana/src/opihi/lib.shell/evaluate_stack.c

    r20936 r34088  
    1212int evaluate_stack (StackVar *stack, int *Nstack) {
    1313 
    14   int i, j, Nvar, Nout, status;
     14  int i, j, status;
    1515  char line[512]; // this is only used to report an error
    1616  StackVar tmp_stack;
    17   Nout = Nvar = 0;
    1817
    1918  status = TRUE;
  • trunk/Ohana/src/opihi/lib.shell/opihi.c

    r31667 r34088  
    44int opihi (int argc, char **argv) {
    55
    6   int Nbad, status;
     6  int Nbad;
    77  char *line, *prompt, *history;
    88  pid_t ppid;
     
    3939    stripwhite (line);
    4040    if (*line) {
    41       status = multicommand (line);
     41      multicommand (line);
    4242      add_history (line);
    4343
  • trunk/Ohana/src/opihi/pantasks/ControllerOps.c

    r32632 r34088  
    6363int CheckControllerJob (Job *job) {
    6464  struct timeval start, stop;
    65   float dtime;
    6665
    6766  gettimeofday (&start, (void *) NULL);
    6867  CheckControllerJobStatus (job);
    6968  gettimeofday (&stop, (void *) NULL);
    70   dtime = DTIME (stop, start);
    71   /* if (VerboseMode()) gprint (GP_ERR, "check job status %f\n", dtime); */
     69  // float dtime = DTIME (stop, start);
     70  // if (VerboseMode()) gprint (GP_ERR, "check job status %f\n", dtime);
    7271
    7372  if ((job[0].state == JOB_EXIT) || (job[0].state == JOB_CRASH)) {
     
    7574    GetJobOutput ("stdout", job[0].pid, &job[0].stdout_buff, job[0].stdout_size);
    7675    gettimeofday (&stop, (void *) NULL);
    77     dtime = DTIME (stop, start);
     76    // float dtime = DTIME (stop, start);
    7877    /* if (VerboseMode()) gprint (GP_ERR, "get stdout %f\n", dtime); */
    7978
     
    8180    GetJobOutput ("stderr", job[0].pid, &job[0].stderr_buff, job[0].stderr_size);
    8281    gettimeofday (&stop, (void *) NULL);
    83     dtime = DTIME (stop, start);
     82    // float dtime = DTIME (stop, start);
    8483    /* if (VerboseMode()) gprint (GP_ERR, "get stderr %f\n", dtime); */
    8584
     
    8786    DeleteControllerJob (job);
    8887    gettimeofday (&stop, (void *) NULL);
    89     dtime = DTIME (stop, start);
     88    // float dtime = DTIME (stop, start);
    9089    /* if (VerboseMode()) gprint (GP_ERR, "delete job %f\n", dtime); */
    9190  } 
     
    578577int QuitController () {
    579578
    580   int status;
    581579  char cmd[128];
    582580  IOBuffer buffer;
     
    586584  sprintf (cmd, "quit");
    587585  InitIOBuffer (&buffer, 0x100);
    588   status = ControllerCommand (cmd, NULL, &buffer);
     586  ControllerCommand (cmd, NULL, &buffer);
    589587  FreeIOBuffer (&buffer);
    590588
  • trunk/Ohana/src/opihi/pantasks/client_shell.c

    r31666 r34088  
    44int client_shell (int argc, char **argv) {
    55
    6   int Nbad, status;
     6  int Nbad;
    77  char *line, *prompt, *history;
    88  pid_t ppid;
     
    4141
    4242    if (*line) {
    43         status = multicommand (line);
     43      // status = multicommand (line); do something different if false?
     44        multicommand (line);
    4445        add_history (line);
    4546        append_history (1, history);
  • trunk/Ohana/src/opihi/pantasks/task.c

    r32632 r34088  
    55
    66  int hash;
    7   int ThisList, status;
     7  int ThisList;
    88  char *input, *outline;
    99  Task *task;
     
    8282      case TASK_NPENDING:
    8383      case TASK_ACTIVE:
    84         status = command (input, &outline, TRUE);
     84        // status = command(); do something with this info?
     85        command (input, &outline, TRUE);
    8586        if (outline != NULL) free (outline);
    86         /* what to do if command is invalid?
    87            if (!status) return (FALSE); */
    8887        break;
    8988
  • trunk/Ohana/src/opihi/pcontrol/CheckHost.c

    r25872 r34088  
    4040int CheckHostResponse (Host *host) {
    4141 
    42   IOBuffer *buffer;
    43 
    4442  /* we only check IDLE hosts without jobs */
    4543  ASSERT (host, "missing host");
    46   buffer = &host[0].comms_buffer;
    4744
    4845  // XXX check on the value of the response? (OK)
  • trunk/Ohana/src/opihi/pcontrol/CheckSystem.c

    r28158 r34088  
    6262void *CheckSystem_Threaded (void *data) {
    6363
    64   int Njobchecks, Nhostchecks, Nlivechecks, Ndonejobs;
    65 
    66   Nlivechecks = 0;
     64  int Njobchecks, Nhostchecks, Ndonejobs;
    6765
    6866  gprintInit ();
  • trunk/Ohana/src/opihi/pcontrol/Makefile

    r33662 r34088  
    1313LIBS1         = -lkapa -lFITS -lohana
    1414LIBS2         = -lbasiccmd -lshell -ldata
    15 FULL_CFLAGS   = $(BASE_CFLAGS) -Wall -Werror
     15FULL_CFLAGS   = $(BASE_CFLAGS)
    1616FULL_CPPFLAGS = $(BASE_CPPFLAGS)
    1717FULL_LDFLAGS  = $(LIBS1) $(LIBS2) $(BASE_LDFLAGS)
  • trunk/Ohana/src/photdbc/src/CopyBackupToHost.c

    r33655 r34088  
    2222  // get the IDs for the src and dst machines
    2323  int srcID = 0;
    24   int srcIndex = 0;
    2524  int dstID = 0;
    2625  int dstIndex = 0;
    2726  for (i = 0; i < table->Nhosts; i++) {
    28     if (!strcmp (table->hosts[i].hostname, srcHostname)) { srcID = table->hosts[i].hostID; srcIndex = i; }
     27    if (!strcmp (table->hosts[i].hostname, srcHostname)) { srcID = table->hosts[i].hostID; }
    2928    if (!strcmp (table->hosts[i].hostname, dstHostname)) { dstID = table->hosts[i].hostID; dstIndex = i; }
    3029  }
  • trunk/Ohana/src/photdbc/src/PclientCommands.c

    r33655 r34088  
    126126int CheckBusyJob (HostInfo *host, IOBuffer *stdout_buf, IOBuffer *stderr_buf) {
    127127
    128   int status;
    129128  char *p;
    130129  char string[64];
     
    132131
    133132  InitIOBuffer (&buffer, 100);
    134   status = PclientCommand (host, "status", &buffer);
    135   status = PclientResponse (host, PCLIENT_PROMPT, &buffer);
     133  PclientCommand (host, "status", &buffer);
     134  PclientResponse (host, PCLIENT_PROMPT, &buffer);
    136135
    137136  /** need to parse message **/
  • trunk/Ohana/src/relastro/src/CoordOps.c

    r32346 r34088  
    1111
    1212  off_t N;
    13   Image *images;
    1413
    15   images = getimages (&N, NULL);
     14  // Images *images = getimages (&N, NULL); return value ignored
     15  getimages (&N, NULL);
    1616
    1717  NoldCoords = N;
  • trunk/Ohana/src/relastro/src/ImageOps.c

    r33652 r34088  
    426426    XY_to_LM (&Rx, &Dx, dLsig, 0.0, coords);
    427427    dP0 = 3600.0 * hypot(Rx - Ro, Dx - Do); // convert to arcsec
    428     XY_to_LM (&Rx, &Dx, 0.0, dLsig, coords);
     428    XY_to_LM (&Rx, &Dx, 0.0, dMsig, coords);
    429429    dP1 = 3600.0 * hypot(Rx - Ro, Dx - Do); // convert to arcsec
    430430    dPosSys = 0.5 * (dP0 + dP1);
  • trunk/Ohana/src/relastro/src/StarMaps.c

    r33652 r34088  
    5757int updateStarMaps(Catalog *catalog) {
    5858
    59   Image *images;
    6059  off_t i, N, Nimages;
    6160  int xbin, ybin;
     
    6463  gettimeofday (&start, (void *) NULL);
    6564
    66   images = getimages(&Nimages, NULL);
     65  // Images *images = getimages(&Nimages, NULL); return value ignored
     66  getimages(&Nimages, NULL);
    6767
    6868  for (i = 0; i < catalog[0].Nmeasure; i++) {
  • trunk/Ohana/src/relastro/src/relastro_merge_source.c

    r33652 r34088  
    1818  dvo_catalog_init (&catalog_dst, TRUE);
    1919  SkyRegion *region_src = NULL;
    20   SkyRegion *region_dst = NULL;
     20  // SkyRegion *region_dst = NULL;
    2121
    2222  // load data from each region file, only use bright stars
     
    2626      region_src = &sky[0].regions[i];
    2727    }
     28    // currently, we only accept dst == src...
    2829    if (sky[0].regions[i].index == CAT_ID_DST) {
    2930      catalog_dst.filename = sky[0].filename[i];
    30       region_dst = &sky[0].regions[i];
     31      // region_dst = &sky[0].regions[i];
    3132    }
    3233  }   
     
    9192
    9293    // repoint the src measures at this object
    93     Measure *measures_src;
    94     ALLOCATE (measures_src, Measure, catalog_src.average[index_src].Nmeasure);
    9594    m = catalog_src.average[index_src].measureOffset;
    9695    for (i = 0; i < catalog_src.average[index_src].Nmeasure; i++, m++) {
  • trunk/Ohana/src/relastro/src/resort_catalog.c

    r33652 r34088  
    112112  int NmeasureTotal = 0;
    113113  int measureOffsetOK = TRUE;
    114   for (i = 0; i < catalog[0].Naverage; i++) {
     114  for (i = 0; i < Naverage; i++) {
    115115    NmeasureTotal += catalog[0].average[i].Nmeasure;
    116116    if (VERBOSE && !(NmeasureTotal <= catalog[0].Nmeasure)) {
  • trunk/Ohana/src/relastro/src/select_images.c

    r33652 r34088  
    292292
    293293  double theta1, theta2;
    294   double Theta1, Theta2;
    295294
    296295  theta1 = opening_angle (x1[0], y1[0], x2[0], y2[0], x1[1], y1[1]);
     
    305304  }
    306305
    307   Theta1 = theta1;
    308   Theta2 = theta2;
    309306  theta1 = opening_angle (x2[0], y2[0], x1[1], y1[1], x2[1], y2[1]);
    310307  theta2 = opening_angle (x2[0], y2[0], x1[1], y1[1], x1[0], y1[0]);
  • trunk/Ohana/src/relastro/src/testparallax.c

    r33652 r34088  
    1010  double R[NPTS], D[NPTS], Time[NPTS], JD[NPTS];
    1111  double X[NPTS], Y[NPTS], dX[NPTS], dY[NPTS], pX[NPTS], pY[NPTS];
    12   double Tref[NPTS], Tjyrs[NPTS], TrefS, TjyrsS, TrefMean, TjyrsMean, Ro, Do;
     12  double Tref[NPTS], Tjyrs[NPTS], TrefS, TjyrsS, TrefMean, Ro, Do;
    1313  Coords coords;
    1414  PMFit fitPAR;
     
    8282  }
    8383  TrefMean = TrefS / Npts;
    84   TjyrsMean = TjyrsS / Npts;
     84  // double TjyrsMean = TjyrsS / Npts;
    8585
    8686  for (i = 0; i < Npts; i++) {
  • trunk/Ohana/src/relphot/src/GridOps.c

    r33963 r34088  
    423423        Merr =  MAX (catalog[c].measureT[m].dM, MIN_ERROR);
    424424
    425         // Wsys = 1.0 / SQ(Merr);
    426         Wsys = 1.0;
     425        // disable Wsys for now
     426        Wsys = TRUE ? 1.0 : 1.0 / SQ(Merr);
    427427
    428428        Ng = gridmeas[c][m];
     
    684684  off_t i, Nimage;
    685685  int j, Nbytes, Nformat;
    686   off_t *imlist;
    687686  FILE *f;
    688687  Header header, theader;
     
    697696
    698697  /* select reference mosaic image */
    699   imlist = SelectRefMosaic (&refmosaic, &Nimage);
     698  // off_t *imlist = SelectRefMosaic (&refmosaic, &Nimage); return value ignored
     699  SelectRefMosaic (&refmosaic, &Nimage);
    700700
    701701  /* we are writing to this file */
  • trunk/Ohana/src/relphot/src/MosaicOps.c

    r33963 r34088  
    762762int setMmos_mosaic (Mosaic *myMosaic, off_t Nmos, Image *image, Catalog *catalog, SetMmosInfo *info, FlatCorrectionTable *flatcorr) {
    763763
    764   Image *imageReal;
    765764  off_t j, NimageReal;
    766765
     
    776775  assert (Nmos < Nmosaic);
    777776
    778   imageReal = getimages (&NimageReal, NULL);
     777  // Image *imageReal = getimages (&NimageReal, NULL); returned pointer is not used
     778  getimages (&NimageReal, NULL);
    779779
    780780  /* on PoorImages run, skip good images */
     
    15001500  off_t i, j, m, c, N, ave, Nimage;
    15011501  double *xlist, *ylist;
    1502   double Xmin, Xmax, Ymin, Ymax;
     1502  // double Xmin, Xmax, Ymin, Ymax;
    15031503  char string[64];
    1504   Image *image;
    15051504  Graphdata graphdata;
    15061505
    15071506  if (!MOSAIC_ZEROPT) return;
    15081507
    1509   image = getimages (&Nimage, NULL);
     1508  // Image *image = getimages (&Nimage, NULL); returned value ignored
     1509  getimages (&Nimage, NULL);
    15101510
    15111511  N = 0;
    1512   for (i = 0; i < Nmosaic; i++)
     1512  for (i = 0; i < Nmosaic; i++) {
    15131513    N = MAX (N, N_onMosaic[i]);
     1514  }
    15141515
    15151516  ALLOCATE (xlist, double, N);
     
    15181519  for (i = 0; i < Nmosaic; i++) {
    15191520    N = 0;
    1520     Xmin = Ymin = +360.0;
    1521     Xmax = Ymax = -360.0;
     1521    // Xmin = Ymin = +360.0;
     1522    // Xmax = Ymax = -360.0;
    15221523    for (j = 0; j < N_onMosaic[i]; j++) {
    15231524     
  • trunk/Ohana/src/relphot/src/StarOps.c

    r33963 r34088  
    354354      int Next = 0;
    355355      int haveSynth = FALSE;
     356      int haveStack = FALSE;
    356357
    357358      int forceSynth = FALSE;
     
    413414            }
    414415          }
     416          // gpc1 stack data
     417          if ((catalog[Nc].measure[m].photcode >= 11000) && (catalog[Nc].measure[m].photcode <= 11400)) {
     418            if (pass < 2) continue;
     419            haveStack = TRUE;
     420          }
     421
    415422          // count extended detections for 2MASS (XXX NOTE hardwired photcodes 2011, 2012, 2013)
    416423          if ((catalog[Nc].measure[m].photcode >= 2011) && (catalog[Nc].measure[m].photcode <= 2013)) {
     
    477484        // up-weight the ubercal values (or convergence can take a long time...)
    478485        if (catalog[Nc].measureT[m].dbFlags & ID_MEAS_PHOTOM_UBERCAL) {
     486          haveUbercal = TRUE;
    479487          wlist[N] = 10.0;
    480488        }
     
    492500
    493501      int Nminmeas = isSetMrelFinal ? 1 : STAR_TOOFEW + 1;
     502
     503      if (haveStack && (N > 1)) {
     504        // fprintf (stderr, "multiple stack values for %10.6f %10.6f\n", catalog[Nc].averageT[j].R, catalog[Nc].averageT[j].D);
     505      }
    494506
    495507      // when performing the grid analysis, STAR_TOOFEW should be set to 1;
     
    11061118  off_t j, N;
    11071119  double *xlist, *ylist;
    1108   double Xmin, Ymin, Xmax, Ymax;
     1120  // double Xmin, Ymin, Xmax, Ymax;
    11091121  Graphdata graphdata;
    11101122
     
    11171129
    11181130  N = 0;
    1119   Xmin = Ymin = +360.0;
    1120   Xmax = Ymax = -360.0;
     1131  // Xmin = Ymin = +360.0;
     1132  // Xmax = Ymax = -360.0;
    11211133  for (i = 0; i < Ncatalog; i++) {
    11221134    for (j = 0; j < catalog[i].Naverage; j++) {
  • trunk/Ohana/src/relphot/src/reload_catalogs.c

    r33963 r34088  
    9494      catalog.catformat = dvo_catalog_catformat (UPDATE_CATFORMAT);
    9595    }
     96
     97    struct timeval now;
     98    gettimeofday (&now, (void *) NULL);
     99    char *moddate = ohana_sec_to_date (now.tv_sec);
     100    gfits_modify (&catalog.header, "RELPHOT", "%s", 1, moddate);     
     101    free (moddate);
     102
    96103    dvo_catalog_save (&catalog, VERBOSE);
    97104    dvo_catalog_unlock (&catalog);
  • trunk/Ohana/src/relphot/src/select_images.c

    r33963 r34088  
    256256    }
    257257    if (RESET) {
    258       if (!KEEP_UBERCAL) {
     258      if (!KEEP_UBERCAL || !(image[nimage].flags & ID_IMAGE_PHOTOM_UBERCAL)) {
    259259        image[nimage].Mcal = 0.0;
    260260        image[nimage].dMcal = NAN;
     
    296296
    297297  double theta1, theta2;
    298   double Theta1, Theta2;
    299298
    300299  theta1 = opening_angle (x1[0], y1[0], x2[0], y2[0], x1[1], y1[1]);
     
    309308  }
    310309
    311   Theta1 = theta1;
    312   Theta2 = theta2;
    313310  theta1 = opening_angle (x2[0], y2[0], x1[1], y1[1], x2[1], y2[1]);
    314311  theta2 = opening_angle (x2[0], y2[0], x1[1], y1[1], x1[0], y1[0]);
  • trunk/Ohana/src/relphot/src/setMrelFinal.c

    r33963 r34088  
    166166
    167167  /* allow measures from images marked POOR and FEW */
    168   if (pass >= 2) IMAGE_BAD = ID_IMAGE_PHOTOM_NOCAL;
     168  if (pass >= 3) IMAGE_BAD = ID_IMAGE_PHOTOM_NOCAL;
    169169 
    170170  /* allow measures marked as outliers (POOR) and off image region (AREA) */
    171   if (pass >= 2) {
     171  if (pass >= 3) {
    172172    MEAS_BAD = ID_MEAS_NOCAL | ID_MEAS_SKIP_PHOTOM;
    173173  } else {
     
    233233        }
    234234
    235         // PASS 3 : accept bad measurements (eg, SAT, CR)
     235        // PASS 3 : accept bad measurements (eg, SAT, CR), internal outliers
    236236        if (pass < 3) {
    237237          if (catalog[0].measure[m].photFlags & code->photomBadMask) goto skip;
     
    241241        }
    242242       
    243         // PASS 2 : internal outliers accepted
     243        // PASS 2 : accept stack measurements
    244244
    245245        // PASS 1 : accept poor measurements as well (eg, POOR FIT, etc)
  • trunk/Ohana/src/skycalc/src/time.c

    r20936 r34088  
    6565  long ja, jdint, jalpha, jb, jc, jd, je;
    6666  float jdfrac;
    67   double x;
    6867
    6968  jdin = jdin + 0.5;  /* adjust for 1/2 day */
    7069  jdint = jdin;
    71   x = jdint/7.+0.01;
     70
     71  // double x = jdint/7.+0.01; XXX why was this here?
    7272  jdfrac = jdin - jdint;
    7373  date->h = jdfrac * 24; /* truncate */
  • trunk/Ohana/src/tools/src/fhead.c

    r31160 r34088  
    55int main (int argc, char **argv) {
    66
    7   int N, Extnum, Nextend, status;
     7  int N, Extnum, Nextend;
    88  int i, j;
    99  off_t nbytes;
     
    4545      fprintf (stdout, "------> %s <------\n", argv[i]);
    4646   
    47     status = FALSE;
    4847    if (!Extnum && !Extname) {
    4948      if (!gfits_read_header (argv[i], &head)) {
  • trunk/Ohana/src/tools/src/mktemp.c

    r27591 r34088  
    1616  int i, j, Ntotal;
    1717  char *tmpdir, *template, deftemplate[32], *prefix, defprefix[32], *filename;
    18   int make_directory, fail_silently, unsafe_mode, full_path;
     18  int make_directory, fail_silently, full_path;
    1919
    2020  tmpdir = NULL;
     
    2525  make_directory = FALSE;
    2626  fail_silently = FALSE;
    27   unsafe_mode = FALSE;
     27  // int unsafe_mode = FALSE; -u not implemented
    2828  full_path = TRUE;
    2929
     
    5656          continue;
    5757        }
    58         if (argv[i][j] == 'u') {
    59           unsafe_mode = TRUE;
    60           continue;
    61         }
     58        // -u == --dry-run, not implemented
     59        // if (argv[i][j] == 'u') {
     60        //   unsafe_mode = TRUE;
     61        //   continue;
     62        // }
     63
    6264        // unknown option
    6365        usage();
  • trunk/Ohana/src/uniphot/src/update_dvo_uniphot.c

    r33654 r34088  
    66
    77  off_t i, Nimage, Nkeep, *keep;
    8   int j, status, Nmin;
     8  int j, Nmin;
    99  char line[256];
    1010  glob_t pglob;
     
    5555  pglob.gl_offs = 0;
    5656  sprintf (line, "%s/*/*.cpt", CATDIR);
    57   status = glob (line, 0, NULL, &pglob);
     57  glob (line, 0, NULL, &pglob);
    5858
    5959  coords.crpix1 = coords.crpix2 = 0.0;
Note: See TracChangeset for help on using the changeset viewer.