Changeset 20860
- Timestamp:
- Nov 30, 2008, 2:46:46 PM (17 years ago)
- Location:
- branches/eam_branch_20081124/Ohana/src/opihi
- Files:
-
- 2 deleted
- 46 edited
-
cmd.astro/cgrid.c (modified) (1 diff)
-
cmd.astro/cplot.c (modified) (2 diffs)
-
cmd.astro/czplot.c (modified) (2 diffs)
-
cmd.astro/profile.c (modified) (1 diff)
-
cmd.data/applyfit.c (modified) (1 diff)
-
cmd.data/applyfit2d.c (modified) (1 diff)
-
cmd.data/concat.c (modified) (1 diff)
-
cmd.data/dbselect.c (modified) (1 diff)
-
cmd.data/gaussj.c (modified) (1 diff)
-
cmd.data/grid.c (modified) (2 diffs)
-
cmd.data/histogram.c (modified) (1 diff)
-
cmd.data/integrate.c (modified) (3 diffs)
-
cmd.data/interpolate.c (modified) (1 diff)
-
cmd.data/peak.c (modified) (2 diffs)
-
cmd.data/read_vectors.c (modified) (1 diff)
-
cmd.data/sort.c (modified) (1 diff)
-
cmd.data/uniq.c (modified) (2 diffs)
-
cmd.data/vbin.c (modified) (1 diff)
-
cmd.data/vclip.c (modified) (1 diff)
-
cmd.data/vload.c (modified) (1 diff)
-
cmd.data/zplot.c (modified) (2 diffs)
-
dvo/avextract.c (modified) (2 diffs)
-
dvo/dbBooleanCond.c (modified) (4 diffs)
-
dvo/dbCheckStack.c (modified) (5 diffs)
-
dvo/dbCmdlineFields.c (modified) (2 diffs)
-
dvo/dbFields.c (modified) (3 diffs)
-
dvo/dbRPN.c (modified) (7 diffs)
-
dvo/dbStackMath.c (modified) (1 diff)
-
dvo/dbStackOps.c (modified) (2 diffs)
-
dvo/db_check_stack.c (deleted)
-
dvo/db_convert_to_RPN.c (deleted)
-
dvo/fitcolors.c (modified) (1 diff)
-
dvo/images.c (modified) (2 diffs)
-
dvo/imbox.c (modified) (2 diffs)
-
dvo/imdense.c (modified) (2 diffs)
-
dvo/imstats.c (modified) (2 diffs)
-
dvo/lcurve.c (modified) (2 diffs)
-
dvo/lightcurve.c (modified) (1 diff)
-
dvo/mextract.c (modified) (3 diffs)
-
dvo/paverage.c (modified) (2 diffs)
-
dvo/pmeasure.c (modified) (2 diffs)
-
dvo/procks.c (modified) (3 diffs)
-
dvo/showtile.c (modified) (2 diffs)
-
dvo/simage.c (modified) (2 diffs)
-
dvo/skycat.c (modified) (1 diff)
-
include/dvomath.h (modified) (2 diffs)
-
include/dvoshell.h (modified) (5 diffs)
-
lib.shell/VectorOps.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branch_20081124/Ohana/src/opihi/cmd.astro/cgrid.c
r20857 r20860 391 391 graphmode.ptype = 100; /* connect a pair */ 392 392 graphmode.etype = 0; 393 PlotVectorPair (kapa, Xvec,Yvec, &graphmode);394 395 free (Xvec.elements. Flt);396 free (Yvec.elements. Flt);393 PlotVectorPair (kapa, &Xvec, &Yvec, &graphmode); 394 395 free (Xvec.elements.Ptr); 396 free (Yvec.elements.Ptr); 397 397 return (TRUE); 398 398 -
branches/eam_branch_20081124/Ohana/src/opihi/cmd.astro/cplot.c
r20859 r20860 31 31 } 32 32 33 ResetVector ( Xvec, OPIHI_FLT, xvec[0].Nelements);34 ResetVector ( Yvec, OPIHI_FLT, xvec[0].Nelements);33 ResetVector (&Xvec, OPIHI_FLT, xvec[0].Nelements); 34 ResetVector (&Yvec, OPIHI_FLT, xvec[0].Nelements); 35 35 36 36 r = xvec[0].elements.Flt; … … 77 77 78 78 graphmode.etype = 0; 79 PlotVectorPair (kapa, Xvec,Yvec, &graphmode);79 PlotVectorPair (kapa, &Xvec, &Yvec, &graphmode); 80 80 81 free (Xvec.elements. Flt);82 free (Yvec.elements. Flt);81 free (Xvec.elements.Ptr); 82 free (Yvec.elements.Ptr); 83 83 84 84 return (TRUE); -
branches/eam_branch_20081124/Ohana/src/opihi/cmd.astro/czplot.c
r20859 r20860 38 38 return (FALSE); 39 39 } 40 ResetVector ( Xvec, OPIHI_FLT, xvec[0].Nelements);41 ResetVector ( Yvec, OPIHI_FLT, xvec[0].Nelements);42 ResetVector ( Zvec, OPIHI_FLT, xvec[0].Nelements);40 ResetVector (&Xvec, OPIHI_FLT, xvec[0].Nelements); 41 ResetVector (&Yvec, OPIHI_FLT, xvec[0].Nelements); 42 ResetVector (&Zvec, OPIHI_FLT, xvec[0].Nelements); 43 43 44 44 r = xvec[0].elements.Flt; … … 67 67 graphmode.size = -1; /* point size determined by Zvec */ 68 68 graphmode.etype = 0; 69 PlotVectorTriplet (kapa, Xvec, Yvec,Zvec, &graphmode);69 PlotVectorTriplet (kapa, &Xvec, &Yvec, &Zvec, &graphmode); 70 70 71 71 free (Xvec.elements.Flt); -
branches/eam_branch_20081124/Ohana/src/opihi/cmd.astro/profile.c
r20859 r20860 28 28 if ((yvec = SelectVector (argv[3], ANYVECTOR, TRUE)) == NULL) return (FALSE); 29 29 30 ResetVector (xvec, OPIHI_FLT, (int)SQ(2*N+1) ;31 ResetVector (yvec, OPIHI_FLT, (int)SQ(2*N+1) ;30 ResetVector (xvec, OPIHI_FLT, (int)SQ(2*N+1)); 31 ResetVector (yvec, OPIHI_FLT, (int)SQ(2*N+1)); 32 32 33 33 bzero (yvec[0].elements.Flt, (int)SQ(2*N+1)*sizeof(opihi_flt)+1); -
branches/eam_branch_20081124/Ohana/src/opihi/cmd.data/applyfit.c
r20859 r20860 6 6 char *c, name[64]; 7 7 double *C, X; 8 opihi_flt * x, *y;8 opihi_flt *y; 9 9 Vector *xvec, *yvec; 10 10 -
branches/eam_branch_20081124/Ohana/src/opihi/cmd.data/applyfit2d.c
r20859 r20860 6 6 char *c, name[64]; 7 7 double **C, X, Y; 8 opihi_flt * x, *y, *z;8 opihi_flt *z; 9 9 Vector *xvec, *yvec, *zvec; 10 10 -
branches/eam_branch_20081124/Ohana/src/opihi/cmd.data/concat.c
r20859 r20860 5 5 int i, j, Nin; 6 6 double value; 7 opihi_flt *temp; 7 8 Vector *ivec, *ovec; 8 9 -
branches/eam_branch_20081124/Ohana/src/opihi/cmd.data/dbselect.c
r20859 r20860 86 86 ResetVector (vec[i], OPIHI_FLT, Nrows); 87 87 break; 88 } 88 89 } 89 90 -
branches/eam_branch_20081124/Ohana/src/opihi/cmd.data/gaussj.c
r20859 r20860 7 7 opihi_int *vi; 8 8 double **a, **b; 9 int i, j, N, status, QUIET ;9 int i, j, N, status, QUIET, isFloat; 10 10 Vector *B; 11 11 Buffer *A; -
branches/eam_branch_20081124/Ohana/src/opihi/cmd.data/grid.c
r20859 r20860 23 23 24 24 N = 0; 25 ResetVector ( Xvec, OPIHI_FLT, 200);26 ResetVector ( Yvec, OPIHI_FLT, 200);25 ResetVector (&Xvec, OPIHI_FLT, 200); 26 ResetVector (&Yvec, OPIHI_FLT, 200); 27 27 28 28 major = minor = 1; … … 191 191 graphmode.ptype = 100; /* connect a pair */ 192 192 graphmode.etype = 0; 193 PlotVectorPair (kapa, Xvec,Yvec, &graphmode);193 PlotVectorPair (kapa, &Xvec, &Yvec, &graphmode); 194 194 195 195 free (Xvec.elements.Flt); -
branches/eam_branch_20081124/Ohana/src/opihi/cmd.data/histogram.c
r20859 r20860 35 35 bzero (yvec[0].elements.Int, sizeof(opihi_int)*yvec[0].Nelements); 36 36 if (Nbins < 1) return (TRUE); 37 *OUT = yvec[0].elements.Int;37 OUT = yvec[0].elements.Int; 38 38 39 39 if (xvec[0].type == OPIHI_FLT) { -
branches/eam_branch_20081124/Ohana/src/opihi/cmd.data/integrate.c
r20859 r20860 4 4 5 5 int i, N, VERBOSE, isFloat; 6 opihi_flt *X, *Y; 6 opihi_flt *Yf; 7 opihi_int *Yi; 7 8 double start, end, value, range, dvalue; 8 9 Vector *vecx, *vecy; … … 37 38 if ((*X >= start) && (*X <= end)) { 38 39 dvalue = (isFloat) ? *Yf : *Yi; 39 value += *Y* (X[1] - X[0]);40 value += dvalue * (X[1] - X[0]); 40 41 range += (X[1] - X[0]); 41 42 } … … 46 47 if ((*X >= start) && (*X <= end)) { 47 48 dvalue = (isFloat) ? *Yf : *Yi; 48 value += *Y* (X[1] - X[0]);49 value += dvalue * (X[1] - X[0]); 49 50 range += (X[1] - X[0]); 50 51 } -
branches/eam_branch_20081124/Ohana/src/opihi/cmd.data/interpolate.c
r20857 r20860 21 21 if ((yout = SelectVector (argv[4], ANYVECTOR, TRUE)) == NULL) return (FALSE); 22 22 23 REQUIRE_VECTOR_FLT ( in, FALSE);24 REQUIRE_VECTOR_FLT ( xv, FALSE);25 REQUIRE_VECTOR_FLT ( yv, FALSE);23 REQUIRE_VECTOR_FLT (xin, FALSE); 24 REQUIRE_VECTOR_FLT (yin, FALSE); 25 REQUIRE_VECTOR_FLT (xout, FALSE); 26 26 ResetVector (yout, OPIHI_FLT, xout[0].Nelements); 27 27 -
branches/eam_branch_20081124/Ohana/src/opihi/cmd.data/peak.c
r20857 r20860 5 5 int i, N, imax, QUIET; 6 6 double start, end, xmax, ymax; 7 opihi_flt *X, *Y;8 7 Vector *vecx, *vecy; 9 8 … … 31 30 32 31 imax = -1; 32 xmax = -HUGE_VAL; 33 ymax = -HUGE_VAL; 33 34 34 if ( vecx[0].type == OPIHI_FLT) {35 if ((vecx[0].type == OPIHI_FLT) && (vecy[0].type == OPIHI_FLT)) { 35 36 opihi_flt *X = vecx[0].elements.Flt; 36 xmax = X[start]; 37 ymax = (vecy[0].type == OPIHI_FLT) ? vecy[0].elements.Flt[start] : vecy[0].elements.Int[start]; 38 for (i = 1; i < vecx[0].Nelements-1; i++, X++, Y++) { 39 if ((*X >= start) && (*X <= end)) { 40 if ((imax == -1) || (*Y > ymax)) { 41 xmax = *X; 42 ymax = (vecy[0].type == OPIHI_FLT) ? vecy[0].elements.Flt[i] : vecy[0].elements.Int[i]; 43 imax = i; 44 } 45 } 37 opihi_flt *Y = vecy[0].elements.Flt; 38 for (i = 0; i < vecx[0].Nelements; i++, X++, Y++) { 39 if (*X < start) continue; 40 if (*X > end) continue; 41 if (*Y < ymax) continue; 42 xmax = *X; 43 ymax = *Y; 44 imax = i; 46 45 } 47 } else { 46 } 47 if ((vecx[0].type == OPIHI_FLT) && (vecy[0].type == OPIHI_INT)) { 48 opihi_flt *X = vecx[0].elements.Flt; 49 opihi_int *Y = vecy[0].elements.Int; 50 for (i = 0; i < vecx[0].Nelements; i++, X++, Y++) { 51 if (*X < start) continue; 52 if (*X > end) continue; 53 if (*Y < ymax) continue; 54 xmax = *X; 55 ymax = *Y; 56 imax = i; 57 } 58 } 59 if ((vecx[0].type == OPIHI_INT) && (vecy[0].type == OPIHI_FLT)) { 48 60 opihi_int *X = vecx[0].elements.Int; 49 xmax = X[start]; 50 ymax = (vecy[0].type == OPIHI_FLT) ? vecy[0].elements.Flt[start] : vecy[0].elements.Int[start]; 51 for (i = 1; i < vecx[0].Nelements-1; i++, X++, Y++) { 52 if ((*X >= start) && (*X <= end)) { 53 if ((imax == -1) || (*Y > ymax)) { 54 xmax = *X; 55 ymax = (vecy[0].type == OPIHI_FLT) ? vecy[0].elements.Flt[i] : vecy[0].elements.Int[i]; 56 imax = i; 57 } 58 } 61 opihi_flt *Y = vecy[0].elements.Flt; 62 for (i = 0; i < vecx[0].Nelements; i++, X++, Y++) { 63 if (*X < start) continue; 64 if (*X > end) continue; 65 if (*Y < ymax) continue; 66 xmax = *X; 67 ymax = *Y; 68 imax = i; 69 } 70 } 71 if ((vecx[0].type == OPIHI_INT) && (vecy[0].type == OPIHI_INT)) { 72 opihi_int *X = vecx[0].elements.Int; 73 opihi_int *Y = vecy[0].elements.Int; 74 for (i = 0; i < vecx[0].Nelements; i++, X++, Y++) { 75 if (*X < start) continue; 76 if (*X > end) continue; 77 if (*Y < ymax) continue; 78 xmax = *X; 79 ymax = *Y; 80 imax = i; 59 81 } 60 82 } -
branches/eam_branch_20081124/Ohana/src/opihi/cmd.data/read_vectors.c
r20857 r20860 159 159 int read_table_vectors (int argc, char **argv, char *extname) { 160 160 161 int i, j, k, N, Nbytes, Nextend, Ny, Binary ;161 int i, j, k, N, Nbytes, Nextend, Ny, Binary, vecType; 162 162 char type[16], ID[80], *CCDKeyword; 163 163 FTable table; -
branches/eam_branch_20081124/Ohana/src/opihi/cmd.data/sort.c
r20859 r20860 101 101 } 102 102 /* swap .elements.Flt (== V) and itemp */ 103 vec[i][0].elements. Flt = itemp;103 vec[i][0].elements.Int = itemp; 104 104 itemp = V; 105 105 } 106 106 } 107 free (temp); 107 free (itemp); 108 free (ftemp); 108 109 free (vec); 109 110 free (index); -
branches/eam_branch_20081124/Ohana/src/opihi/cmd.data/uniq.c
r20857 r20860 15 15 16 16 /* allocate the maximum possible needed */ 17 ResetVector (o ut, ivec->type, ivec->Nelements);17 ResetVector (ovec, ivec->type, ivec->Nelements); 18 18 19 19 Nnew = 0; … … 48 48 49 49 // free up extra memory 50 ResetVector (o ut, ivec->type, Nnew);50 ResetVector (ovec, ivec->type, Nnew); 51 51 52 52 return (TRUE); -
branches/eam_branch_20081124/Ohana/src/opihi/cmd.data/vbin.c
r20857 r20860 5 5 int i, j, n, N, Nin, Nout; 6 6 int Normalize, Ignore; 7 opihi_flt *Vout, *Vin,IgnoreValue;7 opihi_flt *Vout, IgnoreValue; 8 8 double scale; 9 9 Vector *in, *out; -
branches/eam_branch_20081124/Ohana/src/opihi/cmd.data/vclip.c
r20857 r20860 5 5 int i, Npix, DO_NAN, DO_INF, DO_CLIP, N; 6 6 double min, Vmin, max, Vmax, nan_val, inf_val; 7 opihi_flt *in;8 7 Vector *vec; 9 8 -
branches/eam_branch_20081124/Ohana/src/opihi/cmd.data/vload.c
r20857 r20860 82 82 overlay[i].type = type; 83 83 overlay[i].text = NULL; 84 overlay[i].x = (vec [0].type == OPIHI_FLT) ? vecx[0].elements.Flt[i] : vecx[0].elements.Int[i];85 overlay[i].y = (vec [0].type == OPIHI_FLT) ? vecy[0].elements.Flt[i] : vecy[0].elements.Int[i];84 overlay[i].x = (vecx[0].type == OPIHI_FLT) ? vecx[0].elements.Flt[i] : vecx[0].elements.Int[i]; 85 overlay[i].y = (vecy[0].type == OPIHI_FLT) ? vecy[0].elements.Flt[i] : vecy[0].elements.Int[i]; 86 86 overlay[i].x += 0.5; 87 87 overlay[i].y += 0.5; -
branches/eam_branch_20081124/Ohana/src/opihi/cmd.data/zplot.c
r20857 r20860 41 41 } 42 42 } else { 43 opihi_int *in = zvec[0].elements. Flt;43 opihi_int *in = zvec[0].elements.Int; 44 44 for (i = 0; i < Zvec.Nelements; i++, in++, out++) { 45 45 *out = MIN (1.0, MAX (0.01, (*in - min) / range)); … … 51 51 graphmode.size = -1; /* point size determined by Zvec */ 52 52 graphmode.etype = 0; /* no errorbars */ 53 PlotVectorTriplet (kapa, xvec, yvec, Zvec, &graphmode);53 PlotVectorTriplet (kapa, xvec, yvec, &Zvec, &graphmode); 54 54 55 free (Zvec.elements. Flt);55 free (Zvec.elements.Ptr); 56 56 57 57 return (TRUE); -
branches/eam_branch_20081124/Ohana/src/opihi/dvo/avextract.c
r20857 r20860 1 1 # include "dvoshell.h" 2 2 3 // XXX need to promote values (and dbStack entries) to opihi_flt, but wait until done testing4 3 int avextract (int argc, char **argv) { 5 4 … … 73 72 74 73 /* create output storage vectors */ 75 ALLOCATE (values, float, Nfields);74 ALLOCATE (values, dbValue, Nfields); 76 75 ALLOCATE (vec, Vector *, Nreturn); 77 76 for (i = 0; i < Nreturn; i++) { -
branches/eam_branch_20081124/Ohana/src/opihi/dvo/dbBooleanCond.c
r20857 r20860 4 4 // supplied by fields, in order 0 - Nfields (validate before calling) 5 5 // XXX fields needs to be typed (dbValue), stack math needs to deal with the type cases 6 int dbBooleanCond (dbStack *inStack, int NinStack, float*fields) {6 int dbBooleanCond (dbStack *inStack, int NinStack, dbValue *fields) { 7 7 8 8 float value; … … 22 22 23 23 /***** binary operators *****/ 24 if ((stack[i][0].type >= 3) && (stack[i][0].type <= 8)) {24 if ((stack[i][0].type >= DB_STACK_LOGIC) && (stack[i][0].type <= DB_STACK_POWER)) { 25 25 26 26 // pre-test that op and entries match … … 42 42 43 43 /***** unary operators **/ 44 if (stack[i][0].type == 9) {44 if (stack[i][0].type == DB_STACK_UNARY) { 45 45 46 46 // pre-test that op and entries match … … 62 62 63 63 // the result here is a single stack entry with a value: 64 if (stack[0][0].type == 'F') {64 if (stack[0][0].type & DB_STACK_FIELD) { 65 65 N = stack[0][0].field; 66 value = fields[N];66 value = (stack[0][0].type & DB_STACK_INT) ? fields[N].Int : fields[N].Flt; 67 67 } else { 68 value = stack[0][0].Float;68 value = (stack[0][0].type & DB_STACK_INT) ? stack[0][0].IntValue : stack[0][0].FltValue; 69 69 } 70 70 -
branches/eam_branch_20081124/Ohana/src/opihi/dvo/dbCheckStack.c
r20820 r20860 1 1 # include "dvoshell.h" 2 3 // XXX we are using a fairly bogus set of char values to distinguish a few cases: 4 // 's', 'S' : value is a scalar (upper == float; lower == int) 5 // 'f', 'F' : value is a field (upper == float; lower == int) 6 // 't', 'T' : value is a temp scalar (upper == float; lower == int) 7 // these would be better done using bit values to test for field? temp? float? 2 8 3 9 int dbCheckStack (dbStack *stack, int Nstack, int table, dbField **inFields, int *inNfields) { 4 10 5 11 int i, j, status, NFIELDS, Nfields; 6 char *c ;12 char *c1, *c2; 7 13 dbField *fields; 8 14 … … 14 20 15 21 for (i = 0; i < Nstack; i++) { 16 if (stack[i].type == 'X') {22 if (stack[i].type == DB_STACK_VALUE) { 17 23 18 /** if this is a number, put it on the list of scalers and move on **/ 19 stack[i].Float = strtod (stack[i].name, &c); 20 if (c == stack[i].name + strlen (stack[i].name)) { 21 stack[i].type = 'S'; 24 /** if this is a number, put it on the list of scalars and move on. assume value is 25 * an int unless proven otherwise **/ 26 stack[i].FltValue = strtod (stack[i].name, &c1); 27 stack[i].IntValue = strtol (stack[i].name, &c2, 0); 28 if (c2 == stack[i].name + strlen (stack[i].name)) { 29 stack[i].type |= DB_STACK_INT; 30 continue; 31 } 32 if (c1 == stack[i].name + strlen (stack[i].name)) { 33 // this is a float value 22 34 continue; 23 35 } … … 44 56 code = GetPhotcodebyName (tmpstring); 45 57 if (code) { 46 stack[i]. Float= code->code;47 stack[i].type = 'S';58 stack[i].IntValue = code->code; 59 stack[i].type = DB_STACK_INT; 48 60 continue; 49 61 } … … 60 72 if (j < Nfields) { 61 73 stack[i].field = j; 62 stack[i].type = 'F'; 74 stack[i].type |= DB_STACK_FIELD; 75 if (fields[j].type == OPIHI_INT) { 76 stack[i].type |= DB_STACK_INT; 77 } 63 78 stack[i].name = NULL; 64 stack[i].Float = 0.0; 79 stack[i].FltValue = 0.0; 80 stack[i].IntValue = 0; 65 81 continue; 66 82 } … … 78 94 } 79 95 stack[i].field = Nfields; 80 stack[i].type = 'F'; 96 stack[i].type |= DB_STACK_FIELD; 97 if (fields[Nfields].type == OPIHI_INT) { 98 stack[i].type |= DB_STACK_INT; 99 } 81 100 stack[i].name = NULL; 82 stack[i].Float = 0.0; 101 stack[i].FltValue = 0.0; // 'F' 102 stack[i].IntValue = 0; // 'f' 83 103 84 104 Nfields ++; -
branches/eam_branch_20081124/Ohana/src/opihi/dvo/dbCmdlineFields.c
r20820 r20860 155 155 156 156 stack[0][N + 0].name = strcreate (Rname); 157 stack[0][N + 0].type = 'X';157 stack[0][N + 0].type = DB_STACK_VALUE; 158 158 stack[0][N + 1].name = strfloat (Rmin); 159 stack[0][N + 1].type = 'X';159 stack[0][N + 1].type = DB_STACK_VALUE; 160 160 stack[0][N + 2].name = strcreate (">"); 161 stack[0][N + 2].type = 4; 162 // stack[0][N + 3].name = strcreate ("A"); 163 // stack[0][N + 3].type = 3; 161 stack[0][N + 2].type = DB_STACK_COMPARE; 164 162 165 163 stack[0][N + 3].name = strcreate (Rname); 166 stack[0][N + 3].type = 'X';164 stack[0][N + 3].type = DB_STACK_VALUE; 167 165 stack[0][N + 4].name = strfloat (Rmax); 168 stack[0][N + 4].type = 'X';166 stack[0][N + 4].type = DB_STACK_VALUE; 169 167 stack[0][N + 5].name = strcreate ("<"); 170 stack[0][N + 5].type = 4;168 stack[0][N + 5].type = DB_STACK_COMPARE; 171 169 stack[0][N + 6].name = strcreate ("A"); 172 stack[0][N + 6].type = 3;170 stack[0][N + 6].type = DB_STACK_LOGIC; 173 171 174 172 stack[0][N + 7].name = strcreate (Dname); 175 stack[0][N + 7].type = 'X';173 stack[0][N + 7].type = DB_STACK_VALUE; 176 174 stack[0][N + 8].name = strfloat (Dmin); 177 stack[0][N + 8].type = 'X';175 stack[0][N + 8].type = DB_STACK_VALUE; 178 176 stack[0][N + 9].name = strcreate (">"); 179 stack[0][N + 9].type = 4;177 stack[0][N + 9].type = DB_STACK_COMPARE; 180 178 stack[0][N + 10].name = strcreate ("A"); 181 stack[0][N + 10].type = 3;179 stack[0][N + 10].type = DB_STACK_LOGIC; 182 180 183 181 stack[0][N + 11].name = strcreate (Dname); 184 stack[0][N + 11].type = 'X';182 stack[0][N + 11].type = DB_STACK_VALUE; 185 183 stack[0][N + 12].name = strfloat (Dmax); 186 stack[0][N + 12].type = 'X';184 stack[0][N + 12].type = DB_STACK_VALUE; 187 185 stack[0][N + 13].name = strcreate ("<"); 188 stack[0][N + 13].type = 4;186 stack[0][N + 13].type = DB_STACK_COMPARE; 189 187 stack[0][N + 14].name = strcreate ("A"); 190 stack[0][N + 14].type = 3;188 stack[0][N + 14].type = DB_STACK_LOGIC; 191 189 192 190 if (N == 0) { … … 194 192 } else { 195 193 stack[0][N + 15].name = strcreate ("A"); 196 stack[0][N + 15].type = 3;194 stack[0][N + 15].type = DB_STACK_LOGIC; 197 195 N += 16; 198 196 } -
branches/eam_branch_20081124/Ohana/src/opihi/dvo/dbFields.c
r20857 r20860 107 107 if (!strcasecmp (fieldName, "GLON")) { 108 108 dbExtractMeasuresInitTransform (COORD_GALACTIC); 109 ESCAPE (MEAS_GLON, MAG_NONE );109 ESCAPE (MEAS_GLON, MAG_NONE, OPIHI_FLT); 110 110 } 111 111 if (!strcasecmp (fieldName, "GLAT")) { 112 112 dbExtractMeasuresInitTransform (COORD_GALACTIC); 113 ESCAPE (MEAS_GLAT, MAG_NONE );113 ESCAPE (MEAS_GLAT, MAG_NONE, OPIHI_FLT); 114 114 } 115 115 if (!strcasecmp (fieldName, "GLON:AVE")) { 116 116 dbExtractMeasuresInitTransform (COORD_GALACTIC); 117 ESCAPE (MEAS_GLON_AVE, MAG_NONE );117 ESCAPE (MEAS_GLON_AVE, MAG_NONE, OPIHI_FLT); 118 118 } 119 119 if (!strcasecmp (fieldName, "GLAT:AVE")) { 120 120 dbExtractMeasuresInitTransform (COORD_GALACTIC); 121 ESCAPE (MEAS_GLAT_AVE, MAG_NONE );121 ESCAPE (MEAS_GLAT_AVE, MAG_NONE, OPIHI_FLT); 122 122 } 123 123 124 124 if (!strcasecmp (fieldName, "ELON")) { 125 125 dbExtractMeasuresInitTransform (COORD_ECLIPTIC); 126 ESCAPE (MEAS_ELON, MAG_NONE );126 ESCAPE (MEAS_ELON, MAG_NONE, OPIHI_FLT); 127 127 } 128 128 if (!strcasecmp (fieldName, "ELAT")) { 129 129 dbExtractMeasuresInitTransform (COORD_ECLIPTIC); 130 ESCAPE (MEAS_ELAT, MAG_NONE );130 ESCAPE (MEAS_ELAT, MAG_NONE, OPIHI_FLT); 131 131 } 132 132 if (!strcasecmp (fieldName, "ELON:AVE")) { 133 133 dbExtractMeasuresInitTransform (COORD_ECLIPTIC); 134 ESCAPE (MEAS_ELON_AVE, MAG_NONE );134 ESCAPE (MEAS_ELON_AVE, MAG_NONE, OPIHI_FLT); 135 135 } 136 136 if (!strcasecmp (fieldName, "ELAT:AVE")) { 137 137 dbExtractMeasuresInitTransform (COORD_ECLIPTIC); 138 ESCAPE (MEAS_ELAT_AVE, MAG_NONE );138 ESCAPE (MEAS_ELAT_AVE, MAG_NONE, OPIHI_FLT); 139 139 } 140 140 … … 218 218 if (!strcasecmp (fieldName, "GLON")) { 219 219 dbExtractAveragesInitTransform (COORD_GALACTIC); 220 ESCAPE (AVE_GLON, MAG_NONE );220 ESCAPE (AVE_GLON, MAG_NONE, OPIHI_FLT); 221 221 } 222 222 if (!strcasecmp (fieldName, "GLAT")) { 223 223 dbExtractAveragesInitTransform (COORD_GALACTIC); 224 ESCAPE (AVE_GLAT, MAG_NONE );224 ESCAPE (AVE_GLAT, MAG_NONE, OPIHI_FLT); 225 225 } 226 226 … … 229 229 if (!strcasecmp (fieldName, "ELON")) { 230 230 dbExtractAveragesInitTransform (COORD_ECLIPTIC); 231 ESCAPE (AVE_ELON, MAG_NONE );231 ESCAPE (AVE_ELON, MAG_NONE, OPIHI_FLT); 232 232 } 233 233 if (!strcasecmp (fieldName, "ELAT")) { 234 234 dbExtractAveragesInitTransform (COORD_ECLIPTIC); 235 ESCAPE (AVE_ELAT, MAG_NONE );235 ESCAPE (AVE_ELAT, MAG_NONE, OPIHI_FLT); 236 236 } 237 237 -
branches/eam_branch_20081124/Ohana/src/opihi/dvo/dbRPN.c
r13479 r20860 21 21 22 22 /* decide on priority of object */ 23 type = 0;23 type = DB_STACK_NONE; 24 24 /* unary operations */ 25 if (!strcmp (argv[i], "abs")) { type = 9; goto gotit; } 26 if (!strcmp (argv[i], "int")) { type = 9; goto gotit; } 27 if (!strcmp (argv[i], "exp")) { type = 9; goto gotit; } 28 if (!strcmp (argv[i], "ten")) { type = 9; goto gotit; } 29 if (!strcmp (argv[i], "log")) { type = 9; goto gotit; } 30 if (!strcmp (argv[i], "ln")) { type = 9; goto gotit; } 31 if (!strcmp (argv[i], "sqrt")) { type = 9; goto gotit; } 32 if (!strcmp (argv[i], "erf")) { type = 9; goto gotit; } 33 34 if (!strcmp (argv[i], "sinh")) { type = 9; goto gotit; } 35 if (!strcmp (argv[i], "cosh")) { type = 9; goto gotit; } 36 if (!strcmp (argv[i], "asinh")) { type = 9; goto gotit; } 37 if (!strcmp (argv[i], "acosh")) { type = 9; goto gotit; } 38 39 if (!strcmp (argv[i], "sin")) { type = 9; goto gotit; } 40 if (!strcmp (argv[i], "cos")) { type = 9; goto gotit; } 41 if (!strcmp (argv[i], "tan")) { type = 9; goto gotit; } 42 if (!strcmp (argv[i], "dsin")) { type = 9; goto gotit; } 43 if (!strcmp (argv[i], "dcos")) { type = 9; goto gotit; } 44 if (!strcmp (argv[i], "dtan")) { type = 9; goto gotit; } 45 if (!strcmp (argv[i], "asin")) { type = 9; goto gotit; } 46 if (!strcmp (argv[i], "acos")) { type = 9; goto gotit; } 47 if (!strcmp (argv[i], "atan")) { type = 9; goto gotit; } 48 if (!strcmp (argv[i], "dasin")) { type = 9; goto gotit; } 49 if (!strcmp (argv[i], "dacos")) { type = 9; goto gotit; } 50 if (!strcmp (argv[i], "datan")) { type = 9; goto gotit; } 51 52 if (!strcmp (argv[i], "lgamma")) { type = 9; goto gotit; } 53 54 if (!strcmp (argv[i], "rnd")) { type = 9; goto gotit; } 55 if (!strcmp (argv[i], "xramp")) { type = 9; goto gotit; } 56 if (!strcmp (argv[i], "yramp")) { type = 9; goto gotit; } 57 if (!strcmp (argv[i], "ramp")) { type = 9; goto gotit; } 58 if (!strcmp (argv[i], "zero")) { type = 9; goto gotit; } 59 if (!strcmp (argv[i], "--")) { type = 9; goto gotit; } 60 if (!strcmp (argv[i], "not")) { type = 9; goto gotit; } 61 if (!strcmp (argv[i], "isinf")) { type = 9; goto gotit; } 62 if (!strcmp (argv[i], "isnan")) { type = 9; goto gotit; } 25 if (!strcmp (argv[i], "abs")) { type = DB_STACK_UNARY; goto gotit; } 26 if (!strcmp (argv[i], "int")) { type = DB_STACK_UNARY; goto gotit; } 27 if (!strcmp (argv[i], "exp")) { type = DB_STACK_UNARY; goto gotit; } 28 if (!strcmp (argv[i], "ten")) { type = DB_STACK_UNARY; goto gotit; } 29 if (!strcmp (argv[i], "log")) { type = DB_STACK_UNARY; goto gotit; } 30 if (!strcmp (argv[i], "ln")) { type = DB_STACK_UNARY; goto gotit; } 31 if (!strcmp (argv[i], "sqrt")) { type = DB_STACK_UNARY; goto gotit; } 32 if (!strcmp (argv[i], "erf")) { type = DB_STACK_UNARY; goto gotit; } 33 if (!strcmp (argv[i], "sinh")) { type = DB_STACK_UNARY; goto gotit; } 34 if (!strcmp (argv[i], "cosh")) { type = DB_STACK_UNARY; goto gotit; } 35 if (!strcmp (argv[i], "asinh")) { type = DB_STACK_UNARY; goto gotit; } 36 if (!strcmp (argv[i], "acosh")) { type = DB_STACK_UNARY; goto gotit; } 37 if (!strcmp (argv[i], "sin")) { type = DB_STACK_UNARY; goto gotit; } 38 if (!strcmp (argv[i], "cos")) { type = DB_STACK_UNARY; goto gotit; } 39 if (!strcmp (argv[i], "tan")) { type = DB_STACK_UNARY; goto gotit; } 40 if (!strcmp (argv[i], "dsin")) { type = DB_STACK_UNARY; goto gotit; } 41 if (!strcmp (argv[i], "dcos")) { type = DB_STACK_UNARY; goto gotit; } 42 if (!strcmp (argv[i], "dtan")) { type = DB_STACK_UNARY; goto gotit; } 43 if (!strcmp (argv[i], "asin")) { type = DB_STACK_UNARY; goto gotit; } 44 if (!strcmp (argv[i], "acos")) { type = DB_STACK_UNARY; goto gotit; } 45 if (!strcmp (argv[i], "atan")) { type = DB_STACK_UNARY; goto gotit; } 46 if (!strcmp (argv[i], "dasin")) { type = DB_STACK_UNARY; goto gotit; } 47 if (!strcmp (argv[i], "dacos")) { type = DB_STACK_UNARY; goto gotit; } 48 if (!strcmp (argv[i], "datan")) { type = DB_STACK_UNARY; goto gotit; } 49 if (!strcmp (argv[i], "lgamma")) { type = DB_STACK_UNARY; goto gotit; } 50 if (!strcmp (argv[i], "rnd")) { type = DB_STACK_UNARY; goto gotit; } 51 if (!strcmp (argv[i], "xramp")) { type = DB_STACK_UNARY; goto gotit; } 52 if (!strcmp (argv[i], "yramp")) { type = DB_STACK_UNARY; goto gotit; } 53 if (!strcmp (argv[i], "ramp")) { type = DB_STACK_UNARY; goto gotit; } 54 if (!strcmp (argv[i], "zero")) { type = DB_STACK_UNARY; goto gotit; } 55 if (!strcmp (argv[i], "--")) { type = DB_STACK_UNARY; goto gotit; } 56 if (!strcmp (argv[i], "not")) { type = DB_STACK_UNARY; goto gotit; } 57 if (!strcmp (argv[i], "isinf")) { type = DB_STACK_UNARY; goto gotit; } 58 if (!strcmp (argv[i], "isnan")) { type = DB_STACK_UNARY; goto gotit; } 63 59 64 60 /* binary operations */ 65 if (!strcmp (argv[i], "^")) { type = 8; goto gotit; }66 67 if (!strcmp (argv[i], "@")) { type = 7; goto gotit; }68 if (!strcmp (argv[i], "/")) { type = 7; goto gotit; }69 if (!strcmp (argv[i], "*")) { type = 7; goto gotit; }70 if (!strcmp (argv[i], "%")) { type = 7; goto gotit; }71 72 if (!strcmp (argv[i], "+")) { type = 6; goto gotit; }73 if (!strcmp (argv[i], "-")) { type = 6; goto gotit; }61 if (!strcmp (argv[i], "^")) { type = DB_STACK_POWER; goto gotit; } 62 63 if (!strcmp (argv[i], "@")) { type = DB_STACK_MULTIPLY; goto gotit; } 64 if (!strcmp (argv[i], "/")) { type = DB_STACK_MULTIPLY; goto gotit; } 65 if (!strcmp (argv[i], "*")) { type = DB_STACK_MULTIPLY; goto gotit; } 66 if (!strcmp (argv[i], "%")) { type = DB_STACK_MULTIPLY; goto gotit; } 67 68 if (!strcmp (argv[i], "+")) { type = DB_STACK_SUM; goto gotit; } 69 if (!strcmp (argv[i], "-")) { type = DB_STACK_SUM; goto gotit; } 74 70 75 if (!strcmp (argv[i], "&")) { type = 5; goto gotit; }76 if (!strcmp (argv[i], "|")) { type = 5; goto gotit; }77 78 if (!strcmp (argv[i], "<")) { type = 4; goto gotit; }79 if (!strcmp (argv[i], ">")) { type = 4; goto gotit; }80 if (!strcmp (argv[i], "==")) { type = 4; strcpy (argv[i], "E"); goto gotit; }81 if (!strcmp (argv[i], "!=")) { type = 4; strcpy (argv[i], "N"); goto gotit; }82 if (!strcmp (argv[i], "<=")) { type = 4; strcpy (argv[i], "L"); goto gotit; }83 if (!strcmp (argv[i], ">=")) { type = 4; strcpy (argv[i], "G"); goto gotit; }84 if (!strcmp (argv[i], ">>")) { type = 4; strcpy (argv[i], "U"); goto gotit; }85 if (!strcmp (argv[i], "<<")) { type = 4; strcpy (argv[i], "D"); goto gotit; }86 87 if (!strcmp (argv[i], "&&")) { type = 3; strcpy (argv[i], "A"); goto gotit; }88 if (!strcmp (argv[i], "||")) { type = 3; strcpy (argv[i], "O"); goto gotit; }89 90 if (!strcmp (argv[i], "(")) { type = 2; goto gotit; }91 if (!strcmp (argv[i], ")")) { type = 1; goto gotit; }71 if (!strcmp (argv[i], "&")) { type = DB_STACK_BITWISE; goto gotit; } 72 if (!strcmp (argv[i], "|")) { type = DB_STACK_BITWISE; goto gotit; } 73 74 if (!strcmp (argv[i], "<")) { type = DB_STACK_COMPARE; goto gotit; } 75 if (!strcmp (argv[i], ">")) { type = DB_STACK_COMPARE; goto gotit; } 76 if (!strcmp (argv[i], "==")) { type = DB_STACK_COMPARE; strcpy (argv[i], "E"); goto gotit; } 77 if (!strcmp (argv[i], "!=")) { type = DB_STACK_COMPARE; strcpy (argv[i], "N"); goto gotit; } 78 if (!strcmp (argv[i], "<=")) { type = DB_STACK_COMPARE; strcpy (argv[i], "L"); goto gotit; } 79 if (!strcmp (argv[i], ">=")) { type = DB_STACK_COMPARE; strcpy (argv[i], "G"); goto gotit; } 80 if (!strcmp (argv[i], ">>")) { type = DB_STACK_COMPARE; strcpy (argv[i], "U"); goto gotit; } 81 if (!strcmp (argv[i], "<<")) { type = DB_STACK_COMPARE; strcpy (argv[i], "D"); goto gotit; } 82 83 if (!strcmp (argv[i], "&&")) { type = DB_STACK_LOGIC; strcpy (argv[i], "A"); goto gotit; } 84 if (!strcmp (argv[i], "||")) { type = DB_STACK_LOGIC; strcpy (argv[i], "O"); goto gotit; } 85 86 if (!strcmp (argv[i], "(")) { type = DB_STACK_OPEN_PAR; goto gotit; } 87 if (!strcmp (argv[i], ")")) { type = DB_STACK_CLOSE_PAR; goto gotit; } 92 88 93 89 gotit: 94 90 /* choose how to deal with object */ 95 91 switch (type) { 96 case 8: /* exponentiation: 2^2^3 = 64 != 256 (precedence is right-to-left, not left-to-right!) */92 case DB_STACK_POWER: /* exponentiation: 2^2^3 = 64 != 256 (precedence is right-to-left, not left-to-right!) */ 97 93 /* pop previous, higher operators from OP stack to stack */ 98 94 for (j = Nop_stack - 1; (j >= 0) && (op_stack[j].type > type); j--) { … … 107 103 Nop_stack ++; 108 104 break; 109 case 9: /* unary OPs */110 case 7: /* binary OPs */111 case 6:112 case 5:113 case 4:114 case 3:105 case DB_STACK_UNARY: /* unary OPs */ 106 case DB_STACK_MULTIPLY: /* binary OPs */ 107 case DB_STACK_SUM: 108 case DB_STACK_BITWISE: 109 case DB_STACK_COMPARE: 110 case DB_STACK_LOGIC: 115 111 /* pop previous, higher or equal operators from OP stack to stack */ 116 112 for (j = Nop_stack - 1; (j >= 0) && (op_stack[j].type >= type); j--) { … … 125 121 Nop_stack ++; 126 122 break; 127 case 2:123 case DB_STACK_OPEN_PAR: 128 124 /* push operator on OP stack */ 129 125 op_stack[Nop_stack].name = strcreate (argv[i]); … … 131 127 Nop_stack ++; 132 128 break; 133 case 1:129 case DB_STACK_CLOSE_PAR: 134 130 /* pop rest of operators from OP stack to stack, looking for '(' */ 135 for (j = Nop_stack - 1; (j >= 0) && (op_stack[j].type != 2); j--) {131 for (j = Nop_stack - 1; (j >= 0) && (op_stack[j].type != DB_STACK_OPEN_PAR); j--) { 136 132 stack[Nstack] = op_stack[j]; 137 133 op_stack[j].name = NULL; … … 139 135 Nop_stack --; 140 136 } 141 if ((j == -1) || (op_stack[j].type != 2)) {137 if ((j == -1) || (op_stack[j].type != DB_STACK_OPEN_PAR)) { 142 138 push_error ("syntax error: mismatched parenthesis"); 143 139 Nstack = 0; … … 150 146 /* value of 'X' is used as sentinel until we sort out values */ 151 147 stack[Nstack].name = strcreate (argv[i]); 152 stack[Nstack].type = 'X';148 stack[Nstack].type = DB_STACK_VALUE; 153 149 Nstack ++; 154 150 break; … … 156 152 } 157 153 158 /* dump remaining operators on stack, checking for ' )' */154 /* dump remaining operators on stack, checking for '(' */ 159 155 for (j = Nop_stack - 1; j >= 0; j--) { 160 if (op_stack[j].type == 2) {156 if (op_stack[j].type == DB_STACK_OPEN_PAR) { 161 157 push_error ("syntax error: mismatched parenthesis"); 162 158 Nstack = 0; -
branches/eam_branch_20081124/Ohana/src/opihi/dvo/dbStackMath.c
r15718 r20860 4 4 static int NallocUnary = 0; 5 5 6 dbStack *dbBinary (dbStack *V1, dbStack *V2, char *op, float*fields) {6 dbStack *dbBinary (dbStack *V1, dbStack *V2, char *op, dbValue *fields) { 7 7 8 int N;9 float M1, M2;10 8 dbStack *OUT; 11 9 12 if (V1->type == 'F') { 13 N = V1->field; 14 M1 = fields[N]; 15 } else { 16 M1 = V1->Float; 17 } 18 19 if (V2->type == 'F') { 20 N = V2->field; 21 M2 = fields[N]; 22 } else { 23 M2 = V2->Float; 10 # define SS_FUNC(OP) { \ 11 if (!(V1->type & DB_STACK_INT) && !(V2->type & DB_STACK_INT)) { \ 12 opihi_flt M1 = (V1->type & DB_STACK_FIELD) ? fields[V1->field].Flt : V1->FltValue; \ 13 opihi_flt M2 = (V2->type & DB_STACK_FIELD) ? fields[V2->field].Flt : V2->FltValue; \ 14 OUT[0].type = DB_STACK_VALUE | DB_STACK_TEMP; \ 15 OUT[0].FltValue = OP; \ 16 break; \ 17 } \ 18 if ((V1->type & DB_STACK_INT) && !(V2->type & DB_STACK_INT)) { \ 19 opihi_int M1 = (V1->type & DB_STACK_FIELD) ? fields[V1->field].Int : V1->IntValue; \ 20 opihi_flt M2 = (V2->type & DB_STACK_FIELD) ? fields[V2->field].Flt : V2->FltValue; \ 21 OUT[0].type = DB_STACK_VALUE | DB_STACK_TEMP; \ 22 OUT[0].FltValue = OP; \ 23 break; \ 24 } \ 25 if (!(V1->type & DB_STACK_INT) && (V2->type & DB_STACK_INT)) { \ 26 opihi_flt M1 = (V1->type & DB_STACK_FIELD) ? fields[V1->field].Flt : V1->FltValue; \ 27 opihi_int M2 = (V2->type & DB_STACK_FIELD) ? fields[V2->field].Int : V2->IntValue; \ 28 OUT[0].type = DB_STACK_VALUE | DB_STACK_TEMP; \ 29 OUT[0].FltValue = OP; \ 30 break; \ 31 } \ 32 if ((V1->type & DB_STACK_INT) && (V2->type & DB_STACK_INT)) { \ 33 opihi_int M1 = (V1->type & DB_STACK_FIELD) ? fields[V1->field].Int : V1->IntValue; \ 34 opihi_int M2 = (V2->type & DB_STACK_FIELD) ? fields[V2->field].Int : V2->IntValue; \ 35 OUT[0].type = DB_STACK_VALUE | DB_STACK_TEMP | DB_STACK_INT; \ 36 OUT[0].IntValue = OP; \ 37 break; \ 38 } \ 24 39 } 25 40 26 41 NallocBinary ++; 27 42 ALLOCATE (OUT, dbStack, 1); 28 OUT->type = 'T';29 43 OUT->name = NULL; 30 44 31 // use an enum for the op...45 // XXX use an enum for the op... 32 46 switch (op[0]) { 33 case '+': 34 OUT->Float = M1 + M2; 35 break; 36 case '-': 37 OUT->Float = M1 - M2; 38 break; 39 case '*': 40 OUT->Float = M1 * M2; 41 break; 42 case '/': 43 OUT->Float = M1 / M2; 44 break; 45 case '%': 46 OUT->Float = (int) M1 % (int) M2; 47 break; 48 case 0x5e: 49 OUT->Float = pow (M1, M2); 50 break; 51 case 'D': 52 OUT->Float = MIN (M1, M2); 53 break; 54 case 'U': 55 OUT->Float = MAX (M1, M2); 56 break; 57 case '<': 58 OUT->Float = (M1 < M2) ? 1 : 0; 59 break; 60 case '>': 61 OUT->Float = (M1 > M2) ? 1 : 0; 62 break; 63 case '&': 64 OUT->Float = ((int)M1 & (int)M2); 65 break; 66 case '|': 67 OUT->Float = ((int)M1 | (int)M2); 68 break; 69 case 'E': 70 OUT->Float = (M1 == M2) ? 1 : 0; 71 break; 72 case 'N': 73 OUT->Float = (M1 != M2) ? 1 : 0; 74 break; 75 case 'L': 76 OUT->Float = (M1 <= M2) ? 1 : 0; 77 break; 78 case 'G': 79 OUT->Float = (M1 >= M2) ? 1 : 0; 80 break; 81 case 'A': 82 OUT->Float = (M1 && M2) ? 1 : 0; 83 break; 84 case 'O': 85 OUT->Float = (M1 || M2) ? 1 : 0; 86 break; 47 case '+': SS_FUNC(M1 + M2); 48 case '-': SS_FUNC(M1 - M2); 49 case '*': SS_FUNC(M1 * M2); 50 case '/': SS_FUNC(M1 / M2); 51 case '%': SS_FUNC((int) M1 % (int) M2); 52 case '^': SS_FUNC(pow (M1, M2)); 53 case 'D': SS_FUNC(MIN (M1, M2)); 54 case 'U': SS_FUNC(MAX (M1, M2)); 55 case '<': SS_FUNC((M1 < M2) ? 1 : 0); 56 case '>': SS_FUNC((M1 > M2) ? 1 : 0); 57 case '&': SS_FUNC(((int)M1 & (int)M2)); 58 case '|': SS_FUNC(((int)M1 | (int)M2)); 59 case 'E': SS_FUNC((M1 == M2) ? 1 : 0); 60 case 'N': SS_FUNC((M1 != M2) ? 1 : 0); 61 case 'L': SS_FUNC((M1 <= M2) ? 1 : 0); 62 case 'G': SS_FUNC((M1 >= M2) ? 1 : 0); 63 case 'A': SS_FUNC((M1 && M2) ? 1 : 0); 64 case 'O': SS_FUNC((M1 || M2) ? 1 : 0); 87 65 default: 88 66 return (NULL); 89 67 } 90 68 # undef SS_FUNC 69 91 70 return (OUT); 92 71 } 93 72 94 dbStack *dbUnary (dbStack *V1, char *op, float*fields) {73 dbStack *dbUnary (dbStack *V1, char *op, dbValue *fields) { 95 74 96 int N;97 float M1;98 75 dbStack *OUT; 76 77 # define S_FUNC(OP,FTYPE) { \ 78 if (!(V1->type & DB_STACK_INT)) { \ 79 opihi_flt M1 = (V1->type & DB_STACK_FIELD) ? fields[V1->field].Flt : V1->FltValue; \ 80 OUT[0].type = DB_STACK_VALUE | DB_STACK_TEMP; \ 81 OUT[0].FltValue = OP; \ 82 return (OUT); \ 83 } \ 84 if ((FTYPE != DB_STACK_INT) && (V1->type & DB_STACK_INT)) { \ 85 opihi_int M1 = (V1->type & DB_STACK_FIELD) ? fields[V1->field].Int : V1->IntValue; \ 86 OUT[0].type = DB_STACK_VALUE | DB_STACK_TEMP; \ 87 OUT[0].FltValue = OP; \ 88 return (OUT); \ 89 } \ 90 if ((FTYPE == DB_STACK_INT) && (V1->type & DB_STACK_INT)) { \ 91 opihi_int M1 = (V1->type & DB_STACK_FIELD) ? fields[V1->field].Int : V1->IntValue; \ 92 OUT[0].type = DB_STACK_VALUE | DB_STACK_TEMP | DB_STACK_INT; \ 93 OUT[0].IntValue = OP; \ 94 return (OUT); \ 95 } \ 96 } 99 97 100 if (V1->type == 'F') {101 N = V1->field;102 M1 = fields[N];103 } else {104 M1 = V1->Float;105 }106 107 98 NallocUnary ++; 108 99 ALLOCATE (OUT, dbStack, 1); 109 OUT->type = 'T';110 100 OUT->name = NULL; 111 101 112 if (!strcmp (op, "=")) { OUT->Float = M1; } 113 if (!strcmp (op, "abs")) { OUT->Float = fabs(M1); } 114 if (!strcmp (op, "int")) { OUT->Float = (float)(int)(M1); } 115 if (!strcmp (op, "exp")) { OUT->Float = exp (M1); } 116 if (!strcmp (op, "ten")) { OUT->Float = pow (10.0,M1); } 117 if (!strcmp (op, "log")) { OUT->Float = log10 (M1); } 118 if (!strcmp (op, "ln")) { OUT->Float = log (M1); } 119 if (!strcmp (op, "sqrt")) { OUT->Float = sqrt (M1); } 120 if (!strcmp (op, "erf")) { OUT->Float = erf (M1); } 121 122 if (!strcmp (op, "sinh")) { OUT->Float = sinh (M1); } 123 if (!strcmp (op, "cosh")) { OUT->Float = cosh (M1); } 124 if (!strcmp (op, "asinh")) { OUT->Float = asinh (M1); } 125 if (!strcmp (op, "acosh")) { OUT->Float = acosh (M1); } 126 if (!strcmp (op, "lgamma")) { OUT->Float = lgamma (M1); } 102 if (!strcmp (op, "=")) S_FUNC(M1,0); 103 if (!strcmp (op, "abs")) S_FUNC(fabs(M1),0); 104 if (!strcmp (op, "int")) S_FUNC((int)(M1),DB_STACK_INT); 105 if (!strcmp (op, "exp")) S_FUNC(exp (M1),0); 106 if (!strcmp (op, "ten")) S_FUNC(pow (10.0,M1),0); 107 if (!strcmp (op, "log")) S_FUNC(log10 (M1),0); 108 if (!strcmp (op, "ln")) S_FUNC(log (M1),0); 109 if (!strcmp (op, "sqrt")) S_FUNC(sqrt (M1),0); 110 if (!strcmp (op, "erf")) S_FUNC(erf (M1),0); 127 111 128 if (!strcmp (op, "sin")) { OUT->Float = sin (M1); } 129 if (!strcmp (op, "cos")) { OUT->Float = cos (M1); } 130 if (!strcmp (op, "tan")) { OUT->Float = tan (M1); } 131 if (!strcmp (op, "dsin")) { OUT->Float = sin (M1*RAD_DEG); } 132 if (!strcmp (op, "dcos")) { OUT->Float = cos (M1*RAD_DEG); } 133 if (!strcmp (op, "dtan")) { OUT->Float = tan (M1*RAD_DEG); } 134 if (!strcmp (op, "asin")) { OUT->Float = asin (M1); } 135 if (!strcmp (op, "acos")) { OUT->Float = acos (M1); } 136 if (!strcmp (op, "atan")) { OUT->Float = atan (M1); } 137 if (!strcmp (op, "dasin")) { OUT->Float = asin (M1)*DEG_RAD; } 138 if (!strcmp (op, "dacos")) { OUT->Float = acos (M1)*DEG_RAD; } 139 if (!strcmp (op, "datan")) { OUT->Float = atan (M1)*DEG_RAD; } 140 if (!strcmp (op, "rnd")) { OUT->Float = drand48(); } 141 if (!strcmp (op, "not")) { OUT->Float = !(M1); } 142 if (!strcmp (op, "--")) { OUT->Float = - (M1); } 143 if (!strcmp (op, "isinf")) { OUT->Float = !finite(M1); } 144 if (!strcmp (op, "isnan")) { OUT->Float = isnan(M1); } 112 if (!strcmp (op, "sinh")) S_FUNC(sinh (M1),0); 113 if (!strcmp (op, "cosh")) S_FUNC(cosh (M1),0); 114 if (!strcmp (op, "asinh")) S_FUNC(asinh (M1),0); 115 if (!strcmp (op, "acosh")) S_FUNC(acosh (M1),0); 116 if (!strcmp (op, "lgamma")) S_FUNC(lgamma (M1),0); 117 118 if (!strcmp (op, "sin")) S_FUNC(sin (M1),0); 119 if (!strcmp (op, "cos")) S_FUNC(cos (M1),0); 120 if (!strcmp (op, "tan")) S_FUNC(tan (M1),0); 121 if (!strcmp (op, "dsin")) S_FUNC(sin (M1*RAD_DEG),0); 122 if (!strcmp (op, "dcos")) S_FUNC(cos (M1*RAD_DEG),0); 123 if (!strcmp (op, "dtan")) S_FUNC(tan (M1*RAD_DEG),0); 124 if (!strcmp (op, "asin")) S_FUNC(asin (M1),0); 125 if (!strcmp (op, "acos")) S_FUNC(acos (M1),0); 126 if (!strcmp (op, "atan")) S_FUNC(atan (M1),0); 127 if (!strcmp (op, "dasin")) S_FUNC(asin (M1)*DEG_RAD,0); 128 if (!strcmp (op, "dacos")) S_FUNC(acos (M1)*DEG_RAD,0); 129 if (!strcmp (op, "datan")) S_FUNC(atan (M1)*DEG_RAD,0); 130 if (!strcmp (op, "rnd")) S_FUNC(M1*0.0 + drand48(),0); 131 if (!strcmp (op, "not")) S_FUNC(!(M1),DB_STACK_INT); 132 if (!strcmp (op, "--")) S_FUNC(- (M1),DB_STACK_INT); 133 if (!strcmp (op, "isinf")) S_FUNC(!finite(M1),DB_STACK_INT); 134 if (!strcmp (op, "isnan")) S_FUNC(isnan(M1),DB_STACK_INT); 145 135 146 136 return (OUT); -
branches/eam_branch_20081124/Ohana/src/opihi/dvo/dbStackOps.c
r15719 r20860 2 2 3 3 void dbInitStack (dbStack *stack) { 4 stack[0].type = 0;4 stack[0].type = DB_STACK_NONE; 5 5 stack[0].name = NULL; 6 6 } … … 34 34 void dbFreeTempEntry (dbStack *stack) { 35 35 36 if (stack->type != 'T') return;36 if (stack->type & DB_STACK_TEMP) return; 37 37 38 38 if (stack[0].name != NULL) free (stack[0].name); -
branches/eam_branch_20081124/Ohana/src/opihi/dvo/fitcolors.c
r20857 r20860 318 318 graphdata.color = KapaColorByName ("red"); 319 319 320 KapaPrepPlot (kapa, 11, graphmode);320 KapaPrepPlot (kapa, 11, &graphdata); 321 321 KapaPlotVector (kapa, 11, colorFit, "x"); 322 322 KapaPlotVector (kapa, 11, deltaFit, "y"); -
branches/eam_branch_20081124/Ohana/src/opihi/dvo/images.c
r20859 r20860 113 113 114 114 npts = NPTS = 200; 115 ResetVector ( Xvec, OPIHI_FLT, NPTS);116 ResetVector ( Yvec, OPIHI_FLT, NPTS);115 ResetVector (&Xvec, OPIHI_FLT, NPTS); 116 ResetVector (&Yvec, OPIHI_FLT, NPTS); 117 117 118 118 ALLOCATE (plist, int, NPTS); … … 281 281 graphmode.ptype = 100; /* connect pairs of points */ 282 282 graphmode.etype = 0; 283 PlotVectorPair (kapa, Xvec,Yvec, &graphmode);283 PlotVectorPair (kapa, &Xvec, &Yvec, &graphmode); 284 284 } 285 285 -
branches/eam_branch_20081124/Ohana/src/opihi/dvo/imbox.c
r20859 r20860 36 36 37 37 /* project this image to screen display coords */ 38 ResetVector ( Xvec, OPIHI_FLT, 8);39 ResetVector ( Yvec, OPIHI_FLT, 8);38 ResetVector (&Xvec, OPIHI_FLT, 8); 39 ResetVector (&Yvec, OPIHI_FLT, 8); 40 40 41 41 while (gfits_fread_header (f, &header)) { … … 104 104 graphmode.ptype = 100; /* connect pairs of points */ 105 105 graphmode.etype = 0; 106 PlotVectorPair (kapa, Xvec,Yvec, &graphmode);106 PlotVectorPair (kapa, &Xvec, &Yvec, &graphmode); 107 107 } 108 108 skip: -
branches/eam_branch_20081124/Ohana/src/opihi/dvo/imdense.c
r20859 r20860 32 32 N = 0; 33 33 NPTS = 200; 34 ResetVector ( Xvec, OPIHI_FLT, Npts);35 ResetVector ( Yvec, OPIHI_FLT, Npts);34 ResetVector (&Xvec, OPIHI_FLT, NPTS); 35 ResetVector (&Yvec, OPIHI_FLT, NPTS); 36 36 37 37 for (i = 0; i < Nimage; i++) { … … 64 64 graphmode.style = 2; /* points */ 65 65 graphmode.etype = 0; 66 PlotVectorPair (kapa, Xvec,Yvec, &graphmode);66 PlotVectorPair (kapa, &Xvec, &Yvec, &graphmode); 67 67 } 68 68 -
branches/eam_branch_20081124/Ohana/src/opihi/dvo/imstats.c
r20859 r20860 33 33 34 34 /* assign vector values */ 35 ResetVector ( Xvec, OPIHI_FLT, Nimage);36 ResetVector ( Yvec, OPIHI_FLT, Nimage);35 ResetVector (&Xvec, OPIHI_FLT, Nimage); 36 ResetVector (&Yvec, OPIHI_FLT, Nimage); 37 37 38 38 gprint (GP_LOG, "seq ra (J2000) dec time (s) Nstars\n"); … … 53 53 graphmode.style = 2; 54 54 graphmode.etype = 0; 55 PlotVectorPair (kapa, Xvec,Yvec, &graphmode);55 PlotVectorPair (kapa, &Xvec, &Yvec, &graphmode); 56 56 57 57 free (Xvec.elements.Flt); -
branches/eam_branch_20081124/Ohana/src/opihi/dvo/lcurve.c
r20859 r20860 104 104 N = 0; 105 105 NPTS = 100; 106 ResetVector ( Xvec, OPIHI_FLT, NPTS);107 ResetVector ( Yvec, OPIHI_FLT, NPTS);106 ResetVector (&Xvec, OPIHI_FLT, NPTS); 107 ResetVector (&Yvec, OPIHI_FLT, NPTS); 108 108 dYvec.elements.Flt = NULL; 109 109 if (ErrorBars) { 110 ResetVector ( Yvec, OPIHI_FLT, NPTS);110 ResetVector (&dYvec, OPIHI_FLT, NPTS); 111 111 } 112 112 … … 157 157 158 158 if (ErrorBars) { 159 PlotVectorPairErrors (kapa, Xvec, Yvec,dYvec, &graphmode);159 PlotVectorPairErrors (kapa, &Xvec, &Yvec, &dYvec, &graphmode); 160 160 } else { 161 PlotVectorPair (kapa, Xvec,Yvec, &graphmode);161 PlotVectorPair (kapa, &Xvec, &Yvec, &graphmode); 162 162 } 163 163 -
branches/eam_branch_20081124/Ohana/src/opihi/dvo/lightcurve.c
r20859 r20860 87 87 N = 0; 88 88 NPTS = 100; 89 ResetVector (tvec, OPIHI_FLT, N pts);90 ResetVector (mvec, OPIHI_FLT, N pts);91 ResetVector (dmvec, OPIHI_FLT, N pts);89 ResetVector (tvec, OPIHI_FLT, NPTS); 90 ResetVector (mvec, OPIHI_FLT, NPTS); 91 ResetVector (dmvec, OPIHI_FLT, NPTS); 92 92 93 93 GetTimeFormat (&TimeReference, &TimeFormat); -
branches/eam_branch_20081124/Ohana/src/opihi/dvo/mextract.c
r20857 r20860 88 88 89 89 /* create storage vector */ 90 Npts = 0; 91 NPTS = 1000; 90 92 ALLOCATE (values, dbValue, Nfields); 91 93 ALLOCATE (vec, Vector *, Nreturn); … … 97 99 } 98 100 if ((vec[i] = SelectVector (name, ANYVECTOR, TRUE)) == NULL) goto escape; 99 ResetVector (vec[i], fields[i].type, NNN); 100 } 101 102 Npts = 0; 103 NPTS = 1; 101 ResetVector (vec[i], fields[i].type, NPTS); 102 } 104 103 105 104 // grab data from all selected sky regions … … 166 165 167 166 for (n = 0; n < Nreturn; n++) { 168 vec[n][0].Nelements = Npts; 169 REALLOCATE (vec[n][0].elements.Flt, opihi_flt, MAX(1,Npts)); 167 ResetVector (vec[n], fields[n].type, MAX(1,Npts)); 170 168 } 171 169 -
branches/eam_branch_20081124/Ohana/src/opihi/dvo/paverage.c
r20857 r20860 144 144 } 145 145 if ((Npts > NCHUNK) || (Nloaded >= 25)) { 146 KapaPrepPlot (kapa, Npts, graphmode);146 KapaPrepPlot (kapa, Npts, &graphmode); 147 147 KapaPlotVector (kapa, Npts, Xvec, "x"); 148 148 KapaPlotVector (kapa, Npts, Yvec, "y"); … … 156 156 } 157 157 if (Npts > 0) { 158 KapaPrepPlot (kapa, Npts, graphmode);158 KapaPrepPlot (kapa, Npts, &graphmode); 159 159 KapaPlotVector (kapa, Npts, Xvec, "x"); 160 160 KapaPlotVector (kapa, Npts, Yvec, "y"); -
branches/eam_branch_20081124/Ohana/src/opihi/dvo/pmeasure.c
r20857 r20860 229 229 } 230 230 if ((Npts > NCHUNK) || (Nloaded >= 25)) { 231 KapaPrepPlot (kapa, Npts, graphmode);231 KapaPrepPlot (kapa, Npts, &graphmode); 232 232 KapaPlotVector (kapa, Npts, Xvec, "x"); 233 233 KapaPlotVector (kapa, Npts, Yvec, "y"); … … 242 242 } 243 243 if (Npts > 0) { 244 KapaPrepPlot (kapa, Npts, graphmode);244 KapaPrepPlot (kapa, Npts, &graphmode); 245 245 KapaPlotVector (kapa, Npts, Xvec, "x"); 246 246 KapaPlotVector (kapa, Npts, Yvec, "y"); -
branches/eam_branch_20081124/Ohana/src/opihi/dvo/procks.c
r20859 r20860 95 95 96 96 /* data has been loaded, get ready to plot it */ 97 ResetVector ( Xvec, OPIHI_FLT, 3*Nrocks);98 ResetVector ( Yvec, OPIHI_FLT, 3*Nrocks);97 ResetVector (&Xvec, OPIHI_FLT, 3*Nrocks); 98 ResetVector (&Yvec, OPIHI_FLT, 3*Nrocks); 99 99 100 100 /* project stars to screen display coords */ … … 113 113 graphmode.style = 2; /* set style to points */ 114 114 graphmode.etype = 0; /* no errorbars */ 115 PlotVectorPair (kapa, Xvec,Yvec, &graphmode);115 PlotVectorPair (kapa, &Xvec, &Yvec, &graphmode); 116 116 117 117 /* now plot vectors between two extrema */ … … 146 146 graphmode.etype = 0; /* no errorbars */ 147 147 148 PlotVectorPair (kapa, Xvec,Yvec, &graphmode);148 PlotVectorPair (kapa, &Xvec, &Yvec, &graphmode); 149 149 150 150 free (Xvec.elements.Flt); -
branches/eam_branch_20081124/Ohana/src/opihi/dvo/showtile.c
r20859 r20860 22 22 N = 0; 23 23 NPTS = 200; 24 ResetVector ( Xvec, OPIHI_FLT, NPTS);25 ResetVector ( Yvec, OPIHI_FLT, NPTS);24 ResetVector (&Xvec, OPIHI_FLT, NPTS); 25 ResetVector (&Yvec, OPIHI_FLT, NPTS); 26 26 27 27 /* starting position */ … … 86 86 graphmode.ptype = 100; /* connect pairs of points */ 87 87 graphmode.etype = 0; 88 PlotVectorPair (kapa, Xvec,Yvec, &graphmode);88 PlotVectorPair (kapa, &Xvec, &Yvec, &graphmode); 89 89 } 90 90 -
branches/eam_branch_20081124/Ohana/src/opihi/dvo/simage.c
r20859 r20860 92 92 93 93 /* set up storage buffers */ 94 ResetVector ( Xvec, OPIHI_FLT, Ntars);95 ResetVector ( Yvec, OPIHI_FLT, Ntars);96 ResetVector ( Zvec, OPIHI_FLT, Ntars);94 ResetVector (&Xvec, OPIHI_FLT, Nstars); 95 ResetVector (&Yvec, OPIHI_FLT, Nstars); 96 ResetVector (&Zvec, OPIHI_FLT, Nstars); 97 97 ALLOCATE (buffer, char, (BLOCK*BYTES_STAR)); 98 98 … … 152 152 Npts = Xvec.Nelements; 153 153 154 PlotVectorTriplet (kapa, Xvec, Yvec,Zvec, &graphmode);154 PlotVectorTriplet (kapa, &Xvec, &Yvec, &Zvec, &graphmode); 155 155 156 156 free (Xvec.elements.Flt); -
branches/eam_branch_20081124/Ohana/src/opihi/dvo/skycat.c
r20859 r20860 101 101 graphmode.ptype = 100; /* connect pairs of points */ 102 102 graphmode.etype = 0; 103 PlotVectorPair (kapa, Xvec,Yvec, &graphmode);103 PlotVectorPair (kapa, &Xvec, &Yvec, &graphmode); 104 104 } 105 105 106 free (Xvec.elements. Flt);107 free (Yvec.elements. Flt);106 free (Xvec.elements.Ptr); 107 free (Yvec.elements.Ptr); 108 108 free (regions); 109 109 -
branches/eam_branch_20081124/Ohana/src/opihi/include/dvomath.h
r20857 r20860 14 14 gprint (GP_ERR, "function requires vector of type FLT\n"); \ 15 15 return (RVAL); \ 16 } 16 } } 17 17 18 # define REQUIRE_VECTOR_INT(VECT,RVAL) { \18 # define REQUIRE_VECTOR_INT(VECT,RVAL) { \ 19 19 if (VECT->type != OPIHI_INT) { \ 20 20 gprint (GP_ERR, "function requires vector of type INT\n"); \ 21 21 return (RVAL); \ 22 } 22 } } 23 23 24 24 enum {ANYVECTOR, NEWVECTOR, OLDVECTOR}; … … 109 109 void InitVectors PROTO((void)); 110 110 int CopyVector PROTO((Vector *out, Vector *in)); 111 int ResetVector PROTO((Vector *vec, char type, int Nelements)); 112 int CastVector PROTO((Vector *vec, char type)); 111 113 int MatchVector PROTO((Vector *out, Vector *in, char type)); 112 114 int MoveVector PROTO((Vector *out, Vector *in)); -
branches/eam_branch_20081124/Ohana/src/opihi/include/dvoshell.h
r20857 r20860 5 5 # ifndef DVOSHELL_H 6 6 # define DVOSHELL_H 7 8 typedef enum { 9 DB_STACK_NONE = 0, 10 DB_STACK_INT = 0x01, 11 DB_STACK_FIELD = 0x02, 12 DB_STACK_TEMP = 0x04, 13 DB_STACK_VALUE = 0x08, 14 DB_STACK_CLOSE_PAR = 0x10, 15 DB_STACK_OPEN_PAR, 16 DB_STACK_LOGIC, 17 DB_STACK_COMPARE, 18 DB_STACK_BITWISE, 19 DB_STACK_SUM, 20 DB_STACK_MULTIPLY, 21 DB_STACK_POWER, 22 DB_STACK_UNARY, 23 } dbStackTypes; 7 24 8 25 /* magnitude types */ … … 145 162 char type; 146 163 int field; 147 float Float; 164 opihi_flt FltValue; 165 opihi_int IntValue; 148 166 } dbStack; 149 167 … … 234 252 dbStack *dbRPN PROTO((int argc, char **argv, int *nstack)); 235 253 int dbCheckStack PROTO((dbStack *stack, int Nstack, int table, dbField **inFields, int *Nfields)); 236 int dbBooleanCond PROTO((dbStack *inStack, int NinStack, float*fields));254 int dbBooleanCond PROTO((dbStack *inStack, int NinStack, dbValue *fields)); 237 255 void dbInitStack PROTO((dbStack *stack)); 238 256 void dbFreeStack PROTO((dbStack *stack, int Nstack)); … … 240 258 void dbFreeTempEntry PROTO((dbStack *stack)); 241 259 242 dbStack *dbBinary PROTO((dbStack *V1, dbStack *V2, char *op, float*fields));243 dbStack *dbUnary PROTO((dbStack *V1, char *op, float*fields));260 dbStack *dbBinary PROTO((dbStack *V1, dbStack *V2, char *op, dbValue *fields)); 261 dbStack *dbUnary PROTO((dbStack *V1, char *op, dbValue *fields)); 244 262 245 263 int GetMagMode PROTO((char *string)); … … 248 266 int ParseAverageField PROTO((dbField *field, char *fieldName)); 249 267 250 d oubledbExtractAverages PROTO((Average *average, SecFilt *secfilt, Measure *measure, dbField *field));251 d oubledbExtractMeasures PROTO((Average *average, SecFilt *secfilt, Measure *measure, dbField *field));268 dbValue dbExtractAverages PROTO((Average *average, SecFilt *secfilt, Measure *measure, dbField *field)); 269 dbValue dbExtractMeasures PROTO((Average *average, SecFilt *secfilt, Measure *measure, dbField *field)); 252 270 void dbExtractMeasuresInit PROTO(()); 253 271 -
branches/eam_branch_20081124/Ohana/src/opihi/lib.shell/VectorOps.c
r20859 r20860 190 190 int CastVector (Vector *vec, char type) { 191 191 192 int i; 193 192 194 // the trivial case 193 195 if (vec[0].type == type) return TRUE;
Note:
See TracChangeset
for help on using the changeset viewer.
