"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "tksao/frame/ciaoparser.C" between
ds9.8.2.tar.gz and ds9.8.2.1.tar.gz

About: SAOImage DS9 is an astronomical imaging and data visualization application that supports FITS images and binary tables, multiple frame buffers, region manipulation, and many scale algorithms and colormaps.

ciaoparser.C  (ds9.8.2):ciaoparser.C  (ds9.8.2.1)
skipping to change at line 512 skipping to change at line 512
47, 51, 47, 51, -1, 21, 48, 57, -1, -1, 47, 51, 47, 51, -1, 21, 48, 57, -1, -1,
22, 59, 48, 61, -1, 23, 48, 57, 47, 57, 22, 59, 48, 61, -1, 23, 48, 57, 47, 57,
-1, 24, 48, -1, 25, 60, -1, 26, 48, 57, -1, 24, 48, -1, 25, 60, -1, 26, 48, 57,
47, 51, 47, 51, -1, 48, 57, 47, 53, 47, 47, 51, 47, 51, -1, 48, 57, 47, 53, 47,
51, -1, 61, 47, 62, -1, 62, -1, 57, -1 51, -1, 61, 47, 62, -1, 62, -1, 57, -1
}; };
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] = static const yytype_uint16 yyrline[] =
{ {
0, 94, 94, 94, 102, 103, 106, 107, 108, 109, 0, 94, 94, 94, 99, 100, 103, 104, 105, 106,
112, 113, 114, 117, 118, 119, 120, 121, 122, 123, 109, 110, 111, 114, 115, 116, 117, 118, 119, 120,
124, 127, 128, 131, 132, 135, 138, 141, 144, 155, 121, 124, 125, 128, 129, 132, 135, 138, 141, 152,
158, 159, 160, 161, 164, 171, 178, 185, 194, 197, 155, 156, 157, 158, 161, 168, 175, 182, 191, 194,
200, 203, 210, 217, 224, 233, 238, 243, 244, 249, 197, 200, 207, 214, 221, 230, 235, 240, 241, 246,
254, 255, 260, 265, 265, 270, 277, 278, 279, 282, 251, 252, 257, 262, 262, 267, 274, 275, 276, 279,
289, 290, 293 286, 287, 290
}; };
#endif #endif
#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
First, the terminals, then, starting at YYNTOKENS, nonterminals. */ First, the terminals, then, starting at YYNTOKENS, nonterminals. */
static const char *const yytname[] = static const char *const yytname[] =
{ {
"$end", "error", "$undefined", "INT", "REAL", "ANGDEGREE", "ARCMINUTE", "$end", "error", "$undefined", "INT", "REAL", "ANGDEGREE", "ARCMINUTE",
"ARCSECOND", "SEXSTR", "HMSSTR", "DMSSTR", "EOF_", "ANNULUS_", "BOX_", "ARCSECOND", "SEXSTR", "HMSSTR", "DMSSTR", "EOF_", "ANNULUS_", "BOX_",
skipping to change at line 1494 skipping to change at line 1494
unconditionally makes the parser a bit smaller, and it avoids a unconditionally makes the parser a bit smaller, and it avoids a
GCC warning that YYVAL may be used uninitialized. */ GCC warning that YYVAL may be used uninitialized. */
yyval = yyvsp[1-yylen]; yyval = yyvsp[1-yylen];
YY_REDUCE_PRINT (yyn); YY_REDUCE_PRINT (yyn);
switch (yyn) switch (yyn)
{ {
case 2: case 2:
#line 94 "frame/ciaoparser.Y" #line 94 "frame/ciaoparser.Y"
{ {
if (fr->useMarkerColor()) strcpy(color, fr->markerColor());
strcpy(color, fr->markerColor());
else
strcpy(color, "green");
;} ;}
break; break;
case 8: case 8:
#line 108 "frame/ciaoparser.Y" #line 105 "frame/ciaoparser.Y"
{cerr << "CIAO Regions File 1.0" << endl;;} {cerr << "CIAO Regions File 1.0" << endl;;}
break; break;
case 12: case 12:
#line 114 "frame/ciaoparser.Y" #line 111 "frame/ciaoparser.Y"
{YYACCEPT;;} {YYACCEPT;;}
break; break;
case 18: case 18:
#line 122 "frame/ciaoparser.Y" #line 119 "frame/ciaoparser.Y"
{setProps(&props, Marker::INCLUDE, 0);;} {setProps(&props, Marker::INCLUDE, 0);;}
break; break;
case 19: case 19:
#line 123 "frame/ciaoparser.Y" #line 120 "frame/ciaoparser.Y"
{setProps(&props, Marker::INCLUDE, 0);;} {setProps(&props, Marker::INCLUDE, 0);;}
break; break;
case 20: case 20:
#line 124 "frame/ciaoparser.Y" #line 121 "frame/ciaoparser.Y"
{setProps(&props, Marker::INCLUDE, 0);;} {setProps(&props, Marker::INCLUDE, 0);;}
break; break;
case 21: case 21:
#line 127 "frame/ciaoparser.Y" #line 124 "frame/ciaoparser.Y"
{(yyval.real)=(yyvsp[(1) - (1)].real);;} {(yyval.real)=(yyvsp[(1) - (1)].real);;}
break; break;
case 22: case 22:
#line 128 "frame/ciaoparser.Y" #line 125 "frame/ciaoparser.Y"
{(yyval.real)=(yyvsp[(1) - (1)].integer);;} {(yyval.real)=(yyvsp[(1) - (1)].integer);;}
break; break;
case 23: case 23:
#line 131 "frame/ciaoparser.Y" #line 128 "frame/ciaoparser.Y"
{yydebug=1;;} {yydebug=1;;}
break; break;
case 24: case 24:
#line 132 "frame/ciaoparser.Y" #line 129 "frame/ciaoparser.Y"
{yydebug=0;;} {yydebug=0;;}
break; break;
case 28: case 28:
#line 144 "frame/ciaoparser.Y" #line 141 "frame/ciaoparser.Y"
{ {
// reset maperr flag // reset maperr flag
maperr =0; maperr =0;
props = props =
Marker::SELECT | Marker::EDIT | Marker::MOVE | Marker::SELECT | Marker::EDIT | Marker::MOVE |
Marker::ROTATE | Marker::DELETE | Marker::HIGHLITE | Marker::ROTATE | Marker::DELETE | Marker::HIGHLITE |
Marker::INCLUDE | Marker::SOURCE; Marker::INCLUDE | Marker::SOURCE;
;} ;}
break; break;
case 29: case 29:
#line 155 "frame/ciaoparser.Y" #line 152 "frame/ciaoparser.Y"
{(yyval.real) = zeroTWOPI(degToRad((yyvsp[(1) - (1)].real)));;} {(yyval.real) = zeroTWOPI(degToRad((yyvsp[(1) - (1)].real)));;}
break; break;
case 30: case 30:
#line 158 "frame/ciaoparser.Y" #line 155 "frame/ciaoparser.Y"
{(yyval.real) = FITSPTR->mapLenToRef((yyvsp[(1) - (1)].real), Coord::PHYSICA L);;} {(yyval.real) = FITSPTR->mapLenToRef((yyvsp[(1) - (1)].real), Coord::PHYSICA L);;}
break; break;
case 31: case 31:
#line 159 "frame/ciaoparser.Y" #line 156 "frame/ciaoparser.Y"
{(yyval.real) = FITSPTR->mapLenToRef((yyvsp[(1) - (1)].real), Coord::WCS, Co ord::DEGREE);;} {(yyval.real) = FITSPTR->mapLenToRef((yyvsp[(1) - (1)].real), Coord::WCS, Co ord::DEGREE);;}
break; break;
case 32: case 32:
#line 160 "frame/ciaoparser.Y" #line 157 "frame/ciaoparser.Y"
{(yyval.real) = FITSPTR->mapLenToRef((yyvsp[(1) - (1)].real), Coord::WCS, Co ord::ARCMIN);;} {(yyval.real) = FITSPTR->mapLenToRef((yyvsp[(1) - (1)].real), Coord::WCS, Co ord::ARCMIN);;}
break; break;
case 33: case 33:
#line 161 "frame/ciaoparser.Y" #line 158 "frame/ciaoparser.Y"
{(yyval.real) = FITSPTR->mapLenToRef((yyvsp[(1) - (1)].real), Coord::WCS, Co ord::ARCSEC);;} {(yyval.real) = FITSPTR->mapLenToRef((yyvsp[(1) - (1)].real), Coord::WCS, Co ord::ARCSEC);;}
break; break;
case 34: case 34:
#line 165 "frame/ciaoparser.Y" #line 162 "frame/ciaoparser.Y"
{ {
Vector rr = FITSPTR->mapLenToRef(Vector((yyvsp[(1) - (3)].real),(yyvsp[ (3) - (3)].real)), Coord::PHYSICAL); Vector rr = FITSPTR->mapLenToRef(Vector((yyvsp[(1) - (3)].real),(yyvsp[ (3) - (3)].real)), Coord::PHYSICAL);
(yyval.vector)[0] = rr[0]; (yyval.vector)[0] = rr[0];
(yyval.vector)[1] = rr[1]; (yyval.vector)[1] = rr[1];
(yyval.vector)[2] = rr[2]; (yyval.vector)[2] = rr[2];
;} ;}
break; break;
case 35: case 35:
#line 172 "frame/ciaoparser.Y" #line 169 "frame/ciaoparser.Y"
{ {
Vector rr= FITSPTR->mapLenToRef(Vector((yyvsp[(1) - (3)].real),(yyvsp[( 3) - (3)].real)), Coord::WCS,Coord::DEGREE); Vector rr= FITSPTR->mapLenToRef(Vector((yyvsp[(1) - (3)].real),(yyvsp[( 3) - (3)].real)), Coord::WCS,Coord::DEGREE);
(yyval.vector)[0] = rr[0]; (yyval.vector)[0] = rr[0];
(yyval.vector)[1] = rr[1]; (yyval.vector)[1] = rr[1];
(yyval.vector)[2] = rr[2]; (yyval.vector)[2] = rr[2];
;} ;}
break; break;
case 36: case 36:
#line 179 "frame/ciaoparser.Y" #line 176 "frame/ciaoparser.Y"
{ {
Vector rr = FITSPTR->mapLenToRef(Vector((yyvsp[(1) - (3)].real),(yyvsp[ (3) - (3)].real)), Coord::WCS, Coord::ARCMIN); Vector rr = FITSPTR->mapLenToRef(Vector((yyvsp[(1) - (3)].real),(yyvsp[ (3) - (3)].real)), Coord::WCS, Coord::ARCMIN);
(yyval.vector)[0] = rr[0]; (yyval.vector)[0] = rr[0];
(yyval.vector)[1] = rr[1]; (yyval.vector)[1] = rr[1];
(yyval.vector)[2] = rr[2]; (yyval.vector)[2] = rr[2];
;} ;}
break; break;
case 37: case 37:
#line 186 "frame/ciaoparser.Y" #line 183 "frame/ciaoparser.Y"
{ {
Vector rr = FITSPTR->mapLenToRef(Vector((yyvsp[(1) - (3)].real),(yyvsp[ (3) - (3)].real)), Coord::WCS, Coord::ARCSEC); Vector rr = FITSPTR->mapLenToRef(Vector((yyvsp[(1) - (3)].real),(yyvsp[ (3) - (3)].real)), Coord::WCS, Coord::ARCSEC);
(yyval.vector)[0] = rr[0]; (yyval.vector)[0] = rr[0];
(yyval.vector)[1] = rr[1]; (yyval.vector)[1] = rr[1];
(yyval.vector)[2] = rr[2]; (yyval.vector)[2] = rr[2];
;} ;}
break; break;
case 38: case 38:
#line 194 "frame/ciaoparser.Y" #line 191 "frame/ciaoparser.Y"
{(yyval.real) = parseSEXStr((yyvsp[(1) - (1)].str));;} {(yyval.real) = parseSEXStr((yyvsp[(1) - (1)].str));;}
break; break;
case 39: case 39:
#line 197 "frame/ciaoparser.Y" #line 194 "frame/ciaoparser.Y"
{(yyval.real) = parseHMSStr((yyvsp[(1) - (1)].str));;} {(yyval.real) = parseHMSStr((yyvsp[(1) - (1)].str));;}
break; break;
case 40: case 40:
#line 200 "frame/ciaoparser.Y" #line 197 "frame/ciaoparser.Y"
{(yyval.real) = parseDMSStr((yyvsp[(1) - (1)].str));;} {(yyval.real) = parseDMSStr((yyvsp[(1) - (1)].str));;}
break; break;
case 41: case 41:
#line 204 "frame/ciaoparser.Y" #line 201 "frame/ciaoparser.Y"
{ {
Vector rr = FITSPTR->mapToRef(Vector((yyvsp[(1) - (3)].real),(yyvsp[(3) - (3)].real)), Coord::PHYSICAL); Vector rr = FITSPTR->mapToRef(Vector((yyvsp[(1) - (3)].real),(yyvsp[(3) - (3)].real)), Coord::PHYSICAL);
(yyval.vector)[0] = rr[0]; (yyval.vector)[0] = rr[0];
(yyval.vector)[1] = rr[1]; (yyval.vector)[1] = rr[1];
(yyval.vector)[2] = rr[2]; (yyval.vector)[2] = rr[2];
;} ;}
break; break;
case 42: case 42:
#line 211 "frame/ciaoparser.Y" #line 208 "frame/ciaoparser.Y"
{ {
Vector rr = FITSPTR->mapToRef(Vector((yyvsp[(1) - (3)].real)*360./24.,( yyvsp[(3) - (3)].real)), Coord::WCS,Coord::FK5); Vector rr = FITSPTR->mapToRef(Vector((yyvsp[(1) - (3)].real)*360./24.,( yyvsp[(3) - (3)].real)), Coord::WCS,Coord::FK5);
(yyval.vector)[0] = rr[0]; (yyval.vector)[0] = rr[0];
(yyval.vector)[1] = rr[1]; (yyval.vector)[1] = rr[1];
(yyval.vector)[2] = rr[2]; (yyval.vector)[2] = rr[2];
;} ;}
break; break;
case 43: case 43:
#line 218 "frame/ciaoparser.Y" #line 215 "frame/ciaoparser.Y"
{ {
Vector rr = FITSPTR->mapToRef(Vector((yyvsp[(1) - (3)].real),(yyvsp[(3) - (3)].real)), Coord::WCS, Coord::FK5); Vector rr = FITSPTR->mapToRef(Vector((yyvsp[(1) - (3)].real),(yyvsp[(3) - (3)].real)), Coord::WCS, Coord::FK5);
(yyval.vector)[0] = rr[0]; (yyval.vector)[0] = rr[0];
(yyval.vector)[1] = rr[1]; (yyval.vector)[1] = rr[1];
(yyval.vector)[2] = rr[2]; (yyval.vector)[2] = rr[2];
;} ;}
break; break;
case 44: case 44:
#line 225 "frame/ciaoparser.Y" #line 222 "frame/ciaoparser.Y"
{ {
Vector rr = FITSPTR->mapToRef(Vector((yyvsp[(1) - (3)].real),(yyvsp[(3) - (3)].real)), Coord::WCS, Coord::FK5); Vector rr = FITSPTR->mapToRef(Vector((yyvsp[(1) - (3)].real),(yyvsp[(3) - (3)].real)), Coord::WCS, Coord::FK5);
(yyval.vector)[0] = rr[0]; (yyval.vector)[0] = rr[0];
(yyval.vector)[1] = rr[1]; (yyval.vector)[1] = rr[1];
(yyval.vector)[2] = rr[2]; (yyval.vector)[2] = rr[2];
;} ;}
break; break;
case 45: case 45:
#line 234 "frame/ciaoparser.Y" #line 231 "frame/ciaoparser.Y"
{ {
fr->createAnnulusCmd(Vector((yyvsp[(3) - (7)].vector)), (yyvsp[(5) - (7 )].real), (yyvsp[(7) - (7)].real), 1, fr->createAnnulusCmd(Vector((yyvsp[(3) - (7)].vector)), (yyvsp[(5) - (7 )].real), (yyvsp[(7) - (7)].real), 1,
color,dash,1,font,text,props,NULL,taglist,cblist); color,dash,1,font,text,props,NULL,taglist,cblist);
;} ;}
break; break;
case 46: case 46:
#line 239 "frame/ciaoparser.Y" #line 236 "frame/ciaoparser.Y"
{ {
fr->createBoxCmd(Vector((yyvsp[(3) - (5)].vector)), (yyvsp[(5) - (5)].v ector), 0, fill_, fr->createBoxCmd(Vector((yyvsp[(3) - (5)].vector)), (yyvsp[(5) - (5)].v ector), 0, fill_,
color,dash,1,font,text,props,NULL,taglist,cblist); color,dash,1,font,text,props,NULL,taglist,cblist);
;} ;}
break; break;
case 48: case 48:
#line 245 "frame/ciaoparser.Y" #line 242 "frame/ciaoparser.Y"
{ {
fr->createCircleCmd(Vector((yyvsp[(3) - (5)].vector)), (yyvsp[(5) - (5) ].real), fill_, fr->createCircleCmd(Vector((yyvsp[(3) - (5)].vector)), (yyvsp[(5) - (5) ].real), fill_,
color,dash,1,font,text,props,NULL,taglist,cblist); color,dash,1,font,text,props,NULL,taglist,cblist);
;} ;}
break; break;
case 49: case 49:
#line 250 "frame/ciaoparser.Y" #line 247 "frame/ciaoparser.Y"
{ {
fr->createEllipseCmd(Vector((yyvsp[(3) - (7)].vector)), Vector((yyvsp[( 5) - (7)].vector)), (yyvsp[(7) - (7)].real), fill_, fr->createEllipseCmd(Vector((yyvsp[(3) - (7)].vector)), Vector((yyvsp[( 5) - (7)].vector)), (yyvsp[(7) - (7)].real), fill_,
color,dash,1,font,text,props,NULL,taglist,cblist); color,dash,1,font,text,props,NULL,taglist,cblist);
;} ;}
break; break;
case 50: case 50:
#line 254 "frame/ciaoparser.Y" #line 251 "frame/ciaoparser.Y"
{/* not supported */;} {/* not supported */;}
break; break;
case 51: case 51:
#line 256 "frame/ciaoparser.Y" #line 253 "frame/ciaoparser.Y"
{ {
fr->createCpandaCmd(Vector((yyvsp[(3) - (11)].vector)), (yyvsp[(9) - (1 1)].real), (yyvsp[(11) - (11)].real), 1, (yyvsp[(5) - (11)].real), (yyvsp[(7) - (11)].real), 1, fr->createCpandaCmd(Vector((yyvsp[(3) - (11)].vector)), (yyvsp[(9) - (1 1)].real), (yyvsp[(11) - (11)].real), 1, (yyvsp[(5) - (11)].real), (yyvsp[(7) - (11)].real), 1,
color,dash,1,font,text,props,NULL,taglist,cblist); color,dash,1,font,text,props,NULL,taglist,cblist);
;} ;}
break; break;
case 52: case 52:
#line 261 "frame/ciaoparser.Y" #line 258 "frame/ciaoparser.Y"
{ {
fr->createPointCmd(Vector((yyvsp[(3) - (3)].vector)), Point::BOXCIRCLE, POINTSIZE, fr->createPointCmd(Vector((yyvsp[(3) - (3)].vector)), Point::BOXCIRCLE, POINTSIZE,
color,dash,1,font,text,props,NULL,taglist,cblist); color,dash,1,font,text,props,NULL,taglist,cblist);
;} ;}
break; break;
case 53: case 53:
#line 265 "frame/ciaoparser.Y" #line 262 "frame/ciaoparser.Y"
{polylist.deleteAll();;} {polylist.deleteAll();;}
break; break;
case 54: case 54:
#line 266 "frame/ciaoparser.Y" #line 263 "frame/ciaoparser.Y"
{ {
fr->createPolygonCmd(polylist, fill_, fr->createPolygonCmd(polylist, fill_,
color,dash,1,font,text,props,NULL,taglist,cblist); color,dash,1,font,text,props,NULL,taglist,cblist);
;} ;}
break; break;
case 55: case 55:
#line 271 "frame/ciaoparser.Y" #line 268 "frame/ciaoparser.Y"
{ {
Vector cc = (Vector((yyvsp[(5) - (5)].vector))-Vector((yyvsp[(3) - (5)] .vector)))/2.+Vector((yyvsp[(3) - (5)].vector)); Vector cc = (Vector((yyvsp[(5) - (5)].vector))-Vector((yyvsp[(3) - (5)] .vector)))/2.+Vector((yyvsp[(3) - (5)].vector));
Vector wh = Vector((yyvsp[(5) - (5)].vector))-Vector((yyvsp[(3) - (5)]. vector)); Vector wh = Vector((yyvsp[(5) - (5)].vector))-Vector((yyvsp[(3) - (5)]. vector));
fr->createBoxCmd(cc, wh, 0, fill_, fr->createBoxCmd(cc, wh, 0, fill_,
color,dash,1,font,text,props,NULL,taglist,cblist); color,dash,1,font,text,props,NULL,taglist,cblist);
;} ;}
break; break;
case 56: case 56:
#line 277 "frame/ciaoparser.Y" #line 274 "frame/ciaoparser.Y"
{/* not supported */;} {/* not supported */;}
break; break;
case 58: case 58:
#line 279 "frame/ciaoparser.Y" #line 276 "frame/ciaoparser.Y"
{/* not supported */;} {/* not supported */;}
break; break;
case 59: case 59:
#line 283 "frame/ciaoparser.Y" #line 280 "frame/ciaoparser.Y"
{ {
fr->createBoxCmd(Vector((yyvsp[(2) - (6)].vector)), Vector((yyvsp[(4) - (6)].vector)), (yyvsp[(6) - (6)].real), fill_, fr->createBoxCmd(Vector((yyvsp[(2) - (6)].vector)), Vector((yyvsp[(4) - (6)].vector)), (yyvsp[(6) - (6)].real), fill_,
color,dash,1,font,text,props,NULL,taglist,cblist); color,dash,1,font,text,props,NULL,taglist,cblist);
;} ;}
break; break;
case 62: case 62:
#line 293 "frame/ciaoparser.Y" #line 290 "frame/ciaoparser.Y"
{polylist.append(new Vertex((yyvsp[(1) - (1)].vector)));;} {polylist.append(new Vertex((yyvsp[(1) - (1)].vector)));;}
break; break;
/* Line 1267 of yacc.c. */ /* Line 1267 of yacc.c. */
#line 1819 "frame/ciaoparser.C" #line 1816 "frame/ciaoparser.C"
default: break; default: break;
} }
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
YYPOPSTACK (yylen); YYPOPSTACK (yylen);
yylen = 0; yylen = 0;
YY_STACK_PRINT (yyss, yyssp); YY_STACK_PRINT (yyss, yyssp);
*++yyvsp = yyval; *++yyvsp = yyval;
skipping to change at line 1983 skipping to change at line 1980
YYSTACK_FREE (yyss); YYSTACK_FREE (yyss);
#endif #endif
#if YYERROR_VERBOSE #if YYERROR_VERBOSE
if (yymsg != yymsgbuf) if (yymsg != yymsgbuf)
YYSTACK_FREE (yymsg); YYSTACK_FREE (yymsg);
#endif #endif
/* Make sure YYID is used. */ /* Make sure YYID is used. */
return YYID (yyresult); return YYID (yyresult);
} }
#line 296 "frame/ciaoparser.Y" #line 293 "frame/ciaoparser.Y"
static void setProps(unsigned short* props, unsigned short prop, int value) static void setProps(unsigned short* props, unsigned short prop, int value)
{ {
if (value) if (value)
*props |= prop; *props |= prop;
else else
*props &= ~prop; *props &= ~prop;
} }
 End of changes. 44 change blocks. 
53 lines changed or deleted 50 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)