Changeset 39419
- Timestamp:
- Mar 1, 2016, 11:34:48 AM (10 years ago)
- Location:
- branches/eam_branches/ohana.20160226/src/opihi
- Files:
-
- 104 edited
-
cmd.astro/flux.c (modified) (3 diffs)
-
cmd.astro/imfit-fgauss.c (modified) (1 diff)
-
cmd.astro/imfit-pgauss-psf.c (modified) (1 diff)
-
cmd.astro/imfit-pgauss.c (modified) (1 diff)
-
cmd.astro/imfit-qfgauss.c (modified) (1 diff)
-
cmd.astro/imfit-qgauss-psf.c (modified) (1 diff)
-
cmd.astro/imfit-qgauss.c (modified) (1 diff)
-
cmd.astro/imfit-qrgauss.c (modified) (1 diff)
-
cmd.astro/imfit-rgauss.c (modified) (1 diff)
-
cmd.astro/imfit-serbulge.c (modified) (1 diff)
-
cmd.astro/imfit-sersic.c (modified) (1 diff)
-
cmd.astro/imfit-sgauss-psf.c (modified) (1 diff)
-
cmd.astro/imfit-sgauss.c (modified) (1 diff)
-
cmd.astro/imfit-tgauss.c (modified) (1 diff)
-
cmd.astro/imfit-vgauss.c (modified) (1 diff)
-
cmd.astro/spexseq.c (modified) (1 diff)
-
cmd.basic/continue.c (modified) (2 diffs)
-
cmd.basic/list_help.c (modified) (1 diff)
-
cmd.basic/list_vars.c (modified) (1 diff)
-
cmd.basic/nop.c (modified) (1 diff)
-
cmd.basic/run_for.c (modified) (1 diff)
-
cmd.basic/run_foreach.c (modified) (1 diff)
-
cmd.basic/shell.c (modified) (6 diffs)
-
cmd.data/book_commands.c (modified) (1 diff)
-
cmd.data/cursor.c (modified) (3 diffs)
-
cmd.data/gaussdeviate.c (modified) (1 diff)
-
cmd.data/list_buffers.c (modified) (1 diff)
-
cmd.data/list_vectors.c (modified) (1 diff)
-
cmd.data/medimage.c (modified) (1 diff)
-
cmd.data/medimage_commands.c (modified) (1 diff)
-
cmd.data/queuelist.c (modified) (1 diff)
-
cmd.data/spline.c (modified) (1 diff)
-
cmd.data/spline_commands.c (modified) (1 diff)
-
cmd.data/uniq.c (modified) (4 diffs)
-
cmd.data/vellipse.c (modified) (1 diff)
-
cmd.data/vgauss.c (modified) (1 diff)
-
cmd.data/vmaxwell.c (modified) (1 diff)
-
dvo/avextract.c (modified) (3 diffs)
-
dvo/avmatch.c (modified) (3 diffs)
-
dvo/catname.c (modified) (2 diffs)
-
dvo/ccd.c (modified) (2 diffs)
-
dvo/cmd.c (modified) (4 diffs)
-
dvo/dmt.c (modified) (1 diff)
-
dvo/dvo.c.in (modified) (1 diff)
-
dvo/dvo_host_utils.c (modified) (2 diffs)
-
dvo/fitcolors.c (modified) (5 diffs)
-
dvo/fitsed.c (modified) (5 diffs)
-
dvo/gcat.c (modified) (2 diffs)
-
dvo/gstar.c (modified) (1 diff)
-
dvo/imdata.c (modified) (2 diffs)
-
dvo/imextract.c (modified) (4 diffs)
-
dvo/mextract.c (modified) (4 diffs)
-
dvo/mmatch.c (modified) (3 diffs)
-
dvo/mmextract.c (modified) (4 diffs)
-
dvo/objectcoverage.c (modified) (2 diffs)
-
dvo/paverage.c (modified) (2 diffs)
-
dvo/pmeasure.c (modified) (2 diffs)
-
dvo/procks.c (modified) (1 diff)
-
dvo/showtile.c (modified) (1 diff)
-
dvo/skycat.c (modified) (2 diffs)
-
dvo/version.c (modified) (1 diff)
-
include/dvoshell.h (modified) (1 diff)
-
include/shell.h (modified) (1 diff)
-
lib.data/hermitian.c (modified) (1 diff)
-
lib.shell/CommandOps.c (modified) (1 diff)
-
lib.shell/VectorIO.c (modified) (2 diffs)
-
lib.shell/dvomath.c (modified) (2 diffs)
-
lib.shell/exec_loop.c (modified) (3 diffs)
-
lib.shell/interrupt.c (modified) (5 diffs)
-
lib.shell/macro_edit.c (modified) (1 diff)
-
lib.shell/macro_read.c (modified) (1 diff)
-
lib.shell/macro_write.c (modified) (1 diff)
-
lib.shell/multicommand.c (modified) (1 diff)
-
mana/mana.c.in (modified) (1 diff)
-
mana/version.c (modified) (1 diff)
-
pantasks/ListenClients.c (modified) (1 diff)
-
pantasks/controller_machines.c (modified) (1 diff)
-
pantasks/controller_threads.c (modified) (1 diff)
-
pantasks/controller_version.c (modified) (1 diff)
-
pantasks/invalid.c (modified) (1 diff)
-
pantasks/jobs_and_tasks_thread.c (modified) (1 diff)
-
pantasks/pantasks.c.in (modified) (1 diff)
-
pantasks/pantasks_client.c.in (modified) (1 diff)
-
pantasks/pantasks_server.c.in (modified) (1 diff)
-
pantasks/run.c (modified) (1 diff)
-
pantasks/server_connect.c (modified) (1 diff)
-
pantasks/server_disconnect.c (modified) (1 diff)
-
pantasks/server_run.c (modified) (3 diffs)
-
pantasks/stop.c (modified) (2 diffs)
-
pantasks/thread_locks.c (modified) (2 diffs)
-
pantasks/version.c (modified) (1 diff)
-
pclient/check.c (modified) (1 diff)
-
pclient/pclient.c.in (modified) (2 diffs)
-
pclient/reset.c (modified) (1 diff)
-
pclient/status.c (modified) (1 diff)
-
pclient/stdout.c (modified) (2 diffs)
-
pclient/version.c (modified) (1 diff)
-
pcontrol/CheckSystem.c (modified) (1 diff)
-
pcontrol/JobOps.c (modified) (2 diffs)
-
pcontrol/MachineOps.c (modified) (1 diff)
-
pcontrol/StackOps.c (modified) (1 diff)
-
pcontrol/machines.c (modified) (1 diff)
-
pcontrol/pcontrol.c.in (modified) (1 diff)
-
pcontrol/version.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ohana.20160226/src/opihi/cmd.astro/flux.c
r27611 r39419 1 1 # include "astro.h" 2 # include <signal.h> 2 3 3 4 int flux (int argc, char **argv) { 4 5 5 6 int i, j, k, xmin, ymin, xmax, ymax; 6 void *oldsignal;7 7 double ax, ay, s, S, flux; 8 8 double bx[5], by[5], x[5], y[5], bb[5]; … … 55 55 we have to add up the angles for concave contours */ 56 56 flux = 0; 57 oldsignal = signal (SIGINT, handle_interrupt); 58 interrupt = FALSE;57 58 struct sigaction *old_sigaction = SetInterrupt(); 59 59 for (j = ymin; (j < ymax) && !interrupt; j++) { 60 60 V = (float *)(buf[0].matrix.buffer) + j*buf[0].matrix.Naxis[0] + xmin; … … 72 72 } 73 73 } 74 signal (SIGINT, oldsignal);74 ClearInterrupt (old_sigaction); 75 75 76 76 gprint (GP_LOG, "flux: %f\n", flux); -
branches/eam_branches/ohana.20160226/src/opihi/cmd.astro/imfit-fgauss.c
r20936 r39419 41 41 /* real 2D gaussian -- x, y, sx, sy, sxy, I, sky */ 42 42 opihi_flt fgaussTD (opihi_flt x, opihi_flt y, opihi_flt *par, int Npar, opihi_flt *dpar) { 43 OHANA_UNUSED_PARAM(Npar); 43 44 44 45 opihi_flt X, Y, px, py; -
branches/eam_branches/ohana.20160226/src/opihi/cmd.astro/imfit-pgauss-psf.c
r20936 r39419 39 39 /* pseudo 2D gaussian -- x, y, (sx), (sy), (sxy), I, sky */ 40 40 opihi_flt pgauss_psfTD (opihi_flt x, opihi_flt y, opihi_flt *par, int Npar, opihi_flt *dpar) { 41 OHANA_UNUSED_PARAM(Npar); 41 42 42 43 opihi_flt X, Y, px, py; -
branches/eam_branches/ohana.20160226/src/opihi/cmd.astro/imfit-pgauss.c
r20936 r39419 41 41 /* pseudo 2D gaussian -- x, y, sx, sy, sxy, I, sky */ 42 42 opihi_flt pgaussTD (opihi_flt x, opihi_flt y, opihi_flt *par, int Npar, opihi_flt *dpar) { 43 OHANA_UNUSED_PARAM(Npar); 43 44 44 45 opihi_flt X, Y, px, py; -
branches/eam_branches/ohana.20160226/src/opihi/cmd.astro/imfit-qfgauss.c
r20936 r39419 45 45 /* one component, two slopes: (1 + z^M + z^N)^(-1) -- x, y, sx, sy, sxy, I, sky */ 46 46 opihi_flt qfgaussTD (opihi_flt x, opihi_flt y, opihi_flt *par, int Npar, opihi_flt *dpar) { 47 OHANA_UNUSED_PARAM(Npar); 47 48 48 49 opihi_flt X, Y, px, py; -
branches/eam_branches/ohana.20160226/src/opihi/cmd.astro/imfit-qgauss-psf.c
r20936 r39419 42 42 /* one component, two slopes: (1 + z^M + z^N)^(-1) -- x, y, sx, sy, sxy, I, sky, sr */ 43 43 opihi_flt qgauss_psfTD (opihi_flt x, opihi_flt y, opihi_flt *par, int Npar, opihi_flt *dpar) { 44 OHANA_UNUSED_PARAM(Npar); 44 45 45 46 opihi_flt X, Y, px, py; -
branches/eam_branches/ohana.20160226/src/opihi/cmd.astro/imfit-qgauss.c
r20936 r39419 45 45 /* one component, two slopes: (1 + z^M + z^N)^(-1) -- x, y, sx, sy, sxy, I, sky, sr */ 46 46 opihi_flt qgaussTD (opihi_flt x, opihi_flt y, opihi_flt *par, int Npar, opihi_flt *dpar) { 47 OHANA_UNUSED_PARAM(Npar); 47 48 48 49 opihi_flt X, Y, px, py; -
branches/eam_branches/ohana.20160226/src/opihi/cmd.astro/imfit-qrgauss.c
r20936 r39419 45 45 46 46 opihi_flt qrgaussTD (opihi_flt x, opihi_flt y, opihi_flt *par, int Npar, opihi_flt *dpar) { 47 OHANA_UNUSED_PARAM(Npar); 47 48 48 49 opihi_flt X, Y, px, py; -
branches/eam_branches/ohana.20160226/src/opihi/cmd.astro/imfit-rgauss.c
r20936 r39419 37 37 /* two components: (1 + z_1 + 0.5*z_1^2 + z_2^N)^(-1) -- x, y, sx1, sy1, sxy1, I, sky, sx2, sy2, sxy2 */ 38 38 opihi_flt rgaussTD (opihi_flt x, opihi_flt y, opihi_flt *par, int Npar, opihi_flt *dpar) { 39 OHANA_UNUSED_PARAM(Npar); 39 40 40 41 opihi_flt X, Y, px1, py1, px2, py2; -
branches/eam_branches/ohana.20160226/src/opihi/cmd.astro/imfit-serbulge.c
r20936 r39419 42 42 /* exp (-b (r/r_e)^(1/n)) + pgauss (r) */ 43 43 opihi_flt serbulgeTD (opihi_flt x, opihi_flt y, opihi_flt *par, int Npar, opihi_flt *dpar) { 44 OHANA_UNUSED_PARAM(Npar); 44 45 45 46 opihi_flt X, Y, px1, px2, py1, py2; -
branches/eam_branches/ohana.20160226/src/opihi/cmd.astro/imfit-sersic.c
r20936 r39419 34 34 /* exp (-b (r/r_e)^(1/n)) */ 35 35 opihi_flt sersicTD (opihi_flt x, opihi_flt y, opihi_flt *par, int Npar, opihi_flt *dpar) { 36 OHANA_UNUSED_PARAM(Npar); 36 37 37 38 opihi_flt X, Y, px, py; -
branches/eam_branches/ohana.20160226/src/opihi/cmd.astro/imfit-sgauss-psf.c
r20936 r39419 44 44 /* two components: (1 + z_1 + z_2^N)^(-1) -- x, y, sx1, sy1, sxy1, I, sky, sx2, sy2, sxy2 */ 45 45 opihi_flt sgauss_psfTD (opihi_flt x, opihi_flt y, opihi_flt *par, int Npar, opihi_flt *dpar) { 46 OHANA_UNUSED_PARAM(Npar); 46 47 47 48 opihi_flt X, Y, px1, py1, px2, py2; -
branches/eam_branches/ohana.20160226/src/opihi/cmd.astro/imfit-sgauss.c
r20936 r39419 53 53 /* two components: (1 + z_1 + z_2^N)^(-1) -- x, y, sx1, sy1, sxy1, I, sky, sx2, sy2, sxy2 */ 54 54 opihi_flt sgaussTD (opihi_flt x, opihi_flt y, opihi_flt *par, int Npar, opihi_flt *dpar) { 55 OHANA_UNUSED_PARAM(Npar); 55 56 56 57 opihi_flt X, Y, px1, py1, px2, py2; -
branches/eam_branches/ohana.20160226/src/opihi/cmd.astro/imfit-tgauss.c
r20936 r39419 32 32 /* two components: (1 + z_1^M + z_2^N)^(-1) -- x, y, sx1, sy1, sxy1, I, sky, sx2, sy2, sxy2 */ 33 33 opihi_flt tgaussTD (opihi_flt x, opihi_flt y, opihi_flt *par, int Npar, opihi_flt *dpar) { 34 OHANA_UNUSED_PARAM(Npar); 34 35 35 36 opihi_flt X, Y, px1, py1, px2, py2; -
branches/eam_branches/ohana.20160226/src/opihi/cmd.astro/imfit-vgauss.c
r20936 r39419 27 27 /* pseudo 2D gaussian with opihi_flting 2nd and 3rd order terms -- x, y, sx, sy, sxy, I, sky, f1, f2 */ 28 28 opihi_flt vgaussTD (opihi_flt x, opihi_flt y, opihi_flt *par, int Npar, opihi_flt *dpar) { 29 OHANA_UNUSED_PARAM(Npar); 29 30 30 31 opihi_flt X, Y, px, py; -
branches/eam_branches/ohana.20160226/src/opihi/cmd.astro/spexseq.c
r33662 r39419 43 43 44 44 void get_sequence (Object *object, int Nobject, int idx1, float Dmax, float f1, float f2, int pin1, int pin2) { 45 OHANA_UNUSED_PARAM(pin1); 46 OHANA_UNUSED_PARAM(pin2); 45 47 46 48 int i, j, N; -
branches/eam_branches/ohana.20160226/src/opihi/cmd.basic/continue.c
r10846 r39419 2 2 3 3 int exec_next (int argc, char **argv) { 4 OHANA_UNUSED_PARAM(argc); 5 OHANA_UNUSED_PARAM(argv); 6 4 7 loop_next = TRUE; 5 8 return (TRUE); … … 7 10 8 11 int exec_last (int argc, char **argv) { 12 OHANA_UNUSED_PARAM(argc); 13 OHANA_UNUSED_PARAM(argv); 14 9 15 loop_last = TRUE; 10 16 return (TRUE); -
branches/eam_branches/ohana.20160226/src/opihi/cmd.basic/list_help.c
r27611 r39419 2 2 3 3 int list_help (int argc, char **argv) { 4 OHANA_UNUSED_PARAM(argc); 5 OHANA_UNUSED_PARAM(argv); 4 6 5 7 FILE *f; -
branches/eam_branches/ohana.20160226/src/opihi/cmd.basic/list_vars.c
r2598 r39419 2 2 3 3 int list_vars (int argc, char **argv) { 4 OHANA_UNUSED_PARAM(argc); 5 OHANA_UNUSED_PARAM(argv); 4 6 5 7 ListVariables (); -
branches/eam_branches/ohana.20160226/src/opihi/cmd.basic/nop.c
r26891 r39419 2 2 3 3 int nop (int argc, char **argv) { 4 OHANA_UNUSED_PARAM(argc); 5 OHANA_UNUSED_PARAM(argv); 6 4 7 return (TRUE); 5 8 } -
branches/eam_branches/ohana.20160226/src/opihi/cmd.basic/run_for.c
r33963 r39419 104 104 105 105 status = TRUE; 106 interrupt = FALSE;107 106 for (value = start; (sign*value < sign*end) && !interrupt; value += delta) { 108 107 if ((int)value == value) -
branches/eam_branches/ohana.20160226/src/opihi/cmd.basic/run_foreach.c
r33963 r39419 72 72 73 73 status = TRUE; 74 interrupt = FALSE;75 74 for (i = 2; (i < argc) && !interrupt; i++) { 76 75 set_str_variable (argv[1], argv[i]); -
branches/eam_branches/ohana.20160226/src/opihi/cmd.basic/shell.c
r33662 r39419 51 51 // wait for process to finish or timeout 52 52 // loop forever if desired, but catch C-C and stop the process on interrupt 53 interrupt = FALSE;53 struct sigaction *old_sigaction = SetInterrupt(); 54 54 while (!interrupt) { 55 55 result = waitpid (pid, &wait_status, WNOHANG); … … 59 59 case ECHILD: 60 60 gprint (GP_ERR, "unknown PID, not a child process: %d\n", pid); 61 ClearInterrupt (old_sigaction); 61 62 return (FALSE); 62 63 default: … … 72 73 if (DTIME(now, start) > timeout) { 73 74 gprint (GP_ERR, "timeout on %s (pid %d)\n", argv[1], pid); 75 ClearInterrupt (old_sigaction); 74 76 return (FALSE); 75 77 } … … 83 85 } 84 86 if (WIFEXITED(wait_status)) { 87 ClearInterrupt (old_sigaction); 85 88 exit_status = WEXITSTATUS(wait_status); 86 89 if (exit_status) { … … 91 94 } 92 95 if (WIFSIGNALED(wait_status)) { 96 ClearInterrupt (old_sigaction); 93 97 gprint (GP_ERR, "job %d exited on signal %d\n", pid, WTERMSIG(wait_status)); 94 98 return (FALSE); … … 100 104 } 101 105 } 106 ClearInterrupt (old_sigaction); 102 107 gprint (GP_ERR, "caught interrupt, killing %s (%d)\n", argv[1], pid); 103 108 -
branches/eam_branches/ohana.20160226/src/opihi/cmd.data/book_commands.c
r17419 r39419 2 2 3 3 int book_list (int argc, char **argv) { 4 OHANA_UNUSED_PARAM(argv); 4 5 if (argc != 1) { 5 6 gprint (GP_ERR, "USAGE: book list\n"); -
branches/eam_branches/ohana.20160226/src/opihi/cmd.data/cursor.c
r33662 r39419 6 6 int i, N, kapa, VERBOSE; 7 7 double X, Y, R, D, Z; 8 void *oldsignal;9 8 10 9 // XXX need to be able to specify graph vs image coords … … 38 37 KiiCursorOn (kapa); 39 38 40 oldsignal = signal (SIGINT, handle_interrupt); 41 interrupt = FALSE; 42 39 struct sigaction *old_sigaction = SetInterrupt(); 43 40 for (i = 0; ((i < N) || (N == 0)) && !interrupt; i++) { 44 41 … … 62 59 if (!strcasecmp (key, "Q")) break; 63 60 } 61 ClearInterrupt (old_sigaction); 64 62 65 signal (SIGINT, oldsignal);66 63 KiiCursorOff (kapa); 67 64 return (TRUE); -
branches/eam_branches/ohana.20160226/src/opihi/cmd.data/gaussdeviate.c
r39248 r39419 30 30 31 31 int gaussintegral (int argc, char **argv) { 32 OHANA_UNUSED_PARAM(argc); 33 OHANA_UNUSED_PARAM(argv); 32 34 33 35 gprint (GP_ERR, "fix gaussintegral\n"); -
branches/eam_branches/ohana.20160226/src/opihi/cmd.data/list_buffers.c
r33662 r39419 2 2 3 3 int list_buffers (int argc, char **argv) { 4 OHANA_UNUSED_PARAM(argv); 4 5 5 6 if (argc == 3) PrintBuffers (TRUE); -
branches/eam_branches/ohana.20160226/src/opihi/cmd.data/list_vectors.c
r33662 r39419 2 2 3 3 int list_vectors (int argc, char **argv) { 4 OHANA_UNUSED_PARAM(argc); 5 OHANA_UNUSED_PARAM(argv); 4 6 5 7 ListVectors (); -
branches/eam_branches/ohana.20160226/src/opihi/cmd.data/medimage.c
r36679 r39419 18 18 19 19 int medimage_help (int argc, char **argv) { 20 OHANA_UNUSED_PARAM(argc); 21 OHANA_UNUSED_PARAM(argv); 20 22 21 23 gprint (GP_ERR, "USAGE: medimage (command)\n"); -
branches/eam_branches/ohana.20160226/src/opihi/cmd.data/medimage_commands.c
r39233 r39419 2 2 3 3 int medimage_list (int argc, char **argv) { 4 OHANA_UNUSED_PARAM(argv); 5 4 6 if (argc != 1) { 5 7 gprint (GP_ERR, "USAGE: medimage list\n"); -
branches/eam_branches/ohana.20160226/src/opihi/cmd.data/queuelist.c
r7917 r39419 2 2 3 3 int queuelist (int argc, char **argv) { 4 OHANA_UNUSED_PARAM(argv); 4 5 5 6 if (argc != 1) { -
branches/eam_branches/ohana.20160226/src/opihi/cmd.data/spline.c
r35109 r39419 23 23 24 24 int spline_help (int argc, char **argv) { 25 OHANA_UNUSED_PARAM(argc); 26 OHANA_UNUSED_PARAM(argv); 25 27 26 28 gprint (GP_ERR, "USAGE: spline (command)\n"); -
branches/eam_branches/ohana.20160226/src/opihi/cmd.data/spline_commands.c
r35109 r39419 2 2 3 3 int spline_list (int argc, char **argv) { 4 OHANA_UNUSED_PARAM(argv); 5 4 6 if (argc != 1) { 5 7 gprint (GP_ERR, "USAGE: spline list\n"); -
branches/eam_branches/ohana.20160226/src/opihi/cmd.data/uniq.c
r39297 r39419 56 56 int onePercent = ivec->Nelements / 100; 57 57 58 void *Signal = signal (SIGINT, handle_interrupt); 59 interrupt = FALSE; 58 struct sigaction *old_sigaction = SetInterrupt(); 60 59 for (i = 0; (i < ivec->Nelements) && !interrupt; Nnew++) { 61 60 vtgt[Nnew] = *vsrc; … … 72 71 } 73 72 } 74 signal (SIGINT, Signal);73 ClearInterrupt (old_sigaction); 75 74 if (VERBOSE) gprint (GP_ERR, "\n"); 76 75 free (indata); … … 90 89 int onePercent = ivec->Nelements / 100; 91 90 92 void *Signal = signal (SIGINT, handle_interrupt); 93 interrupt = FALSE; 91 struct sigaction *old_sigaction = SetInterrupt(); 94 92 for (i = 0; (i < ivec->Nelements) && !interrupt; Nnew++) { 95 93 vtgt[Nnew] = *vsrc; … … 106 104 } 107 105 } 108 signal (SIGINT, Signal);106 ClearInterrupt (old_sigaction); 109 107 if (VERBOSE) gprint (GP_ERR, "\n"); 110 108 free (indata); -
branches/eam_branches/ohana.20160226/src/opihi/cmd.data/vellipse.c
r36679 r39419 230 230 // XXX NOTE that PHI is defined with the wrong sign, should fix this... 231 231 opihi_flt fellipseOD (opihi_flt alpha, opihi_flt *par, int Npar, opihi_flt *dpar) { 232 OHANA_UNUSED_PARAM(Npar); 232 233 233 234 static int pass = 0; -
branches/eam_branches/ohana.20160226/src/opihi/cmd.data/vgauss.c
r36489 r39419 127 127 /* pars: x_o, sigma, I, back */ 128 128 opihi_flt fgaussOD (opihi_flt x, opihi_flt *par, int Npar, opihi_flt *dpar) { 129 OHANA_UNUSED_PARAM(Npar); 129 130 130 131 opihi_flt z, r, f; -
branches/eam_branches/ohana.20160226/src/opihi/cmd.data/vmaxwell.c
r20936 r39419 96 96 // f = C3 + C2*(x - C4)^2 * exp(-0.5*(x - C0)^2 / C1^2) 97 97 opihi_flt fmaxwellOD (opihi_flt x, opihi_flt *par, int Npar, opihi_flt *dpar) { 98 OHANA_UNUSED_PARAM(Npar); 98 99 99 100 opihi_flt z, r, f; -
branches/eam_branches/ohana.20160226/src/opihi/dvo/avextract.c
r39360 r39419 4 4 5 5 off_t i, j, n, m; 6 int N, Npts, NPTS, last, next, state, Nfields, Nreturn, N cstack, Nstack;6 int N, Npts, NPTS, last, next, state, Nfields, Nreturn, Nstack; 7 7 int Nsecfilt, VERBOSE; 8 8 char **cstack, name[1024]; 9 unsigned int Ncstack; 9 10 10 11 Catalog catalog; … … 169 170 170 171 // grab data from all selected sky regions 171 void *Signal = signal (SIGINT, handle_interrupt); 172 interrupt = FALSE; 172 struct sigaction *old_sigaction = SetInterrupt(); 173 173 for (i = 0; (i < skylist[0].Nregions) && !interrupt; i++) { 174 174 … … 254 254 dvo_catalog_free (&catalog); 255 255 } 256 signal (SIGINT, Signal);257 interrupt = FALSE; 256 ClearInterrupt (old_sigaction); 257 258 258 for (n = 0; n < Nreturn; n++) { 259 259 ResetVector (vec[n], fields[n].type, Npts); -
branches/eam_branches/ohana.20160226/src/opihi/dvo/avmatch.c
r39360 r39419 17 17 int VERBOSE; 18 18 char name[1024], *found; 19 void *Signal;20 19 float RADIUS; 21 20 … … 179 178 180 179 // grab data from all selected sky regions 181 Signal = signal (SIGINT, handle_interrupt); 182 interrupt = FALSE; 180 struct sigaction *old_sigaction = SetInterrupt(); 183 181 for (i = 0; (i < skylist[0].Nregions) && !interrupt; i++) { 184 182 … … 253 251 dvo_catalog_free (&catalog); 254 252 } 255 signal (SIGINT, Signal); 256 interrupt = FALSE; 253 ClearInterrupt (old_sigaction); 257 254 258 255 // write vectors to a table (this is used by parallel dvo operations, but can be used elsewhere) -
branches/eam_branches/ohana.20160226/src/opihi/dvo/catname.c
r37807 r39419 55 55 56 56 // prepare to handle interrupt signals 57 signal (SIGINT, handle_interrupt); 58 interrupt = FALSE; 57 struct sigaction *old_sigaction = SetInterrupt(); 59 58 60 59 for (i = 0; (i < skylist[0].Nregions) && !interrupt; i++) { … … 99 98 set_str_variable ("CATNAME", filename); 100 99 } 100 ClearInterrupt (old_sigaction); 101 101 102 102 return (TRUE); -
branches/eam_branches/ohana.20160226/src/opihi/dvo/ccd.c
r38471 r39419 62 62 63 63 // grab data from all selected sky regions 64 signal (SIGINT, handle_interrupt);65 interrupt = FALSE;66 64 67 65 /* loop over regions, extract data for each region */ 66 struct sigaction *old_sigaction = SetInterrupt(); 68 67 for (k = 0; (k < skylist[0].Nregions) && !interrupt; k++) { 69 68 /* lock, load, unlock catalog */ … … 119 118 dvo_catalog_free (&catalog); 120 119 } 120 ClearInterrupt (old_sigaction); 121 121 122 122 xvec[0].Nelements = yvec[0].Nelements = Npts; -
branches/eam_branches/ohana.20160226/src/opihi/dvo/cmd.c
r38471 r39419 21 21 skylist = NULL; 22 22 selection = NULL; 23 struct sigaction *old_sigaction = NULL: 23 24 24 25 /* load photcode information */ … … 60 61 61 62 // grab data from all selected sky regions 62 // void *Signal = signal (SIGINT, handle_interrupt); 63 signal (SIGINT, handle_interrupt); 64 interrupt = FALSE; 63 old_sigaction = SetInterrupt(); 65 64 66 65 /* loop over regions, extract data for each region */ … … 118 117 dvo_catalog_free (&catalog); 119 118 } 119 ClearInterrupt (old_sigaction); 120 120 121 121 xvec[0].Nelements = yvec[0].Nelements = Npts; … … 129 129 130 130 escape: 131 ClearInterrupt (old_sigaction); 131 132 dvo_catalog_free (&catalog); 132 133 SkyListFree (skylist); -
branches/eam_branches/ohana.20160226/src/opihi/dvo/dmt.c
r38471 r39419 3 3 /* extract vectors giving delta mags for multiple measurements */ 4 4 int dmt (int argc, char **argv) { 5 OHANA_UNUSED_PARAM(argc); 6 OHANA_UNUSED_PARAM(argv); 5 7 6 8 // XXX this needs to be fixed: how to access different graphs at once? -
branches/eam_branches/ohana.20160226/src/opihi/dvo/dvo.c.in
r33662 r39419 9 9 /* program-dependent initialization */ 10 10 void program_init (int *argc, char **argv) { 11 OHANA_UNUSED_PARAM(argc); 12 OHANA_UNUSED_PARAM(argv); 11 13 12 14 auto_break = TRUE; -
branches/eam_branches/ohana.20160226/src/opihi/dvo/dvo_host_utils.c
r39360 r39419 249 249 // and has since been re-run 250 250 int HostTableReloadResults (char *uniquer, int VERBOSE) { 251 OHANA_UNUSED_PARAM(VERBOSE); 251 252 252 253 int i; … … 317 318 // and has since been re-run 318 319 int HostTableGetResults (char *uniquer, int VERBOSE) { 320 OHANA_UNUSED_PARAM(VERBOSE); 319 321 320 322 int i; -
branches/eam_branches/ohana.20160226/src/opihi/dvo/fitcolors.c
r39233 r39419 14 14 int mode[4]; 15 15 int Nsecfilt, status; 16 void *oldsignal;17 16 char *cmd, *outcmd, *camera; 18 17 char name[64], filename[64], plotname[64], label[64]; … … 40 39 colorFit = NULL; 41 40 deltaFit = NULL; 42 43 oldsignal = signal (SIGINT, handle_interrupt);44 interrupt = FALSE;45 41 46 42 /* load photcode information */ … … 199 195 graphdata.ptype = 2; 200 196 } 197 198 struct sigaction *old_sigaction = SetInterrupt(); 201 199 202 200 /*** generate the color-color vectors for the pairs ***/ … … 357 355 if (colorFit != NULL) free (colorFit); 358 356 if (deltaFit != NULL) free (deltaFit); 359 signal (SIGINT, oldsignal);357 ClearInterrupt (old_sigaction); 360 358 return (TRUE); 361 359 … … 381 379 DeleteVector (xvec); 382 380 DeleteVector (yvec); 383 signal (SIGINT, oldsignal); 381 ClearInterrupt (old_sigaction); 382 384 383 return (FALSE); 385 384 } -
branches/eam_branches/ohana.20160226/src/opihi/dvo/fitsed.c
r38471 r39419 27 27 int N, done, Nfit; 28 28 int status; 29 void *oldsignal;30 29 char name[64], line[1024], key[20]; 31 30 float *fitmags, *fiterrs, *wavecode, *vegaToAB; … … 48 47 SEDtableRow sourceValue, sourceError; 49 48 SEDfit minFit, testFit; 49 struct sigaction *old_sigaction = NULL; 50 50 51 51 /* defaults */ … … 74 74 fiterrs = NULL; 75 75 fitmags = NULL; 76 77 oldsignal = signal (SIGINT, handle_interrupt);78 interrupt = FALSE;79 76 80 77 /* load photcode information */ … … 184 181 /* loop over regions, extract data for each region */ 185 182 // XXX add interrupt checks 183 old_sigaction = SetInterrupt(); 186 184 gprint (GP_ERR, "using "OFF_T_FMT" possible regions\n", skylist[0].Nregions); 187 for (k = 0; k < skylist[0].Nregions; k++) {185 for (k = 0; (k < skylist[0].Nregions) && !interrupt; k++) { 188 186 /* lock, load, unlock catalog */ 189 187 dvo_catalog_init (&catalog, TRUE); … … 377 375 if (sourceError.mags != NULL) free (sourceError.mags); 378 376 379 signal (SIGINT, oldsignal);377 ClearInterrupt (old_sigaction); 380 378 return (status); 381 379 } -
branches/eam_branches/ohana.20160226/src/opihi/dvo/gcat.c
r39294 r39419 57 57 58 58 // prepare to handle interrupt signals 59 signal (SIGINT, handle_interrupt); 60 interrupt = FALSE; 59 struct sigaction *old_sigaction = SetInterrupt(); 61 60 62 61 for (i = 0; (i < skylist[0].Nregions) && !interrupt; i++) { … … 101 100 set_str_variable ("CATNAME", hostfile); 102 101 } 102 ClearInterrupt (old_sigaction); 103 103 104 104 return (TRUE); -
branches/eam_branches/ohana.20160226/src/opihi/dvo/gstar.c
r39298 r39419 876 876 877 877 void printPhotcodeSequence (Average *average, SecFilt *secfilt, int entry, int type) { 878 OHANA_UNUSED_PARAM(average); 878 879 879 880 int seq; -
branches/eam_branches/ohana.20160226/src/opihi/dvo/imdata.c
r38471 r39419 128 128 129 129 // prepare to handle interrupt signals 130 signal (SIGINT, handle_interrupt); 131 interrupt = FALSE; 130 struct sigaction *old_sigaction = SetInterrupt(); 132 131 133 132 /* for each region file, extract the data of interest in the right time range */ … … 216 215 dvo_catalog_free (&catalog); 217 216 } 217 ClearInterrupt (old_sigaction); 218 218 219 219 vec[0].Nelements = N; -
branches/eam_branches/ohana.20160226/src/opihi/dvo/imextract.c
r37807 r39419 4 4 5 5 off_t i, j, Nimage; 6 int n, N, Npts, NPTS, last, next, state, Nfields, Nreturn, N cstack, Nstack;6 int n, N, Npts, NPTS, last, next, state, Nfields, Nreturn, Nstack; 7 7 char **cstack, name[1024]; 8 void *Signal;9 8 10 9 Vector **vec; … … 57 56 58 57 // parse the remainder of the line as a boolean math expression 58 unsigned int Ncstack; 59 59 cstack = isolate_elements (argc-next, &argv[next], &Ncstack); 60 60 … … 97 97 98 98 // grab data from all selected sky regions 99 Signal = signal (SIGINT, handle_interrupt); 100 interrupt = FALSE; 99 struct sigaction *old_sigaction = SetInterrupt(); 101 100 for (j = 0; (j < Nimage) && !interrupt; j++) { 102 101 … … 128 127 } 129 128 } 130 signal (SIGINT, Signal);131 interrupt = FALSE; 129 ClearInterrupt (old_sigaction); 130 132 131 for (n = 0; n < Nreturn; n++) { 133 132 vec[n][0].Nelements = Npts; -
branches/eam_branches/ohana.20160226/src/opihi/dvo/mextract.c
r39360 r39419 25 25 26 26 off_t i, j, k, m; // used for counter averages and measures 27 int n, N, Npts, NPTS, last, next, state, Nfields, Nreturn, N cstack, Nstack;27 int n, N, Npts, NPTS, last, next, state, Nfields, Nreturn, Nstack; 28 28 int Nsecfilt, VERBOSE, loadImages; 29 29 char **cstack, name[1024]; 30 30 dbValue *values; 31 void *Signal;32 31 33 32 Catalog catalog; … … 115 114 116 115 // parse the remainder of the line as a boolean math expression 116 unsigned int Ncstack; 117 117 cstack = isolate_elements (argc-next, &argv[next], &Ncstack); 118 118 … … 217 217 218 218 // grab data from all selected sky regions 219 Signal = signal (SIGINT, handle_interrupt); 220 interrupt = FALSE; 221 222 // fprintf (stderr, "done setup..."); 219 struct sigaction *old_sigaction = SetInterrupt(); 223 220 224 221 for (i = 0; (i < skylist[0].Nregions) && !interrupt; i++) { … … 310 307 // dbStackFreeReset (); 311 308 } 312 signal (SIGINT, Signal);309 ClearInterrupt (old_sigaction); 313 310 interrupt = FALSE; 314 311 -
branches/eam_branches/ohana.20160226/src/opihi/dvo/mmatch.c
r39360 r39419 14 14 int VERBOSE; 15 15 char name[1024]; 16 void *Signal;17 16 float RADIUS; 18 17 … … 237 236 238 237 // grab data from all selected sky regions 239 Signal = signal (SIGINT, handle_interrupt); 240 interrupt = FALSE; 238 struct sigaction *old_sigaction = SetInterrupt(); 241 239 for (i = 0; (i < skylist[0].Nregions) && !interrupt; i++) { 242 240 … … 331 329 dvo_catalog_free (&catalog); 332 330 } 333 signal (SIGINT, Signal); 334 interrupt = FALSE; 331 ClearInterrupt (old_sigaction); 335 332 336 333 for (n = 0; n < Nfields; n++) { -
branches/eam_branches/ohana.20160226/src/opihi/dvo/mmextract.c
r38471 r39419 6 6 off_t i, j, k, m; 7 7 int n, N, Npts, NPTS, last, next, state; 8 int Nfields, Nreturn, Nreturn_base, N cstack1, Ncstack2, Nstack1, Nstack2;8 int Nfields, Nreturn, Nreturn_base, Nstack1, Nstack2; 9 9 int Nwhere, Iwhere, Nmatch, Imatch, NTABLE, Nt1, Nt2, n1, n2; 10 10 int Nsecfilt, VERBOSE, loadImages; 11 11 char **cstack1, **cstack2, name1[1024], name2[1024]; 12 12 dbValue *values, **table1, **table2; 13 void *Signal;14 13 15 14 Catalog catalog; … … 102 101 103 102 // parse the 'where' and 'matched to' segments of the line as boolean math expressions 103 unsigned int Ncstack1, Ncstack2; 104 104 cstack1 = isolate_elements (Nwhere, &argv[Iwhere], &Ncstack1); 105 105 cstack2 = isolate_elements (Nmatch, &argv[Imatch], &Ncstack2); … … 178 178 179 179 // grab data from all selected sky regions 180 Signal = signal (SIGINT, handle_interrupt);181 interrupt = FALSE; 180 struct sigaction *old_sigaction = SetInterrupt(); 181 182 182 for (i = 0; (i < skylist[0].Nregions) && !interrupt; i++) { 183 183 /* lock, load, unlock catalog */ … … 286 286 // dbStackFreeReset (); 287 287 } 288 signal (SIGINT, Signal); 289 interrupt = FALSE; 288 ClearInterrupt (old_sigaction); 290 289 291 290 // free excess memory -
branches/eam_branches/ohana.20160226/src/opihi/dvo/objectcoverage.c
r39233 r39419 174 174 Nsecfilt = GetPhotcodeNsecfilt(); 175 175 // grab data from all selected sky regions 176 signal (SIGINT, handle_interrupt);177 interrupt = FALSE;178 176 179 177 /* load region corresponding to selection above */ 180 178 if ((skylist = SelectRegions (selection)) == NULL) goto escape; 179 180 struct sigaction *old_sigaction = SetInterrupt(); 181 181 182 182 /* loop over regions, extract data for each region */ … … 224 224 } 225 225 } 226 ClearInterrupt (old_sigaction); 226 227 return (TRUE); 227 228 -
branches/eam_branches/ohana.20160226/src/opihi/dvo/paverage.c
r38471 r39419 99 99 100 100 // prepare to handle interrupt signals 101 signal (SIGINT, handle_interrupt); 102 interrupt = FALSE; 101 struct sigaction *old_sigaction = SetInterrupt(); 103 102 104 103 Nloaded = 0; … … 154 153 dvo_catalog_free (&catalog); 155 154 } 155 ClearInterrupt (old_sigaction); 156 156 if (Npts > 0) { 157 157 KapaPrepPlot (kapa, Npts, &graphmode); -
branches/eam_branches/ohana.20160226/src/opihi/dvo/pmeasure.c
r38471 r39419 172 172 173 173 // prepare to handle interrupt signals 174 signal (SIGINT, handle_interrupt); 175 interrupt = FALSE; 174 struct sigaction *old_sigaction = SetInterrupt(); 176 175 177 176 Nloaded = 0; … … 240 239 dvo_catalog_free (&catalog); 241 240 } 241 ClearInterrupt (old_sigaction); 242 242 243 if (Npts > 0) { 243 244 KapaPrepPlot (kapa, Npts, &graphmode); -
branches/eam_branches/ohana.20160226/src/opihi/dvo/procks.c
r34584 r39419 74 74 NROCKS = 100; 75 75 ALLOCATE (rocks, Rocks, NROCKS); 76 for (i = 0; fscanf (f, "%lf %lf % d%lf%lf%lf %d%lf%lf%lf %d%lf%lf%lf",76 for (i = 0; fscanf (f, "%lf %lf %u%lf%lf%lf %u%lf%lf%lf %u%lf%lf%lf", 77 77 &rocks[i].X[0], &rocks[i].Y[0], 78 78 &rocks[i].t[0], &rocks[i].ra[0], &rocks[i].dec[0], &rocks[i].mag[0], -
branches/eam_branches/ohana.20160226/src/opihi/dvo/showtile.c
r37807 r39419 4 4 5 5 int showtile (int argc, char **argv) { 6 OHANA_UNUSED_PARAM(argv); 6 7 7 8 int kapa, Nd, N, NPTS, status, i, InPic; -
branches/eam_branches/ohana.20160226/src/opihi/dvo/skycat.c
r39354 r39419 71 71 72 72 // prepare to handle interrupt signals 73 signal (SIGINT, handle_interrupt); 74 interrupt = FALSE; 73 struct sigaction *old_sigaction = SetInterrupt(); 75 74 76 75 for (i = 0; (i < Nregions) && !interrupt; i++) { … … 113 112 } 114 113 } 114 ClearInterrupt (old_sigaction); 115 115 116 116 gprint (GP_ERR, "plotting %d catalogs\n", Npts/8); -
branches/eam_branches/ohana.20160226/src/opihi/dvo/version.c
r8653 r39419 3 3 4 4 int version (int argc, char **argv) { 5 OHANA_UNUSED_PARAM(argc); 6 OHANA_UNUSED_PARAM(argv); 5 7 6 8 char *tmp; -
branches/eam_branches/ohana.20160226/src/opihi/include/dvoshell.h
r37049 r39419 81 81 void compare PROTO((Catalog *catlog1, Catalog *catlog2, Vector *rvec, Vector *dvec, Vector *mvec, Vector *drvec, Vector *ddvec, Vector *dmvec, double radius)); 82 82 void cprecess PROTO((Average *average, off_t Naverage, double in_epoch, double out_epoch)); 83 void image_subset PROTO((Image *image, off_t Nimage, off_t **Subset, off_t *Nsubset, SkyRegionSelection *selection, unsigned long int tzero, double trange, int TimeSelect));84 83 off_t match_image PROTO((Image *image, off_t Nimage, unsigned int T, short int S)); 85 off_t match_image_subset PROTO((Image *image, off_t *subset, off_t Nsubset, unsigned int T, short int S));86 84 void print_value PROTO((double value, short int ival)); 87 85 CMPstars *cmpReadFits PROTO((FILE *f, off_t *nstars)); -
branches/eam_branches/ohana.20160226/src/opihi/include/shell.h
r39227 r39419 132 132 #endif 133 133 134 struct sigaction *SetInterrupt PROTO((void)); 135 int ClearInterrupt PROTO((struct sigaction *old_sigaction)); 134 136 void handle_interrupt PROTO((int)); 135 137 char **command_completer PROTO((const char *, int, int)); -
branches/eam_branches/ohana.20160226/src/opihi/lib.data/hermitian.c
r26891 r39419 3 3 double hermitian_polynomial (double x, int order) { 4 4 double value; 5 switch (order) {6 case 0:7 value = hermitian_00(x);8 break;9 case 1:10 value = hermitian_01(x);11 break;12 case 2:13 value = hermitian_02(x);14 break;15 case 3:16 value = hermitian_03(x);17 break;18 case 4:19 value = hermitian_04(x);20 break;21 case 5:22 value = hermitian_05(x);23 break;24 case 6:25 value = hermitian_06(x);26 break;27 case 7:28 value = hermitian_07(x);29 break;30 case 8:31 value = hermitian_08(x);32 break;33 case 9:34 value = hermitian_09(x);35 break;36 case 10:37 value = hermitian_10(x);38 break;39 default:40 value = NAN;41 break;42 }43 return value;5 switch (order) { 6 case 0: 7 value = hermitian_00(x); 8 break; 9 case 1: 10 value = hermitian_01(x); 11 break; 12 case 2: 13 value = hermitian_02(x); 14 break; 15 case 3: 16 value = hermitian_03(x); 17 break; 18 case 4: 19 value = hermitian_04(x); 20 break; 21 case 5: 22 value = hermitian_05(x); 23 break; 24 case 6: 25 value = hermitian_06(x); 26 break; 27 case 7: 28 value = hermitian_07(x); 29 break; 30 case 8: 31 value = hermitian_08(x); 32 break; 33 case 9: 34 value = hermitian_09(x); 35 break; 36 case 10: 37 value = hermitian_10(x); 38 break; 39 default: 40 value = NAN; 41 break; 42 } 43 return value; 44 44 } 45 45 46 46 double hermitian_00(double x) { 47 double value; 48 // H_0(x) = 1 49 value = 1; 50 return value; 47 OHANA_UNUSED_PARAM(x); 48 49 double value; 50 // H_0(x) = 1 51 value = 1; 52 return value; 51 53 } 52 54 double hermitian_01(double x) { 53 double value;54 // H_1(x) = x55 value = x;56 return value;55 double value; 56 // H_1(x) = x 57 value = x; 58 return value; 57 59 } 58 60 double hermitian_02(double x) { 59 double value, x2;60 // H_2(x) = x^2-161 x2 = x*x;62 value = x2 - 1.0;63 return value;61 double value, x2; 62 // H_2(x) = x^2-1 63 x2 = x*x; 64 value = x2 - 1.0; 65 return value; 64 66 } 65 67 double hermitian_03(double x) { 66 double value, x2;67 // H_3(x) = x^3-3x68 x2 = x*x;69 value = x*(x2 - 3.0);70 return value;68 double value, x2; 69 // H_3(x) = x^3-3x 70 x2 = x*x; 71 value = x*(x2 - 3.0); 72 return value; 71 73 } 72 74 double hermitian_04(double x) { 73 double value, x2;74 // H_4(x) = x^4-6x^2+375 x2 = x*x;76 value = (x2 - 6.0)*x2 + 3.0;77 return value;75 double value, x2; 76 // H_4(x) = x^4-6x^2+3 77 x2 = x*x; 78 value = (x2 - 6.0)*x2 + 3.0; 79 return value; 78 80 } 79 81 double hermitian_05(double x) { 80 double value, x2;81 // H_5(x) = x^5-10x^3+15x82 x2 = x*x;83 value = ((x2 - 10.0)*x2 + 15.0)*x;84 return value;82 double value, x2; 83 // H_5(x) = x^5-10x^3+15x 84 x2 = x*x; 85 value = ((x2 - 10.0)*x2 + 15.0)*x; 86 return value; 85 87 } 86 88 double hermitian_06(double x) { 87 double value, x2;88 // H_6(x) = x^6-15x^4+45x^2-1589 x2 = x*x;90 value = (((x2 - 15.0)*x2 + 45.0)*x2) - 15.0;91 return value;89 double value, x2; 90 // H_6(x) = x^6-15x^4+45x^2-15 91 x2 = x*x; 92 value = (((x2 - 15.0)*x2 + 45.0)*x2) - 15.0; 93 return value; 92 94 } 93 95 double hermitian_07(double x) { 94 double value, x2;95 // H_7(x) = x^7-21x^5+105x^3-105x96 x2 = x*x;97 value = (((x2 - 21.0)*x2+105.0)*x2 - 105.0)*x;98 return value;96 double value, x2; 97 // H_7(x) = x^7-21x^5+105x^3-105x 98 x2 = x*x; 99 value = (((x2 - 21.0)*x2+105.0)*x2 - 105.0)*x; 100 return value; 99 101 } 100 102 double hermitian_08(double x) { 101 double value, x2;102 // H_8(x) = x^8-28x^6+210x^4-420x^2+105103 x2 = x*x;104 value = ((((x2 - 28.0)*x2 + 210.0)*x2 - 420.0)*x2 + 105.0);105 return value;103 double value, x2; 104 // H_8(x) = x^8-28x^6+210x^4-420x^2+105 105 x2 = x*x; 106 value = ((((x2 - 28.0)*x2 + 210.0)*x2 - 420.0)*x2 + 105.0); 107 return value; 106 108 } 107 109 double hermitian_09(double x) { 108 double value, x2;109 // H_9(x) = x^9-36x^7+378x^5-1260x^3+945x110 x2 = x*x;111 value = ((((x2 - 36.0)*x2 + 378.0)*x2 - 1260.0)*x2 + 945.0)*x;112 return value;110 double value, x2; 111 // H_9(x) = x^9-36x^7+378x^5-1260x^3+945x 112 x2 = x*x; 113 value = ((((x2 - 36.0)*x2 + 378.0)*x2 - 1260.0)*x2 + 945.0)*x; 114 return value; 113 115 } 114 116 double hermitian_10(double x) { 115 double value, x2;116 // H_{10}(x) = x^{10}-45x^8+630x^6-3150x^4+4725x^2-945117 x2 = x*x;118 value = (((((x2 - 45.0)*x2 + 630.0)*x2 - 3150.0)*x2 + 4725.0)*x2 - 945.0);119 return value;117 double value, x2; 118 // H_{10}(x) = x^{10}-45x^8+630x^6-3150x^4+4725x^2-945 119 x2 = x*x; 120 value = (((((x2 - 45.0)*x2 + 630.0)*x2 - 3150.0)*x2 + 4725.0)*x2 - 945.0); 121 return value; 120 122 } -
branches/eam_branches/ohana.20160226/src/opihi/lib.shell/CommandOps.c
r31667 r39419 151 151 /* tell readline to use out command_generator rather than basic completion */ 152 152 char **command_completer (const char *text, int start, int end) { 153 OHANA_UNUSED_PARAM(end); 153 154 154 155 char **matches; -
branches/eam_branches/ohana.20160226/src/opihi/lib.shell/VectorIO.c
r39360 r39419 81 81 } 82 82 fprintf (stderr, "\n"); 83 # else 84 OHANA_UNUSED_PARAM(table); 85 OHANA_UNUSED_PARAM(message); 83 86 # endif 84 87 return TRUE; … … 99 102 } 100 103 fprintf (stderr, "\n"); 104 # else 105 OHANA_UNUSED_PARAM(table); 106 OHANA_UNUSED_PARAM(message); 101 107 # endif 102 108 return TRUE; -
branches/eam_branches/ohana.20160226/src/opihi/lib.shell/dvomath.c
r36375 r39419 16 16 char *dvomath (int argc, char **argv, int *size, int validsize) { 17 17 18 int i, Nstack , Ncstack;18 int i, Nstack; 19 19 char **cstack, *outname; 20 20 StackVar *stack; … … 27 27 28 28 /* take char array with expression, convert to important elements */ 29 unsigned int Ncstack; 29 30 cstack = isolate_elements (argc, argv, &Ncstack); 30 31 -
branches/eam_branches/ohana.20160226/src/opihi/lib.shell/exec_loop.c
r12332 r39419 3 3 int exec_loop (Macro *loop) { 4 4 5 void *Signal;6 5 int j, status, ThisList; 7 6 char *line; … … 17 16 18 17 /* set up interrupts */ 19 Signal = signal (SIGINT, handle_interrupt); 20 interrupt = FALSE; 18 struct sigaction *old_sigaction = SetInterrupt(); 21 19 22 20 /* process the list */ … … 32 30 if (loop_break || loop_last || loop_next) break; 33 31 } 34 signal (SIGINT, Signal);32 ClearInterrupt (old_sigaction); 35 33 36 34 /* free remaining lines on the list, free the list, decrement the shell level */ -
branches/eam_branches/ohana.20160226/src/opihi/lib.shell/interrupt.c
r27611 r39419 7 7 8 8 void handle_interrupt (int input) { 9 OHANA_UNUSED_PARAM(input); 9 10 10 11 char string[64]; 11 12 int Nask; 12 13 13 signal (SIGINT, SIG_IGN);14 // signal (SIGINT, SIG_IGN); 14 15 15 16 Nask = 0; … … 31 32 if ((string[0] == 'y') || (string[0] == 'Y')) { 32 33 interrupt = FALSE; 33 signal (SIGINT, handle_interrupt);34 // signal (SIGINT, handle_interrupt); 34 35 Nint = 0; 35 36 return; … … 38 39 if ((string[0] == 'n') || (string[0] == 'N')) { 39 40 interrupt = TRUE; 40 signal (SIGINT, handle_interrupt);41 // signal (SIGINT, handle_interrupt); 41 42 Nint = 0; 42 43 return; … … 45 46 if (Nask > 3) { 46 47 interrupt = TRUE; 47 signal (SIGINT, handle_interrupt);48 // signal (SIGINT, handle_interrupt); 48 49 Nint = 0; 49 50 return; … … 52 53 53 54 } 55 56 struct sigaction *SetInterrupt () { 57 58 struct sigaction new_sigaction; 59 struct sigaction *old_sigaction; 60 61 ALLOCATE (old_sigaction, struct sigaction, 1); 62 63 new_sigaction.sa_handler = handle_interrupt; 64 new_sigaction.sa_flags = 0; 65 66 int sigstat = sigaction (SIGINT, &new_sigaction, old_sigaction); 67 if (sigstat) { 68 perror ("failed to set signal handler: "); 69 free (old_sigaction); 70 return NULL; 71 } 72 73 interrupt = FALSE; 74 return old_sigaction; 75 } 76 77 int ClearInterrupt (struct sigaction *old_sigaction) { 78 79 // interrupt = FALSE; 80 81 if (!old_sigaction) return TRUE; 82 83 struct sigaction new_sigaction; 84 85 if (sigaction (SIGINT, old_sigaction, &new_sigaction)) { 86 perror ("failed to reset signal handler: "); 87 FREE (old_sigaction); 88 return FALSE; 89 } 90 FREE (old_sigaction); 91 92 return TRUE; 93 } -
branches/eam_branches/ohana.20160226/src/opihi/lib.shell/macro_edit.c
r7917 r39419 2 2 3 3 int macro_edit (int argc, char **argv) { 4 OHANA_UNUSED_PARAM(argc); 5 OHANA_UNUSED_PARAM(argv); 4 6 5 7 gprint (GP_ERR, "this function is not implemented yet\n"); -
branches/eam_branches/ohana.20160226/src/opihi/lib.shell/macro_read.c
r7917 r39419 2 2 3 3 int macro_read (int argc, char **argv) { 4 OHANA_UNUSED_PARAM(argc); 5 OHANA_UNUSED_PARAM(argv); 4 6 5 7 gprint (GP_ERR, "this function is not implemented yet\n"); -
branches/eam_branches/ohana.20160226/src/opihi/lib.shell/macro_write.c
r7917 r39419 2 2 3 3 int macro_write (int argc, char **argv) { 4 OHANA_UNUSED_PARAM(argc); 5 OHANA_UNUSED_PARAM(argv); 4 6 5 7 gprint (GP_ERR, "this function is not implemented yet\n"); -
branches/eam_branches/ohana.20160226/src/opihi/lib.shell/multicommand.c
r32632 r39419 65 65 done = FALSE; 66 66 status = TRUE; 67 interrupt = FALSE; 67 68 while (!done) { 68 69 q = strchr (p, ';'); -
branches/eam_branches/ohana.20160226/src/opihi/mana/mana.c.in
r16448 r39419 9 9 /* program-dependent initialization */ 10 10 void program_init (int *argc, char **argv) { 11 OHANA_UNUSED_PARAM(argc); 12 OHANA_UNUSED_PARAM(argv); 11 13 12 14 auto_break = TRUE; -
branches/eam_branches/ohana.20160226/src/opihi/mana/version.c
r8653 r39419 3 3 4 4 int version (int argc, char **argv) { 5 OHANA_UNUSED_PARAM(argc); 6 OHANA_UNUSED_PARAM(argv); 5 7 6 8 char *tmp; -
branches/eam_branches/ohana.20160226/src/opihi/pantasks/ListenClients.c
r27435 r39419 68 68 /* select for messages from the current clients; wait for 0.5s before updating client list */ 69 69 void *ListenClients (void *data) { 70 OHANA_UNUSED_PARAM(data); 70 71 71 72 int i, Ncurrent, Nmax, status, Nread; -
branches/eam_branches/ohana.20160226/src/opihi/pantasks/controller_machines.c
r26411 r39419 2 2 3 3 int controller_machines (int argc, char **argv) { 4 OHANA_UNUSED_PARAM(argv); 4 5 5 6 int status; -
branches/eam_branches/ohana.20160226/src/opihi/pantasks/controller_threads.c
r23530 r39419 13 13 14 14 void *CheckControllerThread (void *data) { 15 OHANA_UNUSED_PARAM(data); 15 16 16 17 char log_stdout[128], log_stderr[128]; -
branches/eam_branches/ohana.20160226/src/opihi/pantasks/controller_version.c
r26411 r39419 2 2 3 3 int controller_version (int argc, char **argv) { 4 OHANA_UNUSED_PARAM(argv); 4 5 5 6 int status; -
branches/eam_branches/ohana.20160226/src/opihi/pantasks/invalid.c
r7917 r39419 2 2 3 3 int invalid (int argc, char **argv) { 4 OHANA_UNUSED_PARAM(argc); 4 5 5 6 gprint (GP_ERR, "%s is not valid for the pantasks client\n", argv[0]); -
branches/eam_branches/ohana.20160226/src/opihi/pantasks/jobs_and_tasks_thread.c
r23530 r39419 24 24 25 25 void *CheckJobsAndTasksThread (void *data) { 26 OHANA_UNUSED_PARAM(data); 26 27 27 28 char log_stdout[128], log_stderr[128]; -
branches/eam_branches/ohana.20160226/src/opihi/pantasks/pantasks.c.in
r27996 r39419 9 9 /* program-dependent initialization */ 10 10 void program_init (int *argc, char **argv) { 11 OHANA_UNUSED_PARAM(argc); 12 OHANA_UNUSED_PARAM(argv); 11 13 12 14 pthread_t JobsAndTasksThread; -
branches/eam_branches/ohana.20160226/src/opihi/pantasks/pantasks_client.c.in
r16453 r39419 9 9 /* program-dependent initialization */ 10 10 void program_init (int *argc, char **argv) { 11 OHANA_UNUSED_PARAM(argc); 12 OHANA_UNUSED_PARAM(argv); 11 13 12 14 auto_break = TRUE; -
branches/eam_branches/ohana.20160226/src/opihi/pantasks/pantasks_server.c.in
r38986 r39419 149 149 /* these are needed to resolve symbols expected by libshell.so */ 150 150 void welcome () { } 151 void program_init (int *argc, char **argv) {} 151 void program_init (int *argc, char **argv) { 152 OHANA_UNUSED_PARAM(argc); 153 OHANA_UNUSED_PARAM(argv); 154 } 152 155 153 156 // I need to do things in a different order here to have config / freopen / gprint sequenced correctly -
branches/eam_branches/ohana.20160226/src/opihi/pantasks/run.c
r11084 r39419 9 9 10 10 int run (int argc, char **argv) { 11 OHANA_UNUSED_PARAM(argv); 11 12 12 13 if (argc != 1) { -
branches/eam_branches/ohana.20160226/src/opihi/pantasks/server_connect.c
r16903 r39419 2 2 3 3 int server_connect (int argc, char **argv) { 4 OHANA_UNUSED_PARAM(argv); 4 5 5 6 int server; -
branches/eam_branches/ohana.20160226/src/opihi/pantasks/server_disconnect.c
r16903 r39419 2 2 3 3 int server_disconnect (int argc, char **argv) { 4 OHANA_UNUSED_PARAM(argv); 4 5 5 6 int server; -
branches/eam_branches/ohana.20160226/src/opihi/pantasks/server_run.c
r23530 r39419 2 2 3 3 int server_run (int argc, char **argv) { 4 OHANA_UNUSED_PARAM(argv); 4 5 5 6 if (argc != 1) { … … 15 16 16 17 int server_stop (int argc, char **argv) { 18 OHANA_UNUSED_PARAM(argv); 17 19 18 20 if (argc != 1) { … … 26 28 27 29 int server_halt (int argc, char **argv) { 30 OHANA_UNUSED_PARAM(argv); 28 31 29 32 if (argc != 1) { -
branches/eam_branches/ohana.20160226/src/opihi/pantasks/stop.c
r11084 r39419 2 2 3 3 int stop (int argc, char **argv) { 4 OHANA_UNUSED_PARAM(argv); 4 5 5 6 if (argc != 1) { … … 16 17 17 18 int halt (int argc, char **argv) { 19 OHANA_UNUSED_PARAM(argv); 18 20 19 21 if (argc != 1) { -
branches/eam_branches/ohana.20160226/src/opihi/pantasks/thread_locks.c
r27435 r39419 29 29 30 30 void ControlLock (const char *func) { 31 OHANA_UNUSED_PARAM(func); 31 32 // fprintf (stderr, "control lock %s\n", func); 32 33 pthread_mutex_lock (&ControlMutex); … … 34 35 35 36 void ControlUnlock (const char *func) { 37 OHANA_UNUSED_PARAM(func); 36 38 // fprintf (stderr, "control unlock %s\n", func); 37 39 pthread_mutex_unlock (&ControlMutex); -
branches/eam_branches/ohana.20160226/src/opihi/pantasks/version.c
r8176 r39419 3 3 4 4 int version (int argc, char **argv) { 5 OHANA_UNUSED_PARAM(argc); 6 OHANA_UNUSED_PARAM(argv); 5 7 6 8 char *tmp; -
branches/eam_branches/ohana.20160226/src/opihi/pclient/check.c
r3187 r39419 2 2 3 3 int check (int argc, char **argv) { 4 OHANA_UNUSED_PARAM(argc); 5 OHANA_UNUSED_PARAM(argv); 4 6 5 7 /* force a check */ -
branches/eam_branches/ohana.20160226/src/opihi/pclient/pclient.c.in
r26891 r39419 8 8 9 9 void dummy_prep_term (int flag) { 10 OHANA_UNUSED_PARAM(flag); 10 11 } 11 12 12 13 /* program-dependent initialization */ 13 14 void program_init (int *argc, char **argv) { 15 OHANA_UNUSED_PARAM(argc); 16 OHANA_UNUSED_PARAM(argv); 14 17 15 18 auto_break = TRUE; … … 80 83 81 84 void pipe_signal (int signum) { 85 OHANA_UNUSED_PARAM(signum); 86 82 87 Npipe ++; 83 88 if (Npipe > 100) { -
branches/eam_branches/ohana.20160226/src/opihi/pclient/reset.c
r20047 r39419 2 2 3 3 int reset (int argc, char **argv) { 4 OHANA_UNUSED_PARAM(argv); 4 5 5 6 int i, result, waitstatus; -
branches/eam_branches/ohana.20160226/src/opihi/pclient/status.c
r7917 r39419 2 2 3 3 int status (int argc, char **argv) { 4 OHANA_UNUSED_PARAM(argv); 4 5 5 6 char status_string[64]; -
branches/eam_branches/ohana.20160226/src/opihi/pclient/stdout.c
r7917 r39419 2 2 3 3 int stdout_pclient (int argc, char **argv) { 4 OHANA_UNUSED_PARAM(argv); 4 5 5 6 if (argc != 1) { … … 16 17 17 18 int stderr_pclient (int argc, char **argv) { 19 OHANA_UNUSED_PARAM(argv); 18 20 19 21 if (argc != 1) { -
branches/eam_branches/ohana.20160226/src/opihi/pclient/version.c
r8176 r39419 3 3 4 4 int version (int argc, char **argv) { 5 OHANA_UNUSED_PARAM(argc); 6 OHANA_UNUSED_PARAM(argv); 5 7 6 8 char *tmp; -
branches/eam_branches/ohana.20160226/src/opihi/pcontrol/CheckSystem.c
r34088 r39419 61 61 62 62 void *CheckSystem_Threaded (void *data) { 63 OHANA_UNUSED_PARAM(data); 63 64 64 65 int Njobchecks, Nhostchecks, Ndonejobs; -
branches/eam_branches/ohana.20160226/src/opihi/pcontrol/JobOps.c
r36623 r39419 208 208 209 209 IDtype AddJob (char *hostname, JobMode mode, int timeout, int nicelevel, int argc, char **argv, int Nxhosts, char **xhosts) { 210 OHANA_UNUSED_PARAM(timeout); 210 211 211 212 int JobID; … … 215 216 216 217 job[0].JobID = NextJobID(); 217 if (job[0].JobID < 0) { 218 free (job); 219 return -1; 220 } 218 // XXX this test does not make sense 219 // if (job[0].JobID < 0) { 220 // free (job); 221 // return -1; 222 // } 221 223 222 224 job[0].argc = argc; -
branches/eam_branches/ohana.20160226/src/opihi/pcontrol/MachineOps.c
r29540 r39419 74 74 // delete a new machine (if not new, return TRUE) 75 75 int DelMachine (char *name) { 76 OHANA_UNUSED_PARAM(name); 76 77 77 78 return TRUE; -
branches/eam_branches/ohana.20160226/src/opihi/pcontrol/StackOps.c
r16458 r39419 16 16 17 17 if (!DEBUG) return; 18 fprintf (stderr, "%s: %p ", func, stack);19 fprintf (stderr, "objects: %p ", stack[0].object);18 fprintf (stderr, "%s: %p ", func, (void *) stack); 19 fprintf (stderr, "objects: %p ", (void *) stack[0].object); 20 20 fprintf (stderr, "Nobjects: %d, NOBJECTS: %d\n", stack[0].Nobject, stack[0].NOBJECT); 21 21 } -
branches/eam_branches/ohana.20160226/src/opihi/pcontrol/machines.c
r26411 r39419 2 2 3 3 int machines (int argc, char **argv) { 4 OHANA_UNUSED_PARAM(argc); 5 OHANA_UNUSED_PARAM(argv); 4 6 5 7 PrintMachines (); -
branches/eam_branches/ohana.20160226/src/opihi/pcontrol/pcontrol.c.in
r28158 r39419 11 11 /* program-dependent initialization */ 12 12 void program_init (int *argc, char **argv) { 13 OHANA_UNUSED_PARAM(argc); 14 OHANA_UNUSED_PARAM(argv); 13 15 14 16 # ifdef THREADED -
branches/eam_branches/ohana.20160226/src/opihi/pcontrol/version.c
r8176 r39419 3 3 4 4 int version (int argc, char **argv) { 5 OHANA_UNUSED_PARAM(argc); 6 OHANA_UNUSED_PARAM(argv); 5 7 6 8 char *tmp;
Note:
See TracChangeset
for help on using the changeset viewer.
