~ubuntu-branches/ubuntu/jaunty/gimp/jaunty-security

« back to all changes in this revision

Viewing changes to plug-ins/imagemap/imap_csim_parse.c

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2008-10-06 13:30:41 UTC
  • mto: This revision was merged to the branch mainline in revision 35.
  • Revision ID: james.westby@ubuntu.com-20081006133041-3panbkcanaymfsmp
Tags: upstream-2.6.0
ImportĀ upstreamĀ versionĀ 2.6.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
207
207
{
208
208
  int val;
209
209
  double value;
210
 
  char id[4096];                /* Large enough to hold all polygon points! */
 
210
  char *id;
211
211
}
212
212
/* Line 187 of yacc.c.  */
213
213
#line 214 "y.tab.c"
528
528
/* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
529
529
static const yytype_uint16 yyrline[] =
530
530
{
531
 
       0,    66,    66,    69,    75,    76,    79,    80,    81,    82,
532
 
      83,    86,    92,    98,   102,   108,   114,   115,   118,   119,
533
 
     120,   123,   128,   135,   145,   146,   149,   156,   157,   160,
534
 
     161,   164,   165,   166,   167,   168,   169,   170,   171,   172,
535
 
     173,   176,   193,   251,   261,   266,   267,   272,   278,   284,
536
 
     290,   296,   302,   308
 
531
       0,    66,    66,    69,    76,    77,    80,    81,    82,    83,
 
532
      84,    87,    93,    99,   103,   110,   117,   118,   121,   122,
 
533
     123,   126,   132,   139,   150,   151,   154,   161,   162,   165,
 
534
     166,   169,   170,   171,   172,   173,   174,   175,   176,   177,
 
535
     178,   181,   199,   259,   270,   275,   276,   282,   289,   296,
 
536
     303,   310,   317,   324
537
537
};
538
538
#endif
539
539
 
1260
1260
#endif
1261
1261
#endif
1262
1262
{
1263
 
  
 
1263
 
1264
1264
  int yystate;
1265
1265
  int yyn;
1266
1266
  int yyresult;
1508
1508
#line 70 "imap_csim.y"
1509
1509
    {
1510
1510
                   g_strreplace(&_map_info->image_name, (yyvsp[(5) - (7)].id));
 
1511
                   g_free ((yyvsp[(5) - (7)].id));
1511
1512
                }
1512
1513
    break;
1513
1514
 
1514
1515
  case 8:
1515
 
#line 81 "imap_csim.y"
 
1516
#line 82 "imap_csim.y"
1516
1517
    {}
1517
1518
    break;
1518
1519
 
1519
1520
  case 9:
1520
 
#line 82 "imap_csim.y"
1521
 
    {}
 
1521
#line 83 "imap_csim.y"
 
1522
    { g_free ((yyvsp[(3) - (3)].id)); }
1522
1523
    break;
1523
1524
 
1524
1525
  case 10:
1525
 
#line 83 "imap_csim.y"
1526
 
    {}
 
1526
#line 84 "imap_csim.y"
 
1527
    { g_free ((yyvsp[(3) - (3)].id)); }
1527
1528
    break;
1528
1529
 
1529
1530
  case 11:
1530
 
#line 87 "imap_csim.y"
 
1531
#line 88 "imap_csim.y"
1531
1532
    {
1532
1533
                   _map_info->old_image_width = (yyvsp[(3) - (3)].val);
1533
1534
                }
1534
1535
    break;
1535
1536
 
1536
1537
  case 12:
1537
 
#line 93 "imap_csim.y"
 
1538
#line 94 "imap_csim.y"
1538
1539
    {
1539
1540
                   _map_info->old_image_height = (yyvsp[(3) - (3)].val);
1540
1541
                }
1541
1542
    break;
1542
1543
 
1543
1544
  case 13:
1544
 
#line 99 "imap_csim.y"
 
1545
#line 100 "imap_csim.y"
1545
1546
    {
1546
1547
                  (yyval.val) = (gint) (yyvsp[(1) - (1)].value);
1547
1548
                }
1548
1549
    break;
1549
1550
 
1550
1551
  case 14:
1551
 
#line 103 "imap_csim.y"
 
1552
#line 104 "imap_csim.y"
1552
1553
    {
1553
1554
                  (yyval.val) = (gint) g_ascii_strtod ((yyvsp[(1) - (1)].id), NULL);
 
1555
                  g_free ((yyvsp[(1) - (1)].id));
1554
1556
                }
1555
1557
    break;
1556
1558
 
1557
1559
  case 15:
1558
 
#line 109 "imap_csim.y"
 
1560
#line 111 "imap_csim.y"
1559
1561
    {
1560
1562
                   g_strreplace(&_map_info->title, (yyvsp[(5) - (6)].id));
 
1563
                   g_free ((yyvsp[(5) - (6)].id));
1561
1564
                }
1562
1565
    break;
1563
1566
 
1564
1567
  case 21:
1565
 
#line 124 "imap_csim.y"
 
1568
#line 127 "imap_csim.y"
1566
1569
    {
 
1570
                  g_free ((yyvsp[(2) - (3)].id));
1567
1571
                }
1568
1572
    break;
1569
1573
 
1570
1574
  case 22:
1571
 
#line 129 "imap_csim.y"
 
1575
#line 133 "imap_csim.y"
1572
1576
    {
1573
1577
                   g_strreplace(&_map_info->author, (yyvsp[(2) - (3)].id));
1574
 
 
 
1578
                   g_free ((yyvsp[(2) - (3)].id));
1575
1579
                }
1576
1580
    break;
1577
1581
 
1578
1582
  case 23:
1579
 
#line 136 "imap_csim.y"
 
1583
#line 140 "imap_csim.y"
1580
1584
    {
1581
1585
                   gchar *description;
1582
1586
 
1583
1587
                   description = g_strconcat(_map_info->description, (yyvsp[(2) - (3)].id), "\n",
1584
1588
                                             NULL);
1585
1589
                   g_strreplace(&_map_info->description, description);
 
1590
                   g_free ((yyvsp[(2) - (3)].id));
1586
1591
                }
1587
1592
    break;
1588
1593
 
1589
1594
  case 26:
1590
 
#line 150 "imap_csim.y"
 
1595
#line 155 "imap_csim.y"
1591
1596
    {
1592
1597
                   if (current_type != UNDEFINED)
1593
1598
                      add_shape(current_object);
1595
1600
    break;
1596
1601
 
1597
1602
  case 41:
1598
 
#line 177 "imap_csim.y"
 
1603
#line 182 "imap_csim.y"
1599
1604
    {
1600
1605
                   if (!g_ascii_strcasecmp((yyvsp[(3) - (3)].id), "RECT")) {
1601
1606
                      current_object = create_rectangle(0, 0, 0, 0);
1609
1614
                   } else if (!g_ascii_strcasecmp((yyvsp[(3) - (3)].id), "DEFAULT")) {
1610
1615
                      current_type = UNDEFINED;
1611
1616
                   }
 
1617
                   g_free ((yyvsp[(3) - (3)].id));
1612
1618
                }
1613
1619
    break;
1614
1620
 
1615
1621
  case 42:
1616
 
#line 194 "imap_csim.y"
 
1622
#line 200 "imap_csim.y"
1617
1623
    {
1618
1624
                   char *p;
1619
1625
                   if (current_type == RECTANGLE) {
1668
1674
                         polygon_remove_last_point(polygon);
1669
1675
                      polygon->points = points;
1670
1676
                   }
 
1677
 
 
1678
                   g_free ((yyvsp[(3) - (3)].id));
1671
1679
                }
1672
1680
    break;
1673
1681
 
1674
1682
  case 43:
1675
 
#line 252 "imap_csim.y"
 
1683
#line 260 "imap_csim.y"
1676
1684
    {
1677
1685
                   if (current_type == UNDEFINED) {
1678
1686
                      g_strreplace(&_map_info->default_url, (yyvsp[(3) - (3)].id));
1679
1687
                   } else {
1680
1688
                      object_set_url(current_object, (yyvsp[(3) - (3)].id));
1681
1689
                   }
 
1690
                   g_free ((yyvsp[(3) - (3)].id));
1682
1691
                }
1683
1692
    break;
1684
1693
 
1685
1694
  case 44:
1686
 
#line 262 "imap_csim.y"
 
1695
#line 271 "imap_csim.y"
1687
1696
    {
1688
1697
                }
1689
1698
    break;
1690
1699
 
1691
1700
  case 46:
1692
 
#line 268 "imap_csim.y"
 
1701
#line 277 "imap_csim.y"
1693
1702
    {
 
1703
                   g_free ((yyvsp[(2) - (2)].id));
1694
1704
                }
1695
1705
    break;
1696
1706
 
1697
1707
  case 47:
1698
 
#line 273 "imap_csim.y"
 
1708
#line 283 "imap_csim.y"
1699
1709
    {
1700
1710
                   object_set_comment(current_object, (yyvsp[(3) - (3)].id));
 
1711
                   g_free ((yyvsp[(3) - (3)].id));
1701
1712
                }
1702
1713
    break;
1703
1714
 
1704
1715
  case 48:
1705
 
#line 279 "imap_csim.y"
 
1716
#line 290 "imap_csim.y"
1706
1717
    {
1707
1718
                   object_set_target(current_object, (yyvsp[(3) - (3)].id));
 
1719
                   g_free ((yyvsp[(3) - (3)].id));
1708
1720
                }
1709
1721
    break;
1710
1722
 
1711
1723
  case 49:
1712
 
#line 285 "imap_csim.y"
 
1724
#line 297 "imap_csim.y"
1713
1725
    {
1714
1726
                   object_set_mouse_over(current_object, (yyvsp[(3) - (3)].id));
 
1727
                   g_free ((yyvsp[(3) - (3)].id));
1715
1728
                }
1716
1729
    break;
1717
1730
 
1718
1731
  case 50:
1719
 
#line 291 "imap_csim.y"
 
1732
#line 304 "imap_csim.y"
1720
1733
    {
1721
1734
                   object_set_mouse_out(current_object, (yyvsp[(3) - (3)].id));
 
1735
                   g_free ((yyvsp[(3) - (3)].id));
1722
1736
                }
1723
1737
    break;
1724
1738
 
1725
1739
  case 51:
1726
 
#line 297 "imap_csim.y"
 
1740
#line 311 "imap_csim.y"
1727
1741
    {
1728
1742
                   object_set_focus(current_object, (yyvsp[(3) - (3)].id));
 
1743
                   g_free ((yyvsp[(3) - (3)].id));
1729
1744
                }
1730
1745
    break;
1731
1746
 
1732
1747
  case 52:
1733
 
#line 303 "imap_csim.y"
 
1748
#line 318 "imap_csim.y"
1734
1749
    {
1735
1750
                   object_set_blur(current_object, (yyvsp[(3) - (3)].id));
 
1751
                   g_free ((yyvsp[(3) - (3)].id));
1736
1752
                }
1737
1753
    break;
1738
1754
 
1739
1755
 
1740
1756
/* Line 1267 of yacc.c.  */
1741
 
#line 1742 "y.tab.c"
 
1757
#line 1758 "y.tab.c"
1742
1758
      default: break;
1743
1759
    }
1744
1760
  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
1952
1968
}
1953
1969
 
1954
1970
 
1955
 
#line 311 "imap_csim.y"
 
1971
#line 327 "imap_csim.y"
1956
1972
 
1957
1973
 
1958
1974
static void