"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "tksao/frame/saoparser.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.

saoparser.C  (ds9.8.2):saoparser.C  (ds9.8.2.1)
skipping to change at line 512 skipping to change at line 512
39, 46, 40, 60, -1, -1, 16, 52, 39, 53, 39, 46, 40, 60, -1, -1, 16, 52, 39, 53,
40, 60, -1, 53, 38, 54, -1, 54, -1, 46, 40, 60, -1, 53, 38, 54, -1, 54, -1, 46,
-1, 55, 38, 56, -1, 56, -1, 43, -1, -1, -1, 55, 38, 56, -1, 56, -1, 43, -1, -1,
-1, 29, 59, 5, -1, 57, -1, -1, 29, 61, -1, 29, 59, 5, -1, 57, -1, -1, 29, 61,
5, 57, -1 5, 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, 98, 98, 98, 106, 107, 110, 111, 112, 113, 0, 98, 98, 98, 103, 104, 107, 108, 109, 110,
114, 117, 118, 119, 122, 123, 126, 127, 130, 131, 111, 114, 115, 116, 119, 120, 123, 124, 127, 128,
134, 135, 138, 139, 142, 143, 146, 149, 152, 161, 131, 132, 135, 136, 139, 140, 143, 146, 149, 158,
164, 173, 181, 189, 190, 191, 194, 197, 201, 201, 161, 170, 178, 186, 187, 188, 191, 194, 198, 198,
210, 216, 230, 237, 251, 254, 261, 265, 265, 270, 207, 213, 227, 234, 248, 251, 258, 262, 262, 267,
271, 274, 277, 278, 281, 285, 312, 312, 315, 316, 268, 271, 274, 275, 278, 282, 309, 309, 312, 313,
316 313
}; };
#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", "STRING", "EOF_", "$end", "error", "$undefined", "INT", "REAL", "STRING", "EOF_",
"ANNULUS_", "BOX_", "CIRCLE_", "DEBUG_", "ELLIPSE_", "N_", "OFF_", "ON_", "ANNULUS_", "BOX_", "CIRCLE_", "DEBUG_", "ELLIPSE_", "N_", "OFF_", "ON_",
skipping to change at line 1499 skipping to change at line 1499
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 98 "frame/saoparser.Y" #line 98 "frame/saoparser.Y"
{ {
if (fr->useMarkerColor()) strcpy(color, fr->markerColor());
strcpy(color, fr->markerColor());
else
strcpy(color, "green");
;} ;}
break; break;
case 8: case 8:
#line 112 "frame/saoparser.Y" #line 109 "frame/saoparser.Y"
{cerr << "SAOimage" << endl;;} {cerr << "SAOimage" << endl;;}
break; break;
case 13: case 13:
#line 119 "frame/saoparser.Y" #line 116 "frame/saoparser.Y"
{YYACCEPT;;} {YYACCEPT;;}
break; break;
case 14: case 14:
#line 122 "frame/saoparser.Y" #line 119 "frame/saoparser.Y"
{(yyval.real)=(yyvsp[(1) - (1)].real);;} {(yyval.real)=(yyvsp[(1) - (1)].real);;}
break; break;
case 15: case 15:
#line 123 "frame/saoparser.Y" #line 120 "frame/saoparser.Y"
{(yyval.real)=(yyvsp[(1) - (1)].integer);;} {(yyval.real)=(yyvsp[(1) - (1)].integer);;}
break; break;
case 16: case 16:
#line 126 "frame/saoparser.Y" #line 123 "frame/saoparser.Y"
{yydebug=1;;} {yydebug=1;;}
break; break;
case 17: case 17:
#line 127 "frame/saoparser.Y" #line 124 "frame/saoparser.Y"
{yydebug=0;;} {yydebug=0;;}
break; break;
case 24: case 24:
#line 142 "frame/saoparser.Y" #line 139 "frame/saoparser.Y"
{(yyval.real) = 0;;} {(yyval.real) = 0;;}
break; break;
case 25: case 25:
#line 143 "frame/saoparser.Y" #line 140 "frame/saoparser.Y"
{(yyval.real) = (yyvsp[(1) - (1)].real);;} {(yyval.real) = (yyvsp[(1) - (1)].real);;}
break; break;
case 26: case 26:
#line 146 "frame/saoparser.Y" #line 143 "frame/saoparser.Y"
{(yyval.real) = zeroTWOPI(degToRad((yyvsp[(1) - (1)].real)));;} {(yyval.real) = zeroTWOPI(degToRad((yyvsp[(1) - (1)].real)));;}
break; break;
case 27: case 27:
#line 149 "frame/saoparser.Y" #line 146 "frame/saoparser.Y"
{(yyval.real) = FITSPTR->mapLenToRef((yyvsp[(1) - (1)].real), Coord::IMAGE); ;} {(yyval.real) = FITSPTR->mapLenToRef((yyvsp[(1) - (1)].real), Coord::IMAGE); ;}
break; break;
case 28: case 28:
#line 153 "frame/saoparser.Y" #line 150 "frame/saoparser.Y"
{ {
Vector r = FITSPTR->mapLenToRef(Vector((yyvsp[(1) - (3)].real),(yyvsp[( 3) - (3)].real)), Coord::IMAGE); Vector r = FITSPTR->mapLenToRef(Vector((yyvsp[(1) - (3)].real),(yyvsp[( 3) - (3)].real)), Coord::IMAGE);
(yyval.vector)[0] = r[0]; (yyval.vector)[0] = r[0];
(yyval.vector)[1] = r[1]; (yyval.vector)[1] = r[1];
(yyval.vector)[2] = r[2]; (yyval.vector)[2] = r[2];
;} ;}
break; break;
case 29: case 29:
#line 161 "frame/saoparser.Y" #line 158 "frame/saoparser.Y"
{(yyval.integer) = (yyvsp[(3) - (3)].integer);;} {(yyval.integer) = (yyvsp[(3) - (3)].integer);;}
break; break;
case 30: case 30:
#line 165 "frame/saoparser.Y" #line 162 "frame/saoparser.Y"
{ {
Vector r = FITSPTR->mapToRef(Vector((yyvsp[(1) - (3)].real),(yyvsp[(3) - (3)].real)), Coord::IMAGE); Vector r = FITSPTR->mapToRef(Vector((yyvsp[(1) - (3)].real),(yyvsp[(3) - (3)].real)), Coord::IMAGE);
(yyval.vector)[0] = r[0]; (yyval.vector)[0] = r[0];
(yyval.vector)[1] = r[1]; (yyval.vector)[1] = r[1];
(yyval.vector)[2] = r[2]; (yyval.vector)[2] = r[2];
;} ;}
break; break;
case 31: case 31:
#line 173 "frame/saoparser.Y" #line 170 "frame/saoparser.Y"
{ {
globalProps = globalProps =
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 32: case 32:
#line 181 "frame/saoparser.Y" #line 178 "frame/saoparser.Y"
{ {
// reset maperr flag // reset maperr flag
maperr =0; maperr =0;
localProps = globalProps; localProps = globalProps;
;} ;}
break; break;
case 33: case 33:
#line 189 "frame/saoparser.Y" #line 186 "frame/saoparser.Y"
{setProps(&localProps, Marker::INCLUDE, 1);;} {setProps(&localProps, Marker::INCLUDE, 1);;}
break; break;
case 34: case 34:
#line 190 "frame/saoparser.Y" #line 187 "frame/saoparser.Y"
{setProps(&localProps, Marker::INCLUDE, 1);;} {setProps(&localProps, Marker::INCLUDE, 1);;}
break; break;
case 35: case 35:
#line 191 "frame/saoparser.Y" #line 188 "frame/saoparser.Y"
{setProps(&localProps, Marker::INCLUDE, 0);;} {setProps(&localProps, Marker::INCLUDE, 0);;}
break; break;
case 36: case 36:
#line 195 "frame/saoparser.Y" #line 192 "frame/saoparser.Y"
{fr->createCircleCmd(Vector((yyvsp[(3) - (7)].vector)), (yyvsp[(5) - (7)].re al), fill_, {fr->createCircleCmd(Vector((yyvsp[(3) - (7)].vector)), (yyvsp[(5) - (7)].re al), fill_,
color,dash,1,font,text,localProps,localComment,taglist,cblist);;} color,dash,1,font,text,localProps,localComment,taglist,cblist);;}
break; break;
case 37: case 37:
#line 198 "frame/saoparser.Y" #line 195 "frame/saoparser.Y"
{fr->createAnnulusCmd(Vector((yyvsp[(3) - (9)].vector)), {fr->createAnnulusCmd(Vector((yyvsp[(3) - (9)].vector)),
(yyvsp[(5) - (9)].real),(yyvsp[(7) - (9)].real),1, (yyvsp[(5) - (9)].real),(yyvsp[(7) - (9)].real),1,
color,dash,1,font,text,localProps,localComment,taglist,cblist);;} color,dash,1,font,text,localProps,localComment,taglist,cblist);;}
break; break;
case 38: case 38:
#line 201 "frame/saoparser.Y" #line 198 "frame/saoparser.Y"
{aNum=2;;} {aNum=2;;}
break; break;
case 39: case 39:
#line 203 "frame/saoparser.Y" #line 200 "frame/saoparser.Y"
{ {
aAnnuli[0] = (yyvsp[(5) - (12)].real); aAnnuli[0] = (yyvsp[(5) - (12)].real);
aAnnuli[1] = (yyvsp[(7) - (12)].real); aAnnuli[1] = (yyvsp[(7) - (12)].real);
fr->createAnnulusCmd(Vector((yyvsp[(3) - (12)].vector)), fr->createAnnulusCmd(Vector((yyvsp[(3) - (12)].vector)),
aNum,aAnnuli, aNum,aAnnuli,
color,dash,1,font,text,localProps,localComment,taglist,cblist); color,dash,1,font,text,localProps,localComment,taglist,cblist);
;} ;}
break; break;
case 40: case 40:
#line 211 "frame/saoparser.Y" #line 208 "frame/saoparser.Y"
{fr->createAnnulusCmd(Vector((yyvsp[(3) - (11)].vector)), {fr->createAnnulusCmd(Vector((yyvsp[(3) - (11)].vector)),
(yyvsp[(5) - (11)].real),(yyvsp[(7) - (11)].real),(yyvsp[(9) - (11)]. integer), (yyvsp[(5) - (11)].real),(yyvsp[(7) - (11)].real),(yyvsp[(9) - (11)]. integer),
color,dash,1,font,text,localProps,localComment,taglist,cblist);;} color,dash,1,font,text,localProps,localComment,taglist,cblist);;}
break; break;
case 41: case 41:
#line 217 "frame/saoparser.Y" #line 214 "frame/saoparser.Y"
{ {
// for ellipse annulus // for ellipse annulus
aStatus = 1; aStatus = 1;
aCenter = Vector((yyvsp[(3) - (9)].vector)); aCenter = Vector((yyvsp[(3) - (9)].vector));
aAngle = (yyvsp[(7) - (9)].real); aAngle = (yyvsp[(7) - (9)].real);
aVector[0] = Vector((yyvsp[(5) - (9)].vector)); aVector[0] = Vector((yyvsp[(5) - (9)].vector));
aNum = 1; aNum = 1;
strncpy(aComment,localComment,80); strncpy(aComment,localComment,80);
aProps = localProps; aProps = localProps;
fr->createEllipseCmd(Vector((yyvsp[(3) - (9)].vector)), Vector((yyvsp[( 5) - (9)].vector)), (yyvsp[(7) - (9)].real), fill_, fr->createEllipseCmd(Vector((yyvsp[(3) - (9)].vector)), Vector((yyvsp[( 5) - (9)].vector)), (yyvsp[(7) - (9)].real), fill_,
color,dash,1,font,text,localProps,localComment,taglist,cblist); color,dash,1,font,text,localProps,localComment,taglist,cblist);
;} ;}
break; break;
case 42: case 42:
#line 232 "frame/saoparser.Y" #line 229 "frame/saoparser.Y"
{ {
aStatus = 2; aStatus = 2;
aVector[aNum++] = Vector((yyvsp[(5) - (18)].vector)); aVector[aNum++] = Vector((yyvsp[(5) - (18)].vector));
;} ;}
break; break;
case 43: case 43:
#line 238 "frame/saoparser.Y" #line 235 "frame/saoparser.Y"
{ {
// for box annulus // for box annulus
aStatus = 3; aStatus = 3;
aCenter = Vector((yyvsp[(3) - (9)].vector)); aCenter = Vector((yyvsp[(3) - (9)].vector));
aAngle = (yyvsp[(7) - (9)].real); aAngle = (yyvsp[(7) - (9)].real);
aVector[0] = Vector((yyvsp[(5) - (9)].vector)); aVector[0] = Vector((yyvsp[(5) - (9)].vector));
aNum = 1; aNum = 1;
strncpy(aComment,localComment,80); strncpy(aComment,localComment,80);
aProps = localProps; aProps = localProps;
fr->createBoxCmd(Vector((yyvsp[(3) - (9)].vector)), Vector((yyvsp[(5) - (9)].vector)), (yyvsp[(7) - (9)].real), fill_, fr->createBoxCmd(Vector((yyvsp[(3) - (9)].vector)), Vector((yyvsp[(5) - (9)].vector)), (yyvsp[(7) - (9)].real), fill_,
color,dash,1,font,text,localProps,localComment,taglist,cblist); color,dash,1,font,text,localProps,localComment,taglist,cblist);
;} ;}
break; break;
case 44: case 44:
#line 252 "frame/saoparser.Y" #line 249 "frame/saoparser.Y"
{fr->createBoxCmd(Vector((yyvsp[(3) - (9)].vector)), Vector((yyvsp[(5) - (9) ].vector)), (yyvsp[(7) - (9)].real), fill_, {fr->createBoxCmd(Vector((yyvsp[(3) - (9)].vector)), Vector((yyvsp[(5) - (9) ].vector)), (yyvsp[(7) - (9)].real), fill_,
color,dash,1,font,text,localProps,localComment,taglist,cblist);;} color,dash,1,font,text,localProps,localComment,taglist,cblist);;}
break; break;
case 45: case 45:
#line 256 "frame/saoparser.Y" #line 253 "frame/saoparser.Y"
{ {
aStatus = 4; aStatus = 4;
aVector[aNum++] = Vector((yyvsp[(5) - (18)].vector)); aVector[aNum++] = Vector((yyvsp[(5) - (18)].vector));
;} ;}
break; break;
case 46: case 46:
#line 262 "frame/saoparser.Y" #line 259 "frame/saoparser.Y"
{fr->createPointCmd(Vector((yyvsp[(3) - (5)].vector)), Point::BOXCIRCLE, POI NTSIZE, {fr->createPointCmd(Vector((yyvsp[(3) - (5)].vector)), Point::BOXCIRCLE, POI NTSIZE,
color,dash,1,font,text,localProps,localComment,taglist,cblist);;} color,dash,1,font,text,localProps,localComment,taglist,cblist);;}
break; break;
case 47: case 47:
#line 265 "frame/saoparser.Y" #line 262 "frame/saoparser.Y"
{polylist.deleteAll();;} {polylist.deleteAll();;}
break; break;
case 48: case 48:
#line 266 "frame/saoparser.Y" #line 263 "frame/saoparser.Y"
{fr->createPolygonCmd(polylist, fill_, {fr->createPolygonCmd(polylist, fill_,
color,dash,1,font,text,localProps,localComment,taglist,cblist);;} color,dash,1,font,text,localProps,localComment,taglist,cblist);;}
break; break;
case 51: case 51:
#line 274 "frame/saoparser.Y" #line 271 "frame/saoparser.Y"
{polylist.append(new Vertex((yyvsp[(1) - (1)].vector)));;} {polylist.append(new Vertex((yyvsp[(1) - (1)].vector)));;}
break; break;
case 54: case 54:
#line 281 "frame/saoparser.Y" #line 278 "frame/saoparser.Y"
{aAnnuli[aNum++] = (yyvsp[(1) - (1)].real);;} {aAnnuli[aNum++] = (yyvsp[(1) - (1)].real);;}
break; break;
case 55: case 55:
#line 285 "frame/saoparser.Y" #line 282 "frame/saoparser.Y"
{ {
switch (aStatus) { switch (aStatus) {
case 0: // do nothing case 0: // do nothing
break; break;
case 1: // we found just an ellipse, do nothing case 1: // we found just an ellipse, do nothing
break; break;
case 2: // ok we have an ellipse annulus case 2: // ok we have an ellipse annulus
fr->markerDeleteLastCmd(); // delete the previous ellipse fr->markerDeleteLastCmd(); // delete the previous ellipse
fr->createEllipseAnnulusCmd(aCenter, fr->createEllipseAnnulusCmd(aCenter,
aNum,aVector, aNum,aVector,
skipping to change at line 1765 skipping to change at line 1762
aNum,aVector, aNum,aVector,
aAngle, aAngle,
color,dash,1,font,text,aProps,aComment,taglist,cblist); color,dash,1,font,text,aProps,aComment,taglist,cblist);
break; break;
} }
aStatus = 0; aStatus = 0;
;} ;}
break; break;
case 56: case 56:
#line 312 "frame/saoparser.Y" #line 309 "frame/saoparser.Y"
{DISCARD_(1);;} {DISCARD_(1);;}
break; break;
case 59: case 59:
#line 316 "frame/saoparser.Y" #line 313 "frame/saoparser.Y"
{DISCARD_(0);;} {DISCARD_(0);;}
break; break;
case 60: case 60:
#line 317 "frame/saoparser.Y" #line 314 "frame/saoparser.Y"
{strncpy(localComment,(yyvsp[(3) - (4)].str),80);;} {strncpy(localComment,(yyvsp[(3) - (4)].str),80);;}
break; break;
/* Line 1267 of yacc.c. */ /* Line 1267 of yacc.c. */
#line 1821 "frame/saoparser.C" #line 1818 "frame/saoparser.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 1984 skipping to change at line 1981
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 320 "frame/saoparser.Y" #line 317 "frame/saoparser.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. 41 change blocks. 
50 lines changed or deleted 47 lines changed or added

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