IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 21153


Ignore:
Timestamp:
Jan 22, 2009, 10:43:26 AM (17 years ago)
Author:
eugene
Message:

lots of very minor API mods to satisfy some pickier compilers (supply void to prototypes for argument-less functions)

Location:
trunk/Ohana/src
Files:
81 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/addstar/include/addstar.h

    r20936 r21153  
    141141void       FindCalibration        PROTO((Image *image));
    142142FILE      *GetDB                  PROTO((int *state));
    143 void       InitCalibration        PROTO(());
     143void       InitCalibration        PROTO((int mode));
    144144void       SaveCalibration        PROTO((float Mo, float dMo, float Mr, float dMr, float Mi, int N));
    145145void       SetProtect             PROTO((int mode));
    146 int        SetSignals             PROTO(());
     146int        SetSignals             PROTO((void));
    147147int        Shutdown               PROTO((char *message, ...); )
    148148void       TrapSignal             PROTO((int sig));
     
    177177int        in_image               PROTO((double r, double d, Image *image));
    178178int        load_pt_catalog        PROTO((Catalog *catalog, SkyRegion *region));  /*** choose new name ***/
    179 void       load_subpix            PROTO(());
     179void       load_subpix            PROTO((void));
    180180void       lock_image_db          PROTO((FITS_DB *db, char *filename));
    181181int        main                   PROTO((int argc, char **argv));
     
    238238SkyList   *SkyListExistingSubset  PROTO((SkyList *input, char *path));
    239239int        SkyListSetPath         PROTO((SkyList *list, char *path));
    240 SkyTable  *SkyTableLoadOptimal    PROTO(());
    241 int        InitDataset            PROTO(());
     240int        InitDataset            PROTO((void));
    242241int        PushDataset            PROTO((DVO_DATA *data));
    243242DVO_DATA  *PopDataset             PROTO((void));
  • trunk/Ohana/src/addstar/include/sedstar.h

    r8361 r21153  
    4141int SEDfitInit (SEDtable *table);
    4242int SEDfitPlot (SEDtable *table, double R, double D, SEDfit *minFit, SEDtableRow *sourceValue, SEDtableRow *sourceError);
    43 int SEDfitClear ();
     43int SEDfitClear (void);
    4444int SEDfitCatalog (Catalog *outcat, Catalog *incat, SEDtable *table);
    4545void SetLimitsRaw (float *xvec, float *yvec, int Nelements, Graphdata *graphmode);
  • trunk/Ohana/src/addstar/include/skycells.h

    r21048 r21153  
    7676
    7777void         SetProtect                     PROTO((int mode));
    78 int          SetSignals                     PROTO(());
     78int          SetSignals                     PROTO((void));
    7979int          Shutdown                       PROTO((char *message, ...); )
    8080void         TrapSignal                     PROTO((int sig));
  • trunk/Ohana/src/addstar/src/addstarc.c

    r16983 r21153  
    3232      Send_Image (BindSocket, images, Nimages, FALSE);
    3333      if (options.mosaic) {
    34         GetRegisteredMosaic (&MOSAIC);
     34        // XXX : this is broken due to an API mod for GetRegisteredMosaic
     35        // GetRegisteredMosaic (&MOSAIC);
     36        abort();
    3537        Send_Coords (BindSocket, &MOSAIC, 1, FALSE);
    3638      }
  • trunk/Ohana/src/delstar/include/delstar.h

    r7393 r21153  
    4343int        SetImages              PROTO((Image *new, int Nnew));
    4444void       SetProtect             PROTO((int mode));
    45 int        SetSignals             PROTO(());
     45int        SetSignals             PROTO((void));
    4646int        Shutdown               PROTO((char *format, ...));
    4747void       TrapSignal             PROTO((int sig));
     
    5959Image     *gimages                PROTO((char *filename));
    6060Image     *gtimes                 PROTO((int *NIMAGE));
    61 void       help                   PROTO(());
     61void       help                   PROTO((void));
    6262int        load_image_db          PROTO((FITS_DB *db));
    6363void       lock_image_db          PROTO((FITS_DB *db, char *filename));
     
    6565double     opening_angle          PROTO((double x1, double y1, double x2, double y2, double x3, double y3));
    6666int        parse_time             PROTO((Header *header));
    67 int        save_image_db          PROTO(());
     67int        save_image_db          PROTO((void));
    6868void       sort_lists             PROTO((float *X, float *Y, int *S, int N));
    6969void       unlock_image_db        PROTO((FITS_DB *db));
    70 void       usage                  PROTO(());
     70void       usage                  PROTO((void));
    7171int        wcatalog               PROTO((Catalog *catalog));
    7272
  • trunk/Ohana/src/dvosplit/include/dvosplit.h

    r16061 r21153  
    3232
    3333int        ConfigInit             PROTO((int *argc, char **argv));
    34 int        SetSignals             PROTO(());
     34int        SetSignals             PROTO((void));
    3535void       SetProtect             PROTO((int mode));
    3636void       TrapSignal             PROTO((int sig));
  • trunk/Ohana/src/elixir/include/elixir.h

    r10338 r21153  
    103103char     *GetPhotcodeExt (char *file);
    104104char     *GetPhotcodeMef (char *file);
    105 Machine  *GrabMachine ();
    106 Cluster  *InitCluster ();
    107 Process  *InitProcess (char *name, Queue *pending, Queue *failure, int (*mkargs)());
    108 Queue    *InitQueue ();
     105Machine  *GrabMachine (void);
     106Cluster  *InitCluster (void);
     107Process  *InitProcess (char *name, Queue *pending, Queue *failure, int (*mkargs)(void));
     108Queue    *InitQueue (void);
    109109FILE     *LogOpen (char *filename);
    110110char     *PathFilename (char *file);
     
    114114int       CheckEndingState (Process *global, int Nobjects, int Dynamic);
    115115int       CheckMachineStatus (Machine *machine);
    116 int       CheckMessages ();
     116int       CheckMessages (void);
    117117int       CheckProcess (Process *process);
    118118void      CloseMachine (Machine *machine);
     
    124124int       DumpProcessTimes (char *filename);
    125125int       DumpStatus (char *filename);
    126 void      ElixirStop ();
     126void      ElixirStop (void);
    127127int       FlushFifo (Fifo *fifo);
    128128void      FreeArgs (int argc, char **argv, int *argd);
    129129void      FreeFifo (Fifo *fifo);
    130 int       GetDynamicState ();
    131 double    GetTimeout ();
     130int       GetDynamicState (void);
     131double    GetTimeout (void);
    132132void      HaltElixir (char *pidfile);
    133133int       HalttoRestart (char *pidfile);
     
    149149int       ReadtoFifo (Fifo *fifo, int sock);
    150150void      RegisterTimeout (double value);
    151 void      RemovePID ();
     151void      RemovePID (void);
    152152void      Restart (char **argv);
    153 void      RestartMachines ();
     153void      RestartMachines (void);
    154154void      SIG_DIE (int sig);
    155155void      SIG_MESSAGE (int sig);
     
    157157void      SIG_RELOAD (int sig);
    158158void      SIG_STOP (int sig);
    159 int       SetExitTimer ();
     159int       SetExitTimer (void);
    160160void      SetMessageFile (char *filename);
    161161int       ShiftFifo (Fifo *fifo);
  • trunk/Ohana/src/gastro/include/gastro.h

    r14590 r21153  
    8787void      PlotVector          PROTO((int Npts, float *vect, int mode, int N));
    8888void      PrepPlotting        PROTO((int Npts, Graphdata *graphmode, int N));
    89 void      XDead               PROTO(());
     89void      XDead               PROTO((int value));
    9090void      alter_header        PROTO((char *, char **, int, double, double, double, double, double, double, double, double, int));
    9191void      area_of_region      PROTO((CatStats *region));
  • trunk/Ohana/src/gastro/src/plotstuff.c

    r14590 r21153  
    55static int active;
    66
    7 void XDead () {
     7void XDead (int value) {
    88  signal (SIGPIPE, XDead);
    99  fprintf (stderr, "kapa is dead, must restart\n");
  • trunk/Ohana/src/gastro2/include/gastro2.h

    r14590 r21153  
    133133void      PlotVector (int Npts, float *vect, int mode, int N);
    134134void      PrepPlotting (int Npts, Graphdata *graphmode, int N);
    135 void      XDead ();
     135void      XDead (int value);
    136136void      add_to_regions (CatStats *area);
    137 void      ahelp ();
     137void      ahelp (void);
    138138void      area_of_region (CatStats *region);
    139139double    area_of_skyregion (SkyRegion *region);
     
    147147int       fit_adjust (Coords *coords);
    148148void      fit_apply (double *x, double *y, double X, double Y);
    149 void      fit_eval ();
     149void      fit_eval (void);
    150150void      fit_init (int order);
    151151void      fit_lum_bin (double *x, double *y, int N, double *C0, double *C1);
    152 void      fit_norm ();
     152void      fit_norm (void);
    153153double    fit_scat (StarData *st, StarData *sr, Coords *coords);
    154154int       gaussj (double **a, int n, double **b, int m);
     
    166166void      grid (CmpCatalog *Target, RefCatalog *Subset, Answer *answer);
    167167int       gridbin (double dX, double dY);
    168 void      gridfree ();
     168void      gridfree (void);
    169169void      gridinit (double XMIN, double XMAX, double YMIN, double YMAX, int Nr, int Nt);
    170170void      gstars (char *filename, CmpCatalog *Target);
    171171void      hh_hms (double hh, int *hr, int *mn, double *sc);
    172172void      hms_format (char *line, double value);
    173 void      init_regions ();
     173void      init_regions (void);
    174174int       load_ra_blocks (int Ndec, CatStats *area);
    175175int       mk_polyterm (int n, int m, int norder);
     
    178178
    179179void      pair_add (int i1, int i2);
    180 void      pair_init ();
     180void      pair_init (void);
    181181int       pair_lists (int **index1, int **index2);
    182182
    183183int       parse_GSC_line (CatStats *tregion, char *line);
    184184int       plot_addpt_gridplot (double x, double y);
    185 void      plot_done_gridplot ();
     185void      plot_done_gridplot (void);
    186186void      plot_fullfield (CmpCatalog *Target, RefCatalog *Ref);
    187187void      plot_fullfield_pairs (float *x, float *y, int n);
    188188void      plot_gridpts (double *pts, int Npts);
    189 void      plot_init_gridplot ();
     189void      plot_init_gridplot (void);
    190190void      plot_lumfunc (CmpCatalog *Target, RefCatalog *Ref);
    191191void      plot_resid (StarData *st, StarData *sr, Coords *coords);
  • trunk/Ohana/src/gastro2/src/grid.c

    r20286 r21153  
    9696
    9797    if (PLOTSTUFF) plot_gridpts (N, Nbin);
    98     if (PLOTSTUFF) plot_done_gridplot (dX, dY);
     98    if (PLOTSTUFF) plot_done_gridplot ();
    9999
    100100    XMIN -= 0.5*NGRID_PIX;
  • trunk/Ohana/src/gastro2/src/plots.c

    r8513 r21153  
    55Graphdata gv;
    66
    7 void plot_init_gridplot () {
     7void plot_init_gridplot (void) {
    88 
    99  NV = 1000;
     
    5050}
    5151
    52 void plot_done_gridplot () {
     52void plot_done_gridplot (void) {
    5353
    5454  char c;
  • trunk/Ohana/src/gastro2/src/plotstuff.c

    r14590 r21153  
    55static int active;
    66
    7 void XDead () {
     7void XDead (int value) {
    88  signal (SIGPIPE, XDead);
    99  fprintf (stderr, "kapa is dead, must restart\n");
  • trunk/Ohana/src/gcompare/include/gcompare.h

    r16040 r21153  
    2323/******* PROTOTYPES ***********/
    2424
    25 void               help              PROTO(());
     25void               help              PROTO((void));
    2626data_type          input             PROTO((char *, int, int, int));
    2727match_type        *compare           PROTO((data_type, data_type, int *, double, double, double, double));
  • trunk/Ohana/src/getstar/include/dvoImageExtract.h

    r12840 r21153  
    2424void TrapSignal          PROTO((int sig));
    2525void SetProtect          PROTO((int mode));
    26 int  SetSignals          PROTO(());
     26int  SetSignals          PROTO((void));
    2727
    2828int GetFileMode (Header *header);
  • trunk/Ohana/src/getstar/include/dvoImageOverlaps.h

    r14590 r21153  
    2727void TrapSignal       PROTO((int sig));
    2828void SetProtect       PROTO((int mode));
    29 int  SetSignals       PROTO(());
     29int  SetSignals       PROTO((void));
    3030
    3131Image *ReadImageFiles (char *filename, int *Nimages);
  • trunk/Ohana/src/getstar/include/getstar.h

    r20266 r21153  
    4646void TrapSignal              PROTO((int sig));
    4747void SetProtect              PROTO((int mode));
    48 int  SetSignals              PROTO(());
     48int  SetSignals              PROTO((void));
    4949int  gcatalog                PROTO((Catalog *catalog));
    5050int  write_catalog           PROTO((Catalog *catalog));
  • trunk/Ohana/src/gophot/include/prototypes.h

    r2473 r21153  
    1111char *expandline (char *line, char *config);
    1212bool cosmic (float *star);
    13 int dophot ();
     13int dophot (void);
    1414int ellipse (float, float, float, float *, float *, float *, float *);
    1515int errupd (float *, int);
    1616int fillerup (int, int, int);
    17 float findsky ();
     17float findsky (void);
    1818bool galaxy (float *, float *, float *);
    1919float guess1 (float *, float *, int, int);
     
    2222int impaper2 (int);
    2323int improve (int);
    24 int isearch ();
     24int isearch (void);
    2525void lubksb (float **, int, int *, float *);
    2626void ludcmp (float **, int, int *, float *);
    27 int makemask ();
    28 int makenoise ();
     27int makemask (void);
     28int makenoise (void);
    2929int mprint (int, char *, ...);
    3030int set_verbosity (int);
    31 int completeout ();
     31int completeout (void);
    3232int oblims (float *, int *);
    3333bool oblit (float *);
    3434bool oblit (float *);
    35 int paravg ();
     35int paravg (void);
    3636float parinterp (float, float, float *);
    3737int parupd (float *, float *, int, int);
    38 int shape ();
     38int shape (void);
    3939int sort (float *, int);
    4040bool toobright (float *);
     
    4242bool transmask (int, int, float);
    4343float twofit (float *, float *, float *, float *);
    44 int variparplane ();
     44int variparplane (void);
    4545bool offpic (float *, int, int, float *, float *);
    4646float newguess (float *, float *, int, int);
  • trunk/Ohana/src/imclean/include/imclean.h

    r3519 r21153  
    4646void find_better_line (SMPData *stars, char *mark, int Npts, int i, double *M, double *B, int axis);
    4747
    48 void help ();
     48void help (void);
    4949void args (int argc, char **argv);
    5050void wfits (char *filename, SMPData *stars, int Nstars, Header *header);
  • trunk/Ohana/src/imregister/include/detrend.h

    r12332 r21153  
    7474DetReg DefineEntry (Descriptor descriptor);
    7575
    76 char *set_dBFile ();
    77 char *get_dBPath ();
     76char *set_dBFile (void);
     77char *get_dBPath (void);
    7878int delete_image (DetReg *image);
    7979
     
    9494Match SelectEntry (DetReg *image, int Nimage, Match *list, int Nlist, Criteria *crit);
    9595
    96 int usage ();
     96int usage (void);
    9797Criteria *MosaicCriteria (Criteria base, char *filename, int *ncrit);
    9898Criteria *ImageCriteria (Criteria base, char *filename, char *ImageExtend, char *ImageMode, int *ncrit);
     
    105105int set_crit (Criteria *crit, DetReg *image);
    106106int ckpathname (char *newpath);
    107 int PrintCriteria ();
     107int PrintCriteria (void);
    108108
    109109int SetAltpath (FITS_DB *db, DetReg *image, int Nimage, Match *match, int Nmatch);
  • trunk/Ohana/src/imregister/include/imreg.h

    r12332 r21153  
    100100double SigmaClipList (double *list, int N);
    101101double MosaicIQStats (RegImage *image, int *match, int Nmatch, MosaicRegion *region);
    102 MosaicLayout *CreateCFH12K ();
    103 MosaicLayout *CreateMegaCam ();
     102MosaicLayout *CreateCFH12K (void);
     103MosaicLayout *CreateMegaCam (void);
    104104int GetREFCCD (RegImage *image, int *index, int *entry, int Nindex, int start);
    105105
     
    107107void SIG_DIE (int sig);
    108108void SIG_PIPE (int sig);
    109 void SetSignals ();
     109void SetSignals (void);
    110110void KillProcess (char *pidfile);
    111111void StatusProcess (char *pidfile);
    112 int close_lock_db ();
     112int close_lock_db (void);
    113113int ConfigPID (char *pidfile);
    114114int print_db_status (char *message);
     
    117117int LoadPID (char *file, pid_t *pid, char *username, char *machine);
    118118int Shutdown (int status);
    119 void RemovePID ();
     119void RemovePID (void);
    120120int rconnect (char *hostname, char *command, int *rsock, int *wsock);
    121121
  • trunk/Ohana/src/imregister/include/imregister.h

    r12332 r21153  
    7878void sortpair (int *X, int *Y, int N);
    7979
    80 void ConfigCamera ();
     80void ConfigCamera (void);
    8181int MatchCCDNameHeader (Header *header);
    8282int MatchCCDName (char *ID);
    83 void ConfigFilter ();
     83void ConfigFilter (void);
    8484int MatchFilterList (char *line);
    8585void ConfigInit (int *argc, char **argv);
  • trunk/Ohana/src/kapa/include/prototypes.h

    r10834 r21153  
    44void          CheckFontName       PROTO((int *, char **, char *));
    55void          CheckGeometry       PROTO((int *, char **));
    6 int           CheckPipe           PROTO(());
     6int           CheckPipe           PROTO((void));
    77void          CreateWindow        PROTO((Window, int, long));
    88void          DefineLayout        PROTO((int, char **));
     
    1616void          DrawXErrors         PROTO((Layout *, Gobjects *));
    1717void          DrawYErrors         PROTO((Layout *, Gobjects *));
    18 int           ErasePlot           PROTO(());
     18int           ErasePlot           PROTO((void));
    1919unsigned long GetColor            PROTO((Display *, char *, Colormap, unsigned long));
    20 int           GetColormapSize     PROTO(());
     20int           GetColormapSize     PROTO((void));
    2121char         *GetRGBString        PROTO((int N));
    2222int           InButton            PROTO((XButtonEvent *, Button *));
    2323int           InPicture           PROTO((XButtonEvent *, Picture *));
    24 int           ListSection         PROTO(());
    25 int           LoadBox             PROTO(());
     24int           ListSection         PROTO((void));
     25int           LoadBox             PROTO((void));
    2626void          LoadFont            PROTO((int *, char **, char *));
    27 int           LoadLabels          PROTO(());
    28 int           LoadObject          PROTO(());
    29 int           LoadPtext           PROTO(());
     27int           LoadLabels          PROTO((void));
     28int           LoadObject          PROTO((void));
     29int           LoadPtext           PROTO((void));
    3030int           LoadVectorData      PROTO((Layout *, int, char *));
    3131void          MakeColormap        PROTO((int, char **));
    3232void          MakeCursor          PROTO((unsigned int));
    33 void          MapWindow           PROTO(());
     33void          MapWindow           PROTO((void));
    3434void          NameWindow          PROTO((char *));
    3535Display      *OpenDisplay         PROTO((char *, int *));
    36 int           PNGit               PROTO(());
    37 int           PPMit               PROTO(());
     36int           PNGit               PROTO((void));
     37int           PPMit               PROTO((void));
    3838void          PSConnect           PROTO((Layout *, Gobjects *, FILE *));
    3939int           PSFrame             PROTO((Layout *, FILE *));
     
    4444void          PSXErrors           PROTO((Layout *, Gobjects *, FILE *));
    4545void          PSYErrors           PROTO((Layout *, Gobjects *, FILE *));
    46 int           PSit                PROTO(());
     46int           PSit                PROTO((void));
    4747void          PositionPicture     PROTO((Layout *));
    4848void          QuitX               PROTO((Display *, char *, char *));
     
    5050void          Refresh             PROTO((int));
    5151void          Remap               PROTO((Layout *, Matrix  *));
    52 int           Resize              PROTO(());
    53 int           SetFont             PROTO(());
    54 int           SetLimits           PROTO(());
    55 void          SetNormalHints      PROTO(());
     52int           Resize              PROTO((void));
     53int           SetFont             PROTO((void));
     54int           SetLimits           PROTO((void));
     55void          SetNormalHints      PROTO((void));
    5656int           SetSection          PROTO((int SwitchSection));
    5757void          SetUpDisplay        PROTO((int *, char **));
     
    5959void          SetWMHints          PROTO((Icon *));
    6060void          TopWindow           PROTO((Icon *));
    61 int           cursor              PROTO(());
     61int           cursor              PROTO((void));
    6262int           get_argument        PROTO((int, char **, char *));
    6363void          hh_hms              PROTO((char *, double, double, char));
    6464int           remove_argument     PROTO((int, int *, char **));
    6565
    66 void MakeGC ();
     66void MakeGC (void);
    6767
    68 int EventLoop ();
    69 void CloseDisplay ();
     68int EventLoop (void);
     69void CloseDisplay (void);
    7070int args (int *argc, char **argv);
    7171
    7272void DrawPtext (Layout *layout);
    73 void FlushDisplay ();
     73void FlushDisplay (void);
    7474void AxisTickScale (Axis *axis, double *major, double *minor);
    7575void DrawFrame (Layout *layout);
     
    9393void bDrawPtext (Layout *layout);
    9494
    95 bDrawBuffer *bDrawIt ();
     95bDrawBuffer *bDrawIt (void);
    9696
    9797/******************* XGRAPH **
  • trunk/Ohana/src/kapa/include/structures.h

    r6684 r21153  
    2323  int      width, height;
    2424  char    *bitmap;          /* picture on button */
    25   int    (*function_1) ();  /* mouse_button 1 function */
    26   int    (*function_2) ();  /* mouse_button 2 function */
    27   int    (*function_3) ();  /* mouse_button 3 function */
     25  int    (*function_1) (void);  /* mouse_button 1 function */
     26  int    (*function_2) (void);  /* mouse_button 2 function */
     27  int    (*function_3) (void);  /* mouse_button 3 function */
    2828} Button;
    2929
     
    3535  int      outline;        /* draw an outline?  */
    3636  int      cursor;         /* location of cursor (if selected) */
    37   int    (*function) ();   /* textline function */
     37  int    (*function) (void);   /* textline function */
    3838} TextLine;
    3939
     
    4848  int      cursor_x;       /* location of cursor (if selected) */
    4949  int      cursor_y;       /* location of cursor (if selected) */
    50   int    (*function) ();   /* textline function */
     50  int    (*function) (void);   /* textline function */
    5151} TextBox;
    5252
  • trunk/Ohana/src/kapa2/include/kii.struct.h

    r13320 r21153  
    2929  int      width, height;
    3030  char    *bitmap;          /* picture on button */
    31   int    (*function_1) ();  /* mouse_button 1 function */
    32   int    (*function_2) ();  /* mouse_button 2 function */
    33   int    (*function_3) ();  /* mouse_button 3 function */
     31  int    (*function_1) (void);  /* mouse_button 1 function */
     32  int    (*function_2) (void);  /* mouse_button 2 function */
     33  int    (*function_3) (void);  /* mouse_button 3 function */
    3434} Button;
    3535
     
    4141  int      outline;        /* draw an outline?  */
    4242  int      cursor;         /* location of cursor (if selected) */
    43   int    (*function) ();   /* textline function */
     43  int    (*function) (void);   /* textline function */
    4444} TextLine;
    4545
     
    5454  int      cursor_x;       /* location of cursor (if selected) */
    5555  int      cursor_y;       /* location of cursor (if selected) */
    56   int    (*function) ();   /* textline function */
     56  int    (*function) (void);   /* textline function */
    5757} TextBox;
    5858
  • trunk/Ohana/src/kapa2/include/prototypes.h

    r21060 r21153  
    44void          SetUpGraphic        PROTO((int *argc, char **argv));
    55void          DefineLayout        PROTO((int, char **));
    6 int           EventLoop           PROTO(());
    7 void          CloseDisplay        PROTO(());
     6int           EventLoop           PROTO((void));
     7void          CloseDisplay        PROTO((void));
    88
    99/* SetUpGraphic */
     
    4343/* EventLoop */
    4444int           PScommand           PROTO((int sock));
    45 int           CheckPipe           PROTO(());
     45int           CheckPipe           PROTO((void));
    4646int           Reconfig            PROTO((XEvent *event));
    47 void          Refresh             PROTO(());
     47void          Refresh             PROTO((void));
    4848
    4949/* CheckPipe */
     
    7979
    8080/* Section Utilities */
    81 Section      *InitSection         PROTO(());
     81Section      *InitSection         PROTO((void));
    8282void          FreeSection         PROTO((Section *section));
    83 void          FreeSections        PROTO(());
     83void          FreeSections        PROTO((void));
    8484Section      *AddSection          PROTO((char *name, float x, float y, float dx, float dy));
    8585int           DelSection          PROTO((char *name));
    8686int           GetSectionByName    PROTO((char *name));
    87 int           GetNumberOfSections PROTO(());
     87int           GetNumberOfSections PROTO((void));
    8888Section      *GetSectionByNumber  PROTO((int N));
    89 Section      *GetActiveSection    PROTO(());
     89Section      *GetActiveSection    PROTO((void));
    9090int           SetActiveSectionByNumber PROTO((int N));
    9191int           ListSection         PROTO((int sock));
    9292void          SetSectionSizes     PROTO((Section *section));
    9393
    94 KapaGraphWidget *InitGraph        PROTO(());
     94KapaGraphWidget *InitGraph        PROTO((void));
    9595void          DrawGraph           PROTO((KapaGraphWidget *graph));
    9696void          SetGraphSize        PROTO((Section *section));
     
    131131void          bDrawTick           PROTO((double fx, double fy, double dfx, double dfy, int P, double min, double max, double value, int IsLabel, int IsMajor, int naxis));
    132132void          bDrawClipLine       PROTO((double x0, double y0, double x1, double y1, double X0, double Y1, double X1, double Y0));
    133 bDrawBuffer  *bDrawIt             PROTO(());
     133bDrawBuffer  *bDrawIt             PROTO((void));
    134134void          bDrawGraph          PROTO((KapaGraphWidget *graph));
    135135
     
    137137int           LastEvent           PROTO((Display *display, int type, XEvent *event));
    138138void          FreeObjectData      PROTO((Gobjects *object));
    139 void          FlushDisplay        PROTO(());
     139void          FlushDisplay        PROTO((void));
    140140unsigned long GetColor            PROTO((Display *display, char *name, Colormap colormap, unsigned long default_color));
    141141void          QuitX               PROTO((Display *display, char *message));
    142 Graphic      *GetGraphic          PROTO(());
     142Graphic      *GetGraphic          PROTO((void));
    143143int           GetPixelCount       PROTO((int sock));
    144144
    145 int           Center              PROTO(());
    146 int           Parity              PROTO(());
     145int           Center              PROTO((int sock));
     146int           Parity              PROTO((int sock));
    147147void          SetColorScale       PROTO((Graphic *graphic, KapaImageWidget *image));
    148148void          SetColorScale1D     PROTO((Graphic *graphic, KapaImageWidget *image));
     
    155155int           LoadPicture         PROTO((int sock));
    156156
    157 KapaImageWidget *InitImageWidget  PROTO(());
     157KapaImageWidget *InitImageWidget  PROTO((void));
    158158int           InitImageChannel    PROTO((KapaImageChannel *channel));
    159159void          FreeImage           PROTO((KapaImageWidget *image));
     
    161161
    162162void          InitButtonSize      PROTO((Button *button, int width, int height, char *bitmap));
    163 void          InitButtonFunc      PROTO((Button *button, int (*function)()));
     163void          InitButtonFunc      PROTO((Button *button, int (*function)(Graphic *graphic, KapaImageWidget *image)));
    164164void          DrawImage           PROTO((KapaImageWidget *image));
    165165void          DrawButton          PROTO((Graphic *graphic, Button *button));
     
    232232// void               CreateZoom32 (KapaImageWidget *image, Graphic *graphic, double x, double y);
    233233
    234 int           GetActiveSocket ();
     234int           GetActiveSocket (void);
    235235void          InvertButton (Graphic *graphic, Button *button);
    236236void          bDrawOverlay (KapaImageWidget *image, int N);
    237237
    238238/* color cube tools */
    239 CCNode *CCNodeAlloc ();
     239CCNode *CCNodeAlloc (void);
    240240CCNode *CCFindChild (CCNode *node, float x, float y, float z);
    241241int CCSplitNode (CCNode *node);
     
    253253
    254254int SetColorScale3D_CC (Graphic *graphic, KapaImageWidget *image);
    255 int SetColorCubeHistogram ();
     255int SetColorCubeHistogram (void);
  • trunk/Ohana/src/kapa2/include/structures.h

    r17530 r21153  
    7878  int      cursor_x;       /* location of cursor (if selected) */
    7979  int      cursor_y;       /* location of cursor (if selected) */
    80   int    (*function) ();   /* textline function */
     80  int    (*function) (void);   /* textline function */
    8181} TextBox;
    8282
  • trunk/Ohana/src/kapa2/src/ButtonFunctions.c

    r16810 r21153  
    102102  image[0].DecimalDegrees = image[0].DecimalDegrees ^ TRUE;
    103103  StatusBox (graphic, image);
    104   FlushDisplay (graphic[0].display);
     104  FlushDisplay ();
    105105  return (TRUE);
    106106
  • trunk/Ohana/src/kapa2/src/CheckVisual.c

    r16810 r21153  
    3434  }
    3535 
     36// skip the default and the PseudoColor visuals, go for TrueColor first
     37# if (0)
    3638  /* check default visual first */
    3739  for (i = 0; (i < Nfound) && (graphic[0].visual != visual_list[i].visual); i++);
     
    4042    exit (0);
    4143  }
     44# endif
    4245
    4346  // set these based on selected visual
    4447  isColor = isDefault = isDynamic = FALSE;
    4548
     49# if (0)
    4650  // attempt to select the most desirable type of visual: Default as PseudoColor (XXX is it still true?)
    4751  if (DEBUG) fprintf (stderr, "default visual class is %d\n", visual_list[i].class);
     
    5256    goto test_pixels;
    5357  }
     58# endif
     59
     60  // attempt to select the most desirable type of visual: TrueColor (XXX is it still true?)
     61  for (i = 0; (i < Nfound) && (visual_list[i].class != TrueColor); i++);
     62  if (i != Nfound) {
     63    isColor = TRUE;
     64    if (DEBUG) fprintf (stderr, "visual class is %d\n", visual_list[i].class);
     65    isDefault = (graphic[0].visual == visual_list[i].visual);
     66    graphic[0].visual = visual_list[i].visual;
     67    graphic[0].visualclass = FALSE;
     68    goto test_pixels;
     69  }
    5470
    5571  // attempt to select the most desirable type of visual: PseudoColor (XXX is it still true?)
     
    7288    graphic[0].visual = visual_list[i].visual;
    7389    graphic[0].visualclass = TRUE;
    74     goto test_pixels;
    75   }
    76 
    77   // attempt to select the most desirable type of visual: TrueColor (XXX is it still true?)
    78   for (i = 0; (i < Nfound) && (visual_list[i].class != TrueColor); i++);
    79   if (i != Nfound) {
    80     isColor = TRUE;
    81     if (DEBUG) fprintf (stderr, "visual class is %d\n", visual_list[i].class);
    82     isDefault = (graphic[0].visual == visual_list[i].visual);
    83     graphic[0].visual = visual_list[i].visual;
    84     graphic[0].visualclass = FALSE;
    8590    goto test_pixels;
    8691  }
  • trunk/Ohana/src/kapa2/src/DefineSection.c

    r14590 r21153  
    3434  if (MoveSection) {
    3535    SetSectionSizes (section);
    36     Refresh (1);
     36    Refresh ();
    3737  }
    3838
  • trunk/Ohana/src/kapa2/src/EraseCurrentPlot.c

    r13479 r21153  
    1515 
    1616  if (USE_XWINDOW) XClearWindow (graphic->display, graphic->window);
    17   Refresh (1);
     17  Refresh ();
    1818
    1919  return (TRUE);
  • trunk/Ohana/src/kapa2/src/ErasePlots.c

    r13320 r21153  
    1818
    1919  if (USE_XWINDOW) XClearWindow (graphic->display, graphic->window);
    20   Refresh (1);
     20  Refresh ();
    2121
    2222  return (TRUE);
  • trunk/Ohana/src/kapa2/src/EraseSections.c

    r13320 r21153  
    1111
    1212  if (USE_XWINDOW) XClearWindow (graphic->display, graphic->window);
    13   Refresh (1);
     13  Refresh ();
    1414
    1515  return (TRUE);
  • trunk/Ohana/src/kapa2/src/EventLoop.c

    r14590 r21153  
    2525  display = graphic->display;
    2626 
    27   if (USE_XWINDOW) Refresh (1);
     27  if (USE_XWINDOW) Refresh ();
    2828
    2929  status = TRUE;
     
    4646    if (LastEvent (display, ConfigureNotify, &event)) Reconfig (&event);
    4747    if (LastEvent (display, CirculateNotify, &event)) Reconfig (&event);
    48     if (LastEvent (display, Expose,          &event)) Refresh (1);
     48    if (LastEvent (display, Expose,          &event)) Refresh ();
    4949    if (LastEvent (display, MappingNotify,   &event)) XRefreshKeyboardMapping ((XMappingEvent *) &event);
    5050    if (LastEvent (display, MotionNotify,    &event)) UpdatePointer (graphic, (XMotionEvent *) &event);
  • trunk/Ohana/src/kapa2/src/FlushDisplay.c

    r13320 r21153  
    55# define DTIME(A,B) ((A.tv_sec - B.tv_sec) + 1e-6*(A.tv_usec - B.tv_usec))
    66
    7 void FlushDisplay () {
     7void FlushDisplay (void) {
    88
    99  struct timeval now;
  • trunk/Ohana/src/kapa2/src/Image.c

    r16810 r21153  
    190190  }
    191191
    192   FlushDisplay (graphic[0].display);
     192  FlushDisplay ();
    193193}
    194194
  • trunk/Ohana/src/kapa2/src/InvertButton.c

    r13320 r21153  
    1212
    1313  DrawButton (graphic, button);
    14   FlushDisplay (graphic[0].display);
     14  FlushDisplay ();
    1515 
    1616  graphic[0].fore = fore;
  • trunk/Ohana/src/kapa2/src/LoadFrame.c

    r18426 r21153  
    8181    }
    8282    if (USE_XWINDOW) XClearWindow (graphic.display, graphic.window);
    83     Refresh (1);
     83    Refresh ();
    8484  } else {
    8585    FlushDisplay ();
  • trunk/Ohana/src/kapa2/src/MapWindow.c

    r13320 r21153  
    66  XMapRaised (graphic->display, graphic->window);
    77  XMapSubwindows (graphic->display, graphic->window);
    8   FlushDisplay (graphic);
     8  FlushDisplay ();
    99}
  • trunk/Ohana/src/kapa2/src/Reconfig.c

    r13479 r21153  
    2929
    3030  if (USE_XWINDOW) XClearWindow (graphic->display, graphic->window);
    31   Refresh (1);
     31  Refresh ();
    3232
    3333  return (TRUE);
  • trunk/Ohana/src/kapa2/src/Refresh.c

    r16388 r21153  
    11# include "Ximage.h"
    22
    3 void Refresh () {
     3void Refresh (void) {
    44
    55  int i, Nsection;
  • trunk/Ohana/src/kapa2/src/Resize.c

    r13479 r21153  
    3434
    3535  if (USE_XWINDOW) XClearWindow (graphic->display, graphic->window);
    36   Refresh (1);
     36  Refresh ();
    3737
    3838  return (TRUE);
  • trunk/Ohana/src/kapa2/src/Sections.c

    r13479 r21153  
    177177      sections[N] = sections[N+1];
    178178      sections[N+1] = tmpSection;
    179       Refresh (1);
     179      Refresh ();
    180180      return (TRUE);
    181181  }
     
    187187      sections[N] = sections[N-1];
    188188      sections[N-1] = tmpSection;
    189       Refresh (1);
     189      Refresh ();
    190190      return (TRUE);
    191191  }
     
    199199      }
    200200      sections[i] = tmpSection;
    201       Refresh (1);
     201      Refresh ();
    202202      return (TRUE);
    203203  }
     
    211211      }
    212212      sections[i] = tmpSection;
    213       Refresh (1);
     213      Refresh ();
    214214      return (TRUE);
    215215  }
  • trunk/Ohana/src/kapa2/src/SetGraphData.c

    r13479 r21153  
    7373
    7474  if (USE_XWINDOW) XClearWindow (graphic->display, graphic->window);
    75   Refresh (1);
     75  Refresh ();
    7676
    7777  return (TRUE); 
  • trunk/Ohana/src/kapa2/src/SetGraphStyle.c

    r13479 r21153  
    5555
    5656  if (USE_XWINDOW) XClearWindow (graphic->display, graphic->window);
    57   Refresh (1);
     57  Refresh ();
    5858
    5959  return (TRUE); 
  • trunk/Ohana/src/kapa2/src/SetLimits.c

    r13479 r21153  
    3333
    3434  if (USE_XWINDOW) XClearWindow (graphic->display, graphic->window);
    35   Refresh (1);
     35  Refresh ();
    3636
    3737  return (TRUE); 
  • trunk/Ohana/src/kapa2/src/SetUpGraphic.c

    r16039 r21153  
    4444  LoadFont (graphic, argc, argv, "fixed");
    4545
    46   // FlushDisplay (graphic);
    4746  XSetWindowBackground (graphic->display, graphic->window, graphic->back);
    4847
  • trunk/Ohana/src/kapa2/src/TopWindow.c

    r13320 r21153  
    1515  MakeCursor (graphic, DEFAULT_CURSOR);
    1616  XFreeCursor (graphic->display, graphic->cursor);
    17   // FlushDisplay (graphic);
    1817}
  • trunk/Ohana/src/kii/include/structures.h

    r5852 r21153  
    2828  int      width, height;
    2929  char    *bitmap;          /* picture on button */
    30   int    (*function_1) ();  /* mouse_button 1 function */
    31   int    (*function_2) ();  /* mouse_button 2 function */
    32   int    (*function_3) ();  /* mouse_button 3 function */
     30  int    (*function_1) (void);  /* mouse_button 1 function */
     31  int    (*function_2) (void);  /* mouse_button 2 function */
     32  int    (*function_3) (void);  /* mouse_button 3 function */
    3333} Button;
    3434
     
    4040  int      outline;        /* draw an outline?  */
    4141  int      cursor;         /* location of cursor (if selected) */
    42   int    (*function) ();   /* textline function */
     42  int    (*function) (void);   /* textline function */
    4343} TextLine;
    4444
     
    5353  int      cursor_x;       /* location of cursor (if selected) */
    5454  int      cursor_y;       /* location of cursor (if selected) */
    55   int    (*function) ();   /* textline function */
     55  int    (*function) (void);   /* textline function */
    5656} TextBox;
    5757
  • trunk/Ohana/src/libdvo/include/dvo.h

    r19187 r21153  
    279279OhanaProjectionMode GetProjectionMode (OhanaProjection proj);
    280280
    281 char *libdvo_version ();
    282 
    283 int isRegisteredMosaic ();
    284 int GetRegisteredMosaic ();
     281char *libdvo_version (void);
     282
     283int isRegisteredMosaic (void);
     284int GetRegisteredMosaic (void);
    285285int GetMosaicCoords (Coords *coords);
    286286int FindMosaicForImage (Image *images, int Nimages, int entry);
     
    317317int PhotColor (Average *average, SecFilt *secfilt, Measure *measure, int c1, int c2, double *color);
    318318
    319 PhotCodeData *GetPhotcodeTable ();
     319PhotCodeData *GetPhotcodeTable (void);
    320320
    321321int LoadPhotcodes (char *catdir_file, char *master_file);
     
    331331int GetPhotcodeEquivCodebyCode (int code);
    332332int GetPhotcodeNsec (int code);
    333 int GetPhotcodeNsecfilt ();
     333int GetPhotcodeNsecfilt (void);
    334334void SetZeroPoint (double ZP);
    335 double GetZeroPoint ();
     335double GetZeroPoint (void);
    336336int *GetPhotcodeEquivList (int code, int *nlist);
    337337void ParseColorTerms (char *terms, float *X, int *N);
  • trunk/Ohana/src/libdvo/include/dvo.update.h

    r8638 r21153  
    275275int GetPhotcodeEquivCodebyCode (int code);
    276276int GetPhotcodeNsec (int code);
    277 int GetPhotcodeNsecfilt ();
     277int GetPhotcodeNsecfilt (void);
    278278void SetZeroPoint (double ZP);
    279279int *GetPhotcodeEquivList (int code, int *nlist);
  • trunk/Ohana/src/libkapa/include/kapa.h

    r21060 r21153  
    181181/* KapaColors */
    182182int KapaColorByName (char *name);
    183 int KapaColormapSize ();
     183int KapaColormapSize (void);
    184184char *KapaColorRGBString (int N);
    185185char *KapaColorName (int N);
     
    188188
    189189/* RotFont.c */
    190 void InitRotFonts PROTO(());
     190void InitRotFonts PROTO((void));
    191191int SetRotFont PROTO((char *name, int size));
    192192char *GetRotFont PROTO((int *size));
  • trunk/Ohana/src/libohana/include/ohana.h

    r19823 r21153  
    141141} IOBuffer;
    142142
    143 extern double hypot();
     143extern double hypot(double,double);
    144144
    145145/* in string.c */
     
    183183/* others */
    184184int     Fseek                  PROTO((FILE *f, long offset, int whence));
    185 char   *ohana_version          PROTO(());
     185char   *ohana_version          PROTO((void));
    186186
    187187int     dgaussjordan           PROTO((double **A, double **B, int N, int M));
  • trunk/Ohana/src/misc/include/missing_protos.h

    r12875 r21153  
    1313 *                    which depends on this file every time we need to add
    1414 *                    a new prototype for the SunOS machines.
    15  * $Id: missing_protos.h,v 1.2 2007-04-18 19:21:46 eugene Exp $
     15 * $Id: missing_protos.h,v 1.3 2009-01-22 20:43:24 eugene Exp $
    1616 * $Locker:  $
    1717 *
    1818 * $Log: not supported by cvs2svn $
     19 * Revision 1.2  2007/04/18 19:21:46  eugene
     20 * dropping non-standard includes
     21 *
    1922 * Revision 1.1.1.1  2004/11/24 04:39:33  eugene
    2023 * importing elixir components
     
    205208#else  /* not __GNUC__ */
    206209#include <floatingpoint.h>
    207 void perror();
    208 char *strerror();
    209 void *memset();
    210 double drand48();
    211 long strtol();
     210void perror(void);
     211char *strerror(void);
     212void *memset(void);
     213double drand48(void);
     214long strtol(void);
    212215#endif /* __GNUC__ */
    213216#endif /* SUNOS */
  • trunk/Ohana/src/mosastro/include/mosastro.h

    r8499 r21153  
    131131void       FitGradients       PROTO((Gradients *grad));
    132132void       GetConfig          PROTO((char *config, char *field, char *format, int N, void *ptr));
    133 Gradients *GetGradients       PROTO(());
     133Gradients *GetGradients       PROTO((void));
    134134double     GetScatter         PROTO((int *Nscatter, double *DL, double *DM, int bright));
    135135int        LoadStars          PROTO((int Nfile, char **file));
     
    141141void       area_of_region     PROTO((CatStats *region));
    142142void       args               PROTO((int *argc, char **argv));
    143 int        deproject_raw      PROTO(());
    144 int        deproject_stars    PROTO(());
     143int        deproject_raw      PROTO((void));
     144int        deproject_stars    PROTO((void));
    145145int        dump_grads         PROTO((Gradients *grad, char *filename));
    146 int        dump_match         PROTO(());
    147 int        dump_rawstars      PROTO(());
     146int        dump_match         PROTO((void));
     147int        dump_rawstars      PROTO((void));
    148148int        dump_refcat        PROTO((StarData *refcat, int Nrefcat));
    149149int        dump_stars         PROTO((FILE *f, StarData *stars, int Nstars));
    150150int        fake_field         PROTO((double RA, double DEC));
    151 void       field_combine      PROTO(());
    152 void       field_stats        PROTO(());
     151void       field_combine      PROTO((void));
     152void       field_stats        PROTO((void));
    153153int        find_dec_bands     PROTO((CatStats *area));
    154154void       fit_add            PROTO((double x1, double y1, double x2, double y2));
     
    156156void       fit_apply_grads    PROTO((Coords *distort, Coords *project, int term));
    157157void       fit_correct_grads  PROTO((Gradients *in, Gradients *out, int term));
    158 void       fit_eval           PROTO(());
    159 void       fit_free           PROTO(());
     158void       fit_eval           PROTO((void));
     159void       fit_free           PROTO((void));
    160160void       fit_init           PROTO((int order));
    161161int        gaussj             PROTO((double **a, int n, double **b, int m));
     
    170170StarData  *greference         PROTO((int *Nrefcat));
    171171CatStats  *gregions           PROTO((CatStats *patch, int *nregion));
    172 int        init_chips         PROTO(());
    173 int        init_field         PROTO(());
    174 void       init_regions       PROTO(());
     172int        init_chips         PROTO((void));
     173int        init_field         PROTO((void));
     174void       init_regions       PROTO((void));
    175175int        load_chips         PROTO((char *filename));
    176176int        load_field         PROTO((char *filename));
     
    184184int        parse_GSC_line     PROTO((CatStats *tregion, char *line));
    185185e_time     parse_time         PROTO((Header *header));
    186 void       print_help         PROTO(());
    187 int        project_ref        PROTO(());
     186void       print_help         PROTO((void));
     187int        project_ref        PROTO((void));
    188188int        project_refcat     PROTO((StarData *refcat, int Nrefcat));
    189 int        project_stars      PROTO(());
     189int        project_stars      PROTO((void));
    190190int        rfits              PROTO((Chip *mychip));
    191191int        rtext              PROTO((Chip *mychip));
  • trunk/Ohana/src/nightd/include/nightd.h

    r3466 r21153  
    2828int SetPID (pid_t *Xpid, char *Xuser, char *Xmachine);
    2929int GetDateTime (char *datestr, char *timestr, float *time);
    30 int WaitForMinute ();
    31 int GetStatus ();
    32 int ResetConfig ();
    33 int SendShutdown ();
    34 int StartUp ();
    35 int SetSignals ();
     30int WaitForMinute (void);
     31int GetStatus (void);
     32int ResetConfig (void);
     33int SendShutdown (void);
     34int StartUp (void);
     35int SetSignals (void);
    3636void ToggleSuspend (int sig);
    3737void Shutdown (int sig);
     
    4040char *ExpandWords (char *line);
    4141int pcommand (char *line, int timeout);
    42 int WaitForPeriod ();
     42int WaitForPeriod (void);
    4343int DoCommand (char *command, char *name);
    4444int freeargs (char **arglist);
  • trunk/Ohana/src/opihi/cmd.astro/cplot.c

    r20936 r21153  
    7575  }
    7676  Xvec.Nelements = Npts;
     77  Yvec.Nelements = Npts;
    7778
    7879  graphmode.etype = 0;
  • trunk/Ohana/src/opihi/dvo/dbExtractAverages.c

    r20936 r21153  
    152152          break;
    153153        case MAG_CHISQ:
    154           // GetPhotcodeEquivCodebyCode (field->photcode)
    155154          value.Flt = PhotXm (field->photcode, average, secfilt);
    156155          break;
    157156        case MAG_ERR:
    158           // GetPhotcodeEquivCodebyCode (field->photcode)
    159157          if ((field->photcode->type == PHOT_REF) || (field->photcode->type == PHOT_DEP)) {
    160158            for (i = 0; i < average[0].Nmeasure; i++) {
     
    167165          }
    168166          break;
     167        case MAG_PHOT_FLAGS:
     168          if ((field->photcode->type == PHOT_REF) || (field->photcode->type == PHOT_DEP)) {
     169            for (i = 0; i < average[0].Nmeasure; i++) {
     170              if (field->photcode->code != measure[i].photcode) continue;
     171              value.Int = measure[i].photFlags;
     172              break;
     173            }
     174          } else {
     175            value.Int = 0;
     176          }
     177          break;
    169178        case MAG_NCODE:
    170179          // XXX push these into dvo_photcode_ops APIs
  • trunk/Ohana/src/opihi/dvo/dbExtractMeasures.c

    r20936 r21153  
    123123          } else {
    124124            value.Flt = measure[0].dM;
     125          }
     126          break;
     127        case MAG_PHOT_FLAGS:
     128          if ((field->photcode->type == PHOT_REF) || (field->photcode->type == PHOT_DEP)) {
     129            value.Int = measure[0].photFlags;
     130          } else {
     131            value.Int = 0;
    125132          }
    126133          break;
     
    378385      break;
    379386    case MEAS_OBJ_ID: /* OK */
    380       // XXX this should probably return average[0].objID
    381387      value.Int = average[0].objID;
     388      break;
     389    case MEAS_CAT_ID: /* OK */
     390      value.Int = average[0].catID;
    382391      break;
    383392    case MEAS_IMAGE_ID: /* OK */
  • trunk/Ohana/src/opihi/dvo/dbFields.c

    r20936 r21153  
    3030int GetMagMode (char *string) {
    3131
    32   if (!strcasecmp (string, "inst"))  return (MAG_INST);
    33   if (!strcasecmp (string, "cat"))   return (MAG_CAT);
    34   if (!strcasecmp (string, "sys"))   return (MAG_SYS);
    35   if (!strcasecmp (string, "rel"))   return (MAG_REL);
    36   if (!strcasecmp (string, "cal"))   return (MAG_CAL);
    37   if (!strcasecmp (string, "ave"))   return (MAG_AVE);
    38   if (!strcasecmp (string, "ref"))   return (MAG_REF);
    39   if (!strcasecmp (string, "err"))   return (MAG_ERR);
    40   if (!strcasecmp (string, "chisq")) return (MAG_CHISQ);
    41   if (!strcasecmp (string, "ncode")) return (MAG_NCODE);
    42   if (!strcasecmp (string, "nphot")) return (MAG_NPHOT);
     32  if (!strcasecmp (string, "inst"))      return (MAG_INST);
     33  if (!strcasecmp (string, "cat"))       return (MAG_CAT);
     34  if (!strcasecmp (string, "sys"))       return (MAG_SYS);
     35  if (!strcasecmp (string, "rel"))       return (MAG_REL);
     36  if (!strcasecmp (string, "cal"))       return (MAG_CAL);
     37  if (!strcasecmp (string, "ave"))       return (MAG_AVE);
     38  if (!strcasecmp (string, "ref"))       return (MAG_REF);
     39  if (!strcasecmp (string, "err"))       return (MAG_ERR);
     40  if (!strcasecmp (string, "photflags")) return (MAG_PHOT_FLAGS);
     41  if (!strcasecmp (string, "chisq"))     return (MAG_CHISQ);
     42  if (!strcasecmp (string, "ncode"))     return (MAG_NCODE);
     43  if (!strcasecmp (string, "nphot"))     return (MAG_NPHOT);
    4344  return (MAG_NONE);
    4445}
     
    7576  }
    7677
    77 
    7878  // enforce compatibility
    79   // XXX this is kind of poorly done
    80   if ((code[0].type == PHOT_REF) && (*mode != MAG_ERR)) {
    81     *mode = MAG_CAT;
    82   }
    83   if (code[0].type == PHOT_DEP) {
    84     if (useDefault) {
     79  if (useDefault) {
     80    if (code[0].type == PHOT_REF) {
     81      *mode = MAG_CAT;
     82    }
     83    if (code[0].type == PHOT_DEP) {
    8584      *mode = MAG_REL;
    8685    }
     
    186185  if (!strcasecmp (fieldName, "DETID"))      ESCAPE (MEAS_DET_ID,         MAG_NONE, OPIHI_INT);
    187186  if (!strcasecmp (fieldName, "OBJID"))      ESCAPE (MEAS_OBJ_ID,         MAG_NONE, OPIHI_INT);
     187  if (!strcasecmp (fieldName, "CATID"))      ESCAPE (MEAS_CAT_ID,         MAG_NONE, OPIHI_INT);
    188188  if (!strcasecmp (fieldName, "IMAGEID"))    ESCAPE (MEAS_IMAGE_ID,       MAG_NONE, OPIHI_INT);
    189189  if (!strcasecmp (fieldName, "PSF_QF"))     ESCAPE (MEAS_PSF_QF,         MAG_NONE, OPIHI_FLT);
     
    206206  field->ID = MEAS_MAG;
    207207  field->magMode = mode;
    208   field->type = OPIHI_FLT;
     208  switch (mode) {
     209    case MAG_NCODE:
     210    case MAG_NPHOT:
     211    case MAG_PHOT_FLAGS:
     212      field->type = OPIHI_INT;
     213      break;
     214    default:
     215      field->type = OPIHI_FLT;
     216      break;
     217  }
    209218  field->photcode = code;
    210219  return (TRUE);
     
    280289  field->ID = AVE_MAG;
    281290  field->magMode = mode;
    282   field->type = OPIHI_FLT;
     291  switch (mode) {
     292    case MAG_NCODE:
     293    case MAG_NPHOT:
     294    case MAG_PHOT_FLAGS:
     295      field->type = OPIHI_INT;
     296      break;
     297    default:
     298      field->type = OPIHI_FLT;
     299      break;
     300  }
    283301  field->photcode = code;
    284302  return (TRUE);
  • trunk/Ohana/src/opihi/dvo/gimages.c

    r14590 r21153  
    103103    if (!FindMosaicForImage (image, Nimage, i)) continue;
    104104
     105    typehash = wordhash (&image[i].coords.ctype[4]);
     106
     107    // for non-linear astrometry solutions, a point which is far from the image may
     108    // potentially appear to land in the image: at large field-position, the high order
     109    // terms which are supposed to be perturbations may dominate the solution
     110
     111    // XXX this code checks if the image is even in the ballpark.  this is not a great
     112    // solution.  the better way to do this would be to use the linear portions of the fit
     113    // only for RD_to_XY, then see if the result is close.
     114    {
     115      Coords local;
     116      double Ro, Do, Xo, Yo, Xs, Ys, Xe, Ye, Radius;
     117     
     118      if (typehash == DistortImage) {
     119        Xo = 0.0;
     120        Yo = 0.0;
     121      } else {
     122        Xo = 0.5*image[i].NX;
     123        Yo = 0.5*image[i].NY;
     124      }
     125
     126      XY_to_RD (&Ro, &Do, Xo, Yo, &image[i].coords);
     127
     128      local.crval1 = Ro;
     129      local.crval2 = Do;
     130      local.crpix1 = local.crpix2 = 0.0;
     131      local.cdelt1 = local.cdelt2 = 1.0/3600.0;
     132      local.pc1_1 = local.pc2_2 = 1.0;
     133      local.pc2_1 = local.pc1_2 = 0.0;
     134      local.Npolyterms = 1;
     135      strcpy (local.ctype, "RA---TAN");
     136
     137      if (typehash == DistortImage) {
     138        Xs = -0.5*image[i].NX;
     139        Ys = -0.5*image[i].NY;
     140        Xe = +0.5*image[i].NX;
     141        Ye = +0.5*image[i].NY;
     142      } else {
     143        Xs = 0.0;
     144        Ys = 0.0;
     145        Xe = image[i].NX;
     146        Ye = image[i].NY;
     147      }
     148     
     149      XY_to_RD (&Ro, &Do, Xs, Ys, &image[i].coords);
     150      RD_to_XY (&Xo, &Xo, Ro, Do, &local);
     151      Radius = hypot (Xo, Yo);
     152      // fprintf (stderr, "%s: %f %f    %f ", image[i].name, local.crval1, local.crval2, Radius);
     153
     154      XY_to_RD (&Ro, &Do, Xs, Ye, &image[i].coords);
     155      RD_to_XY (&Xo, &Xo, Ro, Do, &local);
     156      Radius = MAX (Radius, hypot (Xo, Yo));
     157      // fprintf (stderr, "%f ", Radius);
     158
     159      XY_to_RD (&Ro, &Do, Xe, Ys, &image[i].coords);
     160      RD_to_XY (&Xo, &Xo, Ro, Do, &local);
     161      Radius = MAX (Radius, hypot (Xo, Yo));
     162      // fprintf (stderr, "%f ", Radius);
     163
     164      XY_to_RD (&Ro, &Do, Xe, Ye, &image[i].coords);
     165      RD_to_XY (&Xo, &Xo, Ro, Do, &local);
     166      Radius = MAX (Radius, hypot (Xo, Yo));
     167      // fprintf (stderr, "%f ", Radius);
     168
     169      RD_to_XY (&Xo, &Yo, Ra, Dec, &local);
     170      // fprintf (stderr, " : %f\n", hypot(Xo,Yo));
     171      if (hypot(Xo,Yo) > 1.5*Radius) continue;
     172      // fprintf (stderr, " ** try me **\n");
     173    }
     174
    105175    status = RD_to_XY (&X, &Y, Ra, Dec, &image[i].coords);
    106176    if (!finite(X)) continue;
    107177    if (!finite(Y)) continue;
    108178    if (!status) continue;
    109 
    110     typehash = wordhash (&image[i].coords.ctype[4]);
    111179
    112180    if (typehash == DistortImage) {
  • trunk/Ohana/src/opihi/dvo/skycoverage.c

    r19823 r21153  
    11# include "dvoshell.h"
     2
     3int wordhash (char *word);
    24
    35int skycoverage (int argc, char **argv) {
    46
     7  int WITH_MOSAIC, SOLO_MOSAIC;
    58  int i, N, Nimage, status, TimeSelect, ByName, xs, ys;
    69  time_t tzero, tend;
    7   double pixscale, dPix, r, d, Xi, Yi, Xs, Ys, x[2], y[2], trange;
     10  double pixscale, dX, dY, Npts, r, d, Xi, Yi, Xs, Ys, x[2], y[2], trange, RaCenter;
    811  Image *image;
    912  char name[256];
     
    1215  Buffer *buf;
    1316  Coords coords;
     17  int typehash;
     18
     19  WITH_MOSAIC = FALSE;
     20  if ((N = get_argument (argc, argv, "+mosaic"))) {
     21    remove_argument (N, &argc, argv);
     22    WITH_MOSAIC = TRUE;
     23  }
     24
     25  SOLO_MOSAIC = FALSE;
     26  if ((N = get_argument (argc, argv, "-mosaic"))) {
     27    remove_argument (N, &argc, argv);
     28    SOLO_MOSAIC = TRUE;
     29    WITH_MOSAIC = TRUE;
     30  }
     31
     32  RaCenter = 0.0;
     33  if ((N = get_argument (argc, argv, "-ra-center"))) {
     34    remove_argument (N, &argc, argv);
     35    RaCenter = atof (argv[N]);
     36    remove_argument (N, &argc, argv);
     37  }
    1438
    1539  ByName = FALSE;
     
    6185 
    6286  if (argc != 4) {
    63     gprint (GP_ERR, "USAGE: skycoverage (buffer) (pixscale) (dPix) [-time start range] [-name name]\n");
     87    gprint (GP_ERR, "USAGE: skycoverage (buffer) (pixscale) (Npts) [-time start range] [-name name]\n");
    6488    gprint (GP_ERR, "       (buffer) saves bitmapped AIT plot\n");
    6589    gprint (GP_ERR, "       (pixscale) specifies the pixel size in degrees\n");
     90    gprint (GP_ERR, "       (Npts) gives the number of test points per image in each dimension\n");
    6691    gprint (GP_ERR, "       note: we need 64800 / (pixscale)^2 pixels to represent the sky\n");
    6792    return (FALSE);
     
    7095  if ((buf = SelectBuffer (argv[1], ANYBUFFER, TRUE)) == NULL) return (FALSE);
    7196  pixscale = atof(argv[2]);
    72   dPix     = atof(argv[3]);
     97  Npts     = atof(argv[3]);
    7398
    7499  Nx = 360/pixscale;
     
    80105  strcpy (buf[0].file, "(empty)");
    81106
    82   coords.crval1 = 180;
     107  coords.crval1 = RaCenter;
    83108  coords.crval2 = 0;
    84109  coords.crpix1 = 0.5*Nx;
    85110  coords.crpix2 = 0.5*Ny;
    86111  strcpy (coords.ctype, "DEC--AIT");
    87   coords.pc1_1 = coords.pc2_2 = 1;
    88   coords.pc1_2 = coords.pc2_1 = 0;
     112  coords.pc1_1 = -1.0;
     113  coords.pc2_2 = +1.0;
     114  coords.pc1_2 =  0.0;
     115  coords.pc2_1 =  0.0;
    89116  coords.cdelt1 = coords.cdelt2 = pixscale;
    90117  coords.Npolyterms = 0;
     
    109136  }
    110137
     138  int DistortImage = wordhash ("-DIS");
     139
    111140  for (i = 0; i < Nimage; i++) {
    112141    if (ByName && strcmp (name, image[i].name)) continue;
    113142    if (TimeSelect && ((image[i].tzero < tzero) || (image[i].tzero+image[i].trate*image[i].NY > tzero + trange))) continue;
    114143    if (!FindMosaicForImage (image, Nimage, i)) continue;
     144
     145    typehash = wordhash (&image[i].coords.ctype[4]);
     146
     147    /* DIS images represent a field, not a chip */
     148    if ((typehash == DistortImage) && !WITH_MOSAIC) continue;
     149    if ((typehash != DistortImage) &&  SOLO_MOSAIC) continue;
    115150
    116151    /* project this image to screen display coords */
     
    125160    status = FALSE;
    126161   
    127     for (Yi = y[0] + 0.5*dPix; Yi < y[1]; Yi += dPix) {
    128       for (Xi = x[0] + 0.5*dPix; Xi < x[1]; Xi += dPix) {
     162    dX = (x[1] - x[0]) / Npts;
     163    dY = (y[1] - y[0]) / Npts;
     164   
     165    for (Yi = y[0] + 0.5*dY; Yi < y[1]; Yi += dY) {
     166      for (Xi = x[0] + 0.5*dX; Xi < x[1]; Xi += dX) {
    129167        XY_to_RD (&r, &d, Xi, Yi, &image[i].coords);
    130168        r = ohana_normalize_angle (r);
    131169        status = RD_to_XY (&Xs, &Ys, r, d, &coords);
     170        if (Xs < 0) continue;
     171        if (Ys < 0) continue;
     172        if (Xs >= Nx) continue;
     173        if (Ys >= Ny) continue;
    132174        if (status) {
    133175          xs = (int)Xs;
  • trunk/Ohana/src/opihi/include/astro.h

    r17419 r21153  
    99# define ASTRO_H
    1010
    11 void InitAstro ();
    12 void FreeAstro ();
     11void InitAstro (void);
     12void FreeAstro (void);
    1313
    1414typedef struct {
  • trunk/Ohana/src/opihi/include/basic.h

    r17419 r21153  
    33# include "dvomath.h"
    44
    5 void cleanup ();
    6 void InitBasic ();
    7 void FreeBasic ();
    8 void InitBasic_PantasksClient ();
     5void cleanup (void);
     6void InitBasic (void);
     7void FreeBasic (void);
     8void InitBasic_PantasksClient (void);
  • trunk/Ohana/src/opihi/include/data.h

    r20936 r21153  
    3333} Book;
    3434
    35 void InitData ();
    36 void FreeData ();
     35void InitData (void);
     36void FreeData (void);
    3737
    3838/* in book.c */
    39 void InitBooks ();
     39void InitBooks (void);
    4040void InitBook (Book *book, char *name);
    4141void FreeBook (Book *book);
     
    4444Book *CreateBook (char *name);
    4545int DeleteBook (Book *book);
    46 void ListBooks ();
     46void ListBooks (void);
    4747
    4848/* in page.c */
     
    6161
    6262/* in queues.c */
    63 void InitQueues ();
    64 void ListQueues ();
     63void InitQueues (void);
     64void ListQueues (void);
    6565Queue *FindQueue (char *name);
    6666Queue *CreateQueue (char *name);
     
    151151int read_table_vectors (int argc, char **argv, char *extname);
    152152
    153 void *db_getConnection ();
     153void *db_getConnection (void);
    154154
    155155int bracket (double *list, int Nlist, int mode, double value);
    156156int ibracket (int *list, int Nlist, int mode, double value);
    157157
    158 void FreeKapa ();
    159 void FreeQueues ();
    160 void FreeBooks ();
     158void FreeKapa (void);
     159void FreeQueues (void);
     160void FreeBooks (void);
    161161
    162162# endif
  • trunk/Ohana/src/opihi/include/dimm.h

    r4689 r21153  
    66# include "sbig.h"
    77
    8 void InitDIMM ();
     8void InitDIMM (void);
    99
    1010/* telescope.c */
     
    1919int setTime (char *lst);
    2020int getSite (double *lon, double *lat, double *lst);
    21 int ParkScope();
    22 int SleepScope();
    23 int WakeScope();
     21int ParkScope(void);
     22int SleepScope(void);
     23int WakeScope(void);
    2424
    2525/* Serial.c */
     
    3636/* camera.c */
    3737int InitCamera (int port);
    38 void DumpCameraInfo ();
     38void DumpCameraInfo (void);
    3939void CameraFullSize (int *x, int *y);
    4040int SetTemperature (double temp);
    41 double GetTemperature ();
    42 int DumpCameraStatus ();
     41double GetTemperature (void);
     42int DumpCameraStatus (void);
    4343int Exposure (double exptime);
    4444static int readout_callback (float percent);
    4545int ReadOut (int x, int y, int dx, int dy, int binning, unsigned short *buffer);
    46 int OpenShutter ();
    47 int CloseShutter ();
     46int OpenShutter (void);
     47int CloseShutter (void);
    4848
    4949  /* this image structure stuff is considered for further development */
  • trunk/Ohana/src/opihi/include/display.h

    r20936 r21153  
    2020int           SetImage              PROTO((KapaImageData *data));
    2121
    22 void          QuitKapa              PROTO(());
    23 void          InitKapa              PROTO(());
     22void          QuitKapa              PROTO((void));
     23void          InitKapa              PROTO((void));
    2424int           open_kapa             PROTO((int entry));
    2525int           close_kapa            PROTO((char *name));
     
    2727int           DelKapaDevice         PROTO((char *name));
    2828int           FindKapaDevice        PROTO((char *name));
    29 char         *GetKapaName           PROTO(());
     29char         *GetKapaName           PROTO((void));
    3030
    3131/* calling program need to define a function 'get_variable' which
  • trunk/Ohana/src/opihi/include/dvoshell.h

    r20936 r21153  
    3333      MAG_REF,
    3434      MAG_ERR,
     35      MAG_PHOT_FLAGS,
    3536      MAG_CHISQ,
    3637      MAG_NCODE,
     
    99100      MEAS_DET_ID,
    100101      MEAS_OBJ_ID,
     102      MEAS_CAT_ID,
    101103      MEAS_IMAGE_ID,
    102104      MEAS_PSF_QF,
     
    262264double       *ExtractMeasuresByDMag PROTO((PhotCode **code, int *mode, int use_first, Average *average, SecFilt *secfilt, Measure *measure, int *nlist, int param));
    263265double       *ExtractMeasuresDMag   PROTO((PhotCode **code, int *mode, Average *average, SecFilt *secfilt, Measure *measure, int *nlist));
    264 void          FreeImageSelection    PROTO(());
    265 void          FreeImageSelection    PROTO(());
     266void          FreeImageSelection    PROTO((void));
     267void          FreeImageSelection    PROTO((void));
    266268int           GetAverageParam       PROTO((char *parname));
    267 void          GetAverageParamHelp   PROTO(());
     269void          GetAverageParamHelp   PROTO((void));
    268270int           GetMagMode            PROTO((char *string));
    269271double        GetMeasure            PROTO((int param, Average *average, Measure *measure, double mag));
     
    271273int           GetMeasureTypeCode    PROTO((Measure *measure));
    272274int           GetPhotcodeInfo       PROTO((char *string, PhotCode **Code, int *Mode));
    273 int           GetSelectionParam     PROTO(());
     275int           GetSelectionParam     PROTO((void));
    274276int           GetTimeSelection      PROTO((time_t *tz, time_t *te));
    275 void          InitDVO               PROTO(());
    276 void          FreeDVO               PROTO(());
    277 int           InitPhotcodes         PROTO(());
     277void          InitDVO               PROTO((void));
     278void          FreeDVO               PROTO((void));
     279int           InitPhotcodes         PROTO((void));
    278280Image        *LoadImages            PROTO((int *Nimage));
    279281Image        *MatchImage            PROTO((unsigned int time, short int source));
     
    285287SkyList      *SkyListLoadFile       PROTO((char *filename));
    286288int           SetCATDIR             PROTO((char *path, int verbose));
    287 char *        GetCATDIR             PROTO(());
    288 SkyTable     *GetSkyTable           PROTO(());
     289char *        GetCATDIR             PROTO((void));
     290SkyTable     *GetSkyTable           PROTO((void));
    289291SkyList      *SkyListFromFile       PROTO((char *filename));
    290292SkyRegionSelection *SetRegionSelection    PROTO((int *argc, char **argv));
     
    339341int get_skyregion (double *Rs, double *Re, double *Ds, double *De);
    340342int set_skyregion (double Rs, double Re, double Ds, double De);
    341 void FreeImageSelection ();
     343void FreeImageSelection (void);
    342344
    343345void FreeSkyRegionSelection (SkyRegionSelection *selection);
     
    345347
    346348int dbExtractMeasuresInitTransform (CoordTransformSystem target);
    347 int dbExtractMeasuresInitAve ();
    348 int dbExtractMeasuresInitMeas ();
    349 int dbExtractMeasuresInit ();
     349int dbExtractMeasuresInitAve (void);
     350int dbExtractMeasuresInitMeas (void);
     351int dbExtractMeasuresInit (void);
    350352
    351353int dbExtractAveragesInitTransform (CoordTransformSystem target);
    352 int dbExtractAveragesInit ();
     354int dbExtractAveragesInit (void);
    353355
    354356int dbExtractImagesInitTransform (CoordTransformSystem target);
    355 int dbExtractImagesInit ();
    356 int dbExtractImagesReset ();
     357int dbExtractImagesInit (void);
     358int dbExtractImagesReset (void);
    357359
    358360# endif
  • trunk/Ohana/src/opihi/include/imfit.h

    r20936 r21153  
    88
    99opihi_flt (*fitfunc)(opihi_flt, opihi_flt, opihi_flt *, int, opihi_flt *);
    10 void (*imfit_cleanup)();
     10void (*imfit_cleanup)(void);
    1111
    1212void fgauss_setup (char *name);
  • trunk/Ohana/src/opihi/include/mana.h

    r17419 r21153  
    55# ifndef MANA_H
    66
    7 void InitMana ();
    8 void FreeMana ();
     7void InitMana (void);
     8void FreeMana (void);
    99int *findrowpeaks (float *row, int Nrow, float threshold, int *npeaks);
    1010
  • trunk/Ohana/src/opihi/include/pantasks.h

    r20936 r21153  
    167167/* scheduler prototypes */
    168168
    169 void InitPantasks ();
    170 void FreePantasks ();
    171 
    172 void InitPantasksServer ();
    173 void FreePantasksServer ();
    174 
    175 void InitPantasksClient ();
    176 void FreePantasksClient ();
    177 
    178 void InitTasks ();
    179 void FreeTasks ();
    180 
    181 Task *NextTask ();
     169void InitPantasks (void);
     170void FreePantasks (void);
     171
     172void InitPantasksServer (void);
     173void FreePantasksServer (void);
     174
     175void InitPantasksClient (void);
     176void FreePantasksClient (void);
     177
     178void InitTasks (void);
     179void FreeTasks (void);
     180
     181Task *NextTask (void);
    182182Task *FindTask (char *name);
    183183void ListTasks (int verbose);
     
    186186Task *CreateTask (char *name);
    187187int ValidateTask (Task *task, int RequireStatic);
    188 int RegisterNewTask ();
    189 int DeleteNewTask ();
    190 Task *GetNewTask ();
    191 Task *GetActiveTask ();
     188int RegisterNewTask (void);
     189int DeleteNewTask (void);
     190Task *GetNewTask (void);
     191Task *GetActiveTask (void);
    192192void SetTaskTimer (struct timeval *timer);
    193193double GetTaskTimer (struct timeval start, int verbose);
    194 void InitTaskTimers ();
     194void InitTaskTimers (void);
    195195int TaskHash (char *input);
    196196int RemoveTask (Task *task);
     
    200200void UpdateTaskTimerStats (Task *task, int mode, double dtime);
    201201
    202 int NextJobID ();
    203 void InitJobIDs ();
    204 void FreeJobIDs ();
     202int NextJobID (void);
     203void InitJobIDs (void);
     204void FreeJobIDs (void);
    205205int FreeJobID (int ID);
    206206
    207 void InitJobs ();
    208 void FreeJobs ();
    209 
    210 Job *NextJob ();
     207void InitJobs (void);
     208void FreeJobs (void);
     209
     210Job *NextJob (void);
    211211Job *FindJob (int JobID);
    212 void ListJobs ();
     212void ListJobs (void);
    213213Job *CreateJob (Task *task);
    214214int SubmitJob (Job *job);
     
    217217void FreeJob (Job *job);
    218218
    219 float CheckJobs ();
    220 float CheckTasks ();
    221 int CheckSystem ();
    222 int CheckController ();
     219float CheckJobs (void);
     220float CheckTasks (void);
     221int CheckSystem (void);
     222int CheckController (void);
    223223int CheckTimeRanges (TimeRange *ranges, int Nranges);
    224224int BumpTimeRanges (TimeRange *ranges, int Nranges);
     
    230230int DeleteControllerJob (Job *job);
    231231Job *FindControllerJob (int JobID);
    232 int StartController ();
     232int StartController (void);
    233233int ControllerCommand (char *command, char *response, IOBuffer *buffer);
    234234int SubmitLocalJob (Job *job);
    235235int CheckLocalJob (Job *job);
    236236int CheckLocalJobStatus (Job *job);
    237 void InitTaskTimers ();
     237void InitTaskTimers (void);
    238238CommandF *FindControllerCommand (char *cmd);
    239 int QuitController ();
    240 int StopController ();
    241 int RestartController ();
    242 int VerboseMode ();
     239int QuitController (void);
     240int StopController (void);
     241int RestartController (void);
     242int VerboseMode (void);
    243243int KillLocalJob (Job *job);
    244 int CheckControllerOutput ();
    245 int PrintControllerOutput ();
     244int CheckControllerOutput (void);
     245int PrintControllerOutput (void);
    246246
    247247int AddHost (char *hostname, int max_threads);
    248248int DeleteHost (char *hostname);
    249249
    250 int FlushControllerOutput ();
     250int FlushControllerOutput (void);
    251251int KillControllerJob (Job *job);
    252 int CheckControllerStatus ();
     252int CheckControllerStatus (void);
    253253void gotsignal (int signum);
    254254int client_shell (int argc, char **argv);
    255255
    256 void InitClients ();
     256void InitClients (void);
    257257void AddNewClient (int client);
    258258int  DeleteClient (int client);
     
    261261// functions related to the server threads
    262262void CheckTasksSetState (int state);
    263 int CheckTasksGetState ();
     263int CheckTasksGetState (void);
    264264void *CheckTasksThread (void *data);
    265265
    266266void CheckJobsSetState (int state);
    267 int CheckJobsGetState ();
     267int CheckJobsGetState (void);
    268268void *CheckJobsThread (void *data);
    269269
    270270void CheckControllerSetState (int state);
    271 int CheckControllerGetState ();
     271int CheckControllerGetState (void);
    272272void *CheckControllerThread (void *data);
    273273
    274274void CheckInputsSetState (int state);
    275 int CheckInputsGetState ();
     275int CheckInputsGetState (void);
    276276void *CheckInputsThread (void *data);
    277277
    278278// functions related to the queue of input files
    279 void InitInputs ();
    280 void FreeInputs ();
     279void InitInputs (void);
     280void FreeInputs (void);
    281281void AddNewInput (char *input);
    282282int DeleteInput (char *input);
    283 void CheckInputs ();
    284 
    285 void SerialThreadLock ();
    286 void SerialThreadUnlock ();
    287 
    288 int InitPassword ();
     283void CheckInputs (void);
     284
     285void SerialThreadLock (void);
     286void SerialThreadUnlock (void);
     287
     288int InitPassword (void);
    289289int CheckPassword (int BindSocket);
    290290
    291 int FlushJobs ();
     291int FlushJobs (void);
  • trunk/Ohana/src/opihi/include/pclient.h

    r17419 r21153  
    4444IOBuffer child_stderr;
    4545
    46 int InitChild ();
    47 int FreeChild ();
    48 int CheckChild ();
    49 void CheckChildStatus ();
     46int InitChild (void);
     47int FreeChild (void);
     48int CheckChild (void);
     49void CheckChildStatus (void);
    5050
    51 void InitPclient ();
    52 void FreePclient ();
     51void InitPclient (void);
     52void FreePclient (void);
    5353void gotsignal (int signum);
    5454
  • trunk/Ohana/src/opihi/include/pcontrol.h

    r20047 r21153  
    154154// # define ABORT(STRING) { gprint (GP_ERR, "programming error: %s\n", STRING); raise (SIGINT); exit (2); }
    155155
    156 void InitPcontrol ();
    157 void FreePcontrol ();
     156void InitPcontrol (void);
     157void FreePcontrol (void);
    158158
    159159/*** StackOps.c ***/
    160 Stack *InitStack ();
     160Stack *InitStack (void);
    161161void   FreeStack (Stack *stack);
    162162int    PushStack (Stack *stack, int where, void *object, int id, char *name);
     
    173173
    174174/*** CheckSystem.c ***/
    175 int   CheckSystem ();
     175int   CheckSystem (void);
    176176void *CheckSystem_Threaded (void *data);
    177177int   CheckBusyJobs (float delay);
     
    214214
    215215/*** misc files ***/
    216 int    VerboseMode ();  // in verbose.c
     216int    VerboseMode (void);  // in verbose.c
    217217void   gotsignal (int signum); // in pcontrol.c
    218218
    219219/*** IDops.c ***/
    220 void InitIDs ();
    221 IDtype NextJobID ();
    222 IDtype NextHostID ();
     220void InitIDs (void);
     221IDtype NextJobID (void);
     222IDtype NextHostID (void);
    223223void PrintID (gpDest dest, IDtype ID);
    224224IDtype GetID (char *IDword);
    225225
    226226/*** CheckPoint.c ***/
    227 int SetCheckPoint ();
    228 int ClearCheckPoint ();
    229 int TestCheckPoint ();
     227int SetCheckPoint (void);
     228int ClearCheckPoint (void);
     229int TestCheckPoint (void);
    230230
    231231/*** HostOps.c ***/
    232 void   InitHostStacks ();
    233 void   FreeHostStacks ();
     232void   InitHostStacks (void);
     233void   FreeHostStacks (void);
    234234Stack *GetHostStack (int StackID);
    235235char  *GetHostStackName (int StackID);
     
    246246void   DownHost (Host *host);
    247247void   OffHost (Host *host);
    248 int    DownHosts ();
     248int    DownHosts (void);
    249249int    StopHost (Host *host);
    250250int    StopHostResponse (Host *host);
     
    254254int InitJobOutput (JobOutput *output);
    255255int ResetJobOutput (JobOutput *output);
    256 void   InitJobStacks ();
    257 void   FreeJobStacks ();
     256void   InitJobStacks (void);
     257void   FreeJobStacks (void);
    258258Stack *GetJobStack (int StackID);
    259259char  *GetJobStackName (int StackID);
  • trunk/Ohana/src/opihi/include/shell.h

    r17419 r21153  
    1616typedef enum {GP_LOG, GP_ERR} gpDest;
    1717
    18 typedef int CommandF ();
     18typedef int CommandF (int argc, char **argv);
    1919
    2020typedef struct sockaddr_in SockAddress;
     
    6565int           opihi                     PROTO((int argc, char **argv));
    6666int           multicommand              PROTO((char *line));
    67 int getServer ();
     67int getServer (void);
    6868void          multicommand_InitServer   PROTO((void));
    69 void multicommand_StopServer ();
     69void multicommand_StopServer (void);
    7070
    7171int           command                   PROTO((char *line, char **outline, int VERBOSE));
     
    7474char         *parse                     PROTO((char *line));
    7575char        **parse_commands            PROTO((char *, int *));
    76 void          welcome                   PROTO(());
     76void          welcome                   PROTO((void));
    7777
    7878int           add_listentry             PROTO((int ThisList, char *line));
     
    8585int           is_task_exec              PROTO((char *line));
    8686int           is_macro_create           PROTO((char *line));
    87 void          InitLists                 PROTO(());
    88 int current_list_depth ();
    89 int increase_list_depth ();
    90 int decrease_list_depth ();
     87void          InitLists                 PROTO((void));
     88int current_list_depth (void);
     89int increase_list_depth (void);
     90int decrease_list_depth (void);
    9191char *get_next_listentry (int ThisList);
    9292
    93 void          InitCommands              PROTO(());
     93void          InitCommands              PROTO((void));
    9494void          AddCommand                PROTO((Command *new));
    9595int           DeleteCommand             PROTO((Command *command));
     
    105105int           GetMacroDepth             PROTO((void));
    106106void          ListMacro                 PROTO((Macro *macro));
    107 void          ListMacros                PROTO(());
     107void          ListMacros                PROTO((void));
    108108void          FreeMacro                 PROTO((Macro *macro));
    109109CommandF     *find_macro_command        PROTO((char *name));
     
    151151char         *memstr                    PROTO((char *m1, char *m2, int n));
    152152int           write_fmt                 PROTO((int fd, char *format, ...));
    153 char         *opihi_version             PROTO(());
     153char         *opihi_version             PROTO((void));
    154154char         *strip_version             PROTO((char *input));
    155155
    156156/* gprint functions */
    157 void          gprintInit                PROTO(());
     157void          gprintInit                PROTO((void));
    158158gpStream     *gprintGetStream           PROTO((gpDest dest));
    159159void          gprintSetBuffer           PROTO((gpDest dest));
     
    172172int GetClientSocket (char *hostname);
    173173int InitServerSocket_Named (char *hostname, SockAddress *Address);
    174 int DefineValidIP ();
     174int DefineValidIP (void);
    175175
    176 void FreeCommands ();
    177 void FreeMacros ();
    178 void FreeBuffers ();
    179 void FreeVectors ();
    180 void FreeVariables ();
    181 void FreeLists ();
     176void FreeCommands (void);
     177void FreeMacros (void);
     178void FreeBuffers (void);
     179void FreeVectors (void);
     180void FreeVariables (void);
     181void FreeLists (void);
    182182
    183183# endif
  • trunk/Ohana/src/photdbc/include/photdbc.h

    r17284 r21153  
    111111void TrapSignal (int sig);
    112112void SetProtect (int mode);
    113 int SetSignals ();
     113int SetSignals (void);
    114114int copy_images (char *outdir);
  • trunk/Ohana/src/relastro/include/relastro.h

    r17243 r21153  
    139139int           args                PROTO((int argc, char **argv));
    140140int           bcatalog            PROTO((Catalog *subcatalog, Catalog *catalog));
    141 void          clean_images        PROTO(());
     141void          clean_images        PROTO((void));
    142142void          clean_measures      PROTO((Catalog *catalog, int Ncatalog, int final));
    143 void          clean_mosaics       PROTO(());
     143void          clean_mosaics       PROTO((void));
    144144void          clean_stars         PROTO((Catalog *catalog, int Ncatalog));
    145145int           corner_check        PROTO((double *x1, double *y1, double *x2, double *y2));
    146 void          dumpGrid            PROTO(());
    147 void          dump_grid           PROTO(());
     146void          dumpGrid            PROTO((void));
     147void          dump_grid           PROTO((void));
    148148int           edge_check          PROTO((double *x1, double *y1, double *x2, double *y2));
    149149void          findImages          PROTO((Catalog *catalog, int Ncatalog));
     
    154154void TrapSignal (int sig);
    155155void SetProtect (int mode);
    156 int SetSignals ();
     156int SetSignals (void);
    157157
    158158GSCRegion    *find_regions        PROTO((Image *image, int Nimage, int *Nregions, GSCRegion *fullregion));
     
    202202void          plot_defaults       PROTO((Graphdata *graphdata));
    203203void          plot_grid           PROTO((Catalog *catalog));
    204 void          plot_images         PROTO(());
     204void          plot_images         PROTO((void));
    205205void          plot_list           PROTO((Graphdata *graphdata, double *xlist, double *ylist, int N, char *label, char *file));
    206206void          plot_mosaic_fields  PROTO((Catalog *catalog));
    207 void          plot_mosaics        PROTO(());
     207void          plot_mosaics        PROTO((void));
    208208void          plot_scatter        PROTO((Catalog *catalog, int Ncatalog));
    209209void          plot_star_coords    PROTO((Catalog *catalog, int Ncatalog));
     
    212212int           setExclusions       PROTO((Catalog *catalog, int Ncatalog));
    213213void          setMcal             PROTO((Catalog *catalog, int Poor));
    214 void          setMcalFinal        PROTO(());
     214void          setMcalFinal        PROTO((void));
    215215int           setMcalOutput       PROTO((Catalog *catalog, int Ncatalog));
    216216void          setMgrid            PROTO((Catalog *catalog));
     
    238238StatType      statsStarX          PROTO((Catalog *catalog, int Ncatalog));
    239239void          wcatalog            PROTO((Catalog *catalog));
    240 void          wimages             PROTO(());
     240void          wimages             PROTO((void));
    241241void          write_coords        PROTO((Header *header, Coords *coords));
    242242
     
    289289
    290290float GetAstromError (Measure *measure, int mode);
    291 int relastro_objects ();
     291int relastro_objects (void);
    292292int UpdateObjectOffsets (SkyList *skylist);
  • trunk/Ohana/src/relphot/include/relphot.h

    r20323 r21153  
    125125int           args                PROTO((int argc, char **argv));
    126126int           bcatalog            PROTO((Catalog *subcatalog, Catalog *catalog));
    127 void          clean_images        PROTO(());
     127void          clean_images        PROTO((void));
    128128void          clean_measures      PROTO((Catalog *catalog, int Ncatalog, int final));
    129 void          clean_mosaics       PROTO(());
     129void          clean_mosaics       PROTO((void));
    130130void          clean_stars         PROTO((Catalog *catalog, int Ncatalog));
    131131int           corner_check        PROTO((double *x1, double *y1, double *x2, double *y2));
    132 void          dumpGrid            PROTO(());
    133 void          dump_grid           PROTO(());
     132void          dumpGrid            PROTO((void));
     133void          dump_grid           PROTO((void));
    134134int           edge_check          PROTO((double *x1, double *y1, double *x2, double *y2));
    135135void          findImages          PROTO((Catalog *catalog, int Ncatalog));
     
    140140void TrapSignal (int sig);
    141141void SetProtect (int mode);
    142 int SetSignals ();
     142int SetSignals (void);
    143143
    144144void          freeGridBins        PROTO((int Ncatalog));
     
    179179void          plot_defaults       PROTO((Graphdata *graphdata));
    180180void          plot_grid           PROTO((Catalog *catalog));
    181 void          plot_images         PROTO(());
     181void          plot_images         PROTO((void));
    182182void          plot_list           PROTO((Graphdata *graphdata, double *xlist, double *ylist, int N, char *label, char *format, ...));
    183183void          plot_mosaic_fields  PROTO((Catalog *catalog));
    184 void          plot_mosaics        PROTO(());
     184void          plot_mosaics        PROTO((void));
    185185void          plot_scatter        PROTO((Catalog *catalog, int Ncatalog));
    186186void          plot_star_coords    PROTO((Catalog *catalog, int Ncatalog));
     
    190190int           setExclusions       PROTO((Catalog *catalog, int Ncatalog));
    191191void          setMcal             PROTO((Catalog *catalog, int Poor));
    192 void          setMcalFinal        PROTO(());
     192void          setMcalFinal        PROTO((void));
    193193int           setMcalOutput       PROTO((Catalog *catalog, int Ncatalog));
    194194void          setMgrid            PROTO((Catalog *catalog));
     
    217217StatType      statsStarX          PROTO((Catalog *catalog, int Ncatalog));
    218218void          wcatalog            PROTO((Catalog *catalog));
    219 void          wimages             PROTO(());
     219void          wimages             PROTO((void));
    220220void          write_coords        PROTO((Header *header, Coords *coords));
    221 int relphot_objects ();
     221int relphot_objects (void);
  • trunk/Ohana/src/relphot/src/StarOps.c

    r20936 r21153  
    207207          if (isnan(Msys)) continue;
    208208
     209          // XXX this is a hack for the 2MASS search; better to save an average value?
     210          if (catalog[i].measure[m].qPSF < 0.85) continue;
     211
    209212          list[N] = Msys - catalog[i].measure[m].Mcal;
    210213          dlist[N] = MAX (catalog[i].measure[m].dM, MIN_ERROR);
  • trunk/Ohana/src/relphot/src/relphot.c

    r20537 r21153  
    125125    if ((i == 1) || (i == 5) || (i ==  9) || (i == 13)) clean_measures (catalog, Ncatalog, FALSE);
    126126    if ((i == 2) || (i == 6) || (i == 10) || (i == 14)) clean_stars (catalog, Ncatalog);
    127     if ((i == 4) || (i == 8) || (i == 12) || (i == 16)) clean_mosaics (catalog, Ncatalog);
     127    if ((i == 4) || (i == 8) || (i == 12) || (i == 16)) clean_mosaics ();
    128128    if ((i == 4) || (i == 8) || (i == 12) || (i == 16)) clean_images ();
    129129    global_stats (catalog, Ncatalog);
  • trunk/Ohana/src/relphot/src/relphot_objects.c

    r17242 r21153  
    44
    55  int i, j, k, m;
     6  int Nsecfilt;
    67
    78  SkyTable *sky = NULL;
     
    3940    // XXX consider what gets reset (only PHOTOM flags)
    4041    if (RESET) {
     42      Nsecfilt = catalog.Nsecfilt;
    4143      for (j = 0; j < catalog.Naverage; j++) {
    4244        catalog.average[j].code = 0;
     45        for (k = 0; k < Nsecfilt; k++) {
     46          catalog.secfilt[j*Nsecfilt + k].M  = NAN;
     47          catalog.secfilt[j*Nsecfilt + k].dM = NAN;
     48          catalog.secfilt[j*Nsecfilt + k].Xm = NAN_S_SHORT;
     49          catalog.secfilt[j*Nsecfilt + k].Ncode = 0;
     50          catalog.secfilt[j*Nsecfilt + k].Nused = 0;
     51          catalog.secfilt[j*Nsecfilt + k].dummy = 0;
     52        }
    4353        m = catalog.average[j].measureOffset;
    4454        for (k = 0; k < catalog.average[j].Nmeasure; k++) {
  • trunk/Ohana/src/uniphot/include/uniphot.h

    r16061 r21153  
    7373void          PlotVector         PROTO((int Npts, double *vect, int mode, int N));
    7474void          PrepPlotting       PROTO((int Npts, Graphdata *graphmode, int N));
    75 void          XDead              PROTO(());
     75void          XDead              PROTO((void));
    7676int           args               PROTO((int argc, char **argv));
    77 void          dumpresult         PROTO(());
     77void          dumpresult         PROTO((void));
    7878Group        *find_image_sgroups PROTO((FITS_DB *db, ImageLink **imlink, int *Nsgroup));
    7979Group        *find_image_tgroups PROTO((FITS_DB *db, ImageLink **imlink, int *Ntgroup));
     
    101101void TrapSignal (int sig);
    102102void SetProtect (int mode);
    103 int SetSignals ();
     103int SetSignals (void);
    104104int subset_images (FITS_DB *db);
    105105void update (FITS_DB *db, Group *sgroup, int Nsgroup);
Note: See TracChangeset for help on using the changeset viewer.