Changeset 3426 for trunk/tools
- Timestamp:
- Apr 19, 2000, 4:46:07 PM (26 years ago)
- Location:
- trunk/tools
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/wrc/CHANGES
r882 r3426 1 --------------------------------------------------------------------------- 2 Version 1.0.18 (28-Dec-1999) 3 4 Bertho Stultiens <bertho@akhphd.au.dk> 5 - Bugfix: The named resources were not named correctly for indirectly 6 addressable resources, which resulted in an undefined variable. The 7 previous fix was incomplete (I was probably sleeping while I made it). 8 9 --------------------------------------------------------------------------- 10 Version 1.0.17 (20-Dec-1999) 11 12 Bertho Stultiens <bertho@akhphd.au.dk> 13 - Bugfix: Named resources of different types generated the same assembly- 14 label twice, resulting in a compile failure. 15 16 --------------------------------------------------------------------------- 17 Version 1.0.16 (6-Nov-1999) 18 19 Juergen.Schmied@debitel.net 20 - Bugfix: Styles were evaluated as expressions. The NOT in combination 21 with style flags was not overwriting the default styles like WS_VISIBLE. 22 Solved by introducing own rules for parsing styles. 23 24 --------------------------------------------------------------------------- 25 Version 1.0.15 (13-Aug-1999) 26 27 Bertho Stultiens <bertho@akhphd.au.dk> 28 - Bugfix: IDs were not checked which resulted in numbers > 2^16-1 being 29 accepted as IDs. This resulted in duplicate IDs and all other sort of 30 trouble. 31 1 32 --------------------------------------------------------------------------- 2 33 Version 1.0.14 (08-Aug-1999) -
trunk/tools/wrc/dumpres.c
r882 r3426 8 8 #include "config.h" 9 9 10 #include <assert.h> 10 11 #include <stdio.h> 11 12 #include <ctype.h> … … 498 499 printf("\tx, y, w, h: %d, %d, %d, %d\n", ctrl->x, ctrl->y, ctrl->width, ctrl->height); 499 500 if(ctrl->gotstyle) 500 printf("\tStyle: %08lx\n", ctrl->style); 501 { 502 assert(ctrl->style != NULL); 503 assert(ctrl->style->and_mask == 0); 504 printf("\tStyle: %08lx\n", ctrl->style->or_mask); 505 } 501 506 if(ctrl->gotexstyle) 502 printf("\tExStyle: %08lx\n", ctrl->exstyle); 507 { 508 assert(ctrl->exstyle != NULL); 509 assert(ctrl->exstyle->and_mask == 0); 510 printf("\tExStyle: %08lx\n", ctrl->exstyle->or_mask); 511 } 503 512 if(ctrl->gothelpid) 504 513 printf("\tHelpid: %ld\n", ctrl->helpid); … … 530 539 printf("x, y, w, h: %d, %d, %d, %d\n", dlg->x, dlg->y, dlg->width, dlg->height); 531 540 if(dlg->gotstyle) 532 printf("Style: %08lx\n", dlg->style); 541 { 542 assert(dlg->style != NULL); 543 assert(dlg->style->and_mask == 0); 544 printf("Style: %08lx\n", dlg->style->or_mask); 545 546 } 533 547 if(dlg->gotexstyle) 534 printf("ExStyle: %08lx\n", dlg->exstyle); 548 { 549 assert(dlg->exstyle != NULL); 550 assert(dlg->exstyle->and_mask == 0); 551 printf("ExStyle: %08lx\n", dlg->exstyle->or_mask); 552 } 535 553 printf("Menu: %s\n", get_nameid_str(dlg->menu)); 536 554 printf("Class: %s\n", get_nameid_str(dlg->dlgclass)); … … 571 589 printf("x, y, w, h: %d, %d, %d, %d\n", dlgex->x, dlgex->y, dlgex->width, dlgex->height); 572 590 if(dlgex->gotstyle) 573 printf("Style: %08lx\n", dlgex->style); 591 { 592 assert(dlgex->style != NULL); 593 assert(dlgex->style->and_mask == 0); 594 printf("Style: %08lx\n", dlgex->style->or_mask); 595 } 574 596 if(dlgex->gotexstyle) 575 printf("ExStyle: %08lx\n", dlgex->exstyle); 597 { 598 assert(dlgex->exstyle != NULL); 599 assert(dlgex->exstyle->and_mask == 0); 600 printf("ExStyle: %08lx\n", dlgex->exstyle->or_mask); 601 } 576 602 if(dlgex->gothelpid) 577 603 printf("Helpid: %ld\n", dlgex->helpid); -
trunk/tools/wrc/genres.c
r882 r3426 19 19 #include "genres.h" 20 20 #include "utils.h" 21 #include "windef.h" 22 #include "wingdi.h" 21 23 #include "winuser.h" 22 24 … … 416 418 restag = put_res_header(res, WRC_RT_DIALOG, NULL, name, dlg->memopt, &(dlg->lvc)); 417 419 418 put_dword(res, dlg->style );419 put_dword(res, dlg->gotexstyle ? dlg->exstyle : 0);420 put_dword(res, dlg->style->or_mask); 421 put_dword(res, dlg->gotexstyle ? dlg->exstyle->or_mask : 0); 420 422 tag_nctrl = res->size; 421 423 put_word(res, 0); /* Number of controls */ … … 446 448 { 447 449 /* FIXME: what is default control style? */ 448 put_dword(res, ctrl->gotstyle ? ctrl->style 449 put_dword(res, ctrl->gotexstyle ? ctrl->exstyle : 0);450 put_dword(res, ctrl->gotstyle ? ctrl->style->or_mask: WS_CHILD); 451 put_dword(res, ctrl->gotexstyle ? ctrl->exstyle->or_mask : 0); 450 452 put_word(res, ctrl->x); 451 453 put_word(res, ctrl->y); … … 482 484 restag = put_res_header(res, WRC_RT_DIALOG, NULL, name, dlg->memopt, NULL); 483 485 484 put_dword(res, dlg->gotstyle ? dlg->style : WS_POPUPWINDOW);486 put_dword(res, dlg->gotstyle ? dlg->style->or_mask : WS_POPUPWINDOW); 485 487 tag_nctrl = res->size; 486 488 put_byte(res, 0); /* Number of controls */ … … 514 516 put_word(res, ctrl->height); 515 517 put_word(res, ctrl->id); 516 put_dword(res, ctrl->gotstyle ? ctrl->style 518 put_dword(res, ctrl->gotstyle ? ctrl->style->or_mask: WS_CHILD); 517 519 if(ctrl->ctlclass) 518 520 { … … 584 586 put_word(res, 0xffff); /* DlgVer */ 585 587 put_dword(res, dlgex->gothelpid ? dlgex->helpid : 0); 586 put_dword(res, dlgex->gotexstyle ? dlgex->exstyle : 0);587 put_dword(res, dlgex->gotstyle ? dlgex->style : WS_POPUPWINDOW);588 put_dword(res, dlgex->gotexstyle ? dlgex->exstyle->or_mask : 0); 589 put_dword(res, dlgex->gotstyle ? dlgex->style->or_mask : WS_POPUPWINDOW); 588 590 tag_nctrl = res->size; 589 591 put_word(res, 0); /* Number of controls */ … … 620 622 { 621 623 put_dword(res, ctrl->gothelpid ? ctrl->helpid : 0); 622 put_dword(res, ctrl->gotexstyle ? ctrl->exstyle : 0);624 put_dword(res, ctrl->gotexstyle ? ctrl->exstyle->or_mask : 0); 623 625 /* FIXME: what is default control style? */ 624 put_dword(res, ctrl->gotstyle ? ctrl->style : WS_CHILD | WS_VISIBLE);626 put_dword(res, ctrl->gotstyle ? ctrl->style->or_mask : WS_CHILD | WS_VISIBLE); 625 627 put_word(res, ctrl->x); 626 628 put_word(res, ctrl->y); -
trunk/tools/wrc/lexyy.c
r882 r3426 2 2 3 3 /* Scanner skeleton version: 4 * $Header: /home/ktk/tmp/odin/2007/netlabs.cvs/odin32/tools/wrc/lexyy.c,v 1. 1 1999-09-08 19:34:08 sandervl Exp $4 * $Header: /home/ktk/tmp/odin/2007/netlabs.cvs/odin32/tools/wrc/lexyy.c,v 1.2 2000-04-19 14:44:58 sandervl Exp $ 5 5 */ 6 6 … … 282 282 yy_c_buf_p = yy_cp; 283 283 284 #define YY_NUM_RULES 1 17285 #define YY_END_OF_BUFFER 1 18286 static yyconst short int yy_accept[3 46] =284 #define YY_NUM_RULES 124 285 #define YY_END_OF_BUFFER 125 286 static yyconst short int yy_accept[369] = 287 287 { 0, 288 0, 0, 59, 59, 0, 0, 0, 0, 0, 0,289 0, 0, 1 07, 107, 0, 0, 0, 0, 0, 0,288 0, 0, 66, 66, 0, 0, 0, 0, 0, 0, 289 0, 0, 114, 114, 0, 0, 0, 0, 0, 0, 290 290 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 291 0, 0, 22, 22, 9, 9, 9, 9, 39, 39, 292 0, 0, 29, 29, 33, 33, 34, 34, 118, 115, 293 114, 113, 115, 81, 115, 100, 115, 49, 49, 111, 294 115, 115, 115, 52, 52, 47, 115, 48, 114, 115, 295 59, 114, 60, 59, 59, 59, 59, 59, 59, 116, 296 62, 61, 95, 83, 82, 99, 80, 65, 64, 116, 297 105, 103, 104, 101, 105, 107, 109, 108, 4, 116, 298 299 4, 4, 8, 6, 14, 22, 9, 12, 116, 116, 300 39, 38, 38, 38, 29, 116, 27, 25, 26, 29, 301 116, 33, 30, 31, 116, 33, 37, 34, 36, 35, 302 114, 56, 54, 106, 112, 49, 52, 49, 52, 52, 303 111, 57, 55, 58, 63, 53, 114, 0, 0, 0, 304 0, 0, 0, 0, 0, 59, 59, 59, 59, 59, 305 59, 59, 59, 0, 61, 95, 0, 96, 94, 94, 306 84, 86, 87, 88, 89, 90, 91, 92, 93, 94, 307 80, 0, 77, 76, 76, 66, 68, 69, 70, 71, 308 72, 73, 74, 75, 76, 103, 102, 107, 108, 108, 309 310 110, 0, 0, 7, 6, 14, 22, 9, 10, 0, 311 11, 39, 0, 0, 0, 0, 0, 29, 28, 29, 312 33, 32, 33, 34, 112, 51, 50, 0, 0, 0, 313 0, 15, 0, 0, 0, 0, 59, 59, 59, 59, 314 59, 59, 59, 98, 97, 84, 86, 0, 79, 78, 315 66, 68, 0, 3, 2, 10, 51, 50, 0, 0, 316 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 317 59, 59, 59, 59, 59, 59, 46, 84, 85, 66, 318 0, 0, 18, 19, 0, 0, 0, 0, 0, 24, 319 0, 0, 59, 41, 59, 59, 59, 59, 66, 0, 320 321 0, 18, 19, 20, 21, 16, 0, 0, 24, 0, 322 13, 59, 42, 59, 59, 59, 66, 67, 5, 20, 323 21, 16, 17, 0, 23, 13, 59, 59, 59, 45, 324 66, 5, 17, 1, 23, 59, 59, 43, 1, 59, 325 59, 59, 44, 40, 0 291 0, 0, 22, 22, 9, 9, 9, 9, 46, 46, 292 0, 0, 36, 36, 31, 31, 40, 40, 41, 41, 293 125, 122, 121, 120, 122, 88, 122, 107, 122, 56, 294 56, 118, 122, 122, 122, 59, 59, 54, 122, 55, 295 121, 122, 66, 121, 67, 66, 66, 66, 66, 66, 296 66, 123, 69, 68, 102, 90, 89, 106, 87, 72, 297 71, 123, 112, 110, 111, 108, 112, 114, 116, 115, 298 299 4, 123, 4, 4, 8, 6, 14, 22, 9, 12, 300 123, 123, 46, 45, 45, 45, 36, 123, 34, 32, 301 33, 36, 123, 31, 123, 29, 27, 28, 31, 40, 302 37, 38, 123, 40, 44, 41, 43, 42, 121, 63, 303 61, 113, 119, 56, 59, 56, 59, 59, 118, 64, 304 62, 65, 70, 60, 121, 0, 0, 0, 0, 0, 305 0, 0, 0, 66, 66, 66, 66, 66, 66, 66, 306 66, 0, 68, 102, 0, 103, 101, 101, 91, 93, 307 94, 95, 96, 97, 98, 99, 100, 101, 87, 0, 308 84, 83, 83, 73, 75, 76, 77, 78, 79, 80, 309 310 81, 82, 83, 110, 109, 114, 115, 115, 117, 0, 311 0, 7, 6, 14, 22, 9, 10, 0, 11, 46, 312 0, 0, 0, 0, 0, 36, 35, 36, 0, 0, 313 31, 30, 31, 40, 39, 40, 41, 119, 58, 57, 314 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 315 66, 66, 66, 66, 66, 66, 66, 105, 104, 91, 316 93, 0, 86, 85, 73, 75, 0, 3, 2, 10, 317 0, 58, 57, 0, 0, 0, 0, 0, 0, 15, 318 0, 0, 0, 0, 0, 0, 66, 66, 66, 66, 319 66, 66, 53, 91, 92, 73, 0, 0, 0, 18, 320 321 19, 0, 0, 0, 0, 0, 0, 26, 0, 0, 322 66, 48, 66, 66, 66, 66, 73, 0, 0, 0, 323 18, 19, 20, 21, 25, 16, 0, 0, 26, 0, 324 13, 66, 49, 66, 66, 66, 73, 74, 23, 5, 325 20, 21, 25, 16, 17, 0, 24, 13, 66, 66, 326 66, 52, 73, 23, 5, 17, 1, 24, 66, 66, 327 50, 1, 66, 66, 66, 51, 47, 0 326 328 } ; 327 329 … … 368 370 } ; 369 371 370 static yyconst short int yy_base[ 397] =372 static yyconst short int yy_base[425] = 371 373 { 0, 372 374 0, 60, 119, 169, 17, 18, 42, 43, 46, 47, 373 375 219, 262, 21, 22, 24, 37, 306, 366, 426, 486, 374 376 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 375 0, 0, 626, 625, 79, 87, 89, 90, 624, 623, 376 622, 28, 94, 127, 170, 324, 41, 92, 624, 1265, 377 621, 1265, 604, 1265, 614, 1265, 24, 241, 98, 0, 378 602, 601, 600, 0, 612, 1265, 557, 1265, 81, 113, 379 0, 613, 1265, 10, 59, 75, 85, 100, 148, 609, 380 1265, 1265, 0, 1265, 132, 542, 0, 1265, 136, 595, 381 1265, 611, 1265, 1265, 0, 0, 1265, 146, 1265, 1265, 382 383 0, 0, 1265, 603, 0, 0, 0, 1265, 166, 186, 384 0, 1265, 101, 147, 0, 600, 1265, 1265, 1265, 130, 385 182, 0, 1265, 1265, 596, 189, 1265, 604, 1265, 1265, 386 603, 1265, 1265, 1265, 0, 191, 0, 0, 194, 640, 387 0, 1265, 1265, 1265, 1265, 1265, 208, 295, 345, 561, 388 177, 65, 557, 550, 552, 0, 165, 193, 180, 227, 389 201, 224, 216, 592, 1265, 0, 269, 1265, 1265, 590, 390 238, 266, 1265, 1265, 1265, 1265, 1265, 1265, 1265, 0, 391 0, 287, 1265, 1265, 588, 280, 338, 1265, 1265, 1265, 392 1265, 1265, 1265, 1265, 0, 590, 1265, 0, 224, 234, 393 394 1265, 585, 570, 1265, 579, 0, 0, 0, 0, 297, 395 1265, 0, 326, 343, 347, 6, 543, 0, 1265, 329, 396 0, 1265, 337, 583, 0, 433, 301, 540, 43, 541, 397 528, 160, 538, 529, 538, 534, 372, 371, 362, 376, 398 377, 374, 379, 1265, 1265, 341, 344, 0, 1265, 1265, 399 347, 392, 0, 570, 1265, 0, 0, 0, 528, 529, 400 529, 525, 520, 567, 525, 525, 519, 522, 519, 520, 401 428, 426, 417, 420, 432, 422, 0, 395, 1265, 441, 402 0, 513, 559, 558, 515, 506, 510, 510, 497, 0, 403 503, 506, 424, 0, 434, 429, 439, 442, 460, 0, 404 405 506, 546, 541, 540, 533, 527, 479, 441, 0, 427, 406 463, 440, 0, 484, 479, 485, 496, 1265, 421, 417, 407 414, 413, 410, 368, 0, 396, 492, 493, 490, 0, 408 502, 361, 294, 288, 0, 497, 491, 0, 271, 492, 409 493, 498, 0, 0, 1265, 684, 698, 712, 726, 740, 410 754, 768, 782, 796, 810, 824, 838, 852, 866, 880, 411 894, 908, 922, 518, 936, 950, 964, 978, 992, 1006, 412 1020, 213, 1034, 1048, 1062, 1076, 1085, 524, 1097, 1111, 413 1125, 1139, 1153, 1166, 1180, 1194, 1208, 165, 159, 1222, 414 143, 130, 29, 1236, 16, 1250 415 377 0, 0, 1053, 1048, 79, 87, 89, 90, 1030, 1021, 378 1020, 28, 94, 127, 120, 187, 323, 339, 41, 92, 379 1005, 1334, 994, 1334, 977, 1334, 974, 1334, 24, 241, 380 191, 0, 950, 949, 948, 0, 948, 1334, 619, 1334, 381 81, 113, 0, 675, 1334, 10, 59, 83, 85, 103, 382 174, 671, 1334, 1334, 0, 1334, 102, 542, 0, 1334, 383 109, 595, 1334, 673, 1334, 1334, 0, 0, 1334, 126, 384 385 1334, 1334, 0, 0, 1334, 665, 0, 0, 0, 1334, 386 129, 147, 0, 1334, 107, 206, 0, 662, 1334, 1334, 387 1334, 156, 246, 0, 661, 1334, 1334, 1334, 167, 0, 388 1334, 1334, 660, 173, 1334, 668, 1334, 1334, 667, 1334, 389 1334, 1334, 0, 253, 0, 0, 163, 640, 0, 1334, 390 1334, 1334, 1334, 1334, 180, 344, 350, 625, 176, 139, 391 621, 614, 610, 0, 157, 193, 163, 192, 215, 194, 392 247, 653, 1334, 0, 325, 1334, 1334, 652, 281, 323, 393 1334, 1334, 1334, 1334, 1334, 1334, 1334, 0, 0, 326, 394 1334, 1334, 651, 343, 346, 1334, 1334, 1334, 1334, 1334, 395 396 1334, 1334, 0, 648, 1334, 0, 224, 262, 1334, 643, 397 627, 1334, 636, 0, 0, 0, 0, 351, 1334, 0, 398 341, 360, 406, 363, 11, 0, 1334, 392, 412, 419, 399 0, 1334, 407, 0, 1334, 414, 641, 0, 433, 372, 400 598, 43, 599, 588, 595, 465, 596, 587, 594, 590, 401 428, 430, 367, 433, 436, 478, 484, 1334, 1334, 463, 402 468, 0, 1334, 1334, 496, 502, 0, 626, 1334, 0, 403 578, 0, 0, 583, 584, 584, 580, 575, 575, 621, 404 579, 579, 573, 576, 573, 574, 492, 490, 485, 488, 405 500, 490, 0, 515, 1334, 520, 0, 566, 566, 612, 406 407 611, 568, 559, 553, 561, 561, 546, 0, 549, 548, 408 489, 0, 499, 513, 527, 529, 537, 0, 538, 546, 409 586, 573, 534, 524, 0, 469, 424, 409, 0, 409, 410 421, 530, 0, 532, 530, 536, 550, 1334, 0, 416, 411 415, 387, 0, 386, 361, 307, 0, 338, 540, 541, 412 542, 0, 556, 0, 332, 288, 277, 0, 553, 548, 413 0, 244, 555, 556, 563, 0, 0, 1334, 684, 698, 414 712, 726, 740, 754, 768, 782, 796, 810, 824, 838, 415 852, 866, 880, 894, 908, 922, 936, 190, 950, 964, 416 978, 992, 1006, 1020, 1034, 214, 1048, 1062, 1076, 1090, 417 418 1099, 462, 1111, 1125, 1139, 1153, 1167, 1180, 1194, 1207, 419 1221, 1235, 1249, 174, 147, 1263, 135, 93, 29, 1277, 420 16, 1291, 1305, 1319 416 421 } ; 417 422 418 static yyconst short int yy_def[ 397] =423 static yyconst short int yy_def[425] = 419 424 { 0, 420 346, 346, 347, 347, 348, 348, 349, 349, 350, 350, 421 351, 351, 352, 352, 353, 353, 354, 354, 355, 355, 422 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 423 356, 356, 357, 357, 358, 358, 358, 358, 359, 359, 424 360, 360, 361, 361, 362, 362, 363, 363, 345, 345, 425 345, 345, 345, 345, 345, 345, 345, 364, 364, 365, 426 345, 345, 345, 364, 364, 345, 345, 345, 345, 345, 427 366, 345, 345, 366, 366, 366, 366, 366, 366, 367, 428 345, 345, 368, 345, 345, 369, 370, 345, 345, 371, 429 345, 345, 345, 345, 372, 373, 345, 374, 345, 345, 430 431 375, 376, 345, 377, 378, 379, 380, 345, 381, 345, 432 382, 345, 345, 345, 383, 384, 345, 345, 345, 383, 433 345, 385, 345, 345, 386, 385, 345, 345, 345, 345, 434 345, 345, 345, 345, 387, 364, 364, 364, 364, 364, 435 365, 345, 345, 345, 345, 345, 345, 345, 345, 345, 436 345, 345, 345, 345, 345, 366, 366, 366, 366, 366, 437 366, 366, 366, 367, 345, 368, 345, 345, 345, 345, 438 345, 345, 345, 345, 345, 345, 345, 345, 345, 388, 439 370, 345, 345, 345, 345, 345, 345, 345, 345, 345, 440 345, 345, 345, 345, 389, 345, 345, 373, 374, 374, 441 442 345, 375, 376, 345, 377, 378, 379, 380, 390, 345, 443 345, 382, 345, 345, 345, 345, 345, 383, 345, 383, 444 385, 345, 385, 345, 387, 364, 140, 345, 345, 345, 445 345, 345, 345, 345, 345, 345, 366, 366, 366, 366, 446 366, 366, 366, 345, 345, 345, 345, 391, 345, 345, 447 345, 345, 392, 375, 345, 390, 364, 364, 345, 345, 448 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 449 366, 366, 366, 366, 366, 366, 366, 345, 345, 345, 450 393, 345, 345, 345, 345, 345, 345, 345, 345, 394, 451 345, 345, 366, 366, 366, 366, 366, 366, 345, 395, 452 453 345, 345, 345, 345, 345, 345, 345, 345, 394, 345, 454 345, 366, 366, 366, 366, 366, 345, 345, 345, 345, 455 345, 345, 345, 345, 396, 345, 366, 366, 366, 366, 456 345, 345, 345, 345, 396, 366, 366, 366, 345, 366, 457 366, 366, 366, 366, 0, 345, 345, 345, 345, 345, 458 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 459 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 460 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 461 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 462 345, 345, 345, 345, 345, 345 463 425 369, 369, 370, 370, 371, 371, 372, 372, 373, 373, 426 374, 374, 375, 375, 376, 376, 377, 377, 378, 378, 427 379, 379, 379, 379, 379, 379, 379, 379, 379, 379, 428 379, 379, 380, 380, 381, 381, 381, 381, 382, 382, 429 383, 383, 384, 384, 385, 385, 386, 386, 387, 387, 430 368, 368, 368, 368, 368, 368, 368, 368, 368, 388, 431 388, 389, 368, 368, 368, 388, 388, 368, 368, 368, 432 368, 368, 390, 368, 368, 390, 390, 390, 390, 390, 433 390, 391, 368, 368, 392, 368, 368, 393, 394, 368, 434 368, 395, 368, 368, 368, 368, 396, 397, 368, 398, 435 436 368, 368, 399, 400, 368, 401, 402, 403, 404, 368, 437 405, 368, 406, 368, 368, 368, 407, 408, 368, 368, 438 368, 407, 368, 409, 410, 368, 368, 368, 409, 411, 439 368, 368, 412, 411, 368, 368, 368, 368, 368, 368, 440 368, 368, 413, 388, 388, 388, 388, 388, 389, 368, 441 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 442 368, 368, 368, 390, 390, 390, 390, 390, 390, 390, 443 390, 391, 368, 392, 368, 368, 368, 368, 368, 368, 444 368, 368, 368, 368, 368, 368, 368, 414, 394, 368, 445 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 446 447 368, 368, 415, 368, 368, 397, 398, 398, 368, 399, 448 400, 368, 401, 402, 403, 404, 416, 368, 368, 406, 449 368, 368, 368, 368, 368, 407, 368, 407, 368, 368, 450 409, 368, 409, 411, 368, 411, 368, 413, 388, 148, 451 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 452 390, 390, 390, 390, 390, 390, 390, 368, 368, 368, 453 368, 417, 368, 368, 368, 368, 418, 399, 368, 416, 454 368, 388, 388, 368, 368, 368, 368, 368, 368, 368, 455 368, 368, 368, 368, 368, 368, 390, 390, 390, 390, 456 390, 390, 390, 368, 368, 368, 419, 368, 368, 368, 457 458 368, 368, 368, 368, 368, 368, 368, 420, 368, 368, 459 390, 390, 390, 390, 390, 390, 368, 421, 368, 368, 460 368, 368, 368, 368, 422, 368, 368, 368, 420, 368, 461 368, 390, 390, 390, 390, 390, 368, 368, 423, 368, 462 368, 368, 422, 368, 368, 368, 424, 368, 390, 390, 463 390, 390, 368, 423, 368, 368, 368, 424, 390, 390, 464 390, 368, 390, 390, 390, 390, 390, 0, 368, 368, 465 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 466 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 467 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 468 469 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 470 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 471 368, 368, 368, 368 464 472 } ; 465 473 466 static yyconst short int yy_nxt[13 26] =474 static yyconst short int yy_nxt[1395] = 467 475 { 0, 468 50, 51, 52, 53, 54, 50, 55, 56, 50, 50, 469 50, 57, 58, 59, 59, 60, 61, 62, 63, 81, 470 81, 82, 82, 97, 97, 318, 100, 65, 101, 113, 471 52, 98, 98, 114, 134, 135, 157, 50, 300, 100, 472 102, 101, 128, 129, 84, 84, 85, 85, 88, 88, 473 89, 89, 229, 102, 230, 157, 130, 66, 67, 68, 474 50, 69, 52, 53, 54, 70, 55, 56, 50, 50, 475 50, 57, 58, 59, 59, 60, 61, 62, 63, 86, 476 86, 108, 147, 90, 90, 158, 148, 65, 260, 108, 477 109, 108, 108, 128, 129, 261, 52, 50, 109, 100, 478 479 109, 109, 213, 159, 158, 116, 214, 130, 232, 117, 480 136, 136, 136, 233, 149, 160, 110, 66, 67, 68, 481 72, 52, 159, 73, 110, 138, 110, 110, 120, 52, 482 161, 220, 121, 167, 160, 214, 168, 182, 116, 281, 483 183, 74, 117, 75, 138, 76, 77, 78, 215, 161, 484 79, 118, 279, 119, 150, 151, 200, 201, 152, 153, 485 74, 264, 75, 154, 76, 77, 78, 155, 253, 79, 486 72, 52, 52, 73, 248, 100, 134, 135, 123, 124, 487 162, 125, 163, 215, 118, 100, 119, 210, 211, 216, 488 223, 74, 217, 75, 214, 76, 77, 78, 237, 162, 489 490 79, 265, 163, 136, 136, 136, 226, 226, 266, 147, 491 74, 239, 75, 148, 76, 77, 78, 237, 138, 79, 492 92, 93, 197, 229, 216, 230, 94, 217, 231, 238, 493 239, 95, 95, 95, 345, 345, 241, 138, 95, 95, 494 95, 95, 95, 95, 200, 201, 240, 242, 243, 238, 495 246, 246, 247, 136, 136, 136, 241, 95, 95, 95, 496 95, 95, 95, 92, 93, 240, 242, 243, 138, 94, 497 167, 139, 339, 244, 95, 95, 95, 140, 247, 247, 498 247, 95, 95, 95, 95, 95, 95, 138, 182, 339, 499 139, 249, 251, 251, 252, 333, 149, 140, 210, 211, 500 501 95, 95, 95, 95, 95, 95, 103, 103, 100, 103, 502 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 503 103, 103, 103, 103, 103, 126, 52, 213, 258, 121, 504 220, 214, 123, 124, 214, 125, 150, 151, 223, 100, 505 152, 153, 214, 103, 215, 154, 149, 258, 215, 155, 506 252, 252, 252, 278, 278, 247, 247, 247, 247, 280, 507 280, 252, 332, 103, 103, 103, 103, 103, 100, 103, 508 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 509 103, 103, 103, 103, 103, 216, 150, 151, 217, 216, 510 152, 153, 217, 271, 272, 154, 273, 326, 274, 155, 511 512 275, 276, 277, 103, 252, 252, 252, 247, 247, 247, 513 334, 333, 271, 272, 322, 321, 273, 274, 320, 275, 514 276, 277, 332, 103, 103, 103, 100, 100, 100, 100, 515 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 516 100, 100, 100, 100, 100, 226, 226, 293, 294, 295, 517 296, 297, 298, 299, 299, 252, 312, 313, 314, 315, 518 257, 316, 327, 100, 326, 325, 293, 294, 295, 296, 519 297, 298, 317, 317, 252, 312, 313, 314, 315, 257, 520 316, 327, 324, 100, 100, 100, 100, 100, 100, 100, 521 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 522 523 100, 100, 100, 100, 100, 328, 329, 330, 331, 331, 524 252, 336, 337, 338, 252, 252, 252, 340, 341, 342, 525 343, 344, 323, 100, 328, 329, 330, 137, 322, 137, 526 336, 337, 338, 206, 321, 206, 340, 341, 342, 343, 527 344, 320, 303, 100, 100, 100, 170, 302, 319, 311, 528 310, 308, 307, 306, 171, 171, 172, 305, 304, 303, 529 302, 301, 292, 291, 290, 289, 288, 287, 264, 286, 530 285, 284, 283, 282, 254, 270, 269, 268, 267, 263, 531 173, 174, 262, 259, 224, 175, 232, 204, 255, 254, 532 176, 196, 250, 177, 245, 178, 165, 179, 180, 185, 533 534 236, 235, 234, 228, 131, 224, 134, 186, 186, 187, 535 134, 204, 196, 165, 131, 146, 145, 144, 143, 142, 536 133, 132, 131, 345, 52, 100, 100, 100, 100, 345, 537 345, 345, 345, 188, 189, 345, 345, 345, 190, 345, 538 345, 345, 345, 191, 345, 345, 192, 345, 193, 345, 539 194, 195, 227, 227, 227, 345, 345, 345, 345, 227, 540 227, 227, 227, 227, 227, 345, 345, 345, 345, 345, 541 345, 345, 345, 345, 345, 345, 345, 345, 227, 227, 542 227, 227, 227, 227, 64, 64, 64, 64, 64, 64, 543 64, 64, 64, 64, 64, 64, 64, 64, 71, 71, 544 545 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 546 71, 71, 80, 80, 80, 80, 80, 80, 80, 80, 547 80, 80, 80, 80, 80, 80, 83, 83, 83, 83, 548 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 549 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 550 87, 87, 87, 87, 91, 91, 91, 91, 91, 91, 551 91, 91, 91, 91, 91, 91, 91, 91, 96, 96, 552 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 553 96, 96, 99, 99, 99, 99, 99, 99, 99, 99, 554 99, 99, 99, 99, 99, 99, 104, 104, 104, 104, 555 556 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 476 52, 53, 54, 55, 56, 52, 57, 58, 52, 52, 477 52, 59, 60, 61, 61, 62, 63, 64, 65, 83, 478 83, 84, 84, 99, 99, 338, 102, 67, 103, 115, 479 54, 100, 100, 116, 142, 143, 165, 52, 318, 102, 480 104, 103, 136, 137, 86, 86, 87, 87, 90, 90, 481 91, 91, 245, 104, 246, 165, 138, 68, 69, 70, 482 52, 71, 54, 55, 56, 72, 57, 58, 52, 52, 483 52, 59, 60, 61, 61, 62, 63, 64, 65, 88, 484 88, 110, 155, 92, 92, 166, 156, 67, 275, 110, 485 111, 110, 110, 136, 137, 276, 54, 52, 111, 102, 486 487 111, 111, 297, 175, 166, 118, 176, 138, 221, 119, 488 190, 167, 222, 191, 157, 168, 112, 68, 69, 70, 489 74, 54, 54, 75, 112, 102, 112, 112, 122, 54, 490 167, 125, 123, 169, 168, 126, 208, 209, 118, 142, 491 143, 76, 119, 77, 295, 78, 79, 80, 218, 219, 492 81, 120, 169, 121, 158, 159, 267, 228, 160, 161, 493 76, 229, 77, 162, 78, 79, 80, 163, 233, 81, 494 74, 54, 229, 75, 236, 239, 239, 127, 229, 128, 495 245, 155, 246, 262, 120, 156, 121, 247, 129, 54, 496 251, 76, 123, 77, 253, 78, 79, 80, 125, 145, 497 498 81, 145, 126, 144, 144, 144, 170, 223, 171, 251, 499 76, 254, 77, 253, 78, 79, 80, 256, 146, 81, 500 94, 95, 242, 205, 243, 170, 96, 244, 171, 252, 501 254, 97, 97, 97, 368, 368, 256, 146, 97, 97, 502 97, 97, 97, 97, 127, 362, 128, 230, 224, 252, 503 255, 225, 161, 144, 144, 144, 162, 97, 97, 97, 504 97, 97, 97, 94, 95, 144, 144, 144, 146, 96, 505 255, 147, 208, 209, 97, 97, 97, 148, 362, 257, 506 146, 97, 97, 97, 97, 97, 97, 146, 159, 356, 507 147, 225, 161, 260, 260, 261, 162, 148, 257, 146, 508 509 97, 97, 97, 97, 97, 97, 105, 105, 102, 105, 557 510 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 558 105, 105, 105, 105, 100, 100, 100, 100, 100, 100, 559 100, 100, 100, 100, 100, 100, 100, 100, 106, 106, 511 105, 105, 105, 105, 105, 54, 175, 190, 102, 258, 512 263, 131, 132, 355, 133, 261, 261, 261, 102, 348, 513 134, 54, 221, 105, 123, 157, 222, 131, 132, 357, 514 133, 157, 218, 219, 102, 265, 265, 266, 266, 266, 515 266, 223, 356, 105, 105, 105, 105, 105, 102, 105, 516 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 517 105, 105, 105, 105, 105, 158, 159, 344, 342, 160, 518 161, 158, 159, 228, 162, 160, 161, 229, 163, 273, 519 520 162, 289, 224, 105, 163, 225, 161, 223, 233, 242, 521 162, 243, 229, 230, 271, 236, 341, 355, 273, 229, 522 230, 289, 348, 105, 105, 105, 102, 102, 102, 102, 523 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 524 102, 102, 102, 102, 102, 239, 239, 347, 224, 287, 525 346, 225, 161, 288, 159, 290, 162, 225, 161, 291, 526 272, 159, 162, 102, 225, 161, 280, 345, 287, 162, 527 344, 214, 288, 214, 290, 294, 294, 261, 291, 272, 528 261, 261, 261, 102, 102, 102, 102, 102, 102, 102, 529 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 530 531 102, 102, 102, 102, 102, 292, 281, 293, 296, 296, 532 266, 311, 312, 282, 266, 266, 266, 313, 314, 315, 533 316, 332, 333, 102, 292, 342, 293, 261, 261, 261, 534 311, 312, 317, 317, 266, 341, 313, 314, 315, 316, 535 332, 333, 334, 102, 102, 102, 178, 335, 336, 337, 536 337, 266, 349, 350, 179, 179, 180, 351, 352, 359, 537 360, 334, 353, 353, 266, 361, 335, 336, 266, 266, 538 266, 349, 350, 363, 322, 364, 351, 352, 359, 360, 539 181, 182, 365, 366, 361, 183, 367, 321, 340, 339, 540 184, 331, 363, 185, 364, 186, 330, 187, 188, 193, 541 542 328, 365, 366, 327, 326, 367, 325, 194, 194, 195, 543 324, 323, 322, 321, 320, 319, 310, 309, 308, 307, 544 306, 305, 280, 304, 303, 302, 301, 300, 299, 298, 545 268, 286, 285, 196, 197, 284, 283, 279, 198, 278, 546 277, 274, 237, 199, 212, 269, 200, 268, 201, 204, 547 202, 203, 240, 240, 240, 264, 259, 173, 250, 240, 548 240, 240, 240, 240, 240, 249, 248, 241, 139, 237, 549 142, 142, 142, 212, 204, 173, 139, 154, 240, 240, 550 240, 240, 240, 240, 66, 66, 66, 66, 66, 66, 551 66, 66, 66, 66, 66, 66, 66, 66, 73, 73, 552 553 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 554 73, 73, 82, 82, 82, 82, 82, 82, 82, 82, 555 82, 82, 82, 82, 82, 82, 85, 85, 85, 85, 556 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 557 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 558 89, 89, 89, 89, 93, 93, 93, 93, 93, 93, 559 93, 93, 93, 93, 93, 93, 93, 93, 98, 98, 560 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 561 98, 98, 101, 101, 101, 101, 101, 101, 101, 101, 562 101, 101, 101, 101, 101, 101, 106, 106, 106, 106, 563 560 564 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 561 106, 106, 107, 107, 107, 107, 107, 107, 107, 107, 562 107, 107, 107, 107, 107, 107, 111, 111, 111, 111, 563 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 564 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 565 112, 112, 112, 112, 115, 115, 115, 115, 115, 115, 566 567 115, 115, 115, 115, 115, 115, 115, 115, 122, 122, 568 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 569 122, 122, 127, 127, 127, 127, 127, 127, 127, 127, 570 127, 127, 127, 127, 127, 127, 141, 141, 345, 141, 571 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 572 156, 345, 345, 345, 156, 156, 156, 156, 156, 156, 573 156, 156, 156, 156, 164, 164, 345, 164, 164, 164, 574 164, 164, 164, 164, 164, 164, 164, 164, 166, 166, 575 345, 345, 166, 166, 166, 166, 166, 166, 166, 166, 576 345, 166, 169, 169, 169, 169, 169, 169, 169, 169, 577 578 169, 169, 169, 169, 169, 169, 181, 181, 345, 345, 579 181, 181, 181, 181, 181, 181, 181, 181, 345, 181, 580 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 581 184, 184, 184, 184, 198, 198, 345, 198, 198, 198, 582 198, 345, 198, 198, 198, 198, 198, 198, 199, 199, 583 345, 199, 199, 199, 199, 199, 199, 199, 199, 199, 584 199, 199, 202, 202, 345, 202, 202, 202, 202, 202, 585 202, 202, 345, 202, 202, 202, 203, 203, 345, 203, 586 203, 203, 203, 203, 203, 203, 345, 203, 203, 203, 587 205, 345, 345, 345, 205, 345, 205, 207, 207, 345, 588 589 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 590 207, 208, 208, 345, 208, 208, 208, 208, 208, 345, 591 208, 208, 208, 345, 208, 209, 209, 209, 209, 209, 592 209, 209, 209, 209, 209, 209, 209, 209, 209, 212, 593 212, 345, 212, 212, 212, 212, 212, 212, 212, 212, 594 212, 212, 212, 218, 218, 345, 218, 345, 218, 218, 595 218, 345, 218, 218, 218, 218, 219, 219, 345, 219, 596 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, 597 221, 221, 345, 221, 345, 345, 345, 221, 345, 221, 598 221, 221, 221, 221, 222, 222, 345, 222, 222, 222, 599 600 222, 222, 222, 222, 222, 222, 222, 222, 225, 225, 601 345, 225, 225, 225, 225, 225, 225, 225, 225, 225, 602 225, 225, 256, 256, 345, 256, 256, 256, 256, 256, 603 345, 256, 256, 256, 345, 256, 309, 309, 345, 309, 604 309, 309, 309, 309, 309, 309, 309, 309, 309, 309, 605 335, 335, 345, 335, 335, 335, 335, 335, 335, 335, 606 335, 335, 335, 335, 49, 345, 345, 345, 345, 345, 607 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 608 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 609 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 610 611 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 612 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 613 345, 345, 345, 345, 345 565 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 566 107, 107, 107, 107, 102, 102, 102, 102, 102, 102, 567 102, 102, 102, 102, 102, 102, 102, 102, 108, 108, 568 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 569 108, 108, 109, 109, 109, 109, 109, 109, 109, 109, 570 109, 109, 109, 109, 109, 109, 113, 113, 113, 113, 571 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 572 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 573 114, 114, 114, 114, 117, 117, 117, 117, 117, 117, 574 575 117, 117, 117, 117, 117, 117, 117, 117, 124, 124, 576 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 577 124, 124, 130, 130, 130, 130, 130, 130, 130, 130, 578 130, 130, 130, 130, 130, 130, 135, 135, 135, 135, 579 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 580 149, 149, 153, 149, 149, 149, 149, 149, 149, 149, 581 149, 149, 149, 149, 164, 152, 151, 150, 164, 164, 582 164, 164, 164, 164, 164, 164, 164, 164, 172, 172, 583 141, 172, 172, 172, 172, 172, 172, 172, 172, 172, 584 172, 172, 174, 174, 140, 139, 174, 174, 174, 174, 585 586 174, 174, 174, 174, 368, 174, 177, 177, 177, 177, 587 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 588 189, 189, 54, 102, 189, 189, 189, 189, 189, 189, 589 189, 189, 102, 189, 192, 192, 192, 192, 192, 192, 590 192, 192, 192, 192, 192, 192, 192, 192, 206, 206, 591 102, 206, 206, 206, 206, 102, 206, 206, 206, 206, 592 206, 206, 207, 207, 368, 207, 207, 207, 207, 207, 593 207, 207, 207, 207, 207, 207, 210, 210, 368, 210, 594 210, 210, 210, 210, 210, 210, 368, 210, 210, 210, 595 211, 211, 368, 211, 211, 211, 211, 211, 211, 211, 596 597 368, 211, 211, 211, 213, 368, 368, 368, 213, 368, 598 213, 215, 215, 368, 215, 215, 215, 215, 215, 215, 599 215, 215, 215, 215, 215, 216, 216, 368, 216, 216, 600 216, 216, 216, 368, 216, 216, 216, 368, 216, 217, 601 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 602 217, 217, 217, 220, 220, 368, 220, 220, 220, 220, 603 220, 220, 220, 220, 220, 220, 220, 226, 226, 368, 604 226, 368, 226, 226, 226, 368, 226, 226, 226, 226, 605 227, 227, 368, 227, 227, 227, 227, 227, 227, 227, 606 227, 227, 227, 227, 231, 231, 368, 231, 368, 231, 607 608 231, 231, 368, 231, 231, 231, 231, 232, 232, 368, 609 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 610 232, 234, 234, 368, 234, 368, 368, 368, 234, 368, 611 234, 234, 234, 234, 234, 235, 235, 368, 235, 235, 612 235, 235, 235, 235, 235, 235, 235, 235, 235, 238, 613 238, 368, 238, 238, 238, 238, 238, 238, 238, 238, 614 238, 238, 238, 270, 270, 368, 270, 270, 270, 270, 615 270, 368, 270, 270, 270, 368, 270, 329, 329, 368, 616 329, 329, 329, 329, 329, 329, 329, 329, 329, 329, 617 329, 343, 343, 368, 343, 343, 343, 343, 343, 343, 618 619 343, 343, 343, 343, 343, 354, 354, 368, 354, 354, 620 354, 354, 354, 354, 354, 354, 354, 354, 354, 358, 621 358, 368, 358, 358, 358, 358, 358, 358, 358, 358, 622 358, 358, 358, 51, 368, 368, 368, 368, 368, 368, 623 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 624 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 625 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 626 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 627 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 628 368, 368, 368, 368 629 614 630 } ; 615 631 616 static yyconst short int yy_chk[13 26] =632 static yyconst short int yy_chk[1395] = 617 633 { 0, 618 634 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 619 635 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 620 6, 5, 6, 13, 14, 395, 15, 1, 15, 42,621 42, 13, 14, 42, 5 7, 57, 74, 1, 393, 16,622 15, 16, 4 7, 47, 7, 8, 7, 8, 9, 10,623 9, 10, 2 16, 16, 216, 74, 47, 1, 1, 1,636 6, 5, 6, 13, 14, 421, 15, 1, 15, 42, 637 42, 13, 14, 42, 59, 59, 76, 1, 419, 16, 638 15, 16, 49, 49, 7, 8, 7, 8, 9, 10, 639 9, 10, 225, 16, 225, 76, 49, 1, 1, 1, 624 640 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 625 641 2, 2, 2, 2, 2, 2, 2, 2, 2, 7, 626 8, 35, 69, 9, 10, 75, 69, 2, 229, 36,627 35, 37, 38, 48, 48, 229, 43, 2, 36, 43,628 629 37, 38, 113, 76, 75, 43, 113, 48, 152, 43,630 59, 59, 59, 152, 70, 77, 35, 2, 2, 2,631 3, 3, 76, 3, 36, 59, 37, 38, 44, 44,632 78, 120, 44, 85, 77, 120, 85, 89, 44, 392,633 89, 3, 44, 3, 59, 3, 3, 3, 114, 78,634 3, 43, 391, 43, 70, 70, 98, 98, 70, 70,635 3, 232, 3, 70, 3, 3, 3, 70, 389, 3,636 4, 4, 45, 4, 388, 45, 109, 109, 45, 45,637 79, 45, 79, 121, 44, 45, 44, 110, 110, 114,638 1 26, 4, 114, 4, 126, 4, 4, 4, 157, 79,639 640 4, 232, 79, 136, 136, 136, 139, 139, 232, 147,641 4, 1 59, 4, 147, 4, 4, 4, 157, 136, 4,642 11, 11, 372, 151, 121, 151, 11, 121, 151, 158,643 1 59, 11, 11, 11, 199, 199, 161, 136, 11, 11,644 11, 11, 11, 11, 200, 200, 160, 162, 163, 158,645 1 71, 171, 171, 58, 58, 58, 161, 11, 11, 11,646 11, 11, 11, 12, 12, 1 60, 162, 163, 58, 12,647 16 7, 58, 339, 167, 12, 12, 12, 58, 172, 172,648 1 72, 12, 12, 12, 12, 12, 12, 58, 182, 334,649 58, 182, 186, 186, 186, 333, 148, 58, 210, 210,642 8, 35, 71, 9, 10, 77, 71, 2, 242, 36, 643 35, 37, 38, 50, 50, 242, 43, 2, 36, 43, 644 645 37, 38, 418, 87, 77, 43, 87, 50, 115, 43, 646 91, 78, 115, 91, 72, 79, 35, 2, 2, 2, 647 3, 3, 45, 3, 36, 45, 37, 38, 44, 44, 648 78, 45, 44, 80, 79, 45, 100, 100, 44, 111, 649 111, 3, 44, 3, 417, 3, 3, 3, 112, 112, 650 3, 43, 80, 43, 72, 72, 415, 122, 72, 72, 651 3, 122, 3, 72, 3, 3, 3, 72, 129, 3, 652 4, 4, 129, 4, 134, 147, 147, 45, 134, 45, 653 160, 155, 160, 414, 44, 155, 44, 160, 46, 46, 654 165, 4, 46, 4, 167, 4, 4, 4, 46, 388, 655 656 4, 388, 46, 61, 61, 61, 81, 116, 81, 165, 657 4, 168, 4, 167, 4, 4, 4, 170, 61, 4, 658 11, 11, 159, 396, 159, 81, 11, 159, 81, 166, 659 168, 11, 11, 11, 207, 207, 170, 61, 11, 11, 660 11, 11, 11, 11, 46, 362, 46, 123, 116, 166, 661 169, 116, 116, 60, 60, 60, 116, 11, 11, 11, 662 11, 11, 11, 12, 12, 144, 144, 144, 60, 12, 663 169, 60, 208, 208, 12, 12, 12, 60, 357, 171, 664 144, 12, 12, 12, 12, 12, 12, 60, 123, 356, 665 60, 123, 123, 179, 179, 179, 123, 60, 171, 144, 650 666 651 667 12, 12, 12, 12, 12, 12, 17, 17, 17, 17, 652 668 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 653 17, 17, 17, 17, 17, 4 6, 46, 213, 227, 46,654 220, 213, 46, 46, 220, 46, 148, 148, 223, 46,655 148, 148, 223, 17, 214, 148, 149, 227, 215, 148,656 187, 187, 187, 246, 246, 246, 247, 247, 247, 251,657 251, 251, 332, 17, 17, 17, 18, 18, 18, 18,669 17, 17, 17, 17, 17, 47, 175, 190, 47, 175, 670 190, 47, 47, 355, 47, 180, 180, 180, 47, 348, 671 48, 48, 221, 17, 48, 156, 221, 48, 48, 346, 672 48, 157, 218, 218, 48, 194, 194, 194, 195, 195, 673 195, 222, 345, 17, 17, 17, 18, 18, 18, 18, 658 674 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 659 18, 18, 18, 18, 18, 214, 149, 149, 214, 215,660 1 49, 149, 215, 237, 238, 149, 239, 326, 240, 149,661 662 241, 242, 243, 18, 252, 252, 252, 278, 278, 278,663 324, 323, 237, 238, 322, 321, 239, 240, 320, 241,664 2 42, 243, 319, 18, 18, 18, 19, 19, 19, 19,675 18, 18, 18, 18, 18, 156, 156, 344, 342, 156, 676 156, 157, 157, 228, 156, 157, 157, 228, 156, 240, 677 678 157, 253, 222, 18, 157, 222, 222, 223, 233, 224, 679 222, 224, 233, 229, 224, 236, 341, 340, 240, 236, 680 230, 253, 331, 18, 18, 18, 19, 19, 19, 19, 665 681 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 666 19, 19, 19, 19, 19, 2 26, 226, 271, 272, 273,667 274, 275, 276, 280, 280, 280, 293, 295, 296, 297,668 2 26, 298, 312, 19, 311, 310, 271, 272, 273, 274,669 275, 276, 299, 299, 299, 293, 295, 296, 297, 226,670 2 98, 312, 308, 19, 19, 19, 20, 20, 20, 20,682 19, 19, 19, 19, 19, 239, 239, 330, 223, 251, 683 328, 223, 223, 252, 229, 254, 223, 229, 229, 255, 684 239, 230, 229, 19, 230, 230, 246, 327, 251, 230, 685 326, 402, 252, 402, 254, 260, 260, 260, 255, 239, 686 261, 261, 261, 19, 19, 19, 20, 20, 20, 20, 671 687 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 672 688 673 20, 20, 20, 20, 20, 314, 315, 316, 317, 317, 674 317, 327, 328, 329, 331, 331, 331, 336, 337, 340, 675 341, 342, 307, 20, 314, 315, 316, 364, 306, 364, 676 327, 328, 329, 378, 305, 378, 336, 337, 340, 341, 677 342, 304, 303, 20, 20, 20, 86, 302, 301, 292, 678 291, 289, 288, 287, 86, 86, 86, 286, 285, 284, 679 283, 282, 270, 269, 268, 267, 266, 265, 264, 263, 680 262, 261, 260, 259, 254, 236, 235, 234, 233, 231, 681 86, 86, 230, 228, 224, 86, 217, 205, 203, 202, 682 86, 196, 185, 86, 170, 86, 164, 86, 86, 90, 683 684 155, 154, 153, 150, 131, 128, 125, 90, 90, 90, 685 116, 104, 92, 80, 72, 67, 65, 63, 62, 61, 686 55, 53, 51, 49, 41, 40, 39, 34, 33, 0, 687 0, 0, 0, 90, 90, 0, 0, 0, 90, 0, 688 0, 0, 0, 90, 0, 0, 90, 0, 90, 0, 689 90, 90, 140, 140, 140, 0, 0, 0, 0, 140, 690 140, 140, 140, 140, 140, 0, 0, 0, 0, 0, 691 0, 0, 0, 0, 0, 0, 0, 0, 140, 140, 692 140, 140, 140, 140, 346, 346, 346, 346, 346, 346, 693 346, 346, 346, 346, 346, 346, 346, 346, 347, 347, 694 695 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 696 347, 347, 348, 348, 348, 348, 348, 348, 348, 348, 697 348, 348, 348, 348, 348, 348, 349, 349, 349, 349, 698 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 699 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 700 350, 350, 350, 350, 351, 351, 351, 351, 351, 351, 701 351, 351, 351, 351, 351, 351, 351, 351, 352, 352, 702 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 703 352, 352, 353, 353, 353, 353, 353, 353, 353, 353, 704 353, 353, 353, 353, 353, 353, 354, 354, 354, 354, 705 706 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 707 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 708 355, 355, 355, 355, 356, 356, 356, 356, 356, 356, 709 356, 356, 356, 356, 356, 356, 356, 356, 357, 357, 710 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 711 357, 357, 358, 358, 358, 358, 358, 358, 358, 358, 712 358, 358, 358, 358, 358, 358, 359, 359, 359, 359, 713 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 714 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 715 360, 360, 360, 360, 361, 361, 361, 361, 361, 361, 716 717 361, 361, 361, 361, 361, 361, 361, 361, 362, 362, 718 362, 362, 362, 362, 362, 362, 362, 362, 362, 362, 719 362, 362, 363, 363, 363, 363, 363, 363, 363, 363, 720 363, 363, 363, 363, 363, 363, 365, 365, 0, 365, 721 365, 365, 365, 365, 365, 365, 365, 365, 365, 365, 722 366, 0, 0, 0, 366, 366, 366, 366, 366, 366, 723 366, 366, 366, 366, 367, 367, 0, 367, 367, 367, 724 367, 367, 367, 367, 367, 367, 367, 367, 368, 368, 725 0, 0, 368, 368, 368, 368, 368, 368, 368, 368, 726 0, 368, 369, 369, 369, 369, 369, 369, 369, 369, 727 728 369, 369, 369, 369, 369, 369, 370, 370, 0, 0, 729 370, 370, 370, 370, 370, 370, 370, 370, 0, 370, 730 371, 371, 371, 371, 371, 371, 371, 371, 371, 371, 731 371, 371, 371, 371, 373, 373, 0, 373, 373, 373, 732 373, 0, 373, 373, 373, 373, 373, 373, 374, 374, 733 0, 374, 374, 374, 374, 374, 374, 374, 374, 374, 734 374, 374, 375, 375, 0, 375, 375, 375, 375, 375, 735 375, 375, 0, 375, 375, 375, 376, 376, 0, 376, 736 376, 376, 376, 376, 376, 376, 0, 376, 376, 376, 737 377, 0, 0, 0, 377, 0, 377, 379, 379, 0, 738 739 379, 379, 379, 379, 379, 379, 379, 379, 379, 379, 740 379, 380, 380, 0, 380, 380, 380, 380, 380, 0, 741 380, 380, 380, 0, 380, 381, 381, 381, 381, 381, 742 381, 381, 381, 381, 381, 381, 381, 381, 381, 382, 743 382, 0, 382, 382, 382, 382, 382, 382, 382, 382, 744 382, 382, 382, 383, 383, 0, 383, 0, 383, 383, 745 383, 0, 383, 383, 383, 383, 384, 384, 0, 384, 746 384, 384, 384, 384, 384, 384, 384, 384, 384, 384, 747 385, 385, 0, 385, 0, 0, 0, 385, 0, 385, 748 385, 385, 385, 385, 386, 386, 0, 386, 386, 386, 749 750 386, 386, 386, 386, 386, 386, 386, 386, 387, 387, 751 0, 387, 387, 387, 387, 387, 387, 387, 387, 387, 752 387, 387, 390, 390, 0, 390, 390, 390, 390, 390, 753 0, 390, 390, 390, 0, 390, 394, 394, 0, 394, 754 394, 394, 394, 394, 394, 394, 394, 394, 394, 394, 755 396, 396, 0, 396, 396, 396, 396, 396, 396, 396, 756 396, 396, 396, 396, 345, 345, 345, 345, 345, 345, 757 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 758 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 759 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 760 761 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 762 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 763 345, 345, 345, 345, 345 689 20, 20, 20, 20, 20, 256, 246, 257, 265, 265, 690 265, 287, 288, 246, 266, 266, 266, 289, 290, 291, 691 292, 311, 313, 20, 256, 324, 257, 294, 294, 294, 692 287, 288, 296, 296, 296, 323, 289, 290, 291, 292, 693 311, 313, 314, 20, 20, 20, 88, 315, 316, 317, 694 317, 317, 332, 334, 88, 88, 88, 335, 336, 349, 695 350, 314, 337, 337, 337, 351, 315, 316, 353, 353, 696 353, 332, 334, 359, 322, 360, 335, 336, 349, 350, 697 88, 88, 363, 364, 351, 88, 365, 321, 320, 319, 698 88, 310, 359, 88, 360, 88, 309, 88, 88, 92, 699 700 307, 363, 364, 306, 305, 365, 304, 92, 92, 92, 701 303, 302, 301, 300, 299, 298, 286, 285, 284, 283, 702 282, 281, 280, 279, 278, 277, 276, 275, 274, 271, 703 268, 250, 249, 92, 92, 248, 247, 245, 92, 244, 704 243, 241, 237, 92, 213, 211, 92, 210, 92, 204, 705 92, 92, 148, 148, 148, 193, 178, 172, 163, 148, 706 148, 148, 148, 148, 148, 162, 161, 158, 139, 136, 707 133, 125, 118, 106, 94, 82, 74, 69, 148, 148, 708 148, 148, 148, 148, 369, 369, 369, 369, 369, 369, 709 369, 369, 369, 369, 369, 369, 369, 369, 370, 370, 710 711 370, 370, 370, 370, 370, 370, 370, 370, 370, 370, 712 370, 370, 371, 371, 371, 371, 371, 371, 371, 371, 713 371, 371, 371, 371, 371, 371, 372, 372, 372, 372, 714 372, 372, 372, 372, 372, 372, 372, 372, 372, 372, 715 373, 373, 373, 373, 373, 373, 373, 373, 373, 373, 716 373, 373, 373, 373, 374, 374, 374, 374, 374, 374, 717 374, 374, 374, 374, 374, 374, 374, 374, 375, 375, 718 375, 375, 375, 375, 375, 375, 375, 375, 375, 375, 719 375, 375, 376, 376, 376, 376, 376, 376, 376, 376, 720 376, 376, 376, 376, 376, 376, 377, 377, 377, 377, 721 722 377, 377, 377, 377, 377, 377, 377, 377, 377, 377, 723 378, 378, 378, 378, 378, 378, 378, 378, 378, 378, 724 378, 378, 378, 378, 379, 379, 379, 379, 379, 379, 725 379, 379, 379, 379, 379, 379, 379, 379, 380, 380, 726 380, 380, 380, 380, 380, 380, 380, 380, 380, 380, 727 380, 380, 381, 381, 381, 381, 381, 381, 381, 381, 728 381, 381, 381, 381, 381, 381, 382, 382, 382, 382, 729 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 730 383, 383, 383, 383, 383, 383, 383, 383, 383, 383, 731 383, 383, 383, 383, 384, 384, 384, 384, 384, 384, 732 733 384, 384, 384, 384, 384, 384, 384, 384, 385, 385, 734 385, 385, 385, 385, 385, 385, 385, 385, 385, 385, 735 385, 385, 386, 386, 386, 386, 386, 386, 386, 386, 736 386, 386, 386, 386, 386, 386, 387, 387, 387, 387, 737 387, 387, 387, 387, 387, 387, 387, 387, 387, 387, 738 389, 389, 67, 389, 389, 389, 389, 389, 389, 389, 739 389, 389, 389, 389, 390, 65, 64, 63, 390, 390, 740 390, 390, 390, 390, 390, 390, 390, 390, 391, 391, 741 57, 391, 391, 391, 391, 391, 391, 391, 391, 391, 742 391, 391, 392, 392, 55, 53, 392, 392, 392, 392, 743 744 392, 392, 392, 392, 51, 392, 393, 393, 393, 393, 745 393, 393, 393, 393, 393, 393, 393, 393, 393, 393, 746 394, 394, 41, 40, 394, 394, 394, 394, 394, 394, 747 394, 394, 39, 394, 395, 395, 395, 395, 395, 395, 748 395, 395, 395, 395, 395, 395, 395, 395, 397, 397, 749 34, 397, 397, 397, 397, 33, 397, 397, 397, 397, 750 397, 397, 398, 398, 0, 398, 398, 398, 398, 398, 751 398, 398, 398, 398, 398, 398, 399, 399, 0, 399, 752 399, 399, 399, 399, 399, 399, 0, 399, 399, 399, 753 400, 400, 0, 400, 400, 400, 400, 400, 400, 400, 754 755 0, 400, 400, 400, 401, 0, 0, 0, 401, 0, 756 401, 403, 403, 0, 403, 403, 403, 403, 403, 403, 757 403, 403, 403, 403, 403, 404, 404, 0, 404, 404, 758 404, 404, 404, 0, 404, 404, 404, 0, 404, 405, 759 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 760 405, 405, 405, 406, 406, 0, 406, 406, 406, 406, 761 406, 406, 406, 406, 406, 406, 406, 407, 407, 0, 762 407, 0, 407, 407, 407, 0, 407, 407, 407, 407, 763 408, 408, 0, 408, 408, 408, 408, 408, 408, 408, 764 408, 408, 408, 408, 409, 409, 0, 409, 0, 409, 765 766 409, 409, 0, 409, 409, 409, 409, 410, 410, 0, 767 410, 410, 410, 410, 410, 410, 410, 410, 410, 410, 768 410, 411, 411, 0, 411, 0, 0, 0, 411, 0, 769 411, 411, 411, 411, 411, 412, 412, 0, 412, 412, 770 412, 412, 412, 412, 412, 412, 412, 412, 412, 413, 771 413, 0, 413, 413, 413, 413, 413, 413, 413, 413, 772 413, 413, 413, 416, 416, 0, 416, 416, 416, 416, 773 416, 0, 416, 416, 416, 0, 416, 420, 420, 0, 774 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 775 420, 422, 422, 0, 422, 422, 422, 422, 422, 422, 776 777 422, 422, 422, 422, 422, 423, 423, 0, 423, 423, 778 423, 423, 423, 423, 423, 423, 423, 423, 423, 424, 779 424, 0, 424, 424, 424, 424, 424, 424, 424, 424, 780 424, 424, 424, 368, 368, 368, 368, 368, 368, 368, 781 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 782 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 783 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 784 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 785 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 786 368, 368, 368, 368 787 764 788 } ; 765 789 … … 872 896 873 897 /* Set when stripping c-junk */ 874 #define pp_strips 21 875 876 #define pp_stripp 22 877 878 #define pp_stripp_final 23 898 #define pp_stripe 21 899 900 #define pp_strips 22 901 902 #define pp_stripp 23 903 904 #define pp_stripp_final 24 879 905 880 906 /*%option stack*/ … … 882 908 /*%option noyywrap */ 883 909 /* Some shortcut definitions */ 884 #line 9 0"parser.l"910 #line 91 "parser.l" 885 911 886 912 #if !defined(YY_FLEX_MAJOR_VERSION) || (1000 * YY_FLEX_MAJOR_VERSION + YY_FLEX_MINOR_VERSION < 2005) … … 930 956 static int want_nl = 0; /* Set when newline needs to go to parser */ 931 957 static int want_ident = 0; /* Set is #ifdef, #ifndef or defined is seen */ 932 static int stripslevel = 0; /* Count {} during pp_strips mode */958 static int stripslevel = 0; /* Count {} during pp_strips/pp_stripe mode */ 933 959 static int stripplevel = 0; /* Count () during pp_strips mode */ 934 960 static char *substtext = NULL; /* Holds the substition text while getting a define */ … … 1201 1227 } 1202 1228 1203 #line 12 04"lexyy.c"1229 #line 1230 "lexyy.c" 1204 1230 1205 1231 /* Macros after this point can all be overridden by user definitions in … … 1351 1377 register int yy_act; 1352 1378 1353 #line 41 0"parser.l"1379 #line 411 "parser.l" 1354 1380 1355 1381 /* #include handling */ 1356 #line 13 57"lexyy.c"1382 #line 1383 "lexyy.c" 1357 1383 1358 1384 if ( yy_init ) … … 1406 1432 { 1407 1433 yy_current_state = (int) yy_def[yy_current_state]; 1408 if ( yy_current_state >= 3 46)1434 if ( yy_current_state >= 369 ) 1409 1435 yy_c = yy_meta[(unsigned int) yy_c]; 1410 1436 } … … 1412 1438 ++yy_cp; 1413 1439 } 1414 while ( yy_base[yy_current_state] != 1 265);1440 while ( yy_base[yy_current_state] != 1334 ); 1415 1441 1416 1442 yy_find_action: … … 1440 1466 case 1: 1441 1467 YY_RULE_SETUP 1442 #line 41 2"parser.l"1468 #line 413 "parser.l" 1443 1469 push_to(pp_incl); 1444 1470 YY_BREAK 1445 1471 case 2: 1446 YY_RULE_SETUP1447 #line 413 "parser.l"1448 do_include(yytext, yyleng); pop_start();1449 YY_BREAK1450 case 3:1451 1472 YY_RULE_SETUP 1452 1473 #line 414 "parser.l" 1453 1474 do_include(yytext, yyleng); pop_start(); 1454 1475 YY_BREAK 1476 case 3: 1477 YY_RULE_SETUP 1478 #line 415 "parser.l" 1479 do_include(yytext, yyleng); pop_start(); 1480 YY_BREAK 1455 1481 case 4: 1456 1482 YY_RULE_SETUP 1457 #line 41 5"parser.l"1483 #line 416 "parser.l" 1458 1484 yyerror("Malformed #include"); 1459 1485 YY_BREAK … … 1461 1487 case 5: 1462 1488 YY_RULE_SETUP 1463 #line 41 8"parser.l"1489 #line 419 "parser.l" 1464 1490 push_to(pp_def); 1465 1491 YY_BREAK 1466 1492 case 6: 1467 1493 YY_RULE_SETUP 1468 #line 4 19"parser.l"1494 #line 420 "parser.l" 1469 1495 { 1470 1496 set_define(yytext); … … 1474 1500 case 7: 1475 1501 YY_RULE_SETUP 1476 #line 42 3"parser.l"1502 #line 424 "parser.l" 1477 1503 push_to(pp_ignore); /* Ignore function-like defines for now*/ 1478 1504 YY_BREAK 1479 1505 case 8: 1480 1506 YY_RULE_SETUP 1481 #line 42 4"parser.l"1507 #line 425 "parser.l" 1482 1508 yyerror("Malformed #define"); 1483 1509 YY_BREAK 1484 1510 case 9: 1485 1511 YY_RULE_SETUP 1486 #line 42 6"parser.l"1512 #line 427 "parser.l" 1487 1513 { 1488 1514 if(YY_START == pp_def_s) … … 1492 1518 case 10: 1493 1519 YY_RULE_SETUP 1494 #line 43 0"parser.l"1520 #line 431 "parser.l" 1495 1521 { /* Comment is handled in normal handling */ 1496 1522 if(YY_START == pp_def_s) … … 1500 1526 case 11: 1501 1527 YY_RULE_SETUP 1502 #line 43 4"parser.l"1528 #line 435 "parser.l" 1503 1529 line_number++; char_number = 1; /* Line continuation */ 1504 1530 YY_BREAK 1505 1531 case 12: 1506 1532 YY_RULE_SETUP 1507 #line 43 5"parser.l"1533 #line 436 "parser.l" 1508 1534 { 1509 1535 if(YY_START == pp_def_s) … … 1522 1548 case 13: 1523 1549 YY_RULE_SETUP 1524 #line 4 49"parser.l"1550 #line 450 "parser.l" 1525 1551 push_to(pp_undef); 1526 1552 YY_BREAK 1527 1553 case 14: 1528 1554 YY_RULE_SETUP 1529 #line 45 0"parser.l"1555 #line 451 "parser.l" 1530 1556 { 1531 1557 del_define(yytext); … … 1537 1563 case 15: 1538 1564 YY_RULE_SETUP 1539 #line 45 7"parser.l"1565 #line 458 "parser.l" 1540 1566 { 1541 1567 if(YY_START == pp_false) … … 1556 1582 case 16: 1557 1583 YY_RULE_SETUP 1558 #line 47 2"parser.l"1584 #line 473 "parser.l" 1559 1585 { 1560 1586 if(YY_START == pp_false) … … 1576 1602 case 17: 1577 1603 YY_RULE_SETUP 1578 #line 48 8"parser.l"1604 #line 489 "parser.l" 1579 1605 { 1580 1606 if(YY_START == pp_false) … … 1596 1622 case 18: 1597 1623 YY_RULE_SETUP 1598 #line 50 4"parser.l"1624 #line 505 "parser.l" 1599 1625 { 1600 1626 if(!isnevertrue_if()) … … 1612 1638 case 19: 1613 1639 YY_RULE_SETUP 1614 #line 51 6"parser.l"1640 #line 517 "parser.l" 1615 1641 { 1616 1642 if(!isnevertrue_if()) … … 1626 1652 case 20: 1627 1653 YY_RULE_SETUP 1628 #line 52 6"parser.l"1654 #line 527 "parser.l" 1629 1655 { 1630 1656 if(!isnevertrue_if()) … … 1644 1670 case 21: 1645 1671 YY_RULE_SETUP 1646 #line 54 1"parser.l"1672 #line 542 "parser.l" 1647 1673 push_to(pp_error); 1648 1674 YY_BREAK 1649 1675 case 22: 1650 1676 YY_RULE_SETUP 1651 #line 54 2"parser.l"1677 #line 543 "parser.l" 1652 1678 yyerror("Error directive: %s", yytext); 1653 1679 YY_BREAK 1680 case 23: 1681 YY_RULE_SETUP 1682 #line 544 "parser.l" 1683 { 1684 if(yydebug) 1685 printf("(%d)#error ignored\n", line_number); 1686 } 1687 YY_BREAK 1654 1688 /* preprocessor junk */ 1655 case 2 3:1656 YY_RULE_SETUP 1657 #line 5 45"parser.l"1689 case 24: 1690 YY_RULE_SETUP 1691 #line 550 "parser.l" 1658 1692 ; /* Ignore #pragma */ 1659 1693 YY_BREAK 1660 case 24: 1661 YY_RULE_SETUP 1662 #line 546 "parser.l" 1694 case 25: 1695 YY_RULE_SETUP 1696 #line 551 "parser.l" 1697 ; /* Ignore #ident */ 1698 YY_BREAK 1699 case 26: 1700 YY_RULE_SETUP 1701 #line 552 "parser.l" 1663 1702 ; /* Ignore #line */ 1664 1703 YY_BREAK … … 1668 1707 */ 1669 1708 /*^{ws}*#{ws}* ; Ignore # */ 1670 case 2 5:1671 YY_RULE_SETUP 1672 #line 55 3"parser.l"1709 case 27: 1710 YY_RULE_SETUP 1711 #line 559 "parser.l" 1673 1712 stripslevel++; 1674 1713 YY_BREAK 1675 case 2 6:1676 YY_RULE_SETUP 1677 #line 5 54"parser.l"1714 case 28: 1715 YY_RULE_SETUP 1716 #line 560 "parser.l" 1678 1717 stripslevel--; 1679 1718 YY_BREAK 1680 case 2 7:1681 YY_RULE_SETUP 1682 #line 5 55"parser.l"1719 case 29: 1720 YY_RULE_SETUP 1721 #line 561 "parser.l" 1683 1722 if(!stripslevel) pop_start(); 1684 1723 YY_BREAK 1685 case 28:1686 YY_RULE_SETUP 1687 #line 5 56"parser.l"1724 case 30: 1725 YY_RULE_SETUP 1726 #line 562 "parser.l" 1688 1727 ; /* To catch comments */ 1689 1728 YY_BREAK 1690 case 29:1691 YY_RULE_SETUP 1692 #line 5 57"parser.l"1729 case 31: 1730 YY_RULE_SETUP 1731 #line 563 "parser.l" 1693 1732 ; /* Ignore rest */ 1694 1733 YY_BREAK 1695 case 30: 1696 YY_RULE_SETUP 1697 #line 559 "parser.l" 1734 case 32: 1735 YY_RULE_SETUP 1736 #line 565 "parser.l" 1737 stripslevel++; 1738 YY_BREAK 1739 case 33: 1740 YY_RULE_SETUP 1741 #line 566 "parser.l" 1742 { 1743 stripslevel--; 1744 if(!stripslevel) pop_start(); 1745 } 1746 YY_BREAK 1747 case 34: 1748 YY_RULE_SETUP 1749 #line 570 "parser.l" 1750 if(!stripslevel) pop_start(); 1751 YY_BREAK 1752 case 35: 1753 YY_RULE_SETUP 1754 #line 571 "parser.l" 1755 ; /* To catch comments */ 1756 YY_BREAK 1757 case 36: 1758 YY_RULE_SETUP 1759 #line 572 "parser.l" 1760 ; /* Ignore rest */ 1761 YY_BREAK 1762 case 37: 1763 YY_RULE_SETUP 1764 #line 574 "parser.l" 1698 1765 stripplevel++; 1699 1766 YY_BREAK 1700 case 3 1:1701 YY_RULE_SETUP 1702 #line 5 60"parser.l"1767 case 38: 1768 YY_RULE_SETUP 1769 #line 575 "parser.l" 1703 1770 { 1704 1771 stripplevel--; … … 1710 1777 } 1711 1778 YY_BREAK 1712 case 3 2:1713 YY_RULE_SETUP 1714 #line 5 68"parser.l"1779 case 39: 1780 YY_RULE_SETUP 1781 #line 583 "parser.l" 1715 1782 ; /* To catch comments */ 1716 1783 YY_BREAK 1717 case 33:1718 YY_RULE_SETUP 1719 #line 5 69"parser.l"1784 case 40: 1785 YY_RULE_SETUP 1786 #line 584 "parser.l" 1720 1787 ; /* Ignore rest */ 1721 1788 YY_BREAK 1722 case 34:1723 YY_RULE_SETUP 1724 #line 5 71"parser.l"1789 case 41: 1790 YY_RULE_SETUP 1791 #line 586 "parser.l" 1725 1792 ; /* Ignore */ 1726 1793 YY_BREAK 1727 case 35:1728 YY_RULE_SETUP 1729 #line 5 72"parser.l"1794 case 42: 1795 YY_RULE_SETUP 1796 #line 587 "parser.l" 1730 1797 pop_start(); /* Kill the semicolon */ 1731 1798 YY_BREAK 1732 case 36:1733 YY_RULE_SETUP 1734 #line 5 73"parser.l"1799 case 43: 1800 YY_RULE_SETUP 1801 #line 588 "parser.l" 1735 1802 line_number++; char_number = 1; pop_start(); 1736 1803 YY_BREAK 1737 case 37:1738 YY_RULE_SETUP 1739 #line 5 74"parser.l"1804 case 44: 1805 YY_RULE_SETUP 1806 #line 589 "parser.l" 1740 1807 yyless(0); pop_start(); 1741 1808 YY_BREAK 1742 case 38:1743 YY_RULE_SETUP 1744 #line 5 76"parser.l"1809 case 45: 1810 YY_RULE_SETUP 1811 #line 591 "parser.l" 1745 1812 ; /* Ignore everything except #xxx during false #if state */ 1746 1813 YY_BREAK 1747 case 39:1748 YY_RULE_SETUP 1749 #line 5 78"parser.l"1814 case 46: 1815 YY_RULE_SETUP 1816 #line 593 "parser.l" 1750 1817 pop_start(); 1751 1818 YY_BREAK 1752 1819 /* These are special cases due to filename scanning */ 1753 case 4 0:1754 YY_RULE_SETUP 1755 #line 5 81"parser.l"1820 case 47: 1821 YY_RULE_SETUP 1822 #line 596 "parser.l" 1756 1823 return DISCARDABLE; 1757 1824 YY_BREAK 1758 case 4 1:1759 YY_RULE_SETUP 1760 #line 5 82"parser.l"1825 case 48: 1826 YY_RULE_SETUP 1827 #line 597 "parser.l" 1761 1828 return tFIXED; 1762 1829 YY_BREAK 1763 case 4 2:1764 YY_RULE_SETUP 1765 #line 5 83"parser.l"1830 case 49: 1831 YY_RULE_SETUP 1832 #line 598 "parser.l" 1766 1833 return IMPURE; 1767 1834 YY_BREAK 1768 case 43:1769 YY_RULE_SETUP 1770 #line 5 84"parser.l"1835 case 50: 1836 YY_RULE_SETUP 1837 #line 599 "parser.l" 1771 1838 return MOVEABLE; 1772 1839 YY_BREAK 1773 case 44:1774 YY_RULE_SETUP 1775 #line 585"parser.l"1840 case 51: 1841 YY_RULE_SETUP 1842 #line 600 "parser.l" 1776 1843 return LOADONCALL; 1777 1844 YY_BREAK 1778 case 45:1779 YY_RULE_SETUP 1780 #line 586"parser.l"1845 case 52: 1846 YY_RULE_SETUP 1847 #line 601 "parser.l" 1781 1848 return PRELOAD; 1782 1849 YY_BREAK 1783 case 46:1784 YY_RULE_SETUP 1785 #line 587"parser.l"1850 case 53: 1851 YY_RULE_SETUP 1852 #line 602 "parser.l" 1786 1853 return tPURE; 1787 1854 YY_BREAK 1788 case 47:1789 YY_RULE_SETUP 1790 #line 589"parser.l"1855 case 54: 1856 YY_RULE_SETUP 1857 #line 604 "parser.l" 1791 1858 return tBEGIN; 1792 1859 YY_BREAK 1793 case 48:1794 YY_RULE_SETUP 1795 #line 590"parser.l"1860 case 55: 1861 YY_RULE_SETUP 1862 #line 605 "parser.l" 1796 1863 return tEND; 1797 1864 YY_BREAK 1798 case 49:1799 YY_RULE_SETUP 1800 #line 592"parser.l"1865 case 56: 1866 YY_RULE_SETUP 1867 #line 607 "parser.l" 1801 1868 { yylval.num = strtoul(yytext, 0, 10); return toupper(yytext[yyleng-1]) == 'L' ? LNUMBER : NUMBER; } 1802 1869 YY_BREAK 1803 case 5 0:1804 YY_RULE_SETUP 1805 #line 593"parser.l"1870 case 57: 1871 YY_RULE_SETUP 1872 #line 608 "parser.l" 1806 1873 { yylval.num = strtoul(yytext, 0, 16); return toupper(yytext[yyleng-1]) == 'L' ? LNUMBER : NUMBER; } 1807 1874 YY_BREAK 1808 case 5 1:1809 YY_RULE_SETUP 1810 #line 594"parser.l"1875 case 58: 1876 YY_RULE_SETUP 1877 #line 609 "parser.l" 1811 1878 { yylval.num = strtoul(yytext+2, 0, 8); return toupper(yytext[yyleng-1]) == 'L' ? LNUMBER : NUMBER; } 1812 1879 YY_BREAK 1813 case 5 2:1814 YY_RULE_SETUP 1815 #line 595"parser.l"1880 case 59: 1881 YY_RULE_SETUP 1882 #line 610 "parser.l" 1816 1883 { 1817 1884 struct keyword *token; … … 1887 1954 } 1888 1955 YY_BREAK 1889 case 53:1890 YY_RULE_SETUP 1891 #line 6 67"parser.l"1956 case 60: 1957 YY_RULE_SETUP 1958 #line 682 "parser.l" 1892 1959 return LOGOR; 1893 1960 YY_BREAK 1894 case 54:1895 YY_RULE_SETUP 1896 #line 6 68"parser.l"1961 case 61: 1962 YY_RULE_SETUP 1963 #line 683 "parser.l" 1897 1964 return LOGAND; 1898 1965 YY_BREAK 1899 case 55:1900 YY_RULE_SETUP 1901 #line 6 69"parser.l"1966 case 62: 1967 YY_RULE_SETUP 1968 #line 684 "parser.l" 1902 1969 return EQ; 1903 1970 YY_BREAK 1904 case 56:1905 YY_RULE_SETUP 1906 #line 6 70"parser.l"1971 case 63: 1972 YY_RULE_SETUP 1973 #line 685 "parser.l" 1907 1974 return NE; 1908 1975 YY_BREAK 1909 case 57:1910 YY_RULE_SETUP 1911 #line 6 71"parser.l"1976 case 64: 1977 YY_RULE_SETUP 1978 #line 686 "parser.l" 1912 1979 return LTE; 1913 1980 YY_BREAK 1914 case 58:1915 YY_RULE_SETUP 1916 #line 6 72"parser.l"1981 case 65: 1982 YY_RULE_SETUP 1983 #line 687 "parser.l" 1917 1984 return GTE; 1918 1985 YY_BREAK 1919 case 59:1920 YY_RULE_SETUP 1921 #line 6 74"parser.l"1986 case 66: 1987 YY_RULE_SETUP 1988 #line 689 "parser.l" 1922 1989 { pop_start(); yylval.str = make_filename(yytext, yyleng); return FILENAME; } 1923 1990 YY_BREAK 1924 case 6 0:1925 YY_RULE_SETUP 1926 #line 6 75"parser.l"1991 case 67: 1992 YY_RULE_SETUP 1993 #line 690 "parser.l" 1927 1994 push_to(yywf_s); 1928 1995 YY_BREAK 1929 case 6 1:1930 YY_RULE_SETUP 1931 #line 6 76"parser.l"1996 case 68: 1997 YY_RULE_SETUP 1998 #line 691 "parser.l" 1932 1999 { pop_start(); pop_start(); yylval.str = make_filename(yytext, yyleng-1); return FILENAME; } 1933 2000 YY_BREAK 1934 case 6 2:1935 YY_RULE_SETUP 1936 #line 6 77"parser.l"2001 case 69: 2002 YY_RULE_SETUP 2003 #line 692 "parser.l" 1937 2004 yyerror("Newline in filename"); 1938 2005 YY_BREAK 1939 case 63:1940 YY_RULE_SETUP 1941 #line 6 79"parser.l"2006 case 70: 2007 YY_RULE_SETUP 2008 #line 694 "parser.l" 1942 2009 { 1943 2010 push_to(yylstr); … … 1947 2014 } 1948 2015 YY_BREAK 1949 case 64:1950 YY_RULE_SETUP 1951 #line 685"parser.l"2016 case 71: 2017 YY_RULE_SETUP 2018 #line 700 "parser.l" 1952 2019 { 1953 2020 pop_start(); … … 1956 2023 } 1957 2024 YY_BREAK 1958 case 65:1959 YY_RULE_SETUP 1960 #line 690"parser.l"2025 case 72: 2026 YY_RULE_SETUP 2027 #line 705 "parser.l" 1961 2028 yyerror("Unterminated string"); 1962 2029 YY_BREAK 1963 case 66:1964 YY_RULE_SETUP 1965 #line 691"parser.l"2030 case 73: 2031 YY_RULE_SETUP 2032 #line 706 "parser.l" 1966 2033 { /* octal escape sequence */ 1967 2034 int result; … … 1972 2039 } 1973 2040 YY_BREAK 1974 case 67:1975 YY_RULE_SETUP 1976 #line 698"parser.l"2041 case 74: 2042 YY_RULE_SETUP 2043 #line 713 "parser.l" 1977 2044 { /* hex escape sequence */ 1978 2045 int result; … … 1981 2048 } 1982 2049 YY_BREAK 1983 case 68:1984 YY_RULE_SETUP 1985 #line 7 03"parser.l"2050 case 75: 2051 YY_RULE_SETUP 2052 #line 718 "parser.l" 1986 2053 yyerror("Bad escape secuence"); 1987 2054 YY_BREAK 1988 case 69:1989 YY_RULE_SETUP 1990 #line 7 04"parser.l"2055 case 76: 2056 YY_RULE_SETUP 2057 #line 719 "parser.l" 1991 2058 addwchar('\a'); 1992 2059 YY_BREAK 1993 case 7 0:1994 YY_RULE_SETUP 1995 #line 7 05"parser.l"2060 case 77: 2061 YY_RULE_SETUP 2062 #line 720 "parser.l" 1996 2063 addwchar('\b'); 1997 2064 YY_BREAK 1998 case 7 1:1999 YY_RULE_SETUP 2000 #line 7 06"parser.l"2065 case 78: 2066 YY_RULE_SETUP 2067 #line 721 "parser.l" 2001 2068 addwchar('\f'); 2002 2069 YY_BREAK 2003 case 7 2:2004 YY_RULE_SETUP 2005 #line 7 07"parser.l"2070 case 79: 2071 YY_RULE_SETUP 2072 #line 722 "parser.l" 2006 2073 addwchar('\n'); 2007 2074 YY_BREAK 2008 case 73:2009 YY_RULE_SETUP 2010 #line 7 08"parser.l"2075 case 80: 2076 YY_RULE_SETUP 2077 #line 723 "parser.l" 2011 2078 addwchar('\r'); 2012 2079 YY_BREAK 2013 case 74:2014 YY_RULE_SETUP 2015 #line 7 09"parser.l"2080 case 81: 2081 YY_RULE_SETUP 2082 #line 724 "parser.l" 2016 2083 addwchar('\t'); 2017 2084 YY_BREAK 2018 case 75:2019 YY_RULE_SETUP 2020 #line 7 10"parser.l"2085 case 82: 2086 YY_RULE_SETUP 2087 #line 725 "parser.l" 2021 2088 addwchar('\v'); 2022 2089 YY_BREAK 2023 case 76:2024 YY_RULE_SETUP 2025 #line 7 11"parser.l"2090 case 83: 2091 YY_RULE_SETUP 2092 #line 726 "parser.l" 2026 2093 addwchar(yytext[1]); 2027 2094 YY_BREAK 2028 case 77:2029 YY_RULE_SETUP 2030 #line 7 12"parser.l"2095 case 84: 2096 YY_RULE_SETUP 2097 #line 727 "parser.l" 2031 2098 addcchar('\"'); /* "bla""bla" -> "bla\"bla" */ 2032 2099 YY_BREAK 2033 case 78:2034 YY_RULE_SETUP 2035 #line 7 13"parser.l"2100 case 85: 2101 YY_RULE_SETUP 2102 #line 728 "parser.l" 2036 2103 addcchar('\"'); /* "bla\""bla" -> "bla\"bla" */ 2037 2104 YY_BREAK 2038 case 79:2039 YY_RULE_SETUP 2040 #line 7 14"parser.l"2105 case 86: 2106 YY_RULE_SETUP 2107 #line 729 "parser.l" 2041 2108 ; /* "bla" "bla" -> "blabla" */ 2042 2109 YY_BREAK 2043 case 8 0:2044 YY_RULE_SETUP 2045 #line 7 15"parser.l"2110 case 87: 2111 YY_RULE_SETUP 2112 #line 730 "parser.l" 2046 2113 { 2047 2114 char *yptr = yytext; … … 2050 2117 } 2051 2118 YY_BREAK 2052 case 8 1:2053 YY_RULE_SETUP 2054 #line 7 21"parser.l"2119 case 88: 2120 YY_RULE_SETUP 2121 #line 736 "parser.l" 2055 2122 { 2056 2123 push_to(yystr); … … 2058 2125 } 2059 2126 YY_BREAK 2060 case 8 2:2061 YY_RULE_SETUP 2062 #line 7 25"parser.l"2127 case 89: 2128 YY_RULE_SETUP 2129 #line 740 "parser.l" 2063 2130 { 2064 2131 pop_start(); … … 2067 2134 } 2068 2135 YY_BREAK 2069 case 83:2070 YY_RULE_SETUP 2071 #line 7 30"parser.l"2136 case 90: 2137 YY_RULE_SETUP 2138 #line 745 "parser.l" 2072 2139 yyerror("Unterminated string"); 2073 2140 YY_BREAK 2074 case 84:2075 YY_RULE_SETUP 2076 #line 7 31"parser.l"2141 case 91: 2142 YY_RULE_SETUP 2143 #line 746 "parser.l" 2077 2144 { /* octal escape sequence */ 2078 2145 int result; … … 2083 2150 } 2084 2151 YY_BREAK 2085 case 85:2086 YY_RULE_SETUP 2087 #line 7 38"parser.l"2152 case 92: 2153 YY_RULE_SETUP 2154 #line 753 "parser.l" 2088 2155 { /* hex escape sequence */ 2089 2156 int result; … … 2092 2159 } 2093 2160 YY_BREAK 2094 case 86:2095 YY_RULE_SETUP 2096 #line 7 43"parser.l"2161 case 93: 2162 YY_RULE_SETUP 2163 #line 758 "parser.l" 2097 2164 yyerror("Bad escape secuence"); 2098 2165 YY_BREAK 2099 case 87:2100 YY_RULE_SETUP 2101 #line 7 44"parser.l"2166 case 94: 2167 YY_RULE_SETUP 2168 #line 759 "parser.l" 2102 2169 addcchar('\a'); 2103 2170 YY_BREAK 2104 case 88:2105 YY_RULE_SETUP 2106 #line 7 45"parser.l"2171 case 95: 2172 YY_RULE_SETUP 2173 #line 760 "parser.l" 2107 2174 addcchar('\b'); 2108 2175 YY_BREAK 2109 case 89:2110 YY_RULE_SETUP 2111 #line 7 46"parser.l"2176 case 96: 2177 YY_RULE_SETUP 2178 #line 761 "parser.l" 2112 2179 addcchar('\f'); 2113 2180 YY_BREAK 2114 case 9 0:2115 YY_RULE_SETUP 2116 #line 7 47"parser.l"2181 case 97: 2182 YY_RULE_SETUP 2183 #line 762 "parser.l" 2117 2184 addcchar('\n'); 2118 2185 YY_BREAK 2119 case 9 1:2120 YY_RULE_SETUP 2121 #line 7 48"parser.l"2186 case 98: 2187 YY_RULE_SETUP 2188 #line 763 "parser.l" 2122 2189 addcchar('\r'); 2123 2190 YY_BREAK 2124 case 9 2:2125 YY_RULE_SETUP 2126 #line 7 49"parser.l"2191 case 99: 2192 YY_RULE_SETUP 2193 #line 764 "parser.l" 2127 2194 addcchar('\t'); 2128 2195 YY_BREAK 2129 case 93:2130 YY_RULE_SETUP 2131 #line 7 50"parser.l"2196 case 100: 2197 YY_RULE_SETUP 2198 #line 765 "parser.l" 2132 2199 addcchar('\v'); 2133 2200 YY_BREAK 2134 case 94:2135 YY_RULE_SETUP 2136 #line 7 51"parser.l"2201 case 101: 2202 YY_RULE_SETUP 2203 #line 766 "parser.l" 2137 2204 addcchar(yytext[1]); 2138 2205 YY_BREAK 2139 case 95:2140 YY_RULE_SETUP 2141 #line 7 52"parser.l"2206 case 102: 2207 YY_RULE_SETUP 2208 #line 767 "parser.l" 2142 2209 { 2143 2210 char *yptr = yytext; … … 2146 2213 } 2147 2214 YY_BREAK 2148 case 96:2149 YY_RULE_SETUP 2150 #line 7 57"parser.l"2215 case 103: 2216 YY_RULE_SETUP 2217 #line 772 "parser.l" 2151 2218 addcchar('\"'); /* "bla""bla" -> "bla\"bla" */ 2152 2219 YY_BREAK 2153 case 97:2154 YY_RULE_SETUP 2155 #line 7 58"parser.l"2220 case 104: 2221 YY_RULE_SETUP 2222 #line 773 "parser.l" 2156 2223 addcchar('\"'); /* "bla\""bla" -> "bla\"bla" */ 2157 2224 YY_BREAK 2158 case 98:2159 YY_RULE_SETUP 2160 #line 7 59"parser.l"2225 case 105: 2226 YY_RULE_SETUP 2227 #line 774 "parser.l" 2161 2228 ; /* "bla" "bla" -> "blabla" */ 2162 2229 YY_BREAK 2163 case 99:2164 YY_RULE_SETUP 2165 #line 7 60"parser.l"2166 yywarning("Matched %c" );2167 YY_BREAK 2168 case 10 0:2169 YY_RULE_SETUP 2170 #line 7 63"parser.l"2230 case 106: 2231 YY_RULE_SETUP 2232 #line 775 "parser.l" 2233 yywarning("Matched %c", *yytext); 2234 YY_BREAK 2235 case 107: 2236 YY_RULE_SETUP 2237 #line 778 "parser.l" 2171 2238 { 2172 2239 push_to(yyrcd); … … 2174 2241 } 2175 2242 YY_BREAK 2176 case 10 1:2177 YY_RULE_SETUP 2178 #line 7 67"parser.l"2243 case 108: 2244 YY_RULE_SETUP 2245 #line 782 "parser.l" 2179 2246 { 2180 2247 pop_start(); … … 2186 2253 } 2187 2254 YY_BREAK 2188 case 10 2:2189 YY_RULE_SETUP 2190 #line 7 75"parser.l"2255 case 109: 2256 YY_RULE_SETUP 2257 #line 790 "parser.l" 2191 2258 { 2192 2259 int result; … … 2195 2262 } 2196 2263 YY_BREAK 2197 case 1 03:2198 YY_RULE_SETUP 2199 #line 7 80"parser.l"2264 case 110: 2265 YY_RULE_SETUP 2266 #line 795 "parser.l" 2200 2267 ; /* Ignore space */ 2201 2268 YY_BREAK 2202 case 1 04:2203 YY_RULE_SETUP 2204 #line 7 81"parser.l"2269 case 111: 2270 YY_RULE_SETUP 2271 #line 796 "parser.l" 2205 2272 line_number++; char_number = 1; 2206 2273 YY_BREAK 2207 case 1 05:2208 YY_RULE_SETUP 2209 #line 7 82"parser.l"2274 case 112: 2275 YY_RULE_SETUP 2276 #line 797 "parser.l" 2210 2277 yyerror("Malformed data-line"); 2211 2278 YY_BREAK 2212 case 1 06:2213 YY_RULE_SETUP 2214 #line 7 84"parser.l"2279 case 113: 2280 YY_RULE_SETUP 2281 #line 799 "parser.l" 2215 2282 push_to(comment); /* Eat comment */ 2216 2283 YY_BREAK 2217 case 1 07:2218 YY_RULE_SETUP 2219 #line 785"parser.l"2284 case 114: 2285 YY_RULE_SETUP 2286 #line 800 "parser.l" 2220 2287 ; 2221 2288 YY_BREAK 2222 case 1 08:2223 YY_RULE_SETUP 2224 #line 786"parser.l"2289 case 115: 2290 YY_RULE_SETUP 2291 #line 801 "parser.l" 2225 2292 ; 2226 2293 YY_BREAK 2227 case 1 09:2228 YY_RULE_SETUP 2229 #line 787"parser.l"2294 case 116: 2295 YY_RULE_SETUP 2296 #line 802 "parser.l" 2230 2297 line_number++; char_number = 1; 2231 2298 YY_BREAK 2232 case 11 0:2233 YY_RULE_SETUP 2234 #line 788"parser.l"2299 case 117: 2300 YY_RULE_SETUP 2301 #line 803 "parser.l" 2235 2302 pop_start(); 2236 2303 YY_BREAK 2237 case 11 1:2238 YY_RULE_SETUP 2239 #line 790"parser.l"2304 case 118: 2305 YY_RULE_SETUP 2306 #line 805 "parser.l" 2240 2307 ; /* Eat comment */ 2241 2308 YY_BREAK 2242 case 11 2:2243 YY_RULE_SETUP 2244 #line 791"parser.l"2309 case 119: 2310 YY_RULE_SETUP 2311 #line 806 "parser.l" 2245 2312 ; /* Eat comment */ 2246 2313 YY_BREAK 2247 case 1 13:2248 YY_RULE_SETUP 2249 #line 793"parser.l"2314 case 120: 2315 YY_RULE_SETUP 2316 #line 808 "parser.l" 2250 2317 { 2251 2318 if(YY_START == yywf) … … 2260 2327 } 2261 2328 YY_BREAK 2262 case 1 14:2263 YY_RULE_SETUP 2264 #line 8 04"parser.l"2329 case 121: 2330 YY_RULE_SETUP 2331 #line 819 "parser.l" 2265 2332 ; /* Eat whitespace */ 2266 2333 YY_BREAK 2267 case 1 15:2268 YY_RULE_SETUP 2269 #line 8 06"parser.l"2334 case 122: 2335 YY_RULE_SETUP 2336 #line 821 "parser.l" 2270 2337 return yytext[0]; 2271 2338 YY_BREAK … … 2291 2358 case YY_STATE_EOF(pp_ignore_eol): 2292 2359 case YY_STATE_EOF(pp_false): 2360 case YY_STATE_EOF(pp_stripe): 2293 2361 case YY_STATE_EOF(pp_strips): 2294 2362 case YY_STATE_EOF(pp_stripp): 2295 2363 case YY_STATE_EOF(pp_stripp_final): 2296 #line 8 07"parser.l"2364 #line 822 "parser.l" 2297 2365 { 2298 2366 YY_BUFFER_STATE b = YY_CURRENT_BUFFER; 2299 2367 if(!pop_buffer()) 2300 2368 { 2301 if(YY_START == pp_strips || YY_START == pp_strip p || YY_START == pp_stripp_final)2369 if(YY_START == pp_strips || YY_START == pp_stripe || YY_START == pp_stripp || YY_START == pp_stripp_final) 2302 2370 yyerror("Unexpected end of file during c-junk scanning (started at %d)", cjunk_tagline); 2303 2371 else … … 2307 2375 } 2308 2376 YY_BREAK 2309 case 1 16:2310 YY_RULE_SETUP 2311 #line 8 19"parser.l"2377 case 123: 2378 YY_RULE_SETUP 2379 #line 834 "parser.l" 2312 2380 { 2313 2381 /* Catch all rule to find any unmatched text */ … … 2317 2385 char_number = 1; 2318 2386 } 2319 yywarning("Unmatched text '%c' (0x%02x) YY_START=%d ",2320 isprint(*yytext) ? *yytext : '.', *yytext, YY_START );2321 } 2322 YY_BREAK 2323 case 1 17:2324 YY_RULE_SETUP 2325 #line 8 30"parser.l"2387 yywarning("Unmatched text '%c' (0x%02x) YY_START=%d stripslevel=%d", 2388 isprint(*yytext) ? *yytext : '.', *yytext, YY_START,stripslevel); 2389 } 2390 YY_BREAK 2391 case 124: 2392 YY_RULE_SETUP 2393 #line 845 "parser.l" 2326 2394 ECHO; 2327 2395 YY_BREAK 2328 #line 23 29"lexyy.c"2396 #line 2397 "lexyy.c" 2329 2397 2330 2398 case YY_END_OF_BUFFER: … … 2614 2682 { 2615 2683 yy_current_state = (int) yy_def[yy_current_state]; 2616 if ( yy_current_state >= 3 46)2684 if ( yy_current_state >= 369 ) 2617 2685 yy_c = yy_meta[(unsigned int) yy_c]; 2618 2686 } … … 2649 2717 { 2650 2718 yy_current_state = (int) yy_def[yy_current_state]; 2651 if ( yy_current_state >= 3 46)2719 if ( yy_current_state >= 369 ) 2652 2720 yy_c = yy_meta[(unsigned int) yy_c]; 2653 2721 } 2654 2722 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; 2655 yy_is_jam = (yy_current_state == 3 45);2723 yy_is_jam = (yy_current_state == 368); 2656 2724 2657 2725 return yy_is_jam ? 0 : yy_current_state; … … 3186 3254 } 3187 3255 #endif 3188 #line 8 30"parser.l"3256 #line 845 "parser.l" 3189 3257 3190 3258 … … 3318 3386 3319 3387 /* Called from the parser to kill c-junk */ 3388 void strip_extern(void) 3389 { 3390 cjunk_tagline = line_number; 3391 push_to(pp_stripe); 3392 } 3393 3320 3394 void strip_til_semicolon(void) 3321 3395 { … … 3331 3405 } 3332 3406 3333 -
trunk/tools/wrc/newstruc.c
r882 r3426 13 13 #include <string.h> 14 14 #include <assert.h> 15 #include <string.h>16 15 17 16 #include "wrc.h" … … 280 279 } 281 280 282 style_pair_t *new_style_pair( int style, intexstyle)281 style_pair_t *new_style_pair(style_t *style, style_t *exstyle) 283 282 { 284 283 style_pair_t *sp = (style_pair_t *)xmalloc(sizeof(style_pair_t)); … … 287 286 return sp; 288 287 } 288 289 style_t *new_style(DWORD or_mask, DWORD and_mask) 290 { 291 style_t *st = (style_t *)xmalloc(sizeof(style_t)); 292 st->or_mask = or_mask; 293 st->and_mask = and_mask; 294 return st; 295 } -
trunk/tools/wrc/newstruc.h
r882 r3426 65 65 stringtable_t *new_stringtable(lvc_t *lvc); 66 66 toolbar_t *new_toolbar(int button_width, int button_Height, toolbar_item_t *items, int nitems); 67 style_pair_t *new_style_pair(int style, int exstyle); 67 style_pair_t *new_style_pair(style_t *style, style_t *exstyle); 68 style_t *new_style(DWORD or_mask, DWORD and_mask); 68 69 69 70 #endif -
trunk/tools/wrc/parser.h
r882 r3426 28 28 void push_to(int start); 29 29 void pop_start(void); 30 void strip_extern(void); 30 31 void strip_til_semicolon(void); 31 32 void strip_til_parenthesis(void); -
trunk/tools/wrc/parser.l
r882 r3426 76 76 %x pp_false 77 77 /* Set when stripping c-junk */ 78 %x pp_stripe 78 79 %x pp_strips 79 80 %x pp_stripp … … 135 136 static int want_nl = 0; /* Set when newline needs to go to parser */ 136 137 static int want_ident = 0; /* Set is #ifdef, #ifndef or defined is seen */ 137 static int stripslevel = 0; /* Count {} during pp_strips mode */138 static int stripslevel = 0; /* Count {} during pp_strips/pp_stripe mode */ 138 139 static int stripplevel = 0; /* Count () during pp_strips mode */ 139 140 static char *substtext = NULL; /* Holds the substition text while getting a define */ … … 455 456 456 457 /* Conditional handling */ 457 <INITIAL,pp_strips,pp_strip p,pp_false>^{ws}*#{ws}*if{ws}* {458 <INITIAL,pp_strips,pp_stripe,pp_stripp,pp_false>^{ws}*#{ws}*if{ws}* { 458 459 if(YY_START == pp_false) 459 460 { … … 470 471 } 471 472 } 472 <INITIAL,pp_strips,pp_strip p,pp_false>^{ws}*#{ws}*ifdef{ws}* {473 <INITIAL,pp_strips,pp_stripe,pp_stripp,pp_false>^{ws}*#{ws}*ifdef{ws}* { 473 474 if(YY_START == pp_false) 474 475 { … … 486 487 } 487 488 } 488 <INITIAL,pp_strips,pp_strip p,pp_false>^{ws}*#{ws}*ifndef{ws}* {489 <INITIAL,pp_strips,pp_stripe,pp_stripp,pp_false>^{ws}*#{ws}*ifndef{ws}* { 489 490 if(YY_START == pp_false) 490 491 { … … 502 503 } 503 504 } 504 <INITIAL,pp_strips,pp_strip p,pp_false>^{ws}*#{ws}*elif{ws}* {505 <INITIAL,pp_strips,pp_stripe,pp_stripp,pp_false>^{ws}*#{ws}*elif{ws}* { 505 506 if(!isnevertrue_if()) 506 507 { … … 514 515 printf("(%d)#elif ignored\n", line_number); 515 516 } 516 <INITIAL,pp_strips,pp_strip p,pp_false>^{ws}*#{ws}*else{ws}* {517 <INITIAL,pp_strips,pp_stripe,pp_stripp,pp_false>^{ws}*#{ws}*else{ws}* { 517 518 if(!isnevertrue_if()) 518 519 { … … 524 525 printf("(%d)#else ignored\n", line_number); 525 526 } 526 <INITIAL,pp_strips,pp_strip p,pp_false>^{ws}*#{ws}*endif{ws}* {527 <INITIAL,pp_strips,pp_stripe,pp_stripp,pp_false>^{ws}*#{ws}*endif{ws}* { 527 528 if(!isnevertrue_if()) 528 529 { … … 539 540 540 541 /* The error directive */ 541 ^{ws}*#{ws}*error{ws}* push_to(pp_error); 542 <pp_error>[^\n]* yyerror("Error directive: %s", yytext); 542 <INITIAL,pp_strips,pp_stripe,pp_stripp>^{ws}*#{ws}*error{ws}* push_to(pp_error); 543 <pp_error>[^\n]* yyerror("Error directive: %s", yytext); 544 <pp_false>^{ws}*#{ws}*error[^\n]* { 545 if(yydebug) 546 printf("(%d)#error ignored\n", line_number); 547 } 543 548 544 549 /* preprocessor junk */ 545 ^{ws}*#{ws}*pragma[^\n]* ; /* Ignore #pragma */ 546 ^{ws}*#{ws}*line[^\n]* ; /* Ignore #line */ 550 <INITIAL,pp_strips,pp_stripe,pp_stripp,pp_false>^{ws}*#{ws}*pragma[^\n]* ; /* Ignore #pragma */ 551 <INITIAL,pp_strips,pp_stripe,pp_stripp,pp_false>^{ws}*#{ws}*ident[^\n]* ; /* Ignore #ident */ 552 <INITIAL,pp_strips,pp_stripe,pp_stripp,pp_false>^{ws}*#{ws}*line[^\n]* ; /* Ignore #line */ 547 553 /* We'll get an error on malformed #xxx statements 548 554 * by not recognising '#' at all. This helps tracking … … 556 562 <pp_strips>\/[^*\n] ; /* To catch comments */ 557 563 <pp_strips>[^\{\};\n#/]* ; /* Ignore rest */ 564 565 <pp_stripe>\{ stripslevel++; 566 <pp_stripe>\} { 567 stripslevel--; 568 if(!stripslevel) pop_start(); 569 } 570 <pp_stripe>; if(!stripslevel) pop_start(); 571 <pp_stripe>\/[^*\n] ; /* To catch comments */ 572 <pp_stripe>[^\{\};\n#/]* ; /* Ignore rest */ 558 573 559 574 <pp_stripp>\( stripplevel++; … … 758 773 <yystr>\\\"\" addcchar('\"'); /* "bla\""bla" -> "bla\"bla" */ 759 774 <yystr>\"{ws}+\" ; /* "bla" "bla" -> "blabla" */ 760 <yystr>. yywarning("Matched %c" );775 <yystr>. yywarning("Matched %c", *yytext); 761 776 762 777 … … 782 797 <yyrcd>. yyerror("Malformed data-line"); 783 798 784 <INITIAL,pp_ignore,pp_def_s,pp_strips,pp_strip p>"/*" push_to(comment); /* Eat comment */799 <INITIAL,pp_ignore,pp_def_s,pp_strips,pp_stripe,pp_stripp>"/*" push_to(comment); /* Eat comment */ 785 800 <comment>[^*\n]* ; 786 801 <comment>"*"+[^*/\n]* ; … … 791 806 <INITIAL,pp_ignore,pp_def_s>"//"[^\n]* ; /* Eat comment */ 792 807 793 <INITIAL,yywf,pp_false,pp_strips,pp_strip p>\n {808 <INITIAL,yywf,pp_false,pp_strips,pp_stripe,pp_stripp>\n { 794 809 if(YY_START == yywf) 795 810 pop_start(); … … 809 824 if(!pop_buffer()) 810 825 { 811 if(YY_START == pp_strips || YY_START == pp_strip p || YY_START == pp_stripp_final)826 if(YY_START == pp_strips || YY_START == pp_stripe || YY_START == pp_stripp || YY_START == pp_stripp_final) 812 827 yyerror("Unexpected end of file during c-junk scanning (started at %d)", cjunk_tagline); 813 828 else … … 824 839 char_number = 1; 825 840 } 826 yywarning("Unmatched text '%c' (0x%02x) YY_START=%d ",827 isprint(*yytext) ? *yytext : '.', *yytext, YY_START );841 yywarning("Unmatched text '%c' (0x%02x) YY_START=%d stripslevel=%d", 842 isprint(*yytext) ? *yytext : '.', *yytext, YY_START,stripslevel); 828 843 } 829 844 … … 959 974 960 975 /* Called from the parser to kill c-junk */ 976 void strip_extern(void) 977 { 978 cjunk_tagline = line_number; 979 push_to(pp_stripe); 980 } 981 961 982 void strip_til_semicolon(void) 962 983 { … … 972 993 } 973 994 974 -
trunk/tools/wrc/parser.y
r882 r3426 3 3 * Copyright Martin von Loewis, 1994 4 4 * Copyright 1998 Bertho A. Stultiens (BS) 5 * 1999 Juergen Schmied (JS) 5 6 * 7 * 6-Nov-1999 JS - see CHANGES 8 * 6 9 * 29-Dec-1998 AdH - Grammar and function extensions. 7 10 * grammar: TOOLBAR resources, Named ICONs in … … 104 107 #include "preproc.h" 105 108 #include "parser.h" 109 #include "windef.h" 110 #include "wingdi.h" 106 111 #include "winuser.h" 107 112 … … 110 115 #endif 111 116 112 DWORD andmask; /* Used to parse 'NOT NUMBER' expressions */113 117 int indialog = 0; /* Signal flex that we're parsing a dialog */ 114 118 int want_rscname = 0; /* Set when a resource's name is required */ … … 158 162 dialogex_t *dialogex_font(font_id_t *f, dialogex_t *dlg); 159 163 dialogex_t *dialogex_caption(string_t *s, dialogex_t *dlg); 160 dialogex_t *dialogex_exstyle( intst, dialogex_t *dlg);161 dialogex_t *dialogex_style( intst, dialogex_t *dlg);164 dialogex_t *dialogex_exstyle(style_t *st, dialogex_t *dlg); 165 dialogex_t *dialogex_style(style_t *st, dialogex_t *dlg); 162 166 name_id_t *convert_ctlclass(name_id_t *cls); 163 control_t *ins_ctrl(int type, int s tyle, control_t *ctrl, control_t *prev);167 control_t *ins_ctrl(int type, int special_style, control_t *ctrl, control_t *prev); 164 168 dialog_t *dialog_version(version_t *v, dialog_t *dlg); 165 169 dialog_t *dialog_characteristics(characts_t *c, dialog_t *dlg); … … 169 173 dialog_t *dialog_font(font_id_t *f, dialog_t *dlg); 170 174 dialog_t *dialog_caption(string_t *s, dialog_t *dlg); 171 dialog_t *dialog_exstyle( intst, dialog_t *dlg);172 dialog_t *dialog_style( intst, dialog_t *dlg);175 dialog_t *dialog_exstyle(style_t * st, dialog_t *dlg); 176 dialog_t *dialog_style(style_t * st, dialog_t *dlg); 173 177 resource_t *build_stt_resources(stringtable_t *stthead); 174 178 stringtable_t *find_stringtable(lvc_t *lvc); … … 218 222 dlginit_t *dginit; 219 223 style_pair_t *styles; 224 style_t *style; 220 225 } 221 226 … … 264 269 %type <dlg> dialog dlg_attributes 265 270 %type <ctl> ctrls gen_ctrl lab_ctrl ctrl_desc iconinfo 266 %type <iptr> optional_stylehelpid271 %type <iptr> helpid 267 272 %type <dlgex> dialogex dlgex_attribs 268 273 %type <ctl> exctrls gen_exctrl lab_exctrl exctrl_desc … … 289 294 %type <chars> opt_characts 290 295 %type <ver> opt_version 291 %type <num> expr xpr dummy296 %type <num> expr xpr 292 297 %type <iptr> e_expr 293 298 %type <iptr> pp_expr pp_constant … … 297 302 %type <styles> optional_style_pair 298 303 %type <num> any_num 304 %type <style> optional_style 305 %type <style> style 299 306 300 307 %% … … 389 396 /* C ignore stuff */ 390 397 cjunk : tTYPEDEF { strip_til_semicolon(); } 391 | tEXTERN { strip_ til_semicolon(); }398 | tEXTERN { strip_extern(); } 392 399 | IDENT IDENT { strip_til_semicolon(); } 393 400 | IDENT '(' { strip_til_parenthesis(); } … … 434 441 */ 435 442 nameid : expr { 443 if($1 > 65535 || $1 < -32768) 444 yyerror("Resource's ID out of range (%d)", $1); 436 445 $$ = new_name_id(); 437 446 $$->type = name_ord; … … 672 681 if(!$$->gotstyle) 673 682 { 674 $$->style = WS_POPUP;683 $$->style->or_mask = WS_POPUP; 675 684 $$->gotstyle = TRUE; 676 685 } 677 686 if($$->title) 678 $$->style |= WS_CAPTION;687 $$->style->or_mask |= WS_CAPTION; 679 688 if($$->font) 680 $$->style |= DS_SETFONT; 689 $$->style->or_mask |= DS_SETFONT; 690 691 $$->style->or_mask &= ~($$->style->and_mask); 692 $$->style->and_mask = 0; 693 681 694 indialog = FALSE; 682 695 if(!$$->lvc.language) … … 687 700 dlg_attributes 688 701 : /* Empty */ { $$=new_dialog(); } 689 | dlg_attributes STYLE expr{ $$=dialog_style($3,$1); }690 | dlg_attributes EXSTYLE expr{ $$=dialog_exstyle($3,$1); }702 | dlg_attributes STYLE style { $$=dialog_style($3,$1); } 703 | dlg_attributes EXSTYLE style { $$=dialog_exstyle($3,$1); } 691 704 | dlg_attributes CAPTION tSTRING { $$=dialog_caption($3,$1); } 692 705 | dlg_attributes opt_font { $$=dialog_font($2,$1); } … … 718 731 | ctrls RTEXT lab_ctrl { $$=ins_ctrl(CT_STATIC, SS_RIGHT, $3, $1); } 719 732 /* special treatment for icons, as the extent is optional */ 720 | ctrls ICON nameid_s ','expr ',' expr ',' expr iconinfo {733 | ctrls ICON nameid_s opt_comma expr ',' expr ',' expr iconinfo { 721 734 $10->title = $3; 722 735 $10->id = $5; … … 728 741 729 742 lab_ctrl 730 : tSTRING ','expr ',' expr ',' expr ',' expr ',' expr optional_style {743 : tSTRING opt_comma expr ',' expr ',' expr ',' expr ',' expr optional_style { 731 744 $$=new_control(); 732 745 $$->title = new_name_id(); … … 740 753 if($12) 741 754 { 742 $$->style = *($12);755 $$->style = $12; 743 756 $$->gotstyle = TRUE; 744 free($12);745 757 } 746 758 } … … 757 769 if($10) 758 770 { 759 $$->style = *($10);771 $$->style = $10; 760 772 $$->gotstyle = TRUE; 761 free($10);762 773 } 763 774 } … … 772 783 $$->height = $4; 773 784 } 774 | ',' expr ',' expr ',' expr{785 | ',' expr ',' expr ',' style { 775 786 $$ = new_control(); 776 787 $$->width = $2; … … 779 790 $$->gotstyle = TRUE; 780 791 } 781 | ',' expr ',' expr ',' expr ',' expr{792 | ',' expr ',' expr ',' style ',' style { 782 793 $$ = new_control(); 783 794 $$->width = $2; … … 790 801 ; 791 802 792 gen_ctrl: nameid_s ',' expr ',' ctlclass ',' expr ',' expr ',' expr ',' expr ',' expr ',' expr{803 gen_ctrl: nameid_s opt_comma expr ',' ctlclass ',' style ',' expr ',' expr ',' expr ',' expr ',' style { 793 804 $$=new_control(); 794 805 $$->title = $1; … … 804 815 $$->gotexstyle = TRUE; 805 816 } 806 | nameid_s ',' expr ',' ctlclass ',' expr',' expr ',' expr ',' expr ',' expr {817 | nameid_s opt_comma expr ',' ctlclass ',' style ',' expr ',' expr ',' expr ',' expr { 807 818 $$=new_control(); 808 819 $$->title = $1; … … 822 833 ; 823 834 835 /* ------------------------------ style flags ------------------------------ */ 824 836 optional_style /* Abbused once to get optional ExStyle */ 825 837 : /* Empty */ { $$ = NULL; } 826 | ',' expr { $$ = new_int($2); }838 | ',' style { $$ = $2; } 827 839 ; 828 840 829 841 optional_style_pair 830 : /* Enpty */ { $$ = NULL; } 831 | ',' expr { $$ = new_style_pair($2, 0); } 832 | ',' expr ',' expr { $$ = new_style_pair($2, $4); } 833 ; 842 : /* Empty */ { $$ = NULL; } 843 | ',' style { $$ = new_style_pair($2, 0); } 844 | ',' style ',' style { $$ = new_style_pair($2, $4); } 845 ; 846 847 style 848 : style '|' style { $$ = new_style($1->or_mask | $3->or_mask, $1->and_mask | $3->and_mask); free($1); free($3);} 849 | '(' style ')' { $$ = $2; } 850 | any_num { $$ = new_style($1, 0); } 851 | NOT any_num { $$ = new_style(0, $2); } 852 ; 834 853 835 854 ctlclass … … 870 889 $11->controls = get_control_head($13); 871 890 $$ = $11; 891 892 assert($$->style != NULL); 872 893 if(!$$->gotstyle) 873 894 { 874 $$->style = WS_POPUP;895 $$->style->or_mask = WS_POPUP; 875 896 $$->gotstyle = TRUE; 876 897 } 877 898 if($$->title) 878 $$->style |= WS_CAPTION;899 $$->style->or_mask |= WS_CAPTION; 879 900 if($$->font) 880 $$->style |= DS_SETFONT; 901 $$->style->or_mask |= DS_SETFONT; 902 903 $$->style->or_mask &= ~($$->style->and_mask); 904 $$->style->and_mask = 0; 905 881 906 indialog = FALSE; 882 907 if(!$$->lvc.language) … … 887 912 dlgex_attribs 888 913 : /* Empty */ { $$=new_dialogex(); } 889 | dlgex_attribs STYLE expr{ $$=dialogex_style($3,$1); }890 | dlgex_attribs EXSTYLE expr{ $$=dialogex_exstyle($3,$1); }914 | dlgex_attribs STYLE style { $$=dialogex_style($3,$1); } 915 | dlgex_attribs EXSTYLE style { $$=dialogex_exstyle($3,$1); } 891 916 | dlgex_attribs CAPTION tSTRING { $$=dialogex_caption($3,$1); } 892 917 | dlgex_attribs opt_font { $$=dialogex_font($2,$1); } … … 919 944 | exctrls RTEXT lab_exctrl { $$=ins_ctrl(CT_STATIC, SS_RIGHT, $3, $1); } 920 945 /* special treatment for icons, as the extent is optional */ 921 | exctrls ICON nameid_s ','expr ',' expr ',' expr iconinfo {946 | exctrls ICON nameid_s opt_comma expr ',' expr ',' expr iconinfo { 922 947 $10->title = $3; 923 948 $10->id = $5; … … 929 954 930 955 gen_exctrl 931 : nameid_s ',' expr ',' ctlclass ',' expr',' expr ',' expr ',' expr ','932 expr ',' e_exprhelpid opt_data {956 : nameid_s opt_comma expr ',' ctlclass ',' style ',' expr ',' expr ',' expr ',' 957 expr ',' style helpid opt_data { 933 958 $$=new_control(); 934 959 $$->title = $1; … … 943 968 if($17) 944 969 { 945 $$->exstyle = *($17);970 $$->exstyle = $17; 946 971 $$->gotexstyle = TRUE; 947 free($17);948 972 } 949 973 if($18) … … 955 979 $$->extra = $19; 956 980 } 957 | nameid_s ',' expr ',' ctlclass ',' expr',' expr ',' expr ',' expr ',' expr opt_data {981 | nameid_s opt_comma expr ',' ctlclass ',' style ',' expr ',' expr ',' expr ',' expr opt_data { 958 982 $$=new_control(); 959 983 $$->title = $1; … … 971 995 972 996 lab_exctrl 973 : tSTRING ','expr ',' expr ',' expr ',' expr ',' expr optional_style_pair opt_data {997 : tSTRING opt_comma expr ',' expr ',' expr ',' expr ',' expr optional_style_pair opt_data { 974 998 $$=new_control(); 975 999 $$->title = new_name_id(); … … 1071 1095 item_definitions 1072 1096 : /* Empty */ {$$ = NULL;} 1073 | item_definitions MENUITEM tSTRING ','expr item_options {1097 | item_definitions MENUITEM tSTRING opt_comma expr item_options { 1074 1098 $$=new_menu_item(); 1075 1099 $$->prev = $1; … … 1306 1330 int i; 1307 1331 assert(tagstt != NULL); 1332 if($2 > 65535 || $2 < -32768) 1333 yyerror("Stringtable entry's ID out of range (%d)", $2); 1308 1334 /* Search for the ID */ 1309 1335 for(i = 0; i < tagstt->nentries; i++) … … 1598 1624 | expr { $$ = new_int($1); } 1599 1625 ; 1600 expr : dummy xpr { $$ = ($2) & andmask; } 1601 ; 1602 1603 dummy : /* Empty */ { $$ = 0; andmask = -1; } 1626 expr : xpr { $$ = ($1); } 1604 1627 ; 1605 1628 … … 1615 1638 | '(' xpr ')' { $$ = $2; } 1616 1639 | any_num { $$ = $1; want_rscname = 0; } 1617 | NOT any_num { $$ = 0; andmask &=~($2); }1640 | NOT any_num { $$ = ~($2); } 1618 1641 ; 1619 1642 … … 1624 1647 %% 1625 1648 /* Dialog specific functions */ 1626 dialog_t *dialog_style(int st, dialog_t *dlg) 1627 { 1628 DWORD s = 0; 1649 dialog_t *dialog_style(style_t * st, dialog_t *dlg) 1650 { 1629 1651 assert(dlg != NULL); 1652 if(dlg->style == NULL) 1653 { 1654 dlg->style = new_style(0,0); 1655 } 1656 1630 1657 if(dlg->gotstyle) 1631 1658 { 1632 1659 yywarning("Style already defined, or-ing together"); 1633 s = dlg->style; 1634 } 1635 dlg->style = st | s; 1660 } 1661 else 1662 { 1663 dlg->style->or_mask = 0; 1664 dlg->style->and_mask = 0; 1665 } 1666 dlg->style->or_mask |= st->or_mask; 1667 dlg->style->and_mask |= st->and_mask; 1636 1668 dlg->gotstyle = TRUE; 1669 free(st); 1637 1670 return dlg; 1638 1671 } 1639 1672 1640 dialog_t *dialog_exstyle(int st, dialog_t *dlg) 1641 { 1642 DWORD s = 0; 1673 dialog_t *dialog_exstyle(style_t *st, dialog_t *dlg) 1674 { 1643 1675 assert(dlg != NULL); 1676 if(dlg->exstyle == NULL) 1677 { 1678 dlg->exstyle = new_style(0,0); 1679 } 1680 1644 1681 if(dlg->gotexstyle) 1645 1682 { 1646 1683 yywarning("ExStyle already defined, or-ing together"); 1647 s = dlg->style; 1648 } 1649 dlg->exstyle = st | s; 1684 } 1685 else 1686 { 1687 dlg->exstyle->or_mask = 0; 1688 dlg->exstyle->and_mask = 0; 1689 } 1690 dlg->exstyle->or_mask |= st->or_mask; 1691 dlg->exstyle->and_mask |= st->and_mask; 1650 1692 dlg->gotexstyle = TRUE; 1693 free(st); 1651 1694 return dlg; 1652 1695 } … … 1716 1759 1717 1760 /* Controls specific functions */ 1718 control_t *ins_ctrl(int type, int style, control_t *ctrl, control_t *prev) 1719 { 1761 control_t *ins_ctrl(int type, int special_style, control_t *ctrl, control_t *prev) 1762 { 1763 /* Hm... this seems to be jammed in at all time... */ 1764 int defaultstyle = WS_CHILD | WS_VISIBLE; 1765 1720 1766 assert(ctrl != NULL); 1721 1767 ctrl->prev = prev; 1768 1722 1769 if(prev) 1723 1770 prev->next = ctrl; 1771 1724 1772 if(type != -1) 1725 1773 { … … 1729 1777 } 1730 1778 1731 /* Hm... this seems to be jammed in at all time... */1732 ctrl->style |= WS_CHILD | WS_VISIBLE;1733 1779 switch(type) 1734 1780 { 1735 1781 case CT_BUTTON: 1736 ctrl->style |= style; 1737 if(style != BS_GROUPBOX && style != BS_RADIOBUTTON) 1738 ctrl->style |= WS_TABSTOP; 1782 if(special_style != BS_GROUPBOX && special_style != BS_RADIOBUTTON) 1783 defaultstyle |= WS_TABSTOP; 1739 1784 break; 1740 1785 case CT_EDIT: 1741 ctrl->style |= WS_TABSTOP | WS_BORDER;1786 defaultstyle |= WS_TABSTOP | WS_BORDER; 1742 1787 break; 1743 1788 case CT_LISTBOX: 1744 ctrl->style |= LBS_NOTIFY | WS_BORDER;1789 defaultstyle |= LBS_NOTIFY | WS_BORDER; 1745 1790 break; 1746 1791 case CT_COMBOBOX: 1747 ctrl->style |= CBS_SIMPLE;1792 defaultstyle |= CBS_SIMPLE; 1748 1793 break; 1749 1794 case CT_STATIC: 1750 ctrl->style |= style; 1751 if(style == SS_CENTER || style == SS_LEFT || style == SS_RIGHT) 1752 ctrl->style |= WS_GROUP; 1795 if(special_style == SS_CENTER || special_style == SS_LEFT || special_style == SS_RIGHT) 1796 defaultstyle |= WS_GROUP; 1753 1797 break; 1754 1798 } … … 1759 1803 { 1760 1804 case CT_EDIT: 1761 ctrl->style |= ES_LEFT;1805 defaultstyle |= ES_LEFT; 1762 1806 break; 1763 1807 case CT_LISTBOX: 1764 ctrl->style |= LBS_NOTIFY;1808 defaultstyle |= LBS_NOTIFY; 1765 1809 break; 1766 1810 case CT_COMBOBOX: 1767 ctrl->style |= CBS_SIMPLE | WS_TABSTOP;1811 defaultstyle |= CBS_SIMPLE | WS_TABSTOP; 1768 1812 break; 1769 1813 case CT_SCROLLBAR: 1770 ctrl->style |= SBS_HORZ;1814 defaultstyle |= SBS_HORZ; 1771 1815 break; 1772 1816 case CT_BUTTON: 1773 switch(s tyle)1817 switch(special_style) 1774 1818 { 1775 1819 case BS_CHECKBOX: … … 1782 1826 case BS_3STATE: 1783 1827 case BS_AUTOCHECKBOX: 1784 ctrl->style |= WS_TABSTOP;1828 defaultstyle |= WS_TABSTOP; 1785 1829 break; 1786 1830 default: 1787 yywarning("Unknown default button control-style 0x%08x", s tyle);1831 yywarning("Unknown default button control-style 0x%08x", special_style); 1788 1832 case BS_RADIOBUTTON: 1789 1833 break; … … 1792 1836 1793 1837 case CT_STATIC: 1794 switch(s tyle)1838 switch(special_style) 1795 1839 { 1796 1840 case SS_LEFT: 1797 1841 case SS_RIGHT: 1798 1842 case SS_CENTER: 1799 ctrl->style |= WS_GROUP;1843 defaultstyle |= WS_GROUP; 1800 1844 break; 1801 1845 case SS_ICON: /* Special case */ 1802 1846 break; 1803 1847 default: 1804 yywarning("Unknown default static control-style 0x%08x", s tyle);1848 yywarning("Unknown default static control-style 0x%08x", special_style); 1805 1849 break; 1806 1850 } … … 1815 1859 1816 1860 /* The SS_ICON flag is always forced in for icon controls */ 1817 if(type == CT_STATIC && style == SS_ICON) 1818 ctrl->style |= SS_ICON; 1819 1861 if(type == CT_STATIC && special_style == SS_ICON) 1862 defaultstyle |= SS_ICON; 1863 1864 if (!ctrl->gotstyle) 1865 ctrl->style = new_style(0,0); 1866 1867 /* combine all styles */ 1868 ctrl->style->or_mask = ctrl->style->or_mask | defaultstyle | special_style; 1820 1869 ctrl->gotstyle = TRUE; 1821 1870 byebye: 1871 /* combine with NOT mask */ 1872 if (ctrl->gotstyle) 1873 { 1874 ctrl->style->or_mask &= ~(ctrl->style->and_mask); 1875 ctrl->style->and_mask = 0; 1876 } 1877 if (ctrl->gotexstyle) 1878 { 1879 ctrl->exstyle->or_mask &= ~(ctrl->exstyle->and_mask); 1880 ctrl->exstyle->and_mask = 0; 1881 } 1822 1882 return ctrl; 1823 1883 } … … 1861 1921 1862 1922 /* DialogEx specific functions */ 1863 dialogex_t *dialogex_style(int st, dialogex_t *dlg) 1864 { 1865 DWORD s = 0; 1923 dialogex_t *dialogex_style(style_t * st, dialogex_t *dlg) 1924 { 1866 1925 assert(dlg != NULL); 1926 if(dlg->style == NULL) 1927 { 1928 dlg->style = new_style(0,0); 1929 } 1930 1867 1931 if(dlg->gotstyle) 1868 1932 { 1869 1933 yywarning("Style already defined, or-ing together"); 1870 s = dlg->style; 1871 } 1872 dlg->style = st | s; 1934 } 1935 else 1936 { 1937 dlg->style->or_mask = 0; 1938 dlg->style->and_mask = 0; 1939 } 1940 dlg->style->or_mask |= st->or_mask; 1941 dlg->style->and_mask |= st->and_mask; 1873 1942 dlg->gotstyle = TRUE; 1943 free(st); 1874 1944 return dlg; 1875 1945 } 1876 1946 1877 dialogex_t *dialogex_exstyle(int st, dialogex_t *dlg) 1878 { 1879 DWORD s = 0; 1947 dialogex_t *dialogex_exstyle(style_t * st, dialogex_t *dlg) 1948 { 1880 1949 assert(dlg != NULL); 1950 if(dlg->exstyle == NULL) 1951 { 1952 dlg->exstyle = new_style(0,0); 1953 } 1954 1881 1955 if(dlg->gotexstyle) 1882 1956 { 1883 1957 yywarning("ExStyle already defined, or-ing together"); 1884 s = dlg->exstyle; 1885 } 1886 dlg->exstyle = st | s; 1958 } 1959 else 1960 { 1961 dlg->exstyle->or_mask = 0; 1962 dlg->exstyle->and_mask = 0; 1963 } 1964 dlg->exstyle->or_mask |= st->or_mask; 1965 dlg->exstyle->and_mask |= st->and_mask; 1887 1966 dlg->gotexstyle = TRUE; 1967 free(st); 1888 1968 return dlg; 1889 1969 } -
trunk/tools/wrc/preproc.c
r904 r3426 16 16 17 17 18 extern void set_pp_ignore(int); 18 extern void set_pp_ignore(int); /* From parser.l */ 19 19 20 20 static char *current_define; 21 21 22 #define HASHKEY 22 #define HASHKEY 2039 23 23 static struct pp_entry *pp_defines[HASHKEY]; 24 24 25 #define MAXIFSTACK 25 #define MAXIFSTACK 64 26 26 static struct if_state ifstack[MAXIFSTACK]; 27 27 static int ifstackidx = 0; … … 30 30 void pp_status(void) 31 31 { 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 32 int i; 33 int sum; 34 int total = 0; 35 struct pp_entry *ppp; 36 37 printf("Defines statistics:\n"); 38 for(i = 0; i < HASHKEY; i++) 39 { 40 sum = 0; 41 for(ppp = pp_defines[i]; ppp; ppp = ppp->next) 42 sum++; 43 total += sum; 44 printf("%4d, %3d\n", i, sum); 45 } 46 printf("Total defines: %d\n", total); 47 47 } 48 48 #pragma exit pp_status … … 52 52 int pp_hash(char *str) 53 53 { 54 55 56 57 54 int sum = 0; 55 while(*str) 56 sum += *str++; 57 return sum % HASHKEY; 58 58 } 59 59 60 60 struct pp_entry *pp_lookup(char *ident) 61 61 { 62 63 64 65 66 67 68 69 62 int index = pp_hash(ident); 63 struct pp_entry *ppp; 64 for(ppp = pp_defines[index]; ppp; ppp = ppp->next) 65 { 66 if(!strcmp(ident, ppp->ident)) 67 return ppp; 68 } 69 return NULL; 70 70 } 71 71 72 72 void set_define(char *name) 73 73 { 74 74 current_define = xstrdup(name); 75 75 } 76 76 77 77 void del_define(char *name) 78 78 { 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 79 int index; 80 struct pp_entry *ppp; 81 82 if((ppp = pp_lookup(name)) == NULL) 83 { 84 if(pedantic) 85 yywarning("%s was not defined", name); 86 return; 87 } 88 89 index = pp_hash(name); 90 if(pp_defines[index] == ppp) 91 { 92 pp_defines[index] = ppp->next; 93 if(pp_defines[index]) 94 pp_defines[index]->prev = NULL; 95 } 96 else 97 { 98 ppp->prev->next = ppp->next; 99 if(ppp->next) 100 ppp->next->prev = ppp->prev; 101 } 102 free(ppp); 103 103 } 104 104 105 105 void add_define(char *text) 106 106 { 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 107 int len; 108 char *cptr; 109 int index = pp_hash(current_define); 110 struct pp_entry *ppp; 111 if(pp_lookup(current_define) != NULL) 112 { 113 if(pedantic) 114 yywarning("Redefinition of %s", current_define); 115 del_define(current_define); 116 } 117 ppp = (struct pp_entry *)xmalloc(sizeof(struct pp_entry)); 118 ppp->ident = current_define; 119 ppp->subst = xstrdup(text); 120 ppp->next = pp_defines[index]; 121 pp_defines[index] = ppp; 122 if(ppp->next) 123 ppp->next->prev = ppp; 124 /* Strip trailing white space from subst text */ 125 len = strlen(ppp->subst); 126 while(len && strchr(" \t\r\n", ppp->subst[len-1])) 127 { 128 ppp->subst[--len] = '\0'; 129 } 130 /* Strip leading white space from subst text */ 131 for(cptr = ppp->subst; *cptr && strchr(" \t\r", *cptr); cptr++) 132 ; 133 if(ppp->subst != cptr) 134 memmove(ppp->subst, cptr, strlen(cptr)+1); 135 if(yydebug) 136 printf("Added (%s, %d) <%s> to <%s>\n", input_name, line_number, ppp->ident, ppp->subst); 137 137 } 138 138 139 139 void add_cmdline_define(char *set) 140 140 { 141 char *cpy = xstrdup(set);/* Because gcc passes a R/O string */142 143 144 145 146 147 148 } 149 150 #if defined(_Windows) || defined(__MSDOS__) || defined(__WIN32OS2__)151 #define INCLUDESEPARATOR 141 char *cpy = xstrdup(set); /* Because gcc passes a R/O string */ 142 char *cptr = strchr(cpy, '='); 143 if(cptr) 144 *cptr = '\0'; 145 set_define(cpy); 146 add_define(cptr ? cptr+1 : ""); 147 free(cpy); 148 } 149 150 #if defined(_Windows) || defined(__MSDOS__) 151 #define INCLUDESEPARATOR ";" 152 152 #else 153 #define INCLUDESEPARATOR 153 #define INCLUDESEPARATOR ":" 154 154 #endif 155 155 … … 159 159 void add_include_path(char *path) 160 160 { 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 161 char *tok; 162 char *cpy = xstrdup(path); 163 164 tok = strtok(cpy, INCLUDESEPARATOR); 165 while(tok) 166 { 167 char *dir; 168 char *cptr; 169 if(strlen(tok) == 0) 170 continue; 171 dir = xstrdup(tok); 172 for(cptr = dir; *cptr; cptr++) 173 { 174 /* Convert to forward slash */ 175 if(*cptr == '\\') 176 *cptr = '/'; 177 } 178 /* Kill eventual trailing '/' */ 179 if(*(cptr = dir + strlen(dir)-1) == '/') 180 *cptr = '\0'; 181 182 /* Add to list */ 183 nincludepath++; 184 includepath = (char **)xrealloc(includepath, nincludepath * sizeof(*includepath)); 185 includepath[nincludepath-1] = dir; 186 tok = strtok(NULL, INCLUDESEPARATOR); 187 } 188 free(cpy); 189 189 } 190 190 191 191 FILE *open_include(const char *name, int search) 192 192 { 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 193 char *cpy = xstrdup(name); 194 char *cptr; 195 FILE *fp; 196 int i; 197 198 for(cptr = cpy; *cptr; cptr++) 199 { 200 /* kill double backslash */ 201 if(*cptr == '\\' && *(cptr+1) == '\\') 202 memmove(cptr, cptr+1, strlen(cptr)); 203 /* Convert to forward slash */ 204 if(*cptr == '\\') 205 *cptr = '/'; 206 } 207 208 if(search) 209 { 210 /* Search current dir and then -I path */ 211 fp = fopen(name, "rt"); 212 if(fp) 213 { 214 if(yydebug) 215 printf("Going to include <%s>\n", name); 216 free(cpy); 217 return fp; 218 } 219 } 220 /* Search -I path */ 221 for(i = 0; i < nincludepath; i++) 222 { 223 char *path; 224 path = (char *)xmalloc(strlen(includepath[i]) + strlen(cpy) + 2); 225 strcpy(path, includepath[i]); 226 strcat(path, "/"); 227 strcat(path, cpy); 228 fp = fopen(path, "rt"); 229 if(fp && yydebug) 230 printf("Going to include <%s>\n", path); 231 free(path); 232 if(fp) 233 { 234 free(cpy); 235 return fp; 236 } 237 238 } 239 free(cpy); 240 return NULL; 241 241 } 242 242 243 243 void push_if(int truecase, int wastrue, int nevertrue) 244 244 { 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 245 if(ifstackidx >= MAXIFSTACK-1) 246 internal_error(__FILE__, __LINE__, "#if stack overflow"); 247 ifstack[ifstackidx].current = truecase && !wastrue; 248 ifstack[ifstackidx].hasbeentrue = wastrue; 249 ifstack[ifstackidx].nevertrue = nevertrue; 250 if(nevertrue || !(truecase && !wastrue)) 251 set_pp_ignore(1); 252 if(yydebug) 253 printf("push_if: %d %d %d (%d %d %d)\n", 254 truecase, 255 wastrue, 256 nevertrue, 257 ifstack[ifstackidx].current, 258 ifstack[ifstackidx].hasbeentrue, 259 ifstack[ifstackidx].nevertrue); 260 ifstackidx++; 261 261 } 262 262 263 263 int pop_if(void) 264 264 { 265 266 267 268 269 270 271 272 273 274 275 265 if(ifstackidx <= 0) 266 yyerror("#endif without #if|#ifdef|#ifndef (#if stack underflow)"); 267 ifstackidx--; 268 if(yydebug) 269 printf("pop_if: %d %d %d\n", 270 ifstack[ifstackidx].current, 271 ifstack[ifstackidx].hasbeentrue, 272 ifstack[ifstackidx].nevertrue); 273 if(ifstack[ifstackidx].nevertrue || !ifstack[ifstackidx].current) 274 set_pp_ignore(0); 275 return ifstack[ifstackidx].hasbeentrue || ifstack[ifstackidx].current; 276 276 } 277 277 278 278 int isnevertrue_if(void) 279 279 { 280 281 } 282 280 return ifstackidx > 0 && ifstack[ifstackidx-1].nevertrue; 281 } 282 -
trunk/tools/wrc/wrc.c
r882 r3426 40 40 #include <assert.h> 41 41 #include <ctype.h> 42 43 #include "resource.h" /* For HAVE_WINE_CONSTRUCTOR */44 42 45 43 #include "wrc.h" … … 393 391 } 394 392 395 #if !defined(HAVE_WINE_CONSTRUCTOR)396 if(auto_register)397 {398 warning("Autoregister code non-operable (HAVE_WINE_CONSTRUCTOR not defined)");399 auto_register = 0;400 }401 #endif402 403 393 /* Set alignment power */ 404 394 a = alignment; -
trunk/tools/wrc/wrc.h
r882 r3426 10 10 11 11 #ifndef __WRC_WRCTYPES_H 12 #include "odin.h"13 12 #include "wrctypes.h" 14 #include "ver.h"15 13 #endif 16 14 15 //ifdef __WIN32OS2__ 17 16 #define strcasecmp stricmp 18 17 19 #define WRC_VERSION "1.0.1 4"20 #define WRC_RELEASEDATE "( 08-Aug-1999)"18 #define WRC_VERSION "1.0.18" 19 #define WRC_RELEASEDATE "(28-Dec-1999)" 21 20 #define WRC_FULLVERSION WRC_VERSION " " WRC_RELEASEDATE 22 21 -
trunk/tools/wrc/wrctypes.h
r882 r3426 111 111 int italic; 112 112 } font_id_t; 113 114 /* control styles */ 115 typedef struct style { 116 DWORD or_mask; 117 DWORD and_mask; 118 } style_t; 113 119 114 120 /* resource types */ … … 172 178 int width; /* Size */ 173 179 int height; 174 DWORDstyle; /* Style */175 DWORDexstyle;180 style_t *style; /* Style */ 181 style_t *exstyle; 176 182 DWORD helpid; /* EX: */ 177 183 int gotstyle; /* Used to determine whether the default */ … … 187 193 int width; /* Size */ 188 194 int height; 189 DWORDstyle; /* Style */190 DWORDexstyle;195 style_t *style; /* Style */ 196 style_t *exstyle; 191 197 int gotstyle; /* Used to determine whether the default */ 192 198 int gotexstyle; /* styles must be set */ … … 206 212 int width; /* Size */ 207 213 int height; 208 DWORDstyle; /* Style */209 DWORDexstyle;214 style_t *style; /* Style */ 215 style_t *exstyle; 210 216 DWORD helpid; /* EX: */ 211 217 int gotstyle; /* Used to determine whether the default */ … … 530 536 531 537 typedef struct style_pair { 532 intstyle;533 intexstyle;538 style_t *style; 539 style_t *exstyle; 534 540 } style_pair_t; 535 541 -
trunk/tools/wrc/writeres.c
r979 r3426 6 6 */ 7 7 8 /******************************************************************************* 9 * Defined Constants And Macros * 10 *******************************************************************************/ 8 #include "config.h" 9 10 #include <stdio.h> 11 #include <stdlib.h> 12 #include <string.h> 13 #include <assert.h> 14 #include <time.h> 15 16 #include "wrc.h" 17 #include "writeres.h" 18 #include "genres.h" 19 #include "newstruc.h" 20 #include "utils.h" 21 22 #ifdef NEED_UNDERSCORE_PREFIX 23 char Underscore[] = "_"; 24 #else 25 char Underscore[] = ""; 26 #endif 27 11 28 #define MASM 1 12 29 #ifdef MASM … … 23 40 #define COMMENT_LINE ";" 24 41 #define OR "or" 42 char s_file_head_str[] = 43 ";/* This file is generated with wrc version " WRC_FULLVERSION ". Do not edit! */\n" 44 ";/* Source : %s */\n" 45 ";/* Cmdline: %s */\n" 46 ";/* Date : %s */\n" 47 "\n" 48 "\t.386p\n" 49 "\t.model flat\n" 50 "\t.data\n" 51 "\n" 52 ; 53 54 char s_file_tail_str[] = 55 "\tend\n" 56 ";/* <eof> */\n" 57 "\n" 58 ; 59 25 60 #else 26 61 #define DIRECTIVE_BYTE ".byte" … … 36 71 #define COMMENT_LINE 37 72 #define OR "|" 73 74 char s_file_head_str[] = 75 "/* This file is generated with wrc version " WRC_FULLVERSION ". Do not edit! */\n" 76 "/* Source : %s */\n" 77 "/* Cmdline: %s */\n" 78 "/* Date : %s */\n" 79 "\n" 80 "\t.data\n" 81 "\n" 82 ; 83 84 char s_file_tail_str[] = 85 "/* <eof> */\n" 86 "\n" 87 ; 88 38 89 #endif 39 90 40 /******************************************************************************* 41 * Header Files * 42 *******************************************************************************/ 43 #include "config.h" 44 45 #include <stdio.h> 46 #include <stdlib.h> 47 #include <string.h> 48 #include <assert.h> 49 #include <time.h> 50 51 #include "wrc.h" 52 #include "writeres.h" 53 #include "genres.h" 54 #include "newstruc.h" 55 #include "utils.h" 56 91 char s_file_autoreg_str[] = 92 "\t.text\n" 93 ".LAuto_Register:\n" 94 "\tpushl\t$%s%s\n" 57 95 #ifdef NEED_UNDERSCORE_PREFIX 58 char Underscore[] = "_"; 96 "\tcall\t_LIBRES_RegisterResources\n" 59 97 #else 60 char Underscore[] = ""; 98 "\tcall\tLIBRES_RegisterResources\n" 61 99 #endif 62 63 char s_file_head_str[] = 64 COMMENT_LINE"/* This file is generated with wrc version " WRC_FULLVERSION ". Do not edit! */\n" 65 COMMENT_LINE"/* Source : %s */\n" 66 COMMENT_LINE"/* Cmdline: %s */\n" 67 COMMENT_LINE"/* Date : %s */\n" 68 "\n" 69 #ifdef MASM 70 "\t.386p\n" 71 "\t.model flat\n" 72 #endif 73 "\t.data\n" 74 "\n" 75 ; 76 77 char s_file_tail_str[] = 78 #ifdef MASM 79 "\tend\n" 100 "\taddl\t$4,%%esp\n" 101 "\tret\n\n" 102 #ifdef __NetBSD__ 103 ".stabs \"___CTOR_LIST__\",22,0,0,.LAuto_Register\n\n" 80 104 #else 81 "/* <eof> */\n"82 "\n"105 "\t.section .ctors,\"aw\"\n" 106 "\t.long\t.LAuto_Register\n\n" 83 107 #endif 84 ; 85 86 char s_file_autoreg_str[] = 87 #ifdef MASM 88 "" 89 #else 90 "\t.text\n" 91 LOCAL_PREFIX"LAuto_Register:\n" 92 "\tpushl\t$%s%s\n" 93 #ifdef NEED_UNDERSCORE_PREFIX 94 "\tcall\t_LIBRES_RegisterResources\n" 95 #else 96 "\tcall\tLIBRES_RegisterResources\n" 97 #endif 98 "\taddl\t$4,%%esp\n" 99 "\tret\n\n" 100 #ifdef __NetBSD__ 101 ".stabs \"___CTOR_LIST__\",22,0,0,.LAuto_Register\n\n" 102 #else 103 "\t.section .ctors,\"aw\"\n" 104 "\t"DIRECTIVE_LONG"\t.LAuto_Register\n\n" 105 #endif 106 #endif 107 ; 108 ; 108 109 109 110 char h_file_head_str[] = 110 111 112 113 114 115 111 "/*\n" 112 " * This file is generated with wrc version " WRC_FULLVERSION ". Do not edit!\n" 113 " * Source : %s\n" 114 " * Cmdline: %s\n" 115 " * Date : %s" 116 " */\n" 116 117 "\n" 117 "#ifndef __%08lx_H\n"/* This becomes the date of compile */118 119 120 121 122 118 "#ifndef __%08lx_H\n" /* This becomes the date of compile */ 119 "#define __%08lx_H\n" 120 "\n" 121 "#include <wrc_rsc.h>\n" 122 "\n" 123 ; 123 124 124 125 char h_file_tail_str[] = 125 126 127 126 "#endif\n" 127 "/* <eof> */\n\n" 128 ; 128 129 129 130 char _NEResTab[] = "_NEResTab"; … … 132 133 133 134 /* Variables used for resource sorting */ 134 res_count_t *rcarray = NULL; 135 int rccount = 0; 136 int n_id_entries = 0; /* win32 only: Nr of unique ids in the type-level array */137 int n_name_entries = 0; 138 139 static int direntries; 135 res_count_t *rcarray = NULL; /* Type-level count array */ 136 int rccount = 0; /* Nr of entries in the type-level array */ 137 int n_id_entries = 0; /* win32 only: Nr of unique ids in the type-level array */ 138 int n_name_entries = 0; /* win32 only: Nr of unique namess in the type-level array */ 139 140 static int direntries; /* win32 only: Total number of unique resources */ 140 141 141 142 time_t now; … … 143 144 /* 144 145 ***************************************************************************** 145 * Function 146 * Syntax 147 * Input 148 * outname- Filename to write to149 * top- The resource-tree to convert150 * Output 151 * Description 152 * Remarks 146 * Function : write_resfile 147 * Syntax : void write_resfile(char *outname, resource_t *top) 148 * Input : 149 * outname - Filename to write to 150 * top - The resource-tree to convert 151 * Output : 152 * Description : 153 * Remarks : 153 154 ***************************************************************************** 154 155 */ 155 156 void write_resfile(char *outname, resource_t *top) 156 157 { 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 put_dword(res, 0);/* ResSize */172 put_dword(res, 0x00000020);/* HeaderSize */173 put_word(res, 0xffff);/* ResType */174 175 put_word(res, 0xffff);/* ResName */176 177 put_dword(res, 0);/* DataVersion */178 put_word(res, 0);/* Memory options */179 put_word(res, 0);/* Language */180 put_dword(res, 0);/* Version */181 put_dword(res, 0);/* Charateristics */182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 158 FILE *fo; 159 int ret; 160 char zeros[3] = {0, 0, 0}; 161 162 fo = fopen(outname, "wb"); 163 if(!fo) 164 { 165 error("Could not open %s\n", outname); 166 } 167 168 if(win32) 169 { 170 /* Put an empty resource first to signal win32 format */ 171 res_t *res = new_res(); 172 put_dword(res, 0); /* ResSize */ 173 put_dword(res, 0x00000020); /* HeaderSize */ 174 put_word(res, 0xffff); /* ResType */ 175 put_word(res, 0); 176 put_word(res, 0xffff); /* ResName */ 177 put_word(res, 0); 178 put_dword(res, 0); /* DataVersion */ 179 put_word(res, 0); /* Memory options */ 180 put_word(res, 0); /* Language */ 181 put_dword(res, 0); /* Version */ 182 put_dword(res, 0); /* Charateristics */ 183 ret = fwrite(res->data, 1, res->size, fo); 184 if(ret != res->size) 185 { 186 fclose(fo); 187 error("Error writing %s", outname); 188 } 189 free(res); 190 } 191 192 for(; top; top = top->next) 193 { 194 if(!top->binres) 195 continue; 196 197 ret = fwrite(top->binres->data, 1, top->binres->size, fo); 198 if(ret != top->binres->size) 199 { 200 fclose(fo); 201 error("Error writing %s", outname); 202 } 203 if(win32 && (top->binres->size & 0x03)) 204 { 205 /* Write padding */ 206 ret = fwrite(zeros, 1, 4 - (top->binres->size & 0x03), fo); 207 if(ret != 4 - (top->binres->size & 0x03)) 208 { 209 fclose(fo); 210 error("Error writing %s", outname); 211 } 212 } 213 } 214 fclose(fo); 214 215 } 215 216 216 217 /* 217 218 ***************************************************************************** 218 * Function 219 * Syntax 220 * Input 221 * Output 222 * Description 223 * Remarks 219 * Function : write_s_res 220 * Syntax : void write_s_res(FILE *fp, res_t *res) 221 * Input : 222 * Output : 223 * Description : 224 * Remarks : 224 225 ***************************************************************************** 225 226 */ 226 #define BYTESPERLINE 227 #define BYTESPERLINE 8 227 228 void write_s_res(FILE *fp, res_t *res) 228 229 { 229 230 231 232 233 234 235 236 237 fprintf(fp, "\t"DIRECTIVE_BYTE"\t");238 239 240 241 242 243 244 245 246 247 fprintf(fp, "\t"DIRECTIVE_BYTE"\t");248 249 250 251 252 253 254 230 int idx = res->dataidx; 231 int end = res->size; 232 int rest = (end - idx) % BYTESPERLINE; 233 int lines = (end - idx) / BYTESPERLINE; 234 int i, j; 235 236 for(i = 0 ; i < lines; i++) 237 { 238 fprintf(fp, "\t%s\t", DIRECTIVE_BYTE); 239 for(j = 0; j < BYTESPERLINE; j++, idx++) 240 { 241 fprintf(fp, BYTEFRMT"%s", res->data[idx] & 0xff, 242 j == BYTESPERLINE-1 ? "" : ", "); 243 } 244 fprintf(fp, "\n"); 245 } 246 if(rest) 247 { 248 fprintf(fp, "\t%s\t", DIRECTIVE_BYTE); 249 for(j = 0; j < rest; j++, idx++) 250 { 251 fprintf(fp, BYTEFRMT"%s", res->data[idx] & 0xff, 252 j == rest-1 ? "" : ", "); 253 } 254 fprintf(fp, "\n"); 255 } 255 256 } 256 257 257 258 /* 258 259 ***************************************************************************** 259 * Function 260 * Syntax 261 * Input 262 * Output 263 * Description 264 * Remarks 260 * Function : write_name_str 261 * Syntax : void write_name_str(FILE *fp, name_id_t *nid) 262 * Input : 263 * Output : 264 * Description : 265 * Remarks : One level self recursive for string type conversion 265 266 ***************************************************************************** 266 267 */ 267 268 void write_name_str(FILE *fp, name_id_t *nid) 268 269 { 269 270 271 272 273 274 275 276 277 278 279 280 281 282 res.size++;/* We need to write the lenth byte as well */283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 270 res_t res; 271 assert(nid->type == name_str); 272 273 if(!win32 && nid->name.s_name->type == str_char) 274 { 275 res.size = strlen(nid->name.s_name->str.cstr); 276 if(res.size > 254) 277 error("Can't write strings larger than 254 bytes"); 278 if(res.size == 0) 279 internal_error(__FILE__, __LINE__, "Attempt to write empty string"); 280 res.dataidx = 0; 281 res.data = (char *)xmalloc(res.size + 1); 282 res.data[0] = (char)res.size; 283 res.size++; /* We need to write the lenth byte as well */ 284 strcpy(res.data+1, nid->name.s_name->str.cstr); 285 write_s_res(fp, &res); 286 free(res.data); 287 } 288 else if(!win32 && nid->name.s_name->type == str_unicode) 289 { 290 name_id_t lnid; 291 string_t str; 292 293 lnid.type = name_str; 294 lnid.name.s_name = &str; 295 str.type = str_char; 296 str.str.cstr = dupwstr2cstr(nid->name.s_name->str.wstr); 297 write_name_str(fp, &lnid); 298 free(str.str.cstr); 299 } 300 else if(win32 && nid->name.s_name->type == str_char) 301 { 302 name_id_t lnid; 303 string_t str; 304 305 lnid.type = name_str; 306 lnid.name.s_name = &str; 307 str.type = str_unicode; 308 str.str.wstr = dupcstr2wstr(nid->name.s_name->str.cstr); 309 write_name_str(fp, &lnid); 310 free(str.str.wstr); 311 } 312 else if(win32 && nid->name.s_name->type == str_unicode) 313 { 314 res.size = wstrlen(nid->name.s_name->str.wstr); 315 if(res.size > 65534) 316 error("Can't write strings larger than 65534 bytes"); 317 if(res.size == 0) 318 internal_error(__FILE__, __LINE__, "Attempt to write empty string"); 319 res.dataidx = 0; 320 res.data = (char *)xmalloc((res.size + 1) * 2); 321 ((short *)res.data)[0] = (short)res.size; 322 wstrcpy((short *)(res.data+2), nid->name.s_name->str.wstr); 323 res.size *= 2; /* Function writes bytes, not shorts... */ 324 res.size += 2; /* We need to write the length word as well */ 325 write_s_res(fp, &res); 326 free(res.data); 327 } 328 else 329 { 330 internal_error(__FILE__, __LINE__, "Hmm, requested to write a string of unknown type %d", 331 nid->name.s_name->type); 332 } 332 333 } 333 334 334 335 /* 335 336 ***************************************************************************** 336 * Function 337 * Syntax 338 * Input 339 * Output 340 * Description 341 * Remarks 337 * Function : compare_name_id 338 * Syntax : int compare_name_id(name_id_t *n1, name_id_t *n2) 339 * Input : 340 * Output : 341 * Description : 342 * Remarks : 342 343 ***************************************************************************** 343 344 */ 344 345 int compare_name_id(name_id_t *n1, name_id_t *n2) 345 346 { 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 347 if(n1->type == name_ord && n2->type == name_ord) 348 { 349 return n1->name.i_name - n2->name.i_name; 350 } 351 else if(n1->type == name_str && n2->type == name_str) 352 { 353 if(n1->name.s_name->type == str_char 354 && n2->name.s_name->type == str_char) 355 { 356 return strcasecmp(n1->name.s_name->str.cstr, n2->name.s_name->str.cstr); 357 } 358 else if(n1->name.s_name->type == str_unicode 359 && n2->name.s_name->type == str_unicode) 360 { 361 return wstricmp(n1->name.s_name->str.wstr, n2->name.s_name->str.wstr); 362 } 363 else 364 { 365 internal_error(__FILE__, __LINE__, "Can't yet compare strings of mixed type"); 366 } 367 } 368 else if(n1->type == name_ord && n2->type == name_str) 369 return 1; 370 else if(n1->type == name_str && n2->type == name_ord) 371 return -1; 372 else 373 internal_error(__FILE__, __LINE__, "Comparing name-ids with unknown types (%d, %d)", 374 n1->type, n2->type); 375 376 return 0; /* Keep the compiler happy */ 376 377 } 377 378 378 379 /* 379 380 ***************************************************************************** 380 * Function 381 * Syntax 382 * Input 383 * Output 384 * Description 385 * Remarks 381 * Function : find_counter 382 * Syntax : res_count_t *find_counter(name_id_t *type) 383 * Input : 384 * Output : 385 * Description : 386 * Remarks : 386 387 ***************************************************************************** 387 388 */ 388 389 res_count_t *find_counter(name_id_t *type) 389 390 { 390 391 392 393 394 395 396 391 int i; 392 for(i = 0; i < rccount; i++) 393 { 394 if(!compare_name_id(type, &(rcarray[i].type))) 395 return &rcarray[i]; 396 } 397 return NULL; 397 398 } 398 399 399 400 /* 400 401 ***************************************************************************** 401 * Function 402 * Syntax 403 * Input 404 * Output 405 * Description 406 * Remarks 407 * 408 * 409 * 410 * 402 * Function : count_resources 403 * Syntax : res_count_t *count_resources(resource_t *top) 404 * Input : 405 * Output : 406 * Description : 407 * Remarks : The whole lot is converted into arrays because they are 408 * easy sortable. Makes the lot almost unreadable, but it 409 * works (I hope). Basically you have to keep in mind that 410 * the lot is a three-dimensional structure for win32 and a 411 * two-dimensional structure for win16. 411 412 ***************************************************************************** 412 413 */ 413 #define RCT(v) 414 #define RCT(v) (*((resource_t **)(v))) 414 415 /* qsort sorting function */ 415 416 int sort_name_id(const void *e1, const void *e2) 416 417 { 417 418 return compare_name_id(RCT(e1)->name, RCT(e2)->name); 418 419 } 419 420 420 421 int sort_language(const void *e1, const void *e2) 421 422 { 422 423 424 425 426 423 assert((RCT(e1)->lan) != NULL); 424 assert((RCT(e2)->lan) != NULL); 425 426 return MAKELANGID(RCT(e1)->lan->id, RCT(e1)->lan->sub) 427 - MAKELANGID(RCT(e2)->lan->id, RCT(e2)->lan->sub); 427 428 } 428 429 #undef RCT 429 #define RCT(v) 430 #define RCT(v) ((res_count_t *)(v)) 430 431 int sort_type(const void *e1, const void *e2) 431 432 { 432 433 return compare_name_id(&(RCT(e1)->type), &(RCT(e2)->type)); 433 434 } 434 435 #undef RCT … … 436 437 void count_resources(resource_t *top) 437 438 { 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 439 resource_t *rsc; 440 res_count_t *rcp; 441 name_id_t nid; 442 int i, j; 443 444 for(rsc = top; rsc; rsc = rsc->next) 445 { 446 if(!rsc->binres) 447 continue; 448 switch(rsc->type) 449 { 450 case res_dlgex: 451 nid.name.i_name = WRC_RT_DIALOG; 452 nid.type = name_ord; 453 break; 454 case res_menex: 455 nid.name.i_name = WRC_RT_MENU; 456 nid.type = name_ord; 457 break; 458 case res_usr: 459 nid = *(rsc->res.usr->type); 460 break; 461 default: 462 nid.name.i_name = rsc->type; 463 nid.type = name_ord; 464 } 465 466 if((rcp = find_counter(&nid)) == NULL) 467 { 468 /* Count the number of uniq ids and names */ 469 470 if(nid.type == name_ord) 471 n_id_entries++; 472 else 473 n_name_entries++; 474 475 if(!rcarray) 476 { 477 rcarray = (res_count_t *)xmalloc(sizeof(res_count_t)); 478 rccount = 1; 479 rcarray[0].count = 1; 480 rcarray[0].type = nid; 481 rcarray[0].rscarray = (resource_t **)xmalloc(sizeof(resource_t *)); 482 rcarray[0].rscarray[0] = rsc; 483 } 484 else 485 { 486 rccount++; 487 rcarray = (res_count_t *)xrealloc(rcarray, rccount * sizeof(res_count_t)); 488 rcarray[rccount-1].count = 1; 489 rcarray[rccount-1].type = nid; 490 rcarray[rccount-1].rscarray = (resource_t **)xmalloc(sizeof(resource_t *)); 491 rcarray[rccount-1].rscarray[0] = rsc; 492 } 493 } 494 else 495 { 496 rcp->count++; 497 rcp->rscarray = (resource_t **)xrealloc(rcp->rscarray, rcp->count * sizeof(resource_t *)); 498 rcp->rscarray[rcp->count-1] = rsc; 499 } 500 } 501 502 if(!win32) 503 { 504 /* We're done, win16 requires no special sorting */ 505 return; 506 } 507 508 /* We now have a unsorted list of types with an array of res_count_t 509 * in rcarray[0..rccount-1]. And we have names of one type in the 510 * rcarray[x].rsc[0..rcarray[x].count-1] arrays. 511 * The list needs to be sorted for win32's top level tree structure. 512 */ 513 514 /* Sort the types */ 515 if(rccount > 1) 516 qsort(rcarray, rccount, sizeof(rcarray[0]), sort_type); 517 518 /* Now sort the name-id arrays */ 519 for(i = 0; i < rccount; i++) 520 { 521 if(rcarray[i].count > 1) 522 qsort(rcarray[i].rscarray, rcarray[i].count, sizeof(rcarray[0].rscarray[0]), sort_name_id); 523 } 524 525 /* Now split the name-id arrays into name/language 526 * subs. Don't look at the awfull expressions... 527 * We do this by taking the array elements out of rscarray and putting 528 * together a new array in rsc32array. 529 */ 530 for(i = 0; i < rccount; i++) 531 { 532 res_count_t *rcap; 533 534 assert(rcarray[i].count >= 1); 535 536 /* rcap points to the current type we are dealing with */ 537 rcap = &(rcarray[i]); 538 539 /* Insert the first name-id */ 540 rcap->rsc32array = (res32_count_t *)xmalloc(sizeof(res32_count_t)); 541 rcap->count32 = 1; 542 rcap->rsc32array[0].rsc = (resource_t **)xmalloc(sizeof(resource_t *)); 543 rcap->rsc32array[0].count = 1; 544 rcap->rsc32array[0].rsc[0] = rcap->rscarray[0]; 545 if(rcap->rscarray[0]->name->type == name_ord) 546 { 547 rcap->n_id_entries = 1; 548 rcap->n_name_entries = 0; 549 } 550 else 551 { 552 rcap->n_id_entries = 0; 553 rcap->n_name_entries = 1; 554 } 555 556 /* Now loop over the resting resources of the current type 557 * to find duplicate names (which should have different 558 * languages). 559 */ 560 for(j = 1; j < rcap->count; j++) 561 { 562 res32_count_t *r32cp; 563 564 /* r32cp points to the current res32_count structure 565 * that holds the resource name we are processing. 566 */ 567 r32cp = &(rcap->rsc32array[rcap->count32-1]); 568 569 if(!compare_name_id(r32cp->rsc[0]->name, rcarray[i].rscarray[j]->name)) 570 { 571 /* Names are the same, add to list */ 572 r32cp->count++; 573 r32cp->rsc = (resource_t **)xrealloc(r32cp->rsc, r32cp->count * sizeof(resource_t *)); 574 r32cp->rsc[r32cp->count-1] = rcap->rscarray[j]; 575 } 576 else 577 { 578 /* New name-id, sort the old one by 579 * language and create new list 580 */ 581 if(r32cp->count > 1) 582 qsort(r32cp->rsc, r32cp->count, sizeof(r32cp->rsc[0]), sort_language); 583 rcap->count32++; 584 rcap->rsc32array = (res32_count_t*)xrealloc(rcap->rsc32array, rcap->count32 * sizeof(res32_count_t)); 585 rcap->rsc32array[rcap->count32-1].rsc = (resource_t **)xmalloc(sizeof(resource_t *)); 586 rcap->rsc32array[rcap->count32-1].count = 1; 587 rcap->rsc32array[rcap->count32-1].rsc[0] = rcap->rscarray[j]; 588 589 if(rcap->rscarray[j]->name->type == name_ord) 590 rcap->n_id_entries++; 591 else 592 rcap->n_name_entries++; 593 } 594 } 595 /* Also sort the languages of the last name group */ 596 if(rcap->rsc32array[rcap->count32-1].count > 1) 597 qsort(rcap->rsc32array[rcap->count32-1].rsc, 598 rcap->rsc32array[rcap->count32-1].count, 599 sizeof(rcap->rsc32array[rcap->count32-1].rsc[0]), 600 sort_language); 601 } 601 602 } 602 603 603 604 /* 604 605 ***************************************************************************** 605 * Function 606 * Syntax 607 * Input 608 * Output 609 * Description 610 * Remarks 606 * Function : write_pe_segment 607 * Syntax : void write_pe_segment(FILE *fp, resource_t *top) 608 * Input : 609 * Output : 610 * Description : 611 * Remarks : 611 612 ***************************************************************************** 612 613 */ 613 614 void write_pe_segment(FILE *fp, resource_t *top) 614 615 { 615 int i; 616 617 fprintf(fp, "\t"DIRECTIVE_ALIGN"\t4\n"); 618 fprintf(fp, "%s%s:\n", prefix, _PEResTab); 619 fprintf(fp, "\t"DIRECTIVE_GLOBAL"\t%s%s\n", prefix, _PEResTab); 620 /* Flags */ 621 fprintf(fp, "\t"DIRECTIVE_LONG"\t0\n"); 622 /* Time/Date stamp */ 623 fprintf(fp, "\t"DIRECTIVE_LONG"\t"LONGFRMT"\n", (long)now); 624 /* Version */ 625 fprintf(fp, "\t"DIRECTIVE_LONG"\t0\n"); /* FIXME: must version be filled out? */ 626 /* # of id entries, # of name entries */ 627 fprintf(fp, "\t"DIRECTIVE_WORD"\t%d, %d\n", n_name_entries, n_id_entries); 628 629 /* Write the type level of the tree */ 630 for(i = 0; i < rccount; i++) 631 { 632 res_count_t *rcp; 633 char *label; 634 635 rcp = &rcarray[i]; 636 637 /* TypeId */ 638 if(rcp->type.type == name_ord) 639 fprintf(fp, "\t"DIRECTIVE_LONG"\t%d\n", rcp->type.name.i_name); 640 else 641 { 642 char *name = prep_nid_for_label(&(rcp->type)); 643 fprintf(fp, "\t"DIRECTIVE_LONG"\t(%s_%s_typename - %s%s) "OR" "HEXBIT31"\n", 644 prefix, 645 name, 646 prefix, 647 _PEResTab); 648 } 649 /* Offset */ 650 label = prep_nid_for_label(&(rcp->type)); 651 fprintf(fp, "\t"DIRECTIVE_LONG"\t("LOCAL_PREFIX"L%s - %s%s) "OR" "HEXBIT31"\n", 652 label, 653 prefix, 654 _PEResTab); 655 } 656 657 /* Write the name level of the tree */ 658 659 for(i = 0; i < rccount; i++) 660 { 661 res_count_t *rcp; 662 char *typelabel; 663 char *namelabel; 664 int j; 665 666 rcp = &rcarray[i]; 667 668 typelabel = xstrdup(prep_nid_for_label(&(rcp->type))); 669 fprintf(fp, LOCAL_PREFIX"L%s:\n", typelabel); 670 671 fprintf(fp, "\t"DIRECTIVE_LONG"\t0\n"); /* Flags */ 672 fprintf(fp, "\t"DIRECTIVE_LONG"\t"LONGFRMT"\n", (long)now); /* TimeDate */ 673 fprintf(fp, "\t"DIRECTIVE_LONG"\t0\n"); /* FIXME: must version be filled out? */ 674 fprintf(fp, "\t"DIRECTIVE_WORD"\t%d, %d\n", rcp->n_name_entries, rcp->n_id_entries); 675 for(j = 0; j < rcp->count32; j++) 676 { 677 resource_t *rsc = rcp->rsc32array[j].rsc[0]; 678 /* NameId */ 679 if(rsc->name->type == name_ord) 680 fprintf(fp, "\t"DIRECTIVE_LONG"\t%d\n", rsc->name->name.i_name); 681 else 682 { 683 char *label = prep_nid_for_label(rsc->name); 684 fprintf(fp, "\t"DIRECTIVE_LONG"\t(%s_%d_%s_name - %s%s) "OR" "HEXBIT31"\n", 685 prefix, 686 rsc->type, 687 label, 688 prefix, 689 _PEResTab); 690 } 691 /* Maybe FIXME: Unescape the tree (ommit 0x80000000) and 692 * put the offset to the resource data entry. 693 * ?? Is unescaping worth while ?? 694 */ 695 /* Offset */ 696 namelabel = prep_nid_for_label(rsc->name); 697 fprintf(fp, "\t"DIRECTIVE_LONG"\t("LOCAL_PREFIX"L%s_%s - %s%s) "OR" "HEXBIT31"\n", 698 typelabel, 699 namelabel, 700 prefix, 701 _PEResTab); 702 } 703 free(typelabel); 704 } 705 706 /* Write the language level of the tree */ 707 708 for(i = 0; i < rccount; i++) 709 { 710 res_count_t *rcp; 711 char *namelabel; 712 char *typelabel; 713 int j; 714 715 rcp = &rcarray[i]; 716 typelabel = xstrdup(prep_nid_for_label(&(rcp->type))); 717 718 for(j = 0; j < rcp->count32; j++) 719 { 720 res32_count_t *r32cp = &(rcp->rsc32array[j]); 721 int k; 722 723 namelabel = xstrdup(prep_nid_for_label(r32cp->rsc[0]->name)); 724 fprintf(fp, LOCAL_PREFIX"L%s_%s:\n", typelabel, namelabel); 725 726 fprintf(fp, "\t"DIRECTIVE_LONG"\t0\n"); /* Flags */ 727 fprintf(fp, "\t"DIRECTIVE_LONG"\t"LONGFRMT"\n", (long)now); /* TimeDate */ 728 fprintf(fp, "\t"DIRECTIVE_LONG"\t0\n"); /* FIXME: must version be filled out? */ 729 fprintf(fp, "\t"DIRECTIVE_WORD"\t0, %d\n", r32cp->count); 730 731 for(k = 0; k < r32cp->count; k++) 732 { 733 resource_t *rsc = r32cp->rsc[k]; 734 assert(rsc->lan != NULL); 735 /* LanguageId */ 736 fprintf(fp, "\t"DIRECTIVE_LONG"\t"LONGFRMT"\n", rsc->lan ? MAKELANGID(rsc->lan->id, rsc->lan->sub) : 0); 737 /* Offset */ 738 fprintf(fp, "\t"DIRECTIVE_LONG"\t"LOCAL_PREFIX"L%s_%s_%d - %s%s\n", 739 typelabel, 740 namelabel, 741 rsc->lan ? MAKELANGID(rsc->lan->id, rsc->lan->sub) : 0, 742 prefix, 743 _PEResTab); 744 } 745 free(namelabel); 746 } 747 free(typelabel); 748 } 749 750 /* Write the resource table itself */ 751 fprintf(fp, "%s_ResourceDirectory:\n", prefix); 752 fprintf(fp, "\t"DIRECTIVE_GLOBAL"\t%s_ResourceDirectory\n", prefix); 753 direntries = 0; 754 755 for(i = 0; i < rccount; i++) 756 { 757 res_count_t *rcp; 758 char *namelabel; 759 char *typelabel; 760 int j; 761 762 rcp = &rcarray[i]; 763 typelabel = xstrdup(prep_nid_for_label(&(rcp->type))); 764 765 for(j = 0; j < rcp->count32; j++) 766 { 767 res32_count_t *r32cp = &(rcp->rsc32array[j]); 768 int k; 769 770 namelabel = xstrdup(prep_nid_for_label(r32cp->rsc[0]->name)); 771 772 for(k = 0; k < r32cp->count; k++) 773 { 774 resource_t *rsc = r32cp->rsc[k]; 775 776 assert(rsc->lan != NULL); 777 778 fprintf(fp, LOCAL_PREFIX"L%s_%s_%d:\n", 779 typelabel, 780 namelabel, 781 rsc->lan ? MAKELANGID(rsc->lan->id, rsc->lan->sub) : 0); 782 783 /* Data RVA */ 784 fprintf(fp, "\t"DIRECTIVE_LONG"\t%s%s_data - %s%s\n", 785 prefix, 786 rsc->c_name, 787 prefix, 788 _PEResTab); 789 /* Size */ 790 fprintf(fp, "\t"DIRECTIVE_LONG"\t%d\n", 791 rsc->binres->size - rsc->binres->dataidx); 792 /* CodePage */ 793 fprintf(fp, "\t"DIRECTIVE_LONG"\t%ld\n", codepage); 794 /* Reserved */ 795 fprintf(fp, "\t"DIRECTIVE_LONG"\t0\n"); 796 797 direntries++; 798 } 799 free(namelabel); 800 } 801 free(typelabel); 802 } 616 int i; 617 618 fprintf(fp, "\t%s\t4\n", DIRECTIVE_ALIGN); 619 fprintf(fp, "%s%s:\n", prefix, _PEResTab); 620 fprintf(fp, "\t%s\t%s%s\n", DIRECTIVE_GLOBAL, prefix, _PEResTab); 621 /* Flags */ 622 fprintf(fp, "\t%s\t0\n", DIRECTIVE_LONG); 623 /* Time/Date stamp */ 624 fprintf(fp, "\t%s\t"LONGFRMT"\n", DIRECTIVE_LONG, (long)now); 625 /* Version */ 626 fprintf(fp, "\t%s\t0\n", DIRECTIVE_LONG); /* FIXME: must version be filled out? */ 627 /* # of id entries, # of name entries */ 628 fprintf(fp, "\t%s\t%d, %d\n", DIRECTIVE_WORD, n_name_entries, n_id_entries); 629 630 /* Write the type level of the tree */ 631 for(i = 0; i < rccount; i++) 632 { 633 res_count_t *rcp; 634 char *label; 635 636 rcp = &rcarray[i]; 637 638 /* TypeId */ 639 if(rcp->type.type == name_ord) 640 fprintf(fp, "\t%s\t%d\n", DIRECTIVE_LONG, rcp->type.name.i_name); 641 else 642 { 643 char *name = prep_nid_for_label(&(rcp->type)); 644 fprintf(fp, "\t%s\t(%s_%s_typename - %s%s) %s %s\n", 645 DIRECTIVE_LONG, prefix, 646 name, 647 prefix, 648 _PEResTab, OR, HEXBIT31); 649 } 650 /* Offset */ 651 label = prep_nid_for_label(&(rcp->type)); 652 fprintf(fp, "\t%s\t(%sL%s - %s%s) %s %s\n", 653 DIRECTIVE_LONG, LOCAL_PREFIX, label, 654 prefix, 655 _PEResTab, OR, HEXBIT31); 656 } 657 658 /* Write the name level of the tree */ 659 660 for(i = 0; i < rccount; i++) 661 { 662 res_count_t *rcp; 663 char *typelabel; 664 char *namelabel; 665 int j; 666 667 rcp = &rcarray[i]; 668 669 typelabel = xstrdup(prep_nid_for_label(&(rcp->type))); 670 fprintf(fp, "%sL%s:\n", LOCAL_PREFIX, typelabel); 671 672 fprintf(fp, "\t%s\t0\n", DIRECTIVE_LONG); /* Flags */ 673 fprintf(fp, "\t%s\t"LONGFRMT"\n", DIRECTIVE_LONG, (long)now); /* TimeDate */ 674 fprintf(fp, "\t%s\t0\n", DIRECTIVE_LONG); /* FIXME: must version be filled out? */ 675 fprintf(fp, "\t%s\t%d, %d\n", DIRECTIVE_WORD, rcp->n_name_entries, rcp->n_id_entries); 676 for(j = 0; j < rcp->count32; j++) 677 { 678 resource_t *rsc = rcp->rsc32array[j].rsc[0]; 679 /* NameId */ 680 if(rsc->name->type == name_ord) 681 fprintf(fp, "\t%s\t%d\n", DIRECTIVE_LONG, rsc->name->name.i_name); 682 else 683 { 684 fprintf(fp, "\t%s\t(%s%s_name - %s%s) %s %s\n", 685 DIRECTIVE_LONG, prefix, 686 rsc->c_name, 687 prefix, 688 _PEResTab, OR, HEXBIT31); 689 } 690 /* Maybe FIXME: Unescape the tree (ommit 0x80000000) and 691 * put the offset to the resource data entry. 692 * ?? Is unescaping worth while ?? 693 */ 694 /* Offset */ 695 namelabel = prep_nid_for_label(rsc->name); 696 fprintf(fp, "\t%s\t(%sL%s_%s - %s%s) %s %s\n", 697 DIRECTIVE_LONG, LOCAL_PREFIX, typelabel, 698 namelabel, 699 prefix, 700 _PEResTab, OR, HEXBIT31); 701 } 702 free(typelabel); 703 } 704 705 /* Write the language level of the tree */ 706 707 for(i = 0; i < rccount; i++) 708 { 709 res_count_t *rcp; 710 char *namelabel; 711 char *typelabel; 712 int j; 713 714 rcp = &rcarray[i]; 715 typelabel = xstrdup(prep_nid_for_label(&(rcp->type))); 716 717 for(j = 0; j < rcp->count32; j++) 718 { 719 res32_count_t *r32cp = &(rcp->rsc32array[j]); 720 int k; 721 722 namelabel = xstrdup(prep_nid_for_label(r32cp->rsc[0]->name)); 723 fprintf(fp, "%sL%s_%s:\n", LOCAL_PREFIX, typelabel, namelabel); 724 725 fprintf(fp, "\t%s\t0\n", DIRECTIVE_LONG); /* Flags */ 726 fprintf(fp, "\t%s\t"LONGFRMT"\n", DIRECTIVE_LONG, (long)now); /* TimeDate */ 727 fprintf(fp, "\t%s\t0\n", DIRECTIVE_LONG); /* FIXME: must version be filled out? */ 728 fprintf(fp, "\t%s\t0, %d\n", DIRECTIVE_WORD, r32cp->count); 729 730 for(k = 0; k < r32cp->count; k++) 731 { 732 resource_t *rsc = r32cp->rsc[k]; 733 assert(rsc->lan != NULL); 734 /* LanguageId */ 735 fprintf(fp, "\t%s\t"LONGFRMT"\n", DIRECTIVE_LONG, rsc->lan ? MAKELANGID(rsc->lan->id, rsc->lan->sub) : 0); 736 /* Offset */ 737 fprintf(fp, "\t%s\t%sL%s_%s_%d - %s%s\n", 738 DIRECTIVE_LONG, LOCAL_PREFIX, typelabel, 739 namelabel, 740 rsc->lan ? MAKELANGID(rsc->lan->id, rsc->lan->sub) : 0, 741 prefix, 742 _PEResTab); 743 } 744 free(namelabel); 745 } 746 free(typelabel); 747 } 748 749 /* Write the resource table itself */ 750 fprintf(fp, "%s_ResourceDirectory:\n", prefix); 751 fprintf(fp, "\t%s\t%s_ResourceDirectory\n", DIRECTIVE_GLOBAL, prefix); 752 direntries = 0; 753 754 for(i = 0; i < rccount; i++) 755 { 756 res_count_t *rcp; 757 char *namelabel; 758 char *typelabel; 759 int j; 760 761 rcp = &rcarray[i]; 762 typelabel = xstrdup(prep_nid_for_label(&(rcp->type))); 763 764 for(j = 0; j < rcp->count32; j++) 765 { 766 res32_count_t *r32cp = &(rcp->rsc32array[j]); 767 int k; 768 769 namelabel = xstrdup(prep_nid_for_label(r32cp->rsc[0]->name)); 770 771 for(k = 0; k < r32cp->count; k++) 772 { 773 resource_t *rsc = r32cp->rsc[k]; 774 775 assert(rsc->lan != NULL); 776 777 fprintf(fp, "%sL%s_%s_%d:\n", 778 LOCAL_PREFIX, typelabel, 779 namelabel, 780 rsc->lan ? MAKELANGID(rsc->lan->id, rsc->lan->sub) : 0); 781 782 /* Data RVA */ 783 fprintf(fp, "\t%s\t%s%s_data - %s%s\n", 784 DIRECTIVE_LONG, prefix, 785 rsc->c_name, 786 prefix, 787 _PEResTab); 788 /* Size */ 789 fprintf(fp, "\t%s\t%d\n", 790 DIRECTIVE_LONG, rsc->binres->size - rsc->binres->dataidx); 791 /* CodePage */ 792 fprintf(fp, "\t%s\t%ld\n", DIRECTIVE_LONG, codepage); 793 /* Reserved */ 794 fprintf(fp, "\t%s\t0\n", DIRECTIVE_LONG); 795 796 direntries++; 797 } 798 free(namelabel); 799 } 800 free(typelabel); 801 } 803 802 } 804 803 805 804 /* 806 805 ***************************************************************************** 807 * Function 808 * Syntax 809 * Input 810 * Output 811 * Description 812 * Remarks 806 * Function : write_ne_segment 807 * Syntax : void write_ne_segment(FILE *fp, resource_t *top) 808 * Input : 809 * Output : 810 * Description : 811 * Remarks : 813 812 ***************************************************************************** 814 813 */ 815 814 void write_ne_segment(FILE *fp, resource_t *top) 816 815 { 817 818 819 fprintf(fp, "\t"DIRECTIVE_ALIGN"\t4\n");820 821 fprintf(fp, "\t"DIRECTIVE_GLOBAL"\t%s%s\n", prefix, _NEResTab);822 823 824 fprintf(fp, "\t"DIRECTIVE_WORD"\t%d\n", alignment_pwr);825 826 827 828 829 830 831 832 833 fprintf(fp, "\t"DIRECTIVE_WORD"\t"SHORTFRMT"\n", rcp->type.name.i_name | 0x8000);834 835 fprintf(fp, "\t"DIRECTIVE_WORD"\t%s_%s_typename - %s%s\n",836 837 838 839 840 841 fprintf(fp, "\t"DIRECTIVE_WORD"\t%d\n", rcp->count);842 843 fprintf(fp, "\t"DIRECTIVE_LONG"\t0\n");844 845 846 816 int i, j; 817 818 fprintf(fp, "\t%s\t4\n", DIRECTIVE_ALIGN); 819 fprintf(fp, "%s%s:\n", prefix, _NEResTab); 820 fprintf(fp, "\t%s\t%s%s\n", DIRECTIVE_GLOBAL, prefix, _NEResTab); 821 822 /* AlignmentShift */ 823 fprintf(fp, "\t%s\t%d\n", DIRECTIVE_WORD, alignment_pwr); 824 825 /* TypeInfo */ 826 for(i = 0; i < rccount; i++) 827 { 828 res_count_t *rcp = &rcarray[i]; 829 830 /* TypeId */ 831 if(rcp->type.type == name_ord) 832 fprintf(fp, "\t%s\t"SHORTFRMT"\n", DIRECTIVE_WORD, rcp->type.name.i_name | 0x8000); 833 else 834 fprintf(fp, "\t%s\t%s_%s_typename - %s%s\n", 835 DIRECTIVE_WORD, prefix, 836 rcp->type.name.s_name->str.cstr, 837 prefix, 838 _NEResTab); 839 /* ResourceCount */ 840 fprintf(fp, "\t%s\t%d\n", DIRECTIVE_WORD, rcp->count); 841 /* Reserved */ 842 fprintf(fp, "\t%s\t0\n", DIRECTIVE_LONG); 843 /* NameInfo */ 844 for(j = 0; j < rcp->count; j++) 845 { 847 846 /* 848 847 * VERY IMPORTANT: … … 853 852 * All other things are as the MS doc describes (alignment etc.) 854 853 */ 855 856 fprintf(fp, "\t"DIRECTIVE_WORD"\t(%s%s_data - %s%s) >> %d\n",857 858 859 860 861 862 863 fprintf(fp, "\t"DIRECTIVE_WORD"\t%d\n",864 865 866 fprintf(fp, "\t"DIRECTIVE_WORD"\t"SHORTFRMT"\n", (WORD)rcp->rscarray[j]->memopt);867 868 869 fprintf(fp, "\t"DIRECTIVE_WORD"\t"SHORTFRMT"\n", rcp->rscarray[j]->name->name.i_name | 0x8000);870 871 fprintf(fp, "\t"DIRECTIVE_WORD"\t%s%s_name - %s%s\n",872 873 874 875 876 877 fprintf(fp, "\t"DIRECTIVE_WORD"\t0, 0\n");878 879 880 881 fprintf(fp, "\t"DIRECTIVE_WORD"\t0\n");854 /* Offset */ 855 fprintf(fp, "\t%s\t(%s%s_data - %s%s) >> %d\n", 856 DIRECTIVE_WORD, prefix, 857 rcp->rscarray[j]->c_name, 858 prefix, 859 _NEResTab, 860 alignment_pwr); 861 /* Length */ 862 fprintf(fp, "\t%s\t%d\n", 863 DIRECTIVE_WORD, rcp->rscarray[j]->binres->size - rcp->rscarray[j]->binres->dataidx); 864 /* Flags */ 865 fprintf(fp, "\t%s\t"SHORTFRMT"\n", DIRECTIVE_WORD, (WORD)rcp->rscarray[j]->memopt); 866 /* Id */ 867 if(rcp->rscarray[j]->name->type == name_ord) 868 fprintf(fp, "\t%s\t"SHORTFRMT"\n", DIRECTIVE_WORD, rcp->rscarray[j]->name->name.i_name | 0x8000); 869 else 870 fprintf(fp, "\t%s\t%s%s_name - %s%s\n", 871 DIRECTIVE_WORD, prefix, 872 rcp->rscarray[j]->c_name, 873 prefix, 874 _NEResTab); 875 /* Handle and Usage */ 876 fprintf(fp, "\t%s\t0, 0\n", DIRECTIVE_WORD); 877 } 878 } 879 /* EndTypes */ 880 fprintf(fp, "\t%s\t0\n", DIRECTIVE_WORD); 882 881 } 883 882 884 883 /* 885 884 ***************************************************************************** 886 * Function 887 * Syntax 888 * Input 889 * Output 890 * Description 891 * Remarks 885 * Function : write_rsc_names 886 * Syntax : void write_rsc_names(FILE *fp, resource_t *top) 887 * Input : 888 * Output : 889 * Description : 890 * Remarks : 892 891 ***************************************************************************** 893 892 */ 894 893 void write_rsc_names(FILE *fp, resource_t *top) 895 894 { 896 int i, j; 897 898 if(win32) 899 { 900 /* Write the names */ 901 902 for(i = 0; i < rccount; i++) 903 { 904 res_count_t *rcp; 905 906 rcp = &rcarray[i]; 907 908 if(rcp->type.type == name_str) 909 { 910 char *name = prep_nid_for_label(&(rcp->type)); 911 fprintf(fp, "%s_%s_typename:\n", 912 prefix, 913 name); 914 write_name_str(fp, &(rcp->type)); 915 } 916 917 for(j = 0; j < rcp->count32; j++) 918 { 919 resource_t *rsc = rcp->rsc32array[j].rsc[0]; 920 921 if(rsc->name->type == name_str) 922 { 923 char *name = prep_nid_for_label(rsc->name); 924 925 fprintf(fp, "%s_%d_%s_name:\n", 926 prefix, rsc->type, 927 name); 928 write_name_str(fp, rsc->name); 929 } 930 } 931 } 932 } 933 else 934 { 935 /* ResourceNames */ 936 for(i = 0; i < rccount; i++) 937 { 938 res_count_t *rcp = &rcarray[i]; 939 940 for(j = 0; j < rcp->count; j++) 941 { 942 if(rcp->type.type == name_str) 943 { 944 fprintf(fp, "%s_%s_typename:\n", 945 prefix, 946 rcp->type.name.s_name->str.cstr); 947 write_name_str(fp, &(rcp->type)); 948 } 949 if(rcp->rscarray[j]->name->type == name_str) 950 { 951 fprintf(fp, "%s%s_name:\n", 952 prefix, 953 rcp->rscarray[j]->c_name); 954 write_name_str(fp, rcp->rscarray[j]->name); 955 } 956 } 957 } 958 /* EndNames */ 959 960 /* This is to end the NE resource table */ 961 if(create_dir) 962 fprintf(fp, "\t"DIRECTIVE_BYTE"\t0\n"); 963 } 964 965 fprintf(fp, "\n"); 895 int i, j; 896 897 if(win32) 898 { 899 /* Write the names */ 900 901 for(i = 0; i < rccount; i++) 902 { 903 res_count_t *rcp; 904 905 rcp = &rcarray[i]; 906 907 if(rcp->type.type == name_str) 908 { 909 char *name = prep_nid_for_label(&(rcp->type)); 910 fprintf(fp, "%s_%s_typename:\n", 911 prefix, 912 name); 913 write_name_str(fp, &(rcp->type)); 914 } 915 916 for(j = 0; j < rcp->count32; j++) 917 { 918 resource_t *rsc = rcp->rsc32array[j].rsc[0]; 919 920 if(rsc->name->type == name_str) 921 { 922 fprintf(fp, "%s%s_name:\n", 923 prefix, 924 rsc->c_name); 925 write_name_str(fp, rsc->name); 926 } 927 } 928 } 929 } 930 else 931 { 932 /* ResourceNames */ 933 for(i = 0; i < rccount; i++) 934 { 935 res_count_t *rcp = &rcarray[i]; 936 937 for(j = 0; j < rcp->count; j++) 938 { 939 if(rcp->type.type == name_str) 940 { 941 fprintf(fp, "%s_%s_typename:\n", 942 prefix, 943 rcp->type.name.s_name->str.cstr); 944 write_name_str(fp, &(rcp->type)); 945 } 946 if(rcp->rscarray[j]->name->type == name_str) 947 { 948 fprintf(fp, "%s%s_name:\n", 949 prefix, 950 rcp->rscarray[j]->c_name); 951 write_name_str(fp, rcp->rscarray[j]->name); 952 } 953 } 954 } 955 /* EndNames */ 956 957 /* This is to end the NE resource table */ 958 if(create_dir) 959 fprintf(fp, "\t%s\t0\n", DIRECTIVE_BYTE); 960 } 961 962 fprintf(fp, "\n"); 966 963 } 967 964 968 965 /* 969 966 ***************************************************************************** 970 * Function 971 * Syntax 972 * Input 973 * outname- Filename to write to974 * top- The resource-tree to convert975 * Output 976 * Description 977 * Remarks 967 * Function : write_s_file 968 * Syntax : void write_s_file(char *outname, resource_t *top) 969 * Input : 970 * outname - Filename to write to 971 * top - The resource-tree to convert 972 * Output : 973 * Description : 974 * Remarks : 978 975 ***************************************************************************** 979 976 */ 980 977 void write_s_file(char *outname, resource_t *top) 981 978 { 982 FILE *fo; 983 resource_t *rsc; 984 985 fo = fopen(outname, "wt"); 986 if(!fo) 987 { 988 error("Could not open %s\n", outname); 989 return; 990 } 991 992 { 993 char *s, *p; 994 now = time(NULL); 995 s = ctime(&now); 996 p = strchr(s, '\n'); 997 if(p) *p = '\0'; 998 fprintf(fo, s_file_head_str, input_name ? input_name : "stdin", 999 cmdline, s); 1000 } 1001 1002 /* Get an idea how many we have and restructure the tables */ 1003 count_resources(top); 1004 1005 /* First write the segment tables */ 1006 if(create_dir) 1007 { 1008 if(win32) 1009 write_pe_segment(fo, top); 1010 else 1011 write_ne_segment(fo, top); 1012 } 1013 1014 /* Dump the names */ 1015 write_rsc_names(fo, top); 1016 1017 if(create_dir) 1018 fprintf(fo, LOCAL_PREFIX"LResTabEnd:\n"); 1019 1020 if(!indirect_only) 1021 { 1022 /* Write the resource data */ 1023 fprintf(fo, "\n"COMMENT_LINE"/* Resource binary data */\n\n"); 1024 for(rsc = top; rsc; rsc = rsc->next) 1025 { 1026 if(!rsc->binres) 1027 continue; 1028 1029 fprintf(fo, "\t"DIRECTIVE_ALIGN"\t%d\n", win32 ? 4 : alignment); 1030 fprintf(fo, "%s%s_data:\n", prefix, rsc->c_name); 1031 if(global) 1032 fprintf(fo, "\t"DIRECTIVE_GLOBAL"\t%s%s_data\n", prefix, rsc->c_name); 1033 1034 write_s_res(fo, rsc->binres); 1035 1036 fprintf(fo, "\n"); 1037 } 1038 1039 if(create_dir) 1040 { 1041 /* Add a resource descriptor for built-in and elf-dlls */ 1042 fprintf(fo, "\t"DIRECTIVE_ALIGN"\t4\n"); 1043 fprintf(fo, "%s_ResourceDescriptor:\n", prefix); 1044 fprintf(fo, "\t"DIRECTIVE_GLOBAL"\t%s_ResourceDescriptor\n", prefix); 1045 fprintf(fo, "%s_ResourceTable:\n", prefix); 1046 if(global) 1047 fprintf(fo, "\t"DIRECTIVE_GLOBAL"\t%s_ResourceTable\n", prefix); 1048 fprintf(fo, "\t"DIRECTIVE_LONG"\t%s%s\n", prefix, win32 ? _PEResTab : _NEResTab); 1049 fprintf(fo, "%s_NumberOfResources:\n", prefix); 1050 if(global) 1051 fprintf(fo, "\t"DIRECTIVE_GLOBAL"\t%s_NumberOfResources\n", prefix); 1052 fprintf(fo, "\t"DIRECTIVE_LONG"\t%d\n", direntries); 1053 fprintf(fo, "%s_ResourceSectionSize:\n", prefix); 1054 if(global) 1055 fprintf(fo, "\t"DIRECTIVE_GLOBAL"\t%s_ResourceSectionSize\n", prefix); 1056 fprintf(fo, "\t"DIRECTIVE_LONG"\t"LOCAL_PREFIX"LResTabEnd - %s%s\n", prefix, win32 ? _PEResTab : _NEResTab); 1057 if(win32) 1058 { 1059 fprintf(fo, "%s_ResourcesEntries:\n", prefix); 1060 if(global) 1061 fprintf(fo, "\t"DIRECTIVE_GLOBAL"\t%s_ResourcesEntries\n", prefix); 1062 fprintf(fo, "\t"DIRECTIVE_LONG"\t%s_ResourceDirectory\n", prefix); 1063 } 1064 } 1065 } 1066 1067 if(indirect) 1068 { 1069 /* Write the indirection structures */ 1070 fprintf(fo, "\n"COMMENT_LINE"/* Resource indirection structures */\n\n"); 1071 fprintf(fo, "\t"DIRECTIVE_ALIGN"\t4\n"); 1072 for(rsc = top; rsc; rsc = rsc->next) 1073 { 1074 int type; 1075 char *type_name = NULL; 1076 char *label; 1077 1078 if(!rsc->binres) 1079 continue; 1080 1081 switch(rsc->type) 1082 { 1083 case res_menex: 1084 type = WRC_RT_MENU; 1085 break; 1086 case res_dlgex: 1087 type = WRC_RT_DIALOG; 1088 break; 1089 case res_usr: 1090 assert(rsc->res.usr->type != NULL); 1091 type_name = prep_nid_for_label(rsc->res.usr->type); 1092 type = 0; 1093 break; 1094 default: 1095 type = rsc->type; 1096 } 1097 1098 /* 1099 * This follows a structure like: 1100 * struct wrc_resource { 1101 * INT32 id; 1102 * RSCNAME *resname; 1103 * INT32 restype; 1104 * RSCNAME *typename; 1105 * void *data; 1106 * UINT32 datasize; 1107 * }; 1108 * The 'RSCNAME' is a pascal-style string where the 1109 * first byte/word denotes the size and the rest the string 1110 * itself. 1111 */ 1112 fprintf(fo, "%s%s:\n", prefix, rsc->c_name); 1113 if(global) 1114 fprintf(fo, "\t"DIRECTIVE_GLOBAL"\t%s%s\n", prefix, rsc->c_name); 1115 label = prep_nid_for_label(rsc->name); 1116 fprintf(fo, "\t"DIRECTIVE_LONG"\t%d, %s%s%s%s, %d, %s%s%s%s, %s%s_data, %d\n", 1117 rsc->name->type == name_ord ? rsc->name->name.i_name : 0, 1118 rsc->name->type == name_ord ? "0" : prefix, 1119 rsc->name->type == name_ord ? "" : "_", 1120 rsc->name->type == name_ord ? "" : label, 1121 rsc->name->type == name_ord ? "" : "_name", 1122 type, 1123 type ? "0" : prefix, 1124 type ? "" : "_", 1125 type ? "" : type_name, 1126 type ? "" : "_typename", 1127 prefix, 1128 rsc->c_name, 1129 rsc->binres->size - rsc->binres->dataidx); 1130 fprintf(fo, "\n"); 1131 } 1132 fprintf(fo, "\n"); 1133 1134 /* Write the indirection table */ 1135 fprintf(fo, COMMENT_LINE"/* Resource indirection table */\n\n"); 1136 fprintf(fo, "\t"DIRECTIVE_ALIGN"\t4\n"); 1137 fprintf(fo, "%s%s:\n", prefix, _ResTable); 1138 fprintf(fo, "\t"DIRECTIVE_GLOBAL"\t%s%s\n", prefix, _ResTable); 1139 for(rsc = top; rsc; rsc = rsc->next) 1140 { 1141 fprintf(fo, "\t"DIRECTIVE_LONG"\t%s%s\n", prefix, rsc->c_name); 1142 } 1143 fprintf(fo, "\t"DIRECTIVE_LONG"\t0\n"); 1144 fprintf(fo, "\n"); 1145 } 1146 1147 if(auto_register) 1148 fprintf(fo, s_file_autoreg_str, prefix, _ResTable); 1149 1150 fprintf(fo, s_file_tail_str); 1151 fclose(fo); 979 FILE *fo; 980 resource_t *rsc; 981 982 fo = fopen(outname, "wt"); 983 if(!fo) 984 { 985 error("Could not open %s\n", outname); 986 return; 987 } 988 989 { 990 char *s, *p; 991 now = time(NULL); 992 s = ctime(&now); 993 p = strchr(s, '\n'); 994 if(p) *p = '\0'; 995 fprintf(fo, s_file_head_str, input_name ? input_name : "stdin", 996 cmdline, s); 997 } 998 999 /* Get an idea how many we have and restructure the tables */ 1000 count_resources(top); 1001 1002 /* First write the segment tables */ 1003 if(create_dir) 1004 { 1005 if(win32) 1006 write_pe_segment(fo, top); 1007 else 1008 write_ne_segment(fo, top); 1009 } 1010 1011 /* Dump the names */ 1012 write_rsc_names(fo, top); 1013 1014 if(create_dir) 1015 fprintf(fo, "%sLResTabEnd:\n", LOCAL_PREFIX); 1016 1017 if(!indirect_only) 1018 { 1019 /* Write the resource data */ 1020 #ifdef MASM 1021 fprintf(fo, "\n;/* Resource binary data */\n\n"); 1022 #else 1023 fprintf(fo, "\n/* Resource binary data */\n\n"); 1024 #endif 1025 for(rsc = top; rsc; rsc = rsc->next) 1026 { 1027 if(!rsc->binres) 1028 continue; 1029 1030 fprintf(fo, "\t%s\t%d\n", DIRECTIVE_ALIGN, win32 ? 4 : alignment); 1031 fprintf(fo, "%s%s_data:\n", prefix, rsc->c_name); 1032 if(global) 1033 fprintf(fo, "\t%s\t%s%s_data\n", DIRECTIVE_GLOBAL, prefix, rsc->c_name); 1034 1035 write_s_res(fo, rsc->binres); 1036 1037 fprintf(fo, "\n"); 1038 } 1039 1040 if(create_dir) 1041 { 1042 /* Add a resource descriptor for built-in and elf-dlls */ 1043 fprintf(fo, "\t%s\t4\n", DIRECTIVE_ALIGN); 1044 fprintf(fo, "%s_ResourceDescriptor:\n", prefix); 1045 fprintf(fo, "\t%s\t%s_ResourceDescriptor\n", DIRECTIVE_GLOBAL, prefix); 1046 fprintf(fo, "%s_ResourceTable:\n", prefix); 1047 if(global) 1048 fprintf(fo, "\t%s\t%s_ResourceTable\n", DIRECTIVE_GLOBAL, prefix); 1049 fprintf(fo, "\t%s\t%s%s\n", DIRECTIVE_LONG, prefix, win32 ? _PEResTab : _NEResTab); 1050 fprintf(fo, "%s_NumberOfResources:\n", prefix); 1051 if(global) 1052 fprintf(fo, "\t%s\t%s_NumberOfResources\n", DIRECTIVE_GLOBAL, prefix); 1053 fprintf(fo, "\t%s\t%d\n", DIRECTIVE_LONG, direntries); 1054 fprintf(fo, "%s_ResourceSectionSize:\n", prefix); 1055 if(global) 1056 fprintf(fo, "\t%s\t%s_ResourceSectionSize\n", DIRECTIVE_GLOBAL, prefix); 1057 fprintf(fo, "\t%s\t%sLResTabEnd - %s%s\n", DIRECTIVE_LONG, LOCAL_PREFIX, prefix, win32 ? _PEResTab : _NEResTab); 1058 if(win32) 1059 { 1060 fprintf(fo, "%s_ResourcesEntries:\n", prefix); 1061 if(global) 1062 fprintf(fo, "\t%s\t%s_ResourcesEntries\n", DIRECTIVE_GLOBAL, prefix); 1063 fprintf(fo, "\t%s\t%s_ResourceDirectory\n", DIRECTIVE_LONG, prefix); 1064 } 1065 } 1066 } 1067 1068 if(indirect) 1069 { 1070 /* Write the indirection structures */ 1071 fprintf(fo, "\n/* Resource indirection structures */\n\n"); 1072 fprintf(fo, "\t%s\t4\n", DIRECTIVE_ALIGN); 1073 for(rsc = top; rsc; rsc = rsc->next) 1074 { 1075 int type; 1076 char *type_name = NULL; 1077 1078 if(!rsc->binres) 1079 continue; 1080 1081 switch(rsc->type) 1082 { 1083 case res_menex: 1084 type = WRC_RT_MENU; 1085 break; 1086 case res_dlgex: 1087 type = WRC_RT_DIALOG; 1088 break; 1089 case res_usr: 1090 assert(rsc->res.usr->type != NULL); 1091 type_name = prep_nid_for_label(rsc->res.usr->type); 1092 type = 0; 1093 break; 1094 default: 1095 type = rsc->type; 1096 } 1097 1098 /* 1099 * This follows a structure like: 1100 * struct wrc_resource { 1101 * INT32 id; 1102 * RSCNAME *resname; 1103 * INT32 restype; 1104 * RSCNAME *typename; 1105 * void *data; 1106 * UINT32 datasize; 1107 * }; 1108 * The 'RSCNAME' is a pascal-style string where the 1109 * first byte/word denotes the size and the rest the string 1110 * itself. 1111 */ 1112 fprintf(fo, "%s%s:\n", prefix, rsc->c_name); 1113 if(global) 1114 fprintf(fo, "\t%s\t%s%s\n", DIRECTIVE_GLOBAL, prefix, rsc->c_name); 1115 fprintf(fo, "\t%s\t%d, %s%s%s, %d, %s%s%s%s, %s%s_data, %d\n", 1116 DIRECTIVE_LONG, 1117 rsc->name->type == name_ord ? rsc->name->name.i_name : 0, 1118 rsc->name->type == name_ord ? "0" : prefix, 1119 rsc->name->type == name_ord ? "" : rsc->c_name, 1120 rsc->name->type == name_ord ? "" : "_name", 1121 type, 1122 type ? "0" : prefix, 1123 type ? "" : "_", 1124 type ? "" : type_name, 1125 type ? "" : "_typename", 1126 prefix, 1127 rsc->c_name, 1128 rsc->binres->size - rsc->binres->dataidx); 1129 fprintf(fo, "\n"); 1130 } 1131 fprintf(fo, "\n"); 1132 1133 /* Write the indirection table */ 1134 fprintf(fo, "/* Resource indirection table */\n\n"); 1135 fprintf(fo, "\t%s\t4\n", DIRECTIVE_ALIGN); 1136 fprintf(fo, "%s%s:\n", prefix, _ResTable); 1137 fprintf(fo, "\t%s\t%s%s\n", DIRECTIVE_GLOBAL, prefix, _ResTable); 1138 for(rsc = top; rsc; rsc = rsc->next) 1139 { 1140 fprintf(fo, "\t%s\t%s%s\n", DIRECTIVE_LONG, prefix, rsc->c_name); 1141 } 1142 fprintf(fo, "\t%s\t0\n", DIRECTIVE_LONG); 1143 fprintf(fo, "\n"); 1144 } 1145 1146 if(auto_register) 1147 fprintf(fo, s_file_autoreg_str, prefix, _ResTable); 1148 1149 fprintf(fo, s_file_tail_str); 1150 fclose(fo); 1152 1151 } 1153 1152 1154 1153 /* 1155 1154 ***************************************************************************** 1156 * Function 1157 * Syntax 1158 * Input 1159 * outname- Filename to write to1160 * top- The resource-tree to convert1161 * Output 1162 * Description 1163 * Remarks 1155 * Function : write_h_file 1156 * Syntax : void write_h_file(char *outname, resource_t *top) 1157 * Input : 1158 * outname - Filename to write to 1159 * top - The resource-tree to convert 1160 * Output : 1161 * Description : 1162 * Remarks : 1164 1163 ***************************************************************************** 1165 1164 */ 1166 1165 void write_h_file(char *outname, resource_t *top) 1167 1166 { 1168 1169 1170 1167 FILE *fo; 1168 resource_t *rsc; 1169 char *h_prefix; 1171 1170 1172 1171 #ifdef NEED_UNDERSCORE_PREFIX 1173 1172 h_prefix = prefix + 1; 1174 1173 #else 1175 1174 h_prefix = prefix; 1176 1175 #endif 1177 1176 1178 1179 1180 1181 1182 1183 1184 1185 1177 fo = fopen(outname, "wt"); 1178 if(!fo) 1179 { 1180 error("Could not open %s\n", outname); 1181 } 1182 1183 time(&now); 1184 fprintf(fo, h_file_head_str, input_name ? input_name : "stdin", 1186 1185 cmdline, ctime(&now), (long)now, (long)now); 1187 1186 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 } 1238 1239 1187 /* First write the segment tables reference */ 1188 if(create_dir) 1189 { 1190 fprintf(fo, "extern %schar %s%s[];\n\n", 1191 constant ? "const " : "", 1192 h_prefix, 1193 win32 ? _PEResTab : _NEResTab); 1194 } 1195 1196 /* Write the resource data */ 1197 for(rsc = top; global && rsc; rsc = rsc->next) 1198 { 1199 if(!rsc->binres) 1200 continue; 1201 1202 fprintf(fo, "extern %schar %s%s_data[];\n", 1203 constant ? "const " : "", 1204 h_prefix, 1205 rsc->c_name); 1206 } 1207 1208 if(indirect) 1209 { 1210 if(global) 1211 fprintf(fo, "\n"); 1212 1213 /* Write the indirection structures */ 1214 for(rsc = top; global && rsc; rsc = rsc->next) 1215 { 1216 fprintf(fo, "extern %swrc_resource%d_t %s%s;\n", 1217 constant ? "const " : "", 1218 win32 ? 32 : 16, 1219 h_prefix, 1220 rsc->c_name); 1221 } 1222 1223 if(global) 1224 fprintf(fo, "\n"); 1225 1226 /* Write the indirection table */ 1227 fprintf(fo, "extern %swrc_resource%d_t %s%s[];\n\n", 1228 constant ? "const " : "", 1229 win32 ? 32 : 16, 1230 h_prefix, 1231 _ResTable); 1232 } 1233 1234 fprintf(fo, h_file_tail_str); 1235 fclose(fo); 1236 } 1237 1238 -
trunk/tools/wrc/y.tab.c
r1355 r3426 107 107 * Copyright Martin von Loewis, 1994 108 108 * Copyright 1998 Bertho A. Stultiens (BS) 109 * 1999 Juergen Schmied (JS) 109 110 * 111 * 6-Nov-1999 JS - see CHANGES 112 * 110 113 * 29-Dec-1998 AdH - Grammar and function extensions. 111 114 * grammar: TOOLBAR resources, Named ICONs in … … 208 211 #include "preproc.h" 209 212 #include "parser.h" 213 #include "windef.h" 214 #include "wingdi.h" 210 215 #include "winuser.h" 211 216 … … 214 219 #endif 215 220 216 DWORD andmask; /* Used to parse 'NOT NUMBER' expressions */217 221 int indialog = 0; /* Signal flex that we're parsing a dialog */ 218 222 int want_rscname = 0; /* Set when a resource's name is required */ … … 262 266 dialogex_t *dialogex_font(font_id_t *f, dialogex_t *dlg); 263 267 dialogex_t *dialogex_caption(string_t *s, dialogex_t *dlg); 264 dialogex_t *dialogex_exstyle( intst, dialogex_t *dlg);265 dialogex_t *dialogex_style( intst, dialogex_t *dlg);268 dialogex_t *dialogex_exstyle(style_t *st, dialogex_t *dlg); 269 dialogex_t *dialogex_style(style_t *st, dialogex_t *dlg); 266 270 name_id_t *convert_ctlclass(name_id_t *cls); 267 control_t *ins_ctrl(int type, int s tyle, control_t *ctrl, control_t *prev);271 control_t *ins_ctrl(int type, int special_style, control_t *ctrl, control_t *prev); 268 272 dialog_t *dialog_version(version_t *v, dialog_t *dlg); 269 273 dialog_t *dialog_characteristics(characts_t *c, dialog_t *dlg); … … 273 277 dialog_t *dialog_font(font_id_t *f, dialog_t *dlg); 274 278 dialog_t *dialog_caption(string_t *s, dialog_t *dlg); 275 dialog_t *dialog_exstyle( intst, dialog_t *dlg);276 dialog_t *dialog_style( intst, dialog_t *dlg);279 dialog_t *dialog_exstyle(style_t * st, dialog_t *dlg); 280 dialog_t *dialog_style(style_t * st, dialog_t *dlg); 277 281 resource_t *build_stt_resources(stringtable_t *stthead); 278 282 stringtable_t *find_stringtable(lvc_t *lvc); … … 281 285 282 286 283 #line 1 79"parser.y"287 #line 183 "parser.y" 284 288 typedef union{ 285 289 string_t *str; … … 323 327 dlginit_t *dginit; 324 328 style_pair_t *styles; 329 style_t *style; 325 330 } YYSTYPE; 326 331 #ifndef YYDEBUG … … 338 343 339 344 340 #define YYFINAL 597345 #define YYFINAL 604 341 346 #define YYFLAG -32768 342 347 #define YYNTBASE 112 … … 397 402 328, 332, 336, 340, 344, 348, 352, 356, 360, 364, 398 403 368, 372, 376, 380, 391, 404, 415, 416, 421, 428, 399 437, 455, 471, 476, 477, 480, 481, 484, 489, 49 1,400 49 3, 508, 509, 513, 517, 521, 524, 527, 531, 535,401 53 8, 541, 544, 545, 549, 553, 557, 561, 565, 569,402 57 3, 577, 581, 585, 589, 593, 597, 601, 605, 609,403 61 3, 624, 644, 661, 675, 687, 688, 690, 691, 694,404 70 4, 705, 708, 713, 717, 718, 725, 729, 735, 736,405 7 40, 744, 748, 752, 756, 760, 765, 769, 770, 775,406 77 9, 785, 786, 789, 795, 802, 803, 806, 811, 818,407 8 27, 832, 836, 837, 842, 843, 845, 851, 852, 862,408 8 72, 876, 880, 884, 888, 892, 893, 896, 902, 903,409 906, 90 8, 913, 918, 920, 924, 934, 935, 939, 942,410 94 3, 946, 949, 951, 953, 955, 957, 959, 961, 963,411 9 64, 967, 970, 973, 978, 981, 984, 988, 990, 992,412 99 4, 996, 1000, 1004, 1008, 1012, 1013, 1015, 1018, 1019,413 102 3, 1027, 1031, 1035, 1039, 1043, 1046, 1049, 1053, 1055,414 10 58, 1060404 437, 455, 471, 476, 477, 480, 481, 484, 489, 493, 405 497, 499, 502, 504, 506, 521, 522, 526, 530, 534, 406 537, 540, 544, 548, 551, 554, 557, 558, 562, 566, 407 570, 574, 578, 582, 586, 590, 594, 598, 602, 606, 408 610, 614, 618, 622, 626, 637, 657, 674, 688, 700, 409 701, 703, 704, 707, 717, 718, 721, 726, 730, 731, 410 738, 742, 748, 749, 753, 757, 761, 765, 769, 773, 411 778, 782, 783, 788, 792, 798, 799, 802, 808, 815, 412 816, 819, 824, 831, 840, 845, 849, 850, 855, 856, 413 858, 864, 865, 875, 885, 889, 893, 897, 901, 905, 414 906, 909, 915, 916, 919, 921, 926, 931, 933, 937, 415 947, 948, 952, 955, 956, 959, 962, 964, 966, 968, 416 970, 972, 974, 976, 977, 980, 983, 986, 991, 994, 417 997, 1001, 1003, 1005, 1007, 1009, 1013, 1017, 1021, 1025, 418 1026, 1028, 1030, 1034, 1038, 1042, 1046, 1050, 1054, 1057, 419 1060, 1064, 1066, 1069, 1071 415 420 }; 416 421 … … 428 433 16, 0, 9, 109, 16, 110, 0, 11, 0, 12, 429 434 0, 16, 16, 0, 16, 109, 0, 16, 104, 0, 430 119, 121, 0, 16 4, 0, 181, 0, 187, 0, 16,435 119, 121, 0, 165, 0, 182, 0, 188, 0, 16, 431 436 0, 119, 0, 15, 0, 131, 0, 122, 0, 123, 432 0, 134, 0, 14 5, 0, 128, 0, 124, 0, 125,433 0, 15 5, 0, 159, 0, 126, 0, 127, 0, 175,434 0, 129, 0, 16 8, 0, 20, 177, 17, 0, 20,435 17 7, 184, 0, 21, 177, 17, 0, 21, 177, 184,436 0, 30, 17 7, 17, 0, 31, 177, 17, 0, 31,437 17 7, 184, 0, 26, 17, 0, 27, 177, 180, 184,438 0, 90, 17 7, 180, 184, 0, 130, 177, 17, 0,439 130, 17 7, 184, 0, 13, 0, 15, 0, 19, 177,440 18 0, 88, 132, 89, 0, 0, 132, 15, 111, 187,441 133, 0, 132, 18 7, 111, 187, 133, 0, 0, 133,437 0, 134, 0, 146, 0, 128, 0, 124, 0, 125, 438 0, 156, 0, 160, 0, 126, 0, 127, 0, 176, 439 0, 129, 0, 169, 0, 20, 178, 17, 0, 20, 440 178, 185, 0, 21, 178, 17, 0, 21, 178, 185, 441 0, 30, 178, 17, 0, 31, 178, 17, 0, 31, 442 178, 185, 0, 26, 17, 0, 27, 178, 181, 185, 443 0, 90, 178, 181, 185, 0, 130, 178, 17, 0, 444 130, 178, 185, 0, 13, 0, 15, 0, 19, 178, 445 181, 88, 132, 89, 0, 0, 132, 15, 111, 188, 446 133, 0, 132, 188, 111, 188, 133, 0, 0, 133, 442 447 111, 58, 0, 133, 111, 51, 0, 133, 111, 44, 443 448 0, 133, 111, 52, 0, 133, 111, 53, 0, 133, 444 111, 54, 0, 22, 17 7, 187, 111, 187, 111, 187,445 111, 18 7, 135, 88, 136, 89, 0, 0, 135, 70,446 1 87, 0, 135, 69, 187, 0, 135, 67, 15, 0,449 111, 54, 0, 22, 178, 188, 111, 188, 111, 188, 450 111, 188, 135, 88, 136, 89, 0, 0, 135, 70, 451 144, 0, 135, 69, 144, 0, 135, 67, 15, 0, 447 452 135, 141, 0, 135, 66, 120, 0, 135, 24, 119, 448 0, 135, 18 1, 0, 135, 182, 0, 135, 183, 0,453 0, 135, 182, 0, 135, 183, 0, 135, 184, 0, 449 454 0, 136, 44, 140, 0, 136, 45, 138, 0, 136, 450 455 42, 138, 0, 136, 41, 138, 0, 136, 43, 138, … … 454 459 33, 137, 0, 136, 34, 137, 0, 136, 48, 137, 455 460 0, 136, 47, 137, 0, 136, 46, 137, 0, 136, 456 31, 120, 111, 187, 111, 187, 111, 187, 139, 0, 457 15, 111, 187, 111, 187, 111, 187, 111, 187, 111, 458 187, 142, 0, 187, 111, 187, 111, 187, 111, 187, 459 111, 187, 142, 0, 0, 111, 187, 111, 187, 0, 460 111, 187, 111, 187, 111, 187, 0, 111, 187, 111, 461 187, 111, 187, 111, 187, 0, 120, 111, 187, 111, 462 144, 111, 187, 111, 187, 111, 187, 111, 187, 111, 463 187, 111, 187, 0, 120, 111, 187, 111, 144, 111, 464 187, 111, 187, 111, 187, 111, 187, 111, 187, 0, 465 30, 187, 111, 15, 0, 0, 111, 187, 0, 0, 466 111, 187, 0, 111, 187, 111, 187, 0, 187, 0, 467 15, 0, 23, 177, 187, 111, 187, 111, 187, 111, 468 187, 152, 146, 88, 147, 89, 0, 0, 146, 70, 469 187, 0, 146, 69, 187, 0, 146, 67, 15, 0, 470 146, 141, 0, 146, 153, 0, 146, 66, 120, 0, 471 146, 24, 119, 0, 146, 181, 0, 146, 182, 0, 472 146, 183, 0, 0, 147, 44, 148, 0, 147, 45, 473 150, 0, 147, 42, 150, 0, 147, 41, 150, 0, 474 147, 43, 150, 0, 147, 35, 149, 0, 147, 36, 475 149, 0, 147, 40, 149, 0, 147, 37, 149, 0, 476 147, 38, 149, 0, 147, 32, 149, 0, 147, 39, 477 149, 0, 147, 33, 149, 0, 147, 34, 149, 0, 478 147, 48, 149, 0, 147, 47, 149, 0, 147, 46, 479 149, 0, 147, 31, 120, 111, 187, 111, 187, 111, 480 187, 139, 0, 120, 111, 187, 111, 144, 111, 187, 481 111, 187, 111, 187, 111, 187, 111, 187, 111, 186, 482 152, 151, 0, 120, 111, 187, 111, 144, 111, 187, 483 111, 187, 111, 187, 111, 187, 111, 187, 151, 0, 484 15, 111, 187, 111, 187, 111, 187, 111, 187, 111, 485 187, 143, 151, 0, 187, 111, 187, 111, 187, 111, 486 187, 111, 187, 143, 151, 0, 0, 184, 0, 0, 487 111, 187, 0, 30, 187, 111, 15, 111, 187, 111, 488 187, 154, 0, 0, 111, 187, 0, 24, 177, 180, 489 156, 0, 88, 157, 89, 0, 0, 157, 82, 15, 490 111, 187, 158, 0, 157, 82, 84, 0, 157, 83, 491 15, 158, 156, 0, 0, 111, 56, 158, 0, 111, 492 55, 158, 0, 111, 85, 158, 0, 111, 57, 158, 493 0, 111, 80, 158, 0, 111, 81, 158, 0, 25, 494 177, 180, 160, 0, 88, 161, 89, 0, 0, 161, 495 82, 15, 162, 0, 161, 82, 84, 0, 161, 83, 496 15, 163, 160, 0, 0, 111, 187, 0, 111, 186, 497 111, 186, 158, 0, 111, 186, 111, 186, 111, 187, 498 0, 0, 111, 187, 0, 111, 186, 111, 187, 0, 499 111, 186, 111, 186, 111, 187, 0, 111, 186, 111, 500 186, 111, 186, 111, 187, 0, 165, 88, 166, 89, 501 0, 29, 177, 180, 0, 0, 166, 187, 167, 15, 502 0, 0, 111, 0, 28, 169, 88, 170, 89, 0, 503 0, 169, 73, 187, 111, 187, 111, 187, 111, 187, 504 0, 169, 74, 187, 111, 187, 111, 187, 111, 187, 505 0, 169, 78, 187, 0, 169, 75, 187, 0, 169, 506 76, 187, 0, 169, 77, 187, 0, 169, 79, 187, 507 0, 0, 170, 171, 0, 49, 15, 88, 172, 89, 508 0, 0, 172, 173, 0, 171, 0, 50, 15, 111, 509 15, 0, 50, 15, 111, 174, 0, 187, 0, 174, 510 111, 187, 0, 86, 177, 187, 111, 187, 180, 88, 511 176, 89, 0, 0, 176, 87, 187, 0, 176, 84, 512 0, 0, 177, 178, 0, 177, 179, 0, 63, 0, 513 65, 0, 61, 0, 59, 0, 62, 0, 64, 0, 514 60, 0, 0, 180, 181, 0, 180, 182, 0, 180, 515 183, 0, 72, 187, 111, 187, 0, 68, 187, 0, 516 71, 187, 0, 88, 185, 89, 0, 18, 0, 13, 517 0, 14, 0, 15, 0, 185, 167, 18, 0, 185, 518 167, 13, 0, 185, 167, 14, 0, 185, 167, 15, 519 0, 0, 187, 0, 188, 189, 0, 0, 189, 102, 520 189, 0, 189, 103, 189, 0, 189, 93, 189, 0, 521 189, 95, 189, 0, 189, 104, 189, 0, 189, 105, 522 189, 0, 106, 189, 0, 103, 189, 0, 109, 189, 523 110, 0, 190, 0, 108, 190, 0, 13, 0, 14, 524 0 461 31, 120, 168, 188, 111, 188, 111, 188, 139, 0, 462 15, 168, 188, 111, 188, 111, 188, 111, 188, 111, 463 188, 142, 0, 188, 111, 188, 111, 188, 111, 188, 464 111, 188, 142, 0, 0, 111, 188, 111, 188, 0, 465 111, 188, 111, 188, 111, 144, 0, 111, 188, 111, 466 188, 111, 144, 111, 144, 0, 120, 168, 188, 111, 467 145, 111, 144, 111, 188, 111, 188, 111, 188, 111, 468 188, 111, 144, 0, 120, 168, 188, 111, 145, 111, 469 144, 111, 188, 111, 188, 111, 188, 111, 188, 0, 470 30, 188, 111, 15, 0, 0, 111, 144, 0, 0, 471 111, 144, 0, 111, 144, 111, 144, 0, 144, 93, 472 144, 0, 109, 144, 110, 0, 190, 0, 108, 190, 473 0, 188, 0, 15, 0, 23, 178, 188, 111, 188, 474 111, 188, 111, 188, 153, 147, 88, 148, 89, 0, 475 0, 147, 70, 144, 0, 147, 69, 144, 0, 147, 476 67, 15, 0, 147, 141, 0, 147, 154, 0, 147, 477 66, 120, 0, 147, 24, 119, 0, 147, 182, 0, 478 147, 183, 0, 147, 184, 0, 0, 148, 44, 149, 479 0, 148, 45, 151, 0, 148, 42, 151, 0, 148, 480 41, 151, 0, 148, 43, 151, 0, 148, 35, 150, 481 0, 148, 36, 150, 0, 148, 40, 150, 0, 148, 482 37, 150, 0, 148, 38, 150, 0, 148, 32, 150, 483 0, 148, 39, 150, 0, 148, 33, 150, 0, 148, 484 34, 150, 0, 148, 48, 150, 0, 148, 47, 150, 485 0, 148, 46, 150, 0, 148, 31, 120, 168, 188, 486 111, 188, 111, 188, 139, 0, 120, 168, 188, 111, 487 145, 111, 144, 111, 188, 111, 188, 111, 188, 111, 488 188, 111, 144, 153, 152, 0, 120, 168, 188, 111, 489 145, 111, 144, 111, 188, 111, 188, 111, 188, 111, 490 188, 152, 0, 15, 168, 188, 111, 188, 111, 188, 491 111, 188, 111, 188, 143, 152, 0, 188, 111, 188, 492 111, 188, 111, 188, 111, 188, 143, 152, 0, 0, 493 185, 0, 0, 111, 188, 0, 30, 188, 111, 15, 494 111, 188, 111, 188, 155, 0, 0, 111, 188, 0, 495 24, 178, 181, 157, 0, 88, 158, 89, 0, 0, 496 158, 82, 15, 168, 188, 159, 0, 158, 82, 84, 497 0, 158, 83, 15, 159, 157, 0, 0, 111, 56, 498 159, 0, 111, 55, 159, 0, 111, 85, 159, 0, 499 111, 57, 159, 0, 111, 80, 159, 0, 111, 81, 500 159, 0, 25, 178, 181, 161, 0, 88, 162, 89, 501 0, 0, 162, 82, 15, 163, 0, 162, 82, 84, 502 0, 162, 83, 15, 164, 161, 0, 0, 111, 188, 503 0, 111, 187, 111, 187, 159, 0, 111, 187, 111, 504 187, 111, 188, 0, 0, 111, 188, 0, 111, 187, 505 111, 188, 0, 111, 187, 111, 187, 111, 188, 0, 506 111, 187, 111, 187, 111, 187, 111, 188, 0, 166, 507 88, 167, 89, 0, 29, 178, 181, 0, 0, 167, 508 188, 168, 15, 0, 0, 111, 0, 28, 170, 88, 509 171, 89, 0, 0, 170, 73, 188, 111, 188, 111, 510 188, 111, 188, 0, 170, 74, 188, 111, 188, 111, 511 188, 111, 188, 0, 170, 78, 188, 0, 170, 75, 512 188, 0, 170, 76, 188, 0, 170, 77, 188, 0, 513 170, 79, 188, 0, 0, 171, 172, 0, 49, 15, 514 88, 173, 89, 0, 0, 173, 174, 0, 172, 0, 515 50, 15, 111, 15, 0, 50, 15, 111, 175, 0, 516 188, 0, 175, 111, 188, 0, 86, 178, 188, 111, 517 188, 181, 88, 177, 89, 0, 0, 177, 87, 188, 518 0, 177, 84, 0, 0, 178, 179, 0, 178, 180, 519 0, 63, 0, 65, 0, 61, 0, 59, 0, 62, 520 0, 64, 0, 60, 0, 0, 181, 182, 0, 181, 521 183, 0, 181, 184, 0, 72, 188, 111, 188, 0, 522 68, 188, 0, 71, 188, 0, 88, 186, 89, 0, 523 18, 0, 13, 0, 14, 0, 15, 0, 186, 168, 524 18, 0, 186, 168, 13, 0, 186, 168, 14, 0, 525 186, 168, 15, 0, 0, 188, 0, 189, 0, 189, 526 102, 189, 0, 189, 103, 189, 0, 189, 93, 189, 527 0, 189, 95, 189, 0, 189, 104, 189, 0, 189, 528 105, 189, 0, 106, 189, 0, 103, 189, 0, 109, 529 189, 110, 0, 190, 0, 108, 190, 0, 13, 0, 530 14, 0 525 531 }; 526 532 … … 529 535 #if YYDEBUG != 0 530 536 static const short yyrline[] = { 0, 531 3 03, 323, 324, 349, 350, 355, 356, 357, 358, 359,532 36 0, 363, 364, 365, 366, 367, 368, 369, 370, 371,533 37 2, 373, 374, 375, 376, 377, 378, 379, 383, 384,534 3 85, 386, 390, 391, 392, 393, 394, 399, 414, 422,535 4 35, 441, 452, 453, 463, 464, 465, 479, 480, 486,536 4 87, 488, 502, 503, 509, 510, 511, 512, 513, 517,537 5 18, 522, 523, 528, 532, 533, 541, 549, 562, 575,538 5 76, 595, 607, 617, 641, 642, 643, 646, 647, 648,539 6 49, 650, 651, 652, 657, 688, 689, 690, 691, 692,540 693, 694, 695, 696, 697, 700, 701, 702, 703, 704,541 7 05, 706, 707, 708, 709, 711, 712, 713, 714, 715,542 7 16, 717, 718, 720, 730, 750, 766, 769, 774, 781,543 792, 806, 821, 825, 826, 830, 831, 832, 836, 841,544 8 49, 888, 889, 890, 891, 892, 893, 894, 895, 896,545 897, 898, 901, 902, 903, 904, 905, 906, 907, 908,546 9 09, 910, 912, 913, 914, 915, 916, 917, 918, 919,547 9 21, 931, 957, 973, 1001, 1024, 1025, 1028, 1029, 1033,548 104 0, 1041, 1045, 1068, 1072, 1073, 1082, 1088, 1107, 1108,549 110 9, 1110, 1111, 1112, 1113, 1117, 1142, 1146, 1147, 1163,550 116 9, 1189, 1190, 1194, 1202, 1213, 1214, 1218, 1224, 1232,551 12 52, 1293, 1304, 1305, 1335, 1336, 1341, 1348, 1349, 1359,552 136 9, 1376, 1383, 1390, 1397, 1407, 1408, 1417, 1425, 1426,553 143 5, 1440, 1446, 1455, 1456, 1460, 1486, 1487, 1492, 1501,554 15 02, 1512, 1527, 1528, 1529, 1530, 1533, 1534, 1535, 1539,555 15 40, 1548, 1556, 1567, 1571, 1575, 1579, 1583, 1584, 1585,556 1 586, 1587, 1588, 1589, 1590, 1597, 1598, 1600, 1603, 1606,557 16 07, 1608, 1609, 1610, 1611, 1612, 1613, 1615, 1616, 1617,558 16 20, 1621537 310, 330, 331, 356, 357, 362, 363, 364, 365, 366, 538 367, 370, 371, 372, 373, 374, 375, 376, 377, 378, 539 379, 380, 381, 382, 383, 384, 385, 386, 390, 391, 540 392, 393, 397, 398, 399, 400, 401, 406, 421, 429, 541 442, 450, 461, 462, 472, 473, 474, 488, 489, 495, 542 496, 497, 511, 512, 518, 519, 520, 521, 522, 526, 543 527, 531, 532, 537, 541, 542, 550, 558, 571, 584, 544 585, 604, 616, 626, 650, 651, 652, 655, 656, 657, 545 658, 659, 660, 661, 666, 701, 702, 703, 704, 705, 546 706, 707, 708, 709, 710, 713, 714, 715, 716, 717, 547 718, 719, 720, 721, 722, 724, 725, 726, 727, 728, 548 729, 730, 731, 733, 743, 762, 777, 780, 785, 792, 549 803, 817, 832, 837, 838, 842, 843, 844, 848, 849, 550 850, 851, 855, 860, 868, 913, 914, 915, 916, 917, 551 918, 919, 920, 921, 922, 923, 926, 927, 928, 929, 552 930, 931, 932, 933, 934, 935, 937, 938, 939, 940, 553 941, 942, 943, 944, 946, 956, 981, 997, 1025, 1048, 554 1049, 1052, 1053, 1057, 1064, 1065, 1069, 1092, 1096, 1097, 555 1106, 1112, 1131, 1132, 1133, 1134, 1135, 1136, 1137, 1141, 556 1166, 1170, 1171, 1187, 1193, 1213, 1214, 1218, 1226, 1237, 557 1238, 1242, 1248, 1256, 1276, 1317, 1328, 1329, 1361, 1362, 558 1367, 1374, 1375, 1385, 1395, 1402, 1409, 1416, 1423, 1433, 559 1434, 1443, 1451, 1452, 1461, 1466, 1472, 1481, 1482, 1486, 560 1512, 1513, 1518, 1527, 1528, 1538, 1553, 1554, 1555, 1556, 561 1559, 1560, 1561, 1565, 1566, 1574, 1582, 1593, 1597, 1601, 562 1605, 1609, 1610, 1611, 1612, 1613, 1614, 1615, 1616, 1623, 563 1624, 1626, 1629, 1630, 1631, 1632, 1633, 1634, 1635, 1636, 564 1638, 1639, 1640, 1643, 1644 559 565 }; 560 566 #endif … … 581 587 "usertype","accelerators","events","acc_opt","dialog","dlg_attributes","ctrls", 582 588 "lab_ctrl","ctrl_desc","iconinfo","gen_ctrl","opt_font","optional_style","optional_style_pair", 583 " ctlclass","dialogex","dlgex_attribs","exctrls","gen_exctrl","lab_exctrl","exctrl_desc",584 " opt_data","helpid","opt_exfont","opt_expr","menu","menu_body","item_definitions",585 "item_ options","menuex","menuex_body","itemex_definitions","itemex_options",586 "itemex_ p_options","stringtable","stt_head","strings","opt_comma","versioninfo",587 " fix_version","ver_blocks","ver_block","ver_values","ver_value","ver_words",588 " toolbar","toolbar_items","loadmemopts","lamo","lama","opt_lvc","opt_language",589 "opt_ characts","opt_version","raw_data","raw_elements","e_expr","expr","dummy",590 " xpr","any_num", NULL589 "style","ctlclass","dialogex","dlgex_attribs","exctrls","gen_exctrl","lab_exctrl", 590 "exctrl_desc","opt_data","helpid","opt_exfont","opt_expr","menu","menu_body", 591 "item_definitions","item_options","menuex","menuex_body","itemex_definitions", 592 "itemex_options","itemex_p_options","stringtable","stt_head","strings","opt_comma", 593 "versioninfo","fix_version","ver_blocks","ver_block","ver_values","ver_value", 594 "ver_words","toolbar","toolbar_items","loadmemopts","lamo","lama","opt_lvc", 595 "opt_language","opt_characts","opt_version","raw_data","raw_elements","e_expr", 596 "expr","xpr","any_num", NULL 591 597 }; 592 598 #endif … … 606 612 136, 136, 136, 136, 137, 138, 139, 139, 139, 139, 607 613 140, 140, 141, 142, 142, 143, 143, 143, 144, 144, 608 14 5, 146, 146, 146, 146, 146, 146, 146, 146, 146,609 14 6, 146, 147, 147, 147, 147, 147, 147, 147, 147,610 14 7, 147, 147, 147, 147, 147, 147, 147, 147, 147,611 14 7, 148, 148, 149, 150, 151, 151, 152, 152, 153,612 15 4, 154, 155, 156, 157, 157, 157, 157, 158, 158,613 158, 158, 15 8, 158, 158, 159, 160, 161, 161, 161,614 161, 162, 162, 162, 162, 163, 163, 163, 163, 16 3,615 164, 16 5, 166, 166, 167, 167, 168, 169, 169, 169,616 169, 1 69, 169, 169, 169, 170, 170, 171, 172, 172,617 17 3, 173, 173, 174, 174, 175, 176, 176, 176, 177,618 177, 177, 17 8, 178, 178, 178, 179, 179, 179, 180,619 180, 180, 180, 181, 18 2, 183, 184, 185, 185, 185,620 185, 18 5, 185, 185, 185, 186, 186, 187, 188, 189,621 18 9, 189, 189, 189, 189, 189, 189, 189, 189, 189,622 1 90, 190614 144, 144, 145, 145, 146, 147, 147, 147, 147, 147, 615 147, 147, 147, 147, 147, 147, 148, 148, 148, 148, 616 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 617 148, 148, 148, 148, 148, 149, 149, 150, 151, 152, 618 152, 153, 153, 154, 155, 155, 156, 157, 158, 158, 619 158, 158, 159, 159, 159, 159, 159, 159, 159, 160, 620 161, 162, 162, 162, 162, 163, 163, 163, 163, 164, 621 164, 164, 164, 164, 165, 166, 167, 167, 168, 168, 622 169, 170, 170, 170, 170, 170, 170, 170, 170, 171, 623 171, 172, 173, 173, 174, 174, 174, 175, 175, 176, 624 177, 177, 177, 178, 178, 178, 179, 179, 179, 179, 625 180, 180, 180, 181, 181, 181, 181, 182, 183, 184, 626 185, 186, 186, 186, 186, 186, 186, 186, 186, 187, 627 187, 188, 189, 189, 189, 189, 189, 189, 189, 189, 628 189, 189, 189, 190, 190 623 629 }; 624 630 … … 636 642 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 637 643 3, 3, 3, 10, 12, 10, 0, 4, 6, 8, 638 17, 15, 4, 0, 2, 0, 2, 4, 1, 1,639 14, 0, 3, 3, 3, 2, 2, 3, 3, 2,640 2, 2, 0, 3, 3, 3, 3, 3, 3, 3,644 17, 15, 4, 0, 2, 0, 2, 4, 3, 3, 645 1, 2, 1, 1, 14, 0, 3, 3, 3, 2, 646 2, 3, 3, 2, 2, 2, 0, 3, 3, 3, 641 647 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 642 10, 19, 16, 13, 11, 0, 1, 0, 2, 9,643 0, 2, 4, 3, 0, 6, 3, 5, 0, 3,644 3, 3, 3, 3, 3, 4, 3, 0, 4, 3,645 5, 0, 2, 5, 6, 0, 2, 4, 6, 8,646 4, 3, 0, 4, 0, 1, 5, 0, 9, 9,647 3, 3, 3, 3, 3, 0, 2, 5, 0, 2,648 1, 4, 4, 1, 3, 9, 0, 3, 2, 0,649 2, 2, 1, 1, 1, 1, 1, 1, 1, 0,650 2, 2, 2, 4, 2, 2, 3, 1, 1, 1,651 1, 3, 3, 3, 3, 0, 1, 2, 0, 3,652 3, 3, 3, 3, 3, 2, 2, 3, 1, 2,653 1, 1648 3, 3, 3, 3, 10, 19, 16, 13, 11, 0, 649 1, 0, 2, 9, 0, 2, 4, 3, 0, 6, 650 3, 5, 0, 3, 3, 3, 3, 3, 3, 4, 651 3, 0, 4, 3, 5, 0, 2, 5, 6, 0, 652 2, 4, 6, 8, 4, 3, 0, 4, 0, 1, 653 5, 0, 9, 9, 3, 3, 3, 3, 3, 0, 654 2, 5, 0, 2, 1, 4, 4, 1, 3, 9, 655 0, 3, 2, 0, 2, 2, 1, 1, 1, 1, 656 1, 1, 1, 0, 2, 2, 2, 4, 2, 2, 657 3, 1, 1, 1, 1, 3, 3, 3, 3, 0, 658 1, 1, 3, 3, 3, 3, 3, 3, 2, 2, 659 3, 1, 2, 1, 1 654 660 }; 655 661 656 662 static const short yydefact[] = { 2, 657 259, 0, 0, 0, 0, 0, 0, 33, 34, 42, 658 230, 259, 4, 5, 3, 0, 39, 0, 40, 41, 659 0, 0, 271, 272, 30, 0, 0, 0, 0, 0, 660 0, 12, 29, 0, 0, 10, 0, 11, 35, 37, 661 36, 240, 0, 72, 73, 230, 230, 230, 230, 230, 662 230, 230, 0, 230, 208, 230, 230, 230, 230, 38, 663 46, 47, 51, 52, 55, 56, 50, 58, 230, 45, 664 48, 49, 53, 54, 59, 57, 203, 0, 0, 0, 665 0, 258, 269, 31, 0, 25, 26, 24, 27, 0, 666 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 667 0, 0, 7, 8, 9, 236, 239, 235, 237, 233, 668 238, 234, 231, 232, 202, 259, 240, 0, 0, 259, 669 259, 240, 240, 67, 240, 0, 0, 0, 259, 240, 670 0, 259, 267, 266, 270, 0, 0, 0, 0, 0, 671 0, 0, 0, 28, 13, 14, 17, 18, 19, 20, 672 22, 21, 23, 15, 16, 259, 259, 241, 242, 243, 673 244, 0, 60, 0, 61, 62, 63, 0, 0, 0, 674 0, 0, 259, 259, 259, 259, 259, 259, 259, 216, 675 64, 65, 66, 0, 0, 70, 71, 201, 205, 268, 676 262, 263, 260, 261, 264, 265, 32, 245, 246, 75, 677 249, 250, 251, 248, 205, 259, 259, 175, 173, 188, 678 186, 68, 0, 0, 212, 213, 214, 211, 215, 0, 679 259, 69, 206, 0, 259, 247, 0, 0, 0, 0, 680 0, 259, 259, 0, 207, 217, 240, 204, 0, 74, 681 0, 253, 254, 255, 252, 259, 259, 0, 0, 174, 682 0, 0, 187, 0, 0, 0, 0, 259, 259, 0, 683 0, 0, 177, 179, 192, 190, 196, 259, 259, 219, 684 227, 78, 78, 259, 259, 259, 0, 0, 259, 189, 685 259, 0, 0, 0, 0, 0, 76, 77, 86, 168, 686 179, 179, 179, 179, 179, 179, 179, 178, 0, 193, 687 0, 197, 191, 259, 259, 0, 218, 221, 220, 229, 688 259, 226, 0, 0, 259, 132, 176, 181, 180, 183, 689 184, 185, 182, 259, 259, 209, 210, 0, 228, 81, 690 80, 82, 83, 84, 79, 259, 259, 259, 0, 259, 691 259, 96, 90, 93, 94, 95, 169, 0, 179, 257, 692 0, 198, 259, 42, 92, 0, 44, 43, 91, 89, 693 88, 87, 0, 259, 259, 259, 0, 259, 259, 143, 694 136, 137, 140, 141, 142, 259, 194, 259, 222, 223, 695 224, 0, 259, 0, 0, 0, 0, 0, 0, 0, 696 0, 0, 259, 259, 259, 259, 259, 0, 0, 0, 697 85, 139, 0, 138, 135, 134, 133, 0, 195, 0, 698 199, 259, 123, 0, 0, 107, 109, 110, 102, 103, 699 105, 106, 108, 104, 100, 0, 99, 101, 0, 97, 700 98, 113, 112, 111, 0, 259, 0, 0, 0, 0, 701 0, 0, 0, 0, 0, 259, 259, 259, 259, 259, 702 0, 0, 0, 131, 259, 225, 259, 259, 259, 259, 703 123, 0, 0, 154, 156, 157, 149, 150, 152, 153, 704 155, 151, 147, 0, 146, 148, 0, 144, 145, 160, 705 159, 158, 200, 0, 0, 0, 0, 259, 259, 259, 706 259, 259, 259, 259, 259, 259, 0, 0, 0, 0, 707 0, 0, 0, 0, 130, 0, 129, 259, 259, 259, 708 259, 259, 259, 259, 259, 259, 171, 0, 0, 0, 709 0, 117, 0, 0, 0, 259, 170, 259, 259, 259, 710 259, 259, 114, 259, 259, 259, 172, 117, 0, 0, 711 0, 0, 0, 124, 0, 161, 259, 259, 259, 259, 712 259, 259, 116, 259, 0, 126, 0, 118, 124, 125, 713 0, 259, 259, 166, 259, 259, 115, 259, 126, 127, 714 165, 167, 0, 119, 0, 166, 259, 259, 259, 259, 715 164, 128, 0, 120, 122, 259, 259, 166, 121, 256, 716 163, 168, 166, 162, 0, 0, 0 663 1, 0, 0, 0, 0, 0, 0, 33, 34, 274, 664 275, 42, 234, 0, 0, 0, 0, 0, 4, 5, 665 3, 0, 39, 0, 40, 41, 262, 272, 0, 30, 666 0, 0, 0, 0, 0, 0, 12, 29, 0, 0, 667 10, 0, 11, 35, 37, 36, 244, 0, 270, 269, 668 273, 0, 72, 73, 234, 234, 234, 234, 234, 234, 669 234, 0, 234, 212, 234, 234, 234, 234, 38, 46, 670 47, 51, 52, 55, 56, 50, 58, 234, 45, 48, 671 49, 53, 54, 59, 57, 207, 0, 0, 0, 0, 672 0, 0, 31, 0, 25, 26, 24, 27, 0, 6, 673 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 674 0, 7, 8, 9, 240, 243, 239, 241, 237, 242, 675 238, 235, 236, 206, 0, 271, 244, 0, 0, 0, 676 0, 244, 244, 67, 244, 0, 0, 0, 0, 244, 677 0, 0, 265, 266, 263, 264, 267, 268, 0, 28, 678 13, 14, 17, 18, 19, 20, 22, 21, 23, 15, 679 16, 0, 0, 245, 246, 247, 248, 0, 60, 0, 680 61, 62, 63, 0, 0, 0, 0, 0, 0, 0, 681 0, 0, 0, 0, 0, 220, 64, 65, 66, 0, 682 0, 70, 71, 205, 209, 32, 249, 250, 75, 253, 683 254, 255, 252, 209, 0, 0, 179, 177, 192, 190, 684 68, 0, 0, 216, 217, 218, 215, 219, 0, 0, 685 69, 210, 0, 0, 251, 0, 0, 0, 0, 0, 686 0, 0, 0, 211, 221, 244, 208, 0, 74, 0, 687 257, 258, 259, 256, 0, 0, 0, 0, 178, 0, 688 0, 191, 0, 0, 0, 0, 0, 0, 0, 0, 689 209, 181, 183, 196, 194, 200, 0, 0, 223, 231, 690 78, 78, 0, 0, 0, 0, 0, 260, 193, 260, 691 0, 0, 0, 0, 0, 76, 77, 86, 172, 183, 692 183, 183, 183, 183, 183, 183, 182, 0, 197, 0, 693 201, 195, 0, 0, 0, 222, 225, 224, 233, 0, 694 230, 0, 0, 0, 136, 180, 185, 184, 187, 188, 695 189, 186, 260, 260, 213, 214, 0, 232, 81, 80, 696 82, 83, 84, 79, 0, 0, 0, 0, 0, 0, 697 96, 90, 93, 94, 95, 173, 0, 183, 261, 0, 698 202, 0, 42, 92, 0, 44, 43, 91, 89, 0, 699 0, 88, 131, 87, 0, 0, 0, 0, 0, 0, 700 0, 147, 140, 141, 144, 145, 146, 0, 198, 260, 701 226, 227, 228, 0, 132, 0, 0, 0, 0, 0, 702 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 703 0, 0, 0, 0, 0, 85, 143, 0, 142, 139, 704 138, 137, 0, 199, 0, 203, 0, 123, 130, 129, 705 209, 209, 107, 109, 110, 102, 103, 105, 106, 108, 706 104, 100, 0, 99, 101, 209, 97, 98, 113, 112, 707 111, 0, 0, 0, 0, 0, 0, 0, 0, 0, 708 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 709 135, 0, 229, 0, 0, 0, 0, 123, 209, 209, 710 158, 160, 161, 153, 154, 156, 157, 159, 155, 151, 711 0, 150, 152, 209, 148, 149, 164, 163, 162, 204, 712 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 713 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 714 0, 134, 0, 133, 0, 0, 0, 0, 0, 0, 715 0, 0, 0, 175, 0, 0, 0, 0, 117, 0, 716 0, 0, 0, 174, 0, 0, 0, 0, 0, 114, 717 0, 0, 0, 176, 117, 0, 0, 0, 0, 0, 718 124, 0, 165, 0, 0, 0, 0, 0, 0, 116, 719 0, 0, 126, 0, 118, 124, 125, 0, 0, 0, 720 170, 0, 0, 115, 0, 126, 127, 169, 171, 0, 721 119, 0, 170, 0, 0, 0, 0, 168, 128, 0, 722 120, 122, 0, 0, 170, 121, 0, 167, 172, 170, 723 166, 0, 0, 0 717 724 }; 718 725 719 static const short yydefgoto[] = { 595,720 1, 1 3, 31, 32, 14, 15, 358, 359, 60, 61,721 62, 63, 64, 65, 66, 67, 68, 69, 70, 225,722 28 7, 71, 314, 363, 416, 425, 533, 430, 343, 553,723 5 64, 506, 72, 348, 408, 478, 464, 473, 571, 316,724 3 72, 527, 73, 209, 230, 278, 74, 211, 231, 280,725 2 82, 17, 18, 132, 224, 75, 126, 220, 236, 285,726 309, 380, 76, 286, 42, 113, 114, 115, 158, 159,727 16 0, 572, 205, 299, 20, 21, 82, 33726 static const short yydefgoto[] = { 602, 727 1, 19, 36, 37, 20, 21, 357, 358, 69, 70, 728 71, 72, 73, 74, 75, 76, 77, 78, 79, 224, 729 286, 80, 313, 365, 423, 432, 540, 437, 342, 560, 730 571, 362, 513, 81, 347, 413, 485, 471, 480, 578, 731 315, 374, 534, 82, 208, 229, 277, 83, 210, 230, 732 279, 281, 23, 24, 142, 223, 84, 136, 219, 235, 733 284, 308, 382, 85, 285, 47, 122, 123, 124, 164, 734 165, 166, 579, 204, 298, 26, 27, 28 728 735 }; 729 736 730 737 static const short yypact[] = {-32768, 731 199, 9, 20, 28, 6, 9, 51,-32768,-32768, -7, 732 -32768,-32768,-32768,-32768,-32768, 253,-32768, 18,-32768,-32768, 733 -10, -8,-32768,-32768,-32768, 9, 9, 9, 9, 9, 734 77,-32768,-32768, 61, 70,-32768, 90,-32768,-32768,-32768, 735 -32768, 484, 8,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 736 -32768,-32768, 126,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 738 39, 10, -4, 0, -1, 10, 15,-32768,-32768,-32768, 739 -32768, -15,-32768, 197, 197, 197, 82, 197,-32768,-32768, 740 -32768, 442,-32768, -68,-32768,-32768, 390,-32768, 6,-32768, 741 10, 10, 10, 10, 10, 298,-32768,-32768, 31, 56, 742 -32768, 351,-32768,-32768,-32768,-32768, 611, -41, 50,-32768, 743 -32768, 483,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 744 -32768, 55,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 737 745 -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 738 -32768,-32768,-32768,-32768,-32768,-32768, -32768, -10, -10, 13,739 -10, 570,-32768,-32768, 137,-32768,-32768,-32768,-32768, 525,740 -32768, 9, 9, 9, 9, 9, 9, 9, 9, 9,741 9, 9,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,742 -32768,-32768,-32768, -32768, 308,-32768, 484, 271, 309, 484,743 484, 484, 484,-32768, 484, 453, 179, 327, 484, 484,744 343, 81, -70,-32768,-32768, 467, -10, -10, -10, -10,745 -10, -10, 62,-32768, 584, 391, 371, 311, 311, 116,746 116, 116, 116,-32768,-32768,-32768,-32768,-32768,-32768,-32768,747 -32768, 42,-32768, 237,-32768,-32768,-32768, 72, 74, 129,748 214, 219,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,749 -32768,-32768,-32768, 87, 219,-32768,-32768,-32768, 97,-32768,750 206, -14, -70, -70,-32768,-32768,-32768,-32768,-32768,-32768,751 -32768, -32768,-32768,-32768, -4,-32768,-32768,-32768,-32768,-32768,752 -32768,-32768, 1 03, 105,-32768,-32768,-32768,-32768,-32768, -30,753 -32768,-32768,-32768, 222, -5,-32768, 336, 134, 143, 144,754 215,-32768,-32768, 245,-32768,-32768,-32768,-32768, 154,-32768,755 159,-32768,-32768,-32768,-32768,-32768,-32768, -1, 281,-32768,756 2, 285,-32768, 194, 195, 201, 274,-32768,-32768, 205,757 212, 213,-32768, 216, 227,-32768, 229,-32768,-32768,-32768,758 -32768,-32768,-32768,-32768,-32768,-32768, 168, 259, 241,-32768,759 2 41, 267, 247, 250, -17, -44, 252, 252,-32768, 256,760 2 16, 216, 216, 216, 216, 216, 216,-32768, 264, 266,761 282, 266,-32768,-32768,-32768, 379,-32768,-32768,-32768,-32768,762 -32768,-32768, 1 78, 7,-32768,-32768,-32768,-32768,-32768,-32768,763 -32768,-32768,-32768, -29, 241,-32768,-32768, 284,-32768,-32768,764 -32768,-32768,-32768,-32768,-32768, 380,-32768, 279, 383,-32768,765 -32768,-32768,-32768,-32768,-32768,-32768,-32768, 354, 288,-32768,766 290, 266, 401,-32768,-32768, 306,-32768,-32768,-32768,-32768,767 -32768,-32768, 418, 380,-32768, 279, 403,-32768,-32768,-32768,768 -32768, -32768,-32768,-32768,-32768, 168,-32768, 241,-32768, 316,769 -32768, 404, 279, 413, 413, 413, 413, 413, 413, 413,770 413, 413,-32768,-32768,-32768, 279,-32768, 413, 413, 413,771 -32768,-32768, 318,-32768,-32768,-32768,-32768, 548,-32768, 319,772 266,-32768,-32768, 321, 322,-32768,-32768,-32768,-32768,-32768,773 -32768,-32768, -32768,-32768,-32768, 326,-32768,-32768, 328,-32768,774 -32768, -32768,-32768,-32768, 425, 279, 426, 426, 426, 426,775 4 26, 426, 426, 426, 426,-32768,-32768,-32768, 279,-32768,776 426, 426, 426,-32768,-32768,-32768,-32768,-32768,-32768,-32768,777 333, 364, 375,-32768,-32768,-32768,-32768,-32768,-32768,-32768,778 -32768,-32768,-32768, 384,-32768,-32768, 394,-32768,-32768,-32768,779 -32768,-32768,-32768, 395, 397, 398, 399,-32768,-32768,-32768,780 -32768,-32768,-32768,-32768,-32768, 496, 402, 410, 414, 422,781 42 3, 441, 444, 446,-32768, 447,-32768,-32768,-32768,-32768,782 -32768, 496,-32768,-32768,-32768,-32768, 448, 450, 452, 462,783 4 65, 493, 495, 500, 501,-32768,-32768,-32768,-32768,-32768,784 -32768,-32768,-32768,-32768,-32768,-32768,-32768, 493, 502, 503,785 504, 507, 518, 519, 520,-32768,-32768,-32768,-32768,-32768,786 -32768,-32768,-32768,-32768, 521, 522, 523, 527, 519,-32768,787 536,-32768,-32768, 424,-32768,-32768,-32768,-32768, 522, 537,788 -32768,-32768, 538, 539, 540, 424,-32768,-32768,-32768,-32768,789 -32768,-32768, 553,-32768, 555,-32768,-32768, -59,-32768, 43,790 -32768, 256, 424,-32768, 515, 564,-32768746 -32768,-32768,-32768,-32768,-32768,-32768, 197, 197, 197, 197, 747 197, 197,-32768, 58,-32768,-32768,-32768,-32768, 449,-32768, 748 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 749 10,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 750 -32768,-32768,-32768, 349, 197,-32768, 611, 345, 417, 110, 751 110, 611, 611,-32768, 611, 558, 19, 439, 110, 611, 752 454, 114, 517, 125, 50, 50,-32768,-32768, -25,-32768, 753 690, 700, 556, 706, 706, 85, 85, 85, 85,-32768, 754 -32768, 197, 197,-32768,-32768,-32768,-32768, 153,-32768, 401, 755 -32768,-32768,-32768, -14, 7, 195, 255, 262, 197, 197, 756 197, 197, 197, 197, 197,-32768,-32768,-32768,-32768, 53, 757 262,-32768,-32768,-32768, 78,-32768,-32768,-32768,-32768,-32768, 758 -32768,-32768,-32768, -13, 197, 197,-32768,-32768,-32768,-32768, 759 -32768, 88, 123,-32768,-32768,-32768,-32768,-32768, -22, 197, 760 -32768,-32768, 135, 73,-32768, 516, 132, 148, 74, 95, 761 197, 197, 178,-32768,-32768,-32768,-32768, 154,-32768, 157, 762 -32768,-32768,-32768,-32768, 197, 197, -9, 254,-32768, -7, 763 257,-32768, 173, 184, 22, 276, 197, 197, 214, 220, 764 78,-32768, 224, 230,-32768, 234, 197, 197,-32768,-32768, 765 -32768,-32768, 197, 197, 197, 111, 209, 197,-32768, 197, 766 258, 240, 245, 76, 268, 252, 252,-32768, 267, 224, 767 224, 224, 224, 224, 224, 224,-32768, 269, 273, 280, 768 273,-32768, 197, 197, 297,-32768,-32768,-32768,-32768, 197, 769 -32768, 723, 530, 197,-32768,-32768,-32768,-32768,-32768,-32768, 770 -32768,-32768, 197, 197,-32768,-32768, 282,-32768,-32768,-32768, 771 -32768,-32768,-32768,-32768, 193, 197, 77, 364, 35, 35, 772 -32768,-32768,-32768,-32768,-32768,-32768, 618, 291,-32768, 292, 773 273, 43,-32768,-32768, 302,-32768,-32768,-32768,-32768, 82, 774 35, 294,-32768, 294, 676, 193, 197, 77, 420, 35, 775 35,-32768,-32768,-32768,-32768,-32768,-32768, 201,-32768, 197, 776 -32768, 328,-32768, 425,-32768, 48, 35, 77, 426, 426, 777 426, 426, 426, 426, 426, 426, 426, 197, 197, 197, 778 77, 197, 426, 426, 426,-32768,-32768, 335,-32768,-32768, 779 294, 294, 694,-32768, 347, 273, 197,-32768,-32768,-32768, 780 78, 78,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 781 -32768,-32768, 348,-32768,-32768, 78,-32768,-32768,-32768,-32768, 782 -32768, 459, 77, 469, 469, 469, 469, 469, 469, 469, 783 469, 469, 197, 197, 197, 77, 197, 469, 469, 469, 784 -32768, 197,-32768, 197, 197, 197, 197, 376, 78, 78, 785 -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 786 378,-32768,-32768, 78,-32768,-32768,-32768,-32768,-32768,-32768, 787 379, 380, 385, 386, 197, 197, 197, 197, 197, 197, 788 197, 197, 146, 398, 400, 409, 411, 412, 413, 415, 789 422,-32768, 424,-32768, 197, 197, 197, 197, 146, 197, 790 197, 197, 35, 427, 428, 433, 444, 445, 447, 453, 791 455, 101, 197,-32768, 197, 197, 197, 35, 197,-32768, 792 197, 197, 197,-32768, 447, 456, 458, 149, 466, 468, 793 470, 472,-32768, 197, 197, 197, 197, 197, 35,-32768, 794 197, 478, 479, 480, 502, 470, 294, 503, 197, 35, 795 465, 197, 35,-32768, 197, 479, 151,-32768,-32768, 504, 796 218, 505, 465, 35, 197, 35, 197,-32768, 294, 506, 797 294, 527, 197, 35, -71, 294, 35,-32768, 231, 465, 798 -32768, 512, 537,-32768 791 799 }; 792 800 793 801 static const short yypgoto[] = {-32768, 794 -32768,-32768, 40,-32768,-32768,-32768, 1, -355,-32768,-32768,802 -32768,-32768, 28,-32768,-32768,-32768, 1, -248,-32768,-32768, 795 803 -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 796 3 63,-32768,-32768,-32768, 254, -266, 133,-32768, 329, 108,797 110, 176,-32768,-32768,-32768,-32768, 217, -300, -546, 98,798 -32768,-32768,-32768, 411,-32768, -137,-32768, 409,-32768,-32768,799 -32768,-32768,-32768,-32768, 487,-32768,-32768,-32768, 408,-32768,800 -32768,-32768,-32768,-32768, 551,-32768,-32768, -110, 0, -293,801 -2 90, -80,-32768, -275, -12,-32768, 180, -16804 308,-32768,-32768,-32768, 33, -202, 49,-32768, 293, 94, 805 63, -333, 142,-32768,-32768,-32768,-32768, 312, -84, -223, 806 68,-32768,-32768,-32768, 391,-32768, 26,-32768, 397,-32768, 807 -32768,-32768,-32768,-32768,-32768, -190,-32768,-32768,-32768, 395, 808 -32768,-32768,-32768,-32768,-32768, 688,-32768,-32768, -122, 2, 809 -278, -274, 107,-32768, -259, 108, 186, -2 802 810 }; 803 811 804 812 805 #define YYLAST 693 806 807 808 static const short yytable[] = { 43, 809 19, 16, 23, 24, 83, 301, 162, 84, 39, 239, 810 404, 170, 171, 262, 172, 36, 265, 22, 234, 185, 811 345, 23, 24, 346, 25, 23, 24, 414, 164, 581, 812 336, 234, 306, 141, 142, 34, 337, 165, 167, 310, 813 429, 591, 311, 35, 312, 37, 594, 183, 349, 351, 814 187, 590, -256, -256, 374, -259, -259, 375, 235, -256, 815 38, 83, 83, 135, 83, 86, 87, 88, 89, 90, 816 103, 307, 338, 339, 156, 340, 341, 157, 12, 104, 817 462, -256, 263, 240, 226, 266, 91, 139, 140, 141, 818 142, 212, 78, 477, 342, 79, 40, 80, 81, 105, 819 85, 41, 410, 161, 222, 77, 223, 168, 169, 156, 820 26, 27, 157, 12, 28, 29, 184, 30, 116, 189, 821 83, 83, 83, 83, 83, 83, 257, 427, 428, 200, 822 431, 145, 146, 147, 148, 149, 150, 151, 152, 153, 823 154, 155, 124, 198, 199, -259, 475, 476, -259, 479, 824 -259, -259, 143, 317, 318, 319, 320, 321, 322, 323, 825 213, 214, 215, 216, 217, 218, 219, 92, 93, 188, 826 94, 197, 95, 96, 97, 98, 99, 100, 101, 102, 827 92, 93, 206, 94, 207, 95, 96, 97, 98, 99, 828 100, 101, 102, 228, 229, 181, 156, 221, -1, 157, 829 12, 2, 3, 4, 5, 6, 7, 223, 237, 8, 830 9, 377, 241, 232, 10, 233, 208, 101, 102, 254, 831 255, 330, 292, 293, 294, 248, 249, 11, 331, 332, 832 333, 334, 250, 260, 261, 335, 238, 106, 107, 108, 833 109, 110, 111, 112, 246, 272, 273, 295, 296, 201, 834 202, 203, 297, 247, 204, 283, 284, 133, 134, 256, 835 136, 289, 290, 291, 258, 44, 300, 45, 302, 259, 836 12, 46, 47, 48, 49, 50, 51, 52, 53, 54, 837 55, 156, 56, 57, 157, 12, 156, 163, 270, 157, 838 12, 326, 327, 357, 354, 264, 251, 252, 329, 267, 839 138, 210, 347, 253, 268, 269, 164, 139, 140, 141, 840 142, 350, 352, 344, 592, 274, 191, 192, 193, 194, 841 195, 196, 275, 276, 356, 166, 277, 361, 362, 106, 842 107, 108, 109, 110, 111, 112, 355, 279, 58, 281, 843 381, 156, 59, 182, 157, 12, 208, 373, 242, 243, 844 244, -256, 403, 245, 210, 406, 407, 304, 164, 186, 845 305, 271, 313, 409, 402, 411, 315, 106, 107, 108, 846 109, 110, 111, 112, 324, 156, -257, 364, 157, 12, 847 426, 426, 426, 365, 426, 106, 107, 108, 109, 110, 848 111, 112, 325, 328, 353, 354, 164, 360, 376, 456, 849 378, 106, 107, 108, 109, 110, 111, 112, 97, 98, 850 99, 100, 101, 102, 164, 379, 382, 405, 413, 366, 851 367, 156, 368, 369, 157, 12, 412, 415, 435, 455, 852 164, 457, 458, 474, 474, 474, 459, 474, 460, 461, 853 463, 370, 483, 488, 484, 485, 486, 487, 383, 384, 854 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 855 395, 396, 397, 398, 399, 400, 95, 96, 97, 98, 856 99, 100, 101, 102, 489, 497, 498, 499, 500, 501, 857 502, 503, 504, 507, 94, 490, 95, 96, 97, 98, 858 99, 100, 101, 102, 491, 517, 518, 519, 520, 507, 859 522, 523, 524, 525, 492, 493, 401, 494, 495, 496, 860 505, 164, 508, 537, 596, 538, 539, 540, 541, 542, 861 509, 543, 544, 545, 510, 173, 174, 175, 176, 177, 862 178, 179, 511, 512, 555, 556, 557, 558, 559, 560, 863 180, 561, 106, 107, 108, 109, 110, 111, 112, 569, 864 570, 513, 573, 574, 514, 575, 515, 516, 526, 137, 865 528, 138, 529, 597, 582, 583, 584, 585, 139, 140, 866 141, 142, 530, 588, 589, 531, 190, 350, 436, 437, 867 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 868 448, 449, 450, 451, 452, 453, 117, 118, 119, 120, 869 121, 122, 123, 532, 125, 534, 127, 128, 129, 130, 870 535, 536, 547, 548, 549, 92, 93, 550, 94, 131, 871 95, 96, 97, 98, 99, 100, 101, 102, 551, 552, 872 554, 562, 563, 565, 144, 288, 454, 566, 417, 418, 873 419, 420, 421, 422, 423, 424, 568, 577, 578, 579, 874 580, 432, 433, 434, 465, 466, 467, 468, 469, 470, 875 471, 472, 137, 586, 138, 587, 567, 480, 481, 482, 876 546, 139, 140, 141, 142, 93, 371, 94, 576, 95, 877 96, 97, 98, 99, 100, 101, 102, 521, 298, 593, 878 303, 227, 308 813 #define YYLAST 809 814 815 816 static const short yytable[] = { 38, 817 44, 22, 25, 38, 168, 261, 364, 264, 41, 176, 818 177, 39, 178, 226, 51, 40, 170, 191, 29, 86, 819 300, 93, 10, 11, 43, 30, 233, 386, 38, 38, 820 38, 38, 38, 42, 344, 187, 411, 412, 345, 597, 821 112, 2, 3, 4, 5, 6, 7, 10, 11, 8, 822 9, 10, 11, 420, 12, 10, 11, 381, 95, 96, 823 97, 98, 99, 348, 350, 113, 234, 13, 376, 125, 824 275, 134, 377, 149, 262, 225, 265, 115, 116, 117, 825 118, 119, 120, 121, 196, 10, 11, 238, 45, 10, 826 11, 356, 353, 46, 10, 11, 205, 222, 38, 38, 827 38, 38, 38, 38, 38, 38, 38, 38, 38, 269, 828 14, 31, 32, 256, 94, 33, 34, 206, 35, 409, 829 415, 48, 10, 11, 233, 305, 10, 11, 151, 152, 830 153, 154, 155, 156, 157, 158, 159, 160, 161, 421, 831 387, 15, 360, 361, 16, 15, 17, 18, 16, 237, 832 17, 18, 436, 91, 92, 247, 248, 419, 10, 11, 833 512, 239, 249, 220, 306, 291, 292, 293, 115, 116, 834 117, 118, 119, 120, 121, 15, 250, 251, 16, 15, 835 17, 18, 16, 252, 17, 18, 110, 111, 222, 532, 836 294, 295, 255, 387, 469, 296, 434, 435, 231, 438, 837 49, 50, 194, 52, 548, 10, 11, 484, 353, 10, 838 11, 543, 15, 10, 11, 16, 15, 17, 18, 16, 839 162, 17, 18, 163, 14, 567, 89, 90, 91, 92, 840 464, 465, 167, 232, 171, 173, 577, 174, 175, 581, 841 199, 387, 245, 387, 189, 467, 190, 193, 15, 195, 842 589, 16, 591, 17, 18, 291, 292, 293, 246, 556, 843 596, 584, 162, 599, 257, 163, 14, 258, 263, 197, 844 198, 266, 143, 144, 145, 146, 147, 148, 496, 497, 845 294, 295, 207, 267, 211, 296, 212, 213, 214, 215, 846 216, 217, 218, 499, 268, 15, 207, 221, 16, 15, 847 17, 18, 16, 15, 17, 18, 16, 100, 17, 18, 848 387, 327, 227, 228, 343, 316, 317, 318, 319, 320, 849 321, 322, 162, 387, 273, 163, 14, 236, 586, 162, 850 274, 240, 163, 14, 276, 354, 363, 363, 253, 254, 851 278, 314, 209, 162, 280, 209, 163, 14, 375, 170, 852 303, 309, 259, 260, 310, 304, 311, 385, 363, 588, 853 114, 169, 312, 270, 271, 272, 407, 363, 363, 482, 854 483, 598, 486, 379, 282, 283, 601, 314, 359, 323, 855 288, 289, 290, -261, 363, 299, 387, 301, 101, 102, 856 324, 103, 352, 104, 105, 106, 107, 108, 109, 110, 857 111, 378, 380, 115, 116, 117, 118, 119, 120, 121, 858 325, 326, 384, 200, 201, 202, 162, 328, 203, 163, 859 14, 346, 424, 425, 426, 427, 428, 429, 430, 431, 860 349, 351, 170, 172, 410, 439, 440, 441, 417, 418, 861 422, 101, 102, 355, 103, 442, 104, 105, 106, 107, 862 108, 109, 110, 111, 53, 188, 54, 462, 466, 383, 863 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 864 192, 65, 66, 468, 408, 115, 116, 117, 118, 119, 865 120, 121, 87, 470, 88, 414, 495, 416, 498, 500, 866 501, 89, 90, 91, 92, 502, 503, 115, 116, 117, 867 118, 119, 120, 121, 170, 433, 433, 433, 515, 433, 868 516, 603, 115, 116, 117, 118, 119, 120, 121, 517, 869 363, 518, 519, 520, 463, 521, 170, 67, 241, 242, 870 243, 68, 522, 244, 523, 363, 604, 533, 535, 101, 871 102, 170, 103, 536, 104, 105, 106, 107, 108, 109, 872 110, 111, 170, 335, 537, 538, 363, 539, 150, 336, 873 481, 481, 481, 541, 481, 542, 554, 363, 555, 490, 874 363, 491, 492, 493, 494, 87, 557, 88, 558, 287, 875 559, 363, 561, 363, 89, 90, 91, 92, 569, 570, 876 572, 363, 126, 553, 363, 337, 338, 162, 339, 340, 877 163, 14, 504, 505, 506, 507, 508, 509, 510, 511, 878 514, 88, 573, 575, 585, 587, 593, 341, 89, 90, 879 91, 92, 524, 525, 526, 527, 514, 529, 530, 531, 880 179, 180, 181, 182, 183, 184, 185, 594, 583, 373, 881 544, 366, 545, 546, 547, 186, 549, 367, 550, 551, 882 552, 104, 105, 106, 107, 108, 109, 110, 111, 574, 883 528, 562, 563, 564, 565, 566, 600, 297, 568, 115, 884 116, 117, 118, 119, 120, 121, 576, 302, 307, 580, 885 0, 0, 582, 368, 369, 162, 370, 371, 163, 14, 886 0, 0, 590, 0, 592, 0, 0, 0, 0, 0, 887 595, 0, 0, 0, 0, 372, 388, 389, 390, 391, 888 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 889 402, 403, 404, 405, 443, 444, 445, 446, 447, 448, 890 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 891 459, 460, 127, 128, 129, 130, 131, 132, 133, 0, 892 135, 0, 137, 138, 139, 140, 472, 473, 474, 475, 893 476, 477, 478, 479, 406, 141, 329, 0, 0, 487, 894 488, 489, 0, 330, 331, 332, 333, 0, 0, 0, 895 334, 102, 461, 103, 0, 104, 105, 106, 107, 108, 896 109, 110, 111, 103, 0, 104, 105, 106, 107, 108, 897 109, 110, 111, 106, 107, 108, 109, 110, 111 879 898 }; 880 899 881 static const short yycheck[] = { 12, 882 1, 1, 13, 14, 21, 281, 117, 16, 16, 15, 883 366, 122, 123, 15, 125, 10, 15, 9, 49, 130, 884 314, 13, 14, 314, 16, 13, 14, 383, 88, 576, 885 24, 49, 50, 104, 105, 16, 30, 118, 119, 84, 886 396, 588, 87, 16, 89, 6, 593, 128, 324, 325, 887 131, 111, 82, 83, 348, 13, 14, 348, 89, 89, 888 10, 78, 79, 80, 81, 26, 27, 28, 29, 30, 889 10, 89, 66, 67, 68, 69, 70, 71, 72, 10, 890 436, 111, 84, 89, 89, 84, 10, 102, 103, 104, 891 105, 172, 103, 449, 88, 106, 104, 108, 109, 10, 892 109, 109, 378, 116, 185, 88, 111, 120, 121, 68, 893 102, 103, 71, 72, 106, 107, 129, 109, 111, 132, 894 137, 138, 139, 140, 141, 142, 237, 394, 395, 88, 895 397, 92, 93, 94, 95, 96, 97, 98, 99, 100, 896 101, 102, 17, 156, 157, 103, 447, 448, 106, 450, 897 108, 109, 16, 291, 292, 293, 294, 295, 296, 297, 898 173, 174, 175, 176, 177, 178, 179, 91, 92, 89, 899 94, 110, 96, 97, 98, 99, 100, 101, 102, 103, 900 91, 92, 111, 94, 111, 96, 97, 98, 99, 100, 901 101, 102, 103, 206, 207, 17, 68, 111, 0, 71, 902 72, 3, 4, 5, 6, 7, 8, 111, 221, 11, 903 12, 349, 225, 111, 16, 111, 88, 102, 103, 232, 904 233, 44, 55, 56, 57, 82, 83, 29, 51, 52, 905 53, 54, 89, 246, 247, 58, 15, 59, 60, 61, 906 62, 63, 64, 65, 111, 258, 259, 80, 81, 13, 907 14, 15, 85, 111, 18, 268, 269, 78, 79, 15, 908 81, 274, 275, 276, 111, 13, 279, 15, 281, 111, 909 72, 19, 20, 21, 22, 23, 24, 25, 26, 27, 910 28, 68, 30, 31, 71, 72, 68, 17, 88, 71, 911 72, 304, 305, 15, 16, 15, 82, 83, 311, 15, 912 95, 88, 315, 89, 111, 111, 88, 102, 103, 104, 913 105, 324, 325, 314, 590, 111, 137, 138, 139, 140, 914 141, 142, 111, 111, 337, 17, 111, 340, 341, 59, 915 60, 61, 62, 63, 64, 65, 336, 111, 86, 111, 916 353, 68, 90, 17, 71, 72, 88, 348, 13, 14, 917 15, 111, 365, 18, 88, 368, 369, 111, 88, 17, 918 111, 88, 111, 376, 364, 378, 111, 59, 60, 61, 919 62, 63, 64, 65, 111, 68, 111, 24, 71, 72, 920 393, 394, 395, 30, 397, 59, 60, 61, 62, 63, 921 64, 65, 111, 15, 111, 16, 88, 15, 111, 412, 922 111, 59, 60, 61, 62, 63, 64, 65, 98, 99, 923 100, 101, 102, 103, 88, 15, 111, 15, 15, 66, 924 67, 68, 69, 70, 71, 72, 111, 15, 111, 111, 925 88, 111, 111, 446, 447, 448, 111, 450, 111, 15, 926 15, 88, 455, 111, 457, 458, 459, 460, 31, 32, 927 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 928 43, 44, 45, 46, 47, 48, 96, 97, 98, 99, 929 100, 101, 102, 103, 111, 488, 489, 490, 491, 492, 930 493, 494, 495, 496, 94, 111, 96, 97, 98, 99, 931 100, 101, 102, 103, 111, 508, 509, 510, 511, 512, 932 513, 514, 515, 516, 111, 111, 89, 111, 111, 111, 933 15, 88, 111, 526, 0, 528, 529, 530, 531, 532, 934 111, 534, 535, 536, 111, 73, 74, 75, 76, 77, 935 78, 79, 111, 111, 547, 548, 549, 550, 551, 552, 936 88, 554, 59, 60, 61, 62, 63, 64, 65, 562, 937 563, 111, 565, 566, 111, 568, 111, 111, 111, 93, 938 111, 95, 111, 0, 577, 578, 579, 580, 102, 103, 939 104, 105, 111, 586, 587, 111, 110, 590, 31, 32, 940 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 941 43, 44, 45, 46, 47, 48, 46, 47, 48, 49, 942 50, 51, 52, 111, 54, 111, 56, 57, 58, 59, 943 111, 111, 111, 111, 111, 91, 92, 111, 94, 69, 944 96, 97, 98, 99, 100, 101, 102, 103, 111, 111, 945 111, 111, 111, 111, 110, 273, 89, 111, 385, 386, 946 387, 388, 389, 390, 391, 392, 111, 111, 111, 111, 947 111, 398, 399, 400, 438, 439, 440, 441, 442, 443, 948 444, 445, 93, 111, 95, 111, 559, 451, 452, 453, 949 538, 102, 103, 104, 105, 92, 348, 94, 569, 96, 950 97, 98, 99, 100, 101, 102, 103, 512, 278, 592, 951 282, 205, 285 900 static const short yycheck[] = { 2, 901 16, 1, 1, 6, 127, 15, 340, 15, 10, 132, 902 133, 16, 135, 204, 17, 16, 88, 140, 9, 88, 903 280, 16, 13, 14, 10, 16, 49, 361, 31, 32, 904 33, 34, 35, 6, 313, 17, 370, 371, 313, 111, 905 10, 3, 4, 5, 6, 7, 8, 13, 14, 11, 906 12, 13, 14, 387, 16, 13, 14, 15, 31, 32, 907 33, 34, 35, 323, 324, 10, 89, 29, 347, 111, 908 261, 17, 347, 16, 84, 89, 84, 59, 60, 61, 909 62, 63, 64, 65, 110, 13, 14, 15, 104, 13, 910 14, 15, 16, 109, 13, 14, 111, 111, 101, 102, 911 103, 104, 105, 106, 107, 108, 109, 110, 111, 88, 912 72, 102, 103, 236, 109, 106, 107, 111, 109, 368, 913 380, 14, 13, 14, 49, 50, 13, 14, 101, 102, 914 103, 104, 105, 106, 107, 108, 109, 110, 111, 388, 915 93, 103, 108, 109, 106, 103, 108, 109, 106, 15, 916 108, 109, 401, 104, 105, 82, 83, 110, 13, 14, 917 15, 89, 89, 111, 89, 55, 56, 57, 59, 60, 918 61, 62, 63, 64, 65, 103, 82, 83, 106, 103, 919 108, 109, 106, 89, 108, 109, 102, 103, 111, 523, 920 80, 81, 15, 93, 443, 85, 399, 400, 111, 402, 921 15, 16, 89, 18, 538, 13, 14, 456, 16, 13, 922 14, 111, 103, 13, 14, 106, 103, 108, 109, 106, 923 68, 108, 109, 71, 72, 559, 102, 103, 104, 105, 924 421, 422, 125, 111, 128, 129, 570, 130, 131, 573, 925 88, 93, 111, 93, 138, 436, 139, 141, 103, 142, 926 584, 106, 586, 108, 109, 55, 56, 57, 111, 111, 927 594, 111, 68, 597, 111, 71, 72, 111, 15, 162, 928 163, 15, 87, 88, 89, 90, 91, 92, 469, 470, 929 80, 81, 88, 111, 178, 85, 179, 180, 181, 182, 930 183, 184, 185, 484, 111, 103, 88, 191, 106, 103, 931 108, 109, 106, 103, 108, 109, 106, 10, 108, 109, 932 93, 15, 205, 206, 313, 290, 291, 292, 293, 294, 933 295, 296, 68, 93, 111, 71, 72, 220, 111, 68, 934 111, 224, 71, 72, 111, 335, 339, 340, 231, 232, 935 111, 111, 88, 68, 111, 88, 71, 72, 347, 88, 936 111, 84, 245, 246, 87, 111, 89, 360, 361, 583, 937 10, 17, 111, 88, 257, 258, 366, 370, 371, 454, 938 455, 595, 457, 348, 267, 268, 600, 111, 15, 111, 939 273, 274, 275, 111, 387, 278, 93, 280, 91, 92, 940 111, 94, 111, 96, 97, 98, 99, 100, 101, 102, 941 103, 111, 111, 59, 60, 61, 62, 63, 64, 65, 942 303, 304, 111, 13, 14, 15, 68, 310, 18, 71, 943 72, 314, 390, 391, 392, 393, 394, 395, 396, 397, 944 323, 324, 88, 17, 15, 403, 404, 405, 111, 15, 945 15, 91, 92, 336, 94, 111, 96, 97, 98, 99, 946 100, 101, 102, 103, 13, 17, 15, 111, 111, 352, 947 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 948 17, 30, 31, 15, 367, 59, 60, 61, 62, 63, 949 64, 65, 93, 15, 95, 378, 111, 380, 111, 111, 950 111, 102, 103, 104, 105, 111, 111, 59, 60, 61, 951 62, 63, 64, 65, 88, 398, 399, 400, 111, 402, 952 111, 0, 59, 60, 61, 62, 63, 64, 65, 111, 953 523, 111, 111, 111, 417, 111, 88, 86, 13, 14, 954 15, 90, 111, 18, 111, 538, 0, 111, 111, 91, 955 92, 88, 94, 111, 96, 97, 98, 99, 100, 101, 956 102, 103, 88, 24, 111, 111, 559, 111, 110, 30, 957 453, 454, 455, 111, 457, 111, 111, 570, 111, 462, 958 573, 464, 465, 466, 467, 93, 111, 95, 111, 272, 959 111, 584, 111, 586, 102, 103, 104, 105, 111, 111, 960 111, 594, 110, 545, 597, 66, 67, 68, 69, 70, 961 71, 72, 495, 496, 497, 498, 499, 500, 501, 502, 962 503, 95, 111, 111, 111, 111, 111, 88, 102, 103, 963 104, 105, 515, 516, 517, 518, 519, 520, 521, 522, 964 73, 74, 75, 76, 77, 78, 79, 111, 576, 347, 965 533, 24, 535, 536, 537, 88, 539, 30, 541, 542, 966 543, 96, 97, 98, 99, 100, 101, 102, 103, 566, 967 519, 554, 555, 556, 557, 558, 599, 277, 561, 59, 968 60, 61, 62, 63, 64, 65, 569, 281, 284, 572, 969 -1, -1, 575, 66, 67, 68, 69, 70, 71, 72, 970 -1, -1, 585, -1, 587, -1, -1, -1, -1, -1, 971 593, -1, -1, -1, -1, 88, 31, 32, 33, 34, 972 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 973 45, 46, 47, 48, 31, 32, 33, 34, 35, 36, 974 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 975 47, 48, 55, 56, 57, 58, 59, 60, 61, -1, 976 63, -1, 65, 66, 67, 68, 445, 446, 447, 448, 977 449, 450, 451, 452, 89, 78, 44, -1, -1, 458, 978 459, 460, -1, 51, 52, 53, 54, -1, -1, -1, 979 58, 92, 89, 94, -1, 96, 97, 98, 99, 100, 980 101, 102, 103, 94, -1, 96, 97, 98, 99, 100, 981 101, 102, 103, 98, 99, 100, 101, 102, 103 952 982 }; 953 983 /* -*-C-*- Note some compilers choke on comments on `#line' lines. */ … … 1452 1482 1453 1483 case 1: 1454 #line 3 03"parser.y"1484 #line 310 "parser.y" 1455 1485 { 1456 1486 resource_t *rsc; … … 1471 1501 break;} 1472 1502 case 2: 1473 #line 3 23"parser.y"1503 #line 330 "parser.y" 1474 1504 { yyval.res = NULL; want_rscname = 1; ; 1475 1505 break;} 1476 1506 case 3: 1477 #line 3 24"parser.y"1507 #line 331 "parser.y" 1478 1508 { 1479 1509 if(yyvsp[0].res) … … 1503 1533 break;} 1504 1534 case 4: 1505 #line 3 49"parser.y"1535 #line 356 "parser.y" 1506 1536 { yyval.res = yyvsp[-1].res; want_rscname = 1; ; 1507 1537 break;} 1508 1538 case 5: 1509 #line 35 0"parser.y"1539 #line 357 "parser.y" 1510 1540 { yyval.res = yyvsp[-1].res; want_rscname = 1; ; 1511 1541 break;} 1512 1542 case 6: 1513 #line 3 55"parser.y"1543 #line 362 "parser.y" 1514 1544 { pop_start(); push_if(yyvsp[-1].iptr ? *(yyvsp[-1].iptr) : 0, 0, 0); if(yyvsp[-1].iptr) free(yyvsp[-1].iptr);; 1515 1545 break;} 1516 1546 case 7: 1517 #line 3 56"parser.y"1547 #line 363 "parser.y" 1518 1548 { pop_start(); push_if(pp_lookup(yyvsp[-1].str->str.cstr) != NULL, 0, 0); ; 1519 1549 break;} 1520 1550 case 8: 1521 #line 3 57"parser.y"1551 #line 364 "parser.y" 1522 1552 { pop_start(); push_if(pp_lookup(yyvsp[-1].str->str.cstr) == NULL, 0, 0); ; 1523 1553 break;} 1524 1554 case 9: 1525 #line 3 58"parser.y"1555 #line 365 "parser.y" 1526 1556 { pop_start(); push_if(yyvsp[-1].iptr ? *(yyvsp[-1].iptr) : 0, pop_if(), 0); if(yyvsp[-1].iptr) free(yyvsp[-1].iptr); ; 1527 1557 break;} 1528 1558 case 10: 1529 #line 3 59"parser.y"1559 #line 366 "parser.y" 1530 1560 { pop_start(); push_if(1, pop_if(), 0); ; 1531 1561 break;} 1532 1562 case 11: 1533 #line 36 0"parser.y"1563 #line 367 "parser.y" 1534 1564 { pop_if(); ; 1535 1565 break;} 1536 1566 case 12: 1537 #line 3 63"parser.y"1567 #line 370 "parser.y" 1538 1568 { yyval.iptr = yyvsp[0].iptr; ; 1539 1569 break;} 1540 1570 case 13: 1541 #line 3 64"parser.y"1571 #line 371 "parser.y" 1542 1572 { yyval.iptr = new_int(yyvsp[-2].iptr && yyvsp[0].iptr ? (*yyvsp[-2].iptr || *yyvsp[0].iptr) : 0); if(yyvsp[-2].iptr) free(yyvsp[-2].iptr); if(yyvsp[0].iptr) free(yyvsp[0].iptr); ; 1543 1573 break;} 1544 1574 case 14: 1545 #line 3 65"parser.y"1575 #line 372 "parser.y" 1546 1576 { yyval.iptr = new_int(yyvsp[-2].iptr && yyvsp[0].iptr ? (*yyvsp[-2].iptr && *yyvsp[0].iptr) : 0); if(yyvsp[-2].iptr) free(yyvsp[-2].iptr); if(yyvsp[0].iptr) free(yyvsp[0].iptr); ; 1547 1577 break;} 1548 1578 case 15: 1549 #line 3 66"parser.y"1579 #line 373 "parser.y" 1550 1580 { yyval.iptr = new_int(yyvsp[-2].iptr && yyvsp[0].iptr ? (*yyvsp[-2].iptr + *yyvsp[0].iptr) : 0); if(yyvsp[-2].iptr) free(yyvsp[-2].iptr); if(yyvsp[0].iptr) free(yyvsp[0].iptr); ; 1551 1581 break;} 1552 1582 case 16: 1553 #line 3 67"parser.y"1583 #line 374 "parser.y" 1554 1584 { yyval.iptr = new_int(yyvsp[-2].iptr && yyvsp[0].iptr ? (*yyvsp[-2].iptr - *yyvsp[0].iptr) : 0); if(yyvsp[-2].iptr) free(yyvsp[-2].iptr); if(yyvsp[0].iptr) free(yyvsp[0].iptr); ; 1555 1585 break;} 1556 1586 case 17: 1557 #line 3 68"parser.y"1587 #line 375 "parser.y" 1558 1588 { yyval.iptr = new_int(yyvsp[-2].iptr && yyvsp[0].iptr ? (*yyvsp[-2].iptr ^ *yyvsp[0].iptr) : 0); if(yyvsp[-2].iptr) free(yyvsp[-2].iptr); if(yyvsp[0].iptr) free(yyvsp[0].iptr); ; 1559 1589 break;} 1560 1590 case 18: 1561 #line 3 69"parser.y"1591 #line 376 "parser.y" 1562 1592 { yyval.iptr = new_int(yyvsp[-2].iptr && yyvsp[0].iptr ? (*yyvsp[-2].iptr == *yyvsp[0].iptr) : 0); if(yyvsp[-2].iptr) free(yyvsp[-2].iptr); if(yyvsp[0].iptr) free(yyvsp[0].iptr); ; 1563 1593 break;} 1564 1594 case 19: 1565 #line 37 0"parser.y"1595 #line 377 "parser.y" 1566 1596 { yyval.iptr = new_int(yyvsp[-2].iptr && yyvsp[0].iptr ? (*yyvsp[-2].iptr != *yyvsp[0].iptr) : 0); if(yyvsp[-2].iptr) free(yyvsp[-2].iptr); if(yyvsp[0].iptr) free(yyvsp[0].iptr); ; 1567 1597 break;} 1568 1598 case 20: 1569 #line 37 1"parser.y"1599 #line 378 "parser.y" 1570 1600 { yyval.iptr = new_int(yyvsp[-2].iptr && yyvsp[0].iptr ? (*yyvsp[-2].iptr < *yyvsp[0].iptr) : 0); if(yyvsp[-2].iptr) free(yyvsp[-2].iptr); if(yyvsp[0].iptr) free(yyvsp[0].iptr); ; 1571 1601 break;} 1572 1602 case 21: 1573 #line 37 2"parser.y"1603 #line 379 "parser.y" 1574 1604 { yyval.iptr = new_int(yyvsp[-2].iptr && yyvsp[0].iptr ? (*yyvsp[-2].iptr > *yyvsp[0].iptr) : 0); if(yyvsp[-2].iptr) free(yyvsp[-2].iptr); if(yyvsp[0].iptr) free(yyvsp[0].iptr); ; 1575 1605 break;} 1576 1606 case 22: 1577 #line 3 73"parser.y"1607 #line 380 "parser.y" 1578 1608 { yyval.iptr = new_int(yyvsp[-2].iptr && yyvsp[0].iptr ? (*yyvsp[-2].iptr <= *yyvsp[0].iptr) : 0); if(yyvsp[-2].iptr) free(yyvsp[-2].iptr); if(yyvsp[0].iptr) free(yyvsp[0].iptr); ; 1579 1609 break;} 1580 1610 case 23: 1581 #line 3 74"parser.y"1611 #line 381 "parser.y" 1582 1612 { yyval.iptr = new_int(yyvsp[-2].iptr && yyvsp[0].iptr ? (*yyvsp[-2].iptr >= *yyvsp[0].iptr) : 0); if(yyvsp[-2].iptr) free(yyvsp[-2].iptr); if(yyvsp[0].iptr) free(yyvsp[0].iptr); ; 1583 1613 break;} 1584 1614 case 24: 1585 #line 3 75"parser.y"1615 #line 382 "parser.y" 1586 1616 { yyval.iptr = yyvsp[0].iptr; if(yyvsp[0].iptr) *yyvsp[0].iptr = ~(*yyvsp[0].iptr); ; 1587 1617 break;} 1588 1618 case 25: 1589 #line 3 76"parser.y"1619 #line 383 "parser.y" 1590 1620 { yyval.iptr = yyvsp[0].iptr; ; 1591 1621 break;} 1592 1622 case 26: 1593 #line 3 77"parser.y"1623 #line 384 "parser.y" 1594 1624 { yyval.iptr = yyvsp[0].iptr; if(yyvsp[0].iptr) *yyvsp[0].iptr = -(*yyvsp[0].iptr); ; 1595 1625 break;} 1596 1626 case 27: 1597 #line 3 78"parser.y"1627 #line 385 "parser.y" 1598 1628 { yyval.iptr = yyvsp[0].iptr; if(yyvsp[0].iptr) *yyvsp[0].iptr = !(*yyvsp[0].iptr); ; 1599 1629 break;} 1600 1630 case 28: 1601 #line 3 79"parser.y"1631 #line 386 "parser.y" 1602 1632 { yyval.iptr = yyvsp[-1].iptr; ; 1603 1633 break;} 1604 1634 case 29: 1605 #line 3 83"parser.y"1635 #line 390 "parser.y" 1606 1636 { yyval.iptr = new_int(yyvsp[0].num); ; 1607 1637 break;} 1608 1638 case 30: 1609 #line 3 84"parser.y"1639 #line 391 "parser.y" 1610 1640 { yyval.iptr = NULL; ; 1611 1641 break;} 1612 1642 case 31: 1613 #line 3 85"parser.y"1643 #line 392 "parser.y" 1614 1644 { yyval.iptr = new_int(pp_lookup(yyvsp[0].str->str.cstr) != NULL); ; 1615 1645 break;} 1616 1646 case 32: 1617 #line 3 86"parser.y"1647 #line 393 "parser.y" 1618 1648 { yyval.iptr = new_int(pp_lookup(yyvsp[-1].str->str.cstr) != NULL); ; 1619 1649 break;} 1620 1650 case 33: 1621 #line 39 0"parser.y"1651 #line 397 "parser.y" 1622 1652 { strip_til_semicolon(); ; 1623 1653 break;} 1624 1654 case 34: 1625 #line 391 "parser.y" 1655 #line 398 "parser.y" 1656 { strip_extern(); ; 1657 break;} 1658 case 35: 1659 #line 399 "parser.y" 1626 1660 { strip_til_semicolon(); ; 1627 1661 break;} 1628 case 35: 1629 #line 392 "parser.y" 1662 case 36: 1663 #line 400 "parser.y" 1664 { strip_til_parenthesis(); ; 1665 break;} 1666 case 37: 1667 #line 401 "parser.y" 1630 1668 { strip_til_semicolon(); ; 1631 1669 break;} 1632 case 36:1633 #line 393 "parser.y"1634 { strip_til_parenthesis(); ;1635 break;}1636 case 37:1637 #line 394 "parser.y"1638 { strip_til_semicolon(); ;1639 break;}1640 1670 case 38: 1641 #line 399"parser.y"1671 #line 406 "parser.y" 1642 1672 { 1643 1673 yyval.res = yyvsp[0].res; … … 1657 1687 break;} 1658 1688 case 39: 1659 #line 4 14"parser.y"1689 #line 421 "parser.y" 1660 1690 { 1661 1691 /* Don't do anything, stringtables are converted to … … 1668 1698 break;} 1669 1699 case 40: 1670 #line 42 2"parser.y"1700 #line 429 "parser.y" 1671 1701 { 1672 1702 if(!win32) … … 1679 1709 break;} 1680 1710 case 41: 1681 #line 435 "parser.y" 1682 { 1711 #line 442 "parser.y" 1712 { 1713 if(yyvsp[0].num > 65535 || yyvsp[0].num < -32768) 1714 yyerror("Resource's ID out of range (%d)", yyvsp[0].num); 1683 1715 yyval.nid = new_name_id(); 1684 1716 yyval.nid->type = name_ord; … … 1688 1720 break;} 1689 1721 case 42: 1690 #line 4 41"parser.y"1722 #line 450 "parser.y" 1691 1723 { 1692 1724 yyval.nid = new_name_id(); … … 1697 1729 break;} 1698 1730 case 43: 1699 #line 4 52"parser.y"1731 #line 461 "parser.y" 1700 1732 { yyval.nid = yyvsp[0].nid; ; 1701 1733 break;} 1702 1734 case 44: 1703 #line 4 53"parser.y"1735 #line 462 "parser.y" 1704 1736 { 1705 1737 yyval.nid = new_name_id(); … … 1710 1742 break;} 1711 1743 case 45: 1712 #line 4 63"parser.y"1744 #line 472 "parser.y" 1713 1745 { yyval.res = new_resource(res_acc, yyvsp[0].acc, yyvsp[0].acc->memopt, yyvsp[0].acc->lvc.language); ; 1714 1746 break;} 1715 1747 case 46: 1716 #line 4 64"parser.y"1748 #line 473 "parser.y" 1717 1749 { yyval.res = new_resource(res_bmp, yyvsp[0].bmp, yyvsp[0].bmp->memopt, dup_language(currentlanguage)); ; 1718 1750 break;} 1719 1751 case 47: 1720 #line 4 65"parser.y"1752 #line 474 "parser.y" 1721 1753 { 1722 1754 resource_t *rsc; … … 1735 1767 break;} 1736 1768 case 48: 1737 #line 4 79"parser.y"1769 #line 488 "parser.y" 1738 1770 { yyval.res = new_resource(res_dlg, yyvsp[0].dlg, yyvsp[0].dlg->memopt, yyvsp[0].dlg->lvc.language); ; 1739 1771 break;} 1740 1772 case 49: 1741 #line 48 0"parser.y"1773 #line 489 "parser.y" 1742 1774 { 1743 1775 if(win32) … … 1748 1780 break;} 1749 1781 case 50: 1750 #line 4 86"parser.y"1782 #line 495 "parser.y" 1751 1783 { yyval.res = new_resource(res_dlginit, yyvsp[0].dginit, yyvsp[0].dginit->memopt, yyvsp[0].dginit->lvc.language); ; 1752 1784 break;} 1753 1785 case 51: 1754 #line 4 87"parser.y"1786 #line 496 "parser.y" 1755 1787 { yyval.res = new_resource(res_fnt, yyvsp[0].fnt, yyvsp[0].fnt->memopt, dup_language(currentlanguage)); ; 1756 1788 break;} 1757 1789 case 52: 1758 #line 4 88"parser.y"1790 #line 497 "parser.y" 1759 1791 { 1760 1792 resource_t *rsc; … … 1773 1805 break;} 1774 1806 case 53: 1775 #line 5 02"parser.y"1807 #line 511 "parser.y" 1776 1808 { yyval.res = new_resource(res_men, yyvsp[0].men, yyvsp[0].men->memopt, yyvsp[0].men->lvc.language); ; 1777 1809 break;} 1778 1810 case 54: 1779 #line 5 03"parser.y"1811 #line 512 "parser.y" 1780 1812 { 1781 1813 if(win32) … … 1786 1818 break;} 1787 1819 case 55: 1788 #line 5 09"parser.y"1820 #line 518 "parser.y" 1789 1821 { yyval.res = new_resource(res_msg, yyvsp[0].msg, WRC_MO_MOVEABLE | WRC_MO_DISCARDABLE, dup_language(currentlanguage)); ; 1790 1822 break;} 1791 1823 case 56: 1792 #line 51 0"parser.y"1824 #line 519 "parser.y" 1793 1825 { yyval.res = new_resource(res_rdt, yyvsp[0].rdt, yyvsp[0].rdt->memopt, yyvsp[0].rdt->lvc.language); ; 1794 1826 break;} 1795 1827 case 57: 1796 #line 5 11"parser.y"1828 #line 520 "parser.y" 1797 1829 { yyval.res = new_resource(res_toolbar, yyvsp[0].tlbar, yyvsp[0].tlbar->memopt, yyvsp[0].tlbar->lvc.language); ; 1798 1830 break;} 1799 1831 case 58: 1800 #line 5 12"parser.y"1832 #line 521 "parser.y" 1801 1833 { yyval.res = new_resource(res_usr, yyvsp[0].usr, yyvsp[0].usr->memopt, dup_language(currentlanguage)); ; 1802 1834 break;} 1803 1835 case 59: 1804 #line 5 13"parser.y"1836 #line 522 "parser.y" 1805 1837 { yyval.res = new_resource(res_ver, yyvsp[0].veri, WRC_MO_MOVEABLE | WRC_MO_DISCARDABLE, dup_language(currentlanguage)); ; 1806 1838 break;} 1807 1839 case 60: 1808 #line 5 17"parser.y"1840 #line 526 "parser.y" 1809 1841 { yyval.bmp = new_bitmap(load_file(yyvsp[0].str), yyvsp[-1].iptr); ; 1810 1842 break;} 1811 1843 case 61: 1812 #line 5 18"parser.y"1844 #line 527 "parser.y" 1813 1845 { yyval.bmp = new_bitmap(yyvsp[0].raw, yyvsp[-1].iptr); ; 1814 1846 break;} 1815 1847 case 62: 1816 #line 5 22"parser.y"1848 #line 531 "parser.y" 1817 1849 { yyval.curg = new_cursor_group(load_file(yyvsp[0].str), yyvsp[-1].iptr); ; 1818 1850 break;} 1819 1851 case 63: 1820 #line 5 23"parser.y"1852 #line 532 "parser.y" 1821 1853 { yyval.curg = new_cursor_group(yyvsp[0].raw, yyvsp[-1].iptr); ; 1822 1854 break;} 1823 1855 case 64: 1824 #line 5 28"parser.y"1856 #line 537 "parser.y" 1825 1857 { yyval.fnt = new_font(load_file(yyvsp[0].str), yyvsp[-1].iptr); ; 1826 1858 break;} 1827 1859 case 65: 1828 #line 5 32"parser.y"1860 #line 541 "parser.y" 1829 1861 { yyval.icog = new_icon_group(load_file(yyvsp[0].str), yyvsp[-1].iptr); ; 1830 1862 break;} 1831 1863 case 66: 1832 #line 5 33"parser.y"1864 #line 542 "parser.y" 1833 1865 { yyval.icog = new_icon_group(yyvsp[0].raw, yyvsp[-1].iptr); ; 1834 1866 break;} 1835 1867 case 67: 1836 #line 5 41"parser.y"1868 #line 550 "parser.y" 1837 1869 { 1838 1870 if(!win32) … … 1842 1874 break;} 1843 1875 case 68: 1844 #line 5 49"parser.y"1876 #line 558 "parser.y" 1845 1877 { 1846 1878 yyval.rdt = new_rcdata(yyvsp[0].raw, yyvsp[-2].iptr); … … 1855 1887 break;} 1856 1888 case 69: 1857 #line 5 62"parser.y"1889 #line 571 "parser.y" 1858 1890 { 1859 1891 yyval.dginit = new_dlginit(yyvsp[0].raw, yyvsp[-2].iptr); … … 1868 1900 break;} 1869 1901 case 70: 1870 #line 5 75"parser.y"1902 #line 584 "parser.y" 1871 1903 { yyval.usr = new_user(yyvsp[-2].nid, load_file(yyvsp[0].str), yyvsp[-1].iptr); ; 1872 1904 break;} 1873 1905 case 71: 1874 #line 5 76"parser.y"1906 #line 585 "parser.y" 1875 1907 { yyval.usr = new_user(yyvsp[-2].nid, yyvsp[0].raw, yyvsp[-1].iptr); ; 1876 1908 break;} 1877 1909 case 72: 1878 #line 595"parser.y"1910 #line 604 "parser.y" 1879 1911 { 1880 1912 yyval.nid = new_name_id(); … … 1885 1917 break;} 1886 1918 case 73: 1887 #line 6 07"parser.y"1919 #line 616 "parser.y" 1888 1920 { 1889 1921 yyval.nid = new_name_id(); … … 1894 1926 break;} 1895 1927 case 74: 1896 #line 6 17"parser.y"1928 #line 626 "parser.y" 1897 1929 { 1898 1930 yyval.acc = new_accelerator(); … … 1919 1951 break;} 1920 1952 case 75: 1921 #line 6 41"parser.y"1953 #line 650 "parser.y" 1922 1954 { yyval.event=NULL; ; 1923 1955 break;} 1924 1956 case 76: 1925 #line 6 42"parser.y"1957 #line 651 "parser.y" 1926 1958 { yyval.event=add_string_event(yyvsp[-3].str, yyvsp[-1].num, yyvsp[0].num, yyvsp[-4].event); ; 1927 1959 break;} 1928 1960 case 77: 1929 #line 6 43"parser.y"1961 #line 652 "parser.y" 1930 1962 { yyval.event=add_event(yyvsp[-3].num, yyvsp[-1].num, yyvsp[0].num, yyvsp[-4].event); ; 1931 1963 break;} 1932 1964 case 78: 1933 #line 6 46"parser.y"1965 #line 655 "parser.y" 1934 1966 { yyval.num=0; ; 1935 1967 break;} 1936 1968 case 79: 1937 #line 6 47"parser.y"1969 #line 656 "parser.y" 1938 1970 { yyval.num=yyvsp[-2].num | WRC_AF_NOINVERT; ; 1939 1971 break;} 1940 1972 case 80: 1941 #line 6 48"parser.y"1973 #line 657 "parser.y" 1942 1974 { yyval.num=yyvsp[-2].num | WRC_AF_SHIFT; ; 1943 1975 break;} 1944 1976 case 81: 1945 #line 6 49"parser.y"1977 #line 658 "parser.y" 1946 1978 { yyval.num=yyvsp[-2].num | WRC_AF_CONTROL; ; 1947 1979 break;} 1948 1980 case 82: 1949 #line 65 0"parser.y"1981 #line 659 "parser.y" 1950 1982 { yyval.num=yyvsp[-2].num | WRC_AF_ALT; ; 1951 1983 break;} 1952 1984 case 83: 1953 #line 6 51"parser.y"1985 #line 660 "parser.y" 1954 1986 { yyval.num=yyvsp[-2].num | WRC_AF_ASCII; ; 1955 1987 break;} 1956 1988 case 84: 1957 #line 6 52"parser.y"1989 #line 661 "parser.y" 1958 1990 { yyval.num=yyvsp[-2].num | WRC_AF_VIRTKEY; ; 1959 1991 break;} 1960 1992 case 85: 1961 #line 6 58"parser.y"1993 #line 667 "parser.y" 1962 1994 { 1963 1995 if(yyvsp[-11].iptr) … … 1976 2008 if(!yyval.dlg->gotstyle) 1977 2009 { 1978 yyval.dlg->style = WS_POPUP;2010 yyval.dlg->style->or_mask = WS_POPUP; 1979 2011 yyval.dlg->gotstyle = TRUE; 1980 2012 } 1981 2013 if(yyval.dlg->title) 1982 yyval.dlg->style |= WS_CAPTION;2014 yyval.dlg->style->or_mask |= WS_CAPTION; 1983 2015 if(yyval.dlg->font) 1984 yyval.dlg->style |= DS_SETFONT; 2016 yyval.dlg->style->or_mask |= DS_SETFONT; 2017 2018 yyval.dlg->style->or_mask &= ~(yyval.dlg->style->and_mask); 2019 yyval.dlg->style->and_mask = 0; 2020 1985 2021 indialog = FALSE; 1986 2022 if(!yyval.dlg->lvc.language) … … 1989 2025 break;} 1990 2026 case 86: 1991 #line 688"parser.y"2027 #line 701 "parser.y" 1992 2028 { yyval.dlg=new_dialog(); ; 1993 2029 break;} 1994 2030 case 87: 1995 #line 689"parser.y"1996 { yyval.dlg=dialog_style(yyvsp[0]. num,yyvsp[-2].dlg); ;2031 #line 702 "parser.y" 2032 { yyval.dlg=dialog_style(yyvsp[0].style,yyvsp[-2].dlg); ; 1997 2033 break;} 1998 2034 case 88: 1999 #line 690"parser.y"2000 { yyval.dlg=dialog_exstyle(yyvsp[0]. num,yyvsp[-2].dlg); ;2035 #line 703 "parser.y" 2036 { yyval.dlg=dialog_exstyle(yyvsp[0].style,yyvsp[-2].dlg); ; 2001 2037 break;} 2002 2038 case 89: 2003 #line 691"parser.y"2039 #line 704 "parser.y" 2004 2040 { yyval.dlg=dialog_caption(yyvsp[0].str,yyvsp[-2].dlg); ; 2005 2041 break;} 2006 2042 case 90: 2007 #line 692"parser.y"2043 #line 705 "parser.y" 2008 2044 { yyval.dlg=dialog_font(yyvsp[0].fntid,yyvsp[-1].dlg); ; 2009 2045 break;} 2010 2046 case 91: 2011 #line 693"parser.y"2047 #line 706 "parser.y" 2012 2048 { yyval.dlg=dialog_class(yyvsp[0].nid,yyvsp[-2].dlg); ; 2013 2049 break;} 2014 2050 case 92: 2015 #line 694"parser.y"2051 #line 707 "parser.y" 2016 2052 { yyval.dlg=dialog_menu(yyvsp[0].nid,yyvsp[-2].dlg); ; 2017 2053 break;} 2018 2054 case 93: 2019 #line 695"parser.y"2055 #line 708 "parser.y" 2020 2056 { yyval.dlg=dialog_language(yyvsp[0].lan,yyvsp[-1].dlg); ; 2021 2057 break;} 2022 2058 case 94: 2023 #line 696"parser.y"2059 #line 709 "parser.y" 2024 2060 { yyval.dlg=dialog_characteristics(yyvsp[0].chars,yyvsp[-1].dlg); ; 2025 2061 break;} 2026 2062 case 95: 2027 #line 697"parser.y"2063 #line 710 "parser.y" 2028 2064 { yyval.dlg=dialog_version(yyvsp[0].ver,yyvsp[-1].dlg); ; 2029 2065 break;} 2030 2066 case 96: 2031 #line 7 00"parser.y"2067 #line 713 "parser.y" 2032 2068 { yyval.ctl = NULL; ; 2033 2069 break;} 2034 2070 case 97: 2035 #line 7 01"parser.y"2071 #line 714 "parser.y" 2036 2072 { yyval.ctl=ins_ctrl(-1, 0, yyvsp[0].ctl, yyvsp[-2].ctl); ; 2037 2073 break;} 2038 2074 case 98: 2039 #line 7 02"parser.y"2075 #line 715 "parser.y" 2040 2076 { yyval.ctl=ins_ctrl(CT_EDIT, 0, yyvsp[0].ctl, yyvsp[-2].ctl); ; 2041 2077 break;} 2042 2078 case 99: 2043 #line 7 03"parser.y"2079 #line 716 "parser.y" 2044 2080 { yyval.ctl=ins_ctrl(CT_LISTBOX, 0, yyvsp[0].ctl, yyvsp[-2].ctl); ; 2045 2081 break;} 2046 2082 case 100: 2047 #line 7 04"parser.y"2083 #line 717 "parser.y" 2048 2084 { yyval.ctl=ins_ctrl(CT_COMBOBOX, 0, yyvsp[0].ctl, yyvsp[-2].ctl); ; 2049 2085 break;} 2050 2086 case 101: 2051 #line 7 05"parser.y"2087 #line 718 "parser.y" 2052 2088 { yyval.ctl=ins_ctrl(CT_SCROLLBAR, 0, yyvsp[0].ctl, yyvsp[-2].ctl); ; 2053 2089 break;} 2054 2090 case 102: 2055 #line 7 06"parser.y"2091 #line 719 "parser.y" 2056 2092 { yyval.ctl=ins_ctrl(CT_BUTTON, BS_CHECKBOX, yyvsp[0].ctl, yyvsp[-2].ctl); ; 2057 2093 break;} 2058 2094 case 103: 2059 #line 7 07"parser.y"2095 #line 720 "parser.y" 2060 2096 { yyval.ctl=ins_ctrl(CT_BUTTON, BS_DEFPUSHBUTTON, yyvsp[0].ctl, yyvsp[-2].ctl); ; 2061 2097 break;} 2062 2098 case 104: 2063 #line 7 08"parser.y"2099 #line 721 "parser.y" 2064 2100 { yyval.ctl=ins_ctrl(CT_BUTTON, BS_GROUPBOX, yyvsp[0].ctl, yyvsp[-2].ctl);; 2065 2101 break;} 2066 2102 case 105: 2067 #line 7 09"parser.y"2103 #line 722 "parser.y" 2068 2104 { yyval.ctl=ins_ctrl(CT_BUTTON, BS_PUSHBUTTON, yyvsp[0].ctl, yyvsp[-2].ctl); ; 2069 2105 break;} 2070 2106 case 106: 2071 #line 7 11"parser.y"2107 #line 724 "parser.y" 2072 2108 { yyval.ctl=ins_ctrl(CT_BUTTON, BS_RADIOBUTTON, yyvsp[0].ctl, yyvsp[-2].ctl); ; 2073 2109 break;} 2074 2110 case 107: 2075 #line 7 12"parser.y"2111 #line 725 "parser.y" 2076 2112 { yyval.ctl=ins_ctrl(CT_BUTTON, BS_AUTO3STATE, yyvsp[0].ctl, yyvsp[-2].ctl); ; 2077 2113 break;} 2078 2114 case 108: 2079 #line 7 13"parser.y"2115 #line 726 "parser.y" 2080 2116 { yyval.ctl=ins_ctrl(CT_BUTTON, BS_3STATE, yyvsp[0].ctl, yyvsp[-2].ctl); ; 2081 2117 break;} 2082 2118 case 109: 2083 #line 7 14"parser.y"2119 #line 727 "parser.y" 2084 2120 { yyval.ctl=ins_ctrl(CT_BUTTON, BS_AUTOCHECKBOX, yyvsp[0].ctl, yyvsp[-2].ctl); ; 2085 2121 break;} 2086 2122 case 110: 2087 #line 7 15"parser.y"2123 #line 728 "parser.y" 2088 2124 { yyval.ctl=ins_ctrl(CT_BUTTON, BS_AUTORADIOBUTTON, yyvsp[0].ctl, yyvsp[-2].ctl); ; 2089 2125 break;} 2090 2126 case 111: 2091 #line 7 16"parser.y"2127 #line 729 "parser.y" 2092 2128 { yyval.ctl=ins_ctrl(CT_STATIC, SS_LEFT, yyvsp[0].ctl, yyvsp[-2].ctl); ; 2093 2129 break;} 2094 2130 case 112: 2095 #line 7 17"parser.y"2131 #line 730 "parser.y" 2096 2132 { yyval.ctl=ins_ctrl(CT_STATIC, SS_CENTER, yyvsp[0].ctl, yyvsp[-2].ctl); ; 2097 2133 break;} 2098 2134 case 113: 2099 #line 7 18"parser.y"2135 #line 731 "parser.y" 2100 2136 { yyval.ctl=ins_ctrl(CT_STATIC, SS_RIGHT, yyvsp[0].ctl, yyvsp[-2].ctl); ; 2101 2137 break;} 2102 2138 case 114: 2103 #line 7 20"parser.y"2139 #line 733 "parser.y" 2104 2140 { 2105 2141 yyvsp[0].ctl->title = yyvsp[-7].nid; … … 2111 2147 break;} 2112 2148 case 115: 2113 #line 7 30"parser.y"2149 #line 743 "parser.y" 2114 2150 { 2115 2151 yyval.ctl=new_control(); … … 2122 2158 yyval.ctl->width = yyvsp[-3].num; 2123 2159 yyval.ctl->height = yyvsp[-1].num; 2124 if(yyvsp[0]. iptr)2125 { 2126 yyval.ctl->style = *(yyvsp[0].iptr);2160 if(yyvsp[0].style) 2161 { 2162 yyval.ctl->style = yyvsp[0].style; 2127 2163 yyval.ctl->gotstyle = TRUE; 2128 free(yyvsp[0].iptr);2129 2164 } 2130 2165 ; 2131 2166 break;} 2132 2167 case 116: 2133 #line 7 50"parser.y"2168 #line 762 "parser.y" 2134 2169 { 2135 2170 yyval.ctl = new_control(); … … 2139 2174 yyval.ctl->width = yyvsp[-3].num; 2140 2175 yyval.ctl->height = yyvsp[-1].num; 2141 if(yyvsp[0]. iptr)2142 { 2143 yyval.ctl->style = *(yyvsp[0].iptr);2176 if(yyvsp[0].style) 2177 { 2178 yyval.ctl->style = yyvsp[0].style; 2144 2179 yyval.ctl->gotstyle = TRUE; 2145 free(yyvsp[0].iptr);2146 2180 } 2147 2181 ; 2148 2182 break;} 2149 2183 case 117: 2150 #line 7 67"parser.y"2184 #line 778 "parser.y" 2151 2185 { yyval.ctl = new_control(); ; 2152 2186 break;} 2153 2187 case 118: 2154 #line 7 69"parser.y"2188 #line 780 "parser.y" 2155 2189 { 2156 2190 yyval.ctl = new_control(); … … 2160 2194 break;} 2161 2195 case 119: 2162 #line 7 74"parser.y"2196 #line 785 "parser.y" 2163 2197 { 2164 2198 yyval.ctl = new_control(); 2165 2199 yyval.ctl->width = yyvsp[-4].num; 2166 2200 yyval.ctl->height = yyvsp[-2].num; 2167 yyval.ctl->style = yyvsp[0]. num;2201 yyval.ctl->style = yyvsp[0].style; 2168 2202 yyval.ctl->gotstyle = TRUE; 2169 2203 ; 2170 2204 break;} 2171 2205 case 120: 2172 #line 7 81"parser.y"2206 #line 792 "parser.y" 2173 2207 { 2174 2208 yyval.ctl = new_control(); 2175 2209 yyval.ctl->width = yyvsp[-6].num; 2176 2210 yyval.ctl->height = yyvsp[-4].num; 2177 yyval.ctl->style = yyvsp[-2]. num;2211 yyval.ctl->style = yyvsp[-2].style; 2178 2212 yyval.ctl->gotstyle = TRUE; 2179 yyval.ctl->exstyle = yyvsp[0]. num;2213 yyval.ctl->exstyle = yyvsp[0].style; 2180 2214 yyval.ctl->gotexstyle = TRUE; 2181 2215 ; 2182 2216 break;} 2183 2217 case 121: 2184 #line 792"parser.y"2218 #line 803 "parser.y" 2185 2219 { 2186 2220 yyval.ctl=new_control(); … … 2188 2222 yyval.ctl->id = yyvsp[-14].num; 2189 2223 yyval.ctl->ctlclass = convert_ctlclass(yyvsp[-12].nid); 2190 yyval.ctl->style = yyvsp[-10]. num;2224 yyval.ctl->style = yyvsp[-10].style; 2191 2225 yyval.ctl->gotstyle = TRUE; 2192 2226 yyval.ctl->x = yyvsp[-8].num; … … 2194 2228 yyval.ctl->width = yyvsp[-4].num; 2195 2229 yyval.ctl->height = yyvsp[-2].num; 2196 yyval.ctl->exstyle = yyvsp[0]. num;2230 yyval.ctl->exstyle = yyvsp[0].style; 2197 2231 yyval.ctl->gotexstyle = TRUE; 2198 2232 ; 2199 2233 break;} 2200 2234 case 122: 2201 #line 8 06"parser.y"2235 #line 817 "parser.y" 2202 2236 { 2203 2237 yyval.ctl=new_control(); … … 2205 2239 yyval.ctl->id = yyvsp[-12].num; 2206 2240 yyval.ctl->ctlclass = convert_ctlclass(yyvsp[-10].nid); 2207 yyval.ctl->style = yyvsp[-8]. num;2241 yyval.ctl->style = yyvsp[-8].style; 2208 2242 yyval.ctl->gotstyle = TRUE; 2209 2243 yyval.ctl->x = yyvsp[-6].num; … … 2214 2248 break;} 2215 2249 case 123: 2216 #line 8 21"parser.y"2250 #line 832 "parser.y" 2217 2251 { yyval.fntid = new_font_id(yyvsp[-2].num, yyvsp[0].str, 0, 0); ; 2218 2252 break;} 2219 2253 case 124: 2220 #line 8 25"parser.y"2221 { yyval. iptr= NULL; ;2254 #line 837 "parser.y" 2255 { yyval.style = NULL; ; 2222 2256 break;} 2223 2257 case 125: 2224 #line 8 26"parser.y"2225 { yyval. iptr = new_int(yyvsp[0].num); ;2258 #line 838 "parser.y" 2259 { yyval.style = yyvsp[0].style; ; 2226 2260 break;} 2227 2261 case 126: 2228 #line 8 30"parser.y"2262 #line 842 "parser.y" 2229 2263 { yyval.styles = NULL; ; 2230 2264 break;} 2231 2265 case 127: 2232 #line 8 31"parser.y"2233 { yyval.styles = new_style_pair(yyvsp[0]. num, 0); ;2266 #line 843 "parser.y" 2267 { yyval.styles = new_style_pair(yyvsp[0].style, 0); ; 2234 2268 break;} 2235 2269 case 128: 2236 #line 8 32"parser.y"2237 { yyval.styles = new_style_pair(yyvsp[-2]. num, yyvsp[0].num); ;2270 #line 844 "parser.y" 2271 { yyval.styles = new_style_pair(yyvsp[-2].style, yyvsp[0].style); ; 2238 2272 break;} 2239 2273 case 129: 2240 #line 836 "parser.y" 2274 #line 848 "parser.y" 2275 { yyval.style = new_style(yyvsp[-2].style->or_mask | yyvsp[0].style->or_mask, yyvsp[-2].style->and_mask | yyvsp[0].style->and_mask); free(yyvsp[-2].style); free(yyvsp[0].style);; 2276 break;} 2277 case 130: 2278 #line 849 "parser.y" 2279 { yyval.style = yyvsp[-1].style; ; 2280 break;} 2281 case 131: 2282 #line 850 "parser.y" 2283 { yyval.style = new_style(yyvsp[0].num, 0); ; 2284 break;} 2285 case 132: 2286 #line 851 "parser.y" 2287 { yyval.style = new_style(0, yyvsp[0].num); ; 2288 break;} 2289 case 133: 2290 #line 855 "parser.y" 2241 2291 { 2242 2292 yyval.nid = new_name_id(); … … 2245 2295 ; 2246 2296 break;} 2247 case 13 0:2248 #line 8 41"parser.y"2297 case 134: 2298 #line 860 "parser.y" 2249 2299 { 2250 2300 yyval.nid = new_name_id(); … … 2253 2303 ; 2254 2304 break;} 2255 case 13 1:2256 #line 8 50"parser.y"2305 case 135: 2306 #line 869 "parser.y" 2257 2307 { 2258 2308 if(!win32) … … 2277 2327 yyvsp[-3].dlgex->controls = get_control_head(yyvsp[-1].ctl); 2278 2328 yyval.dlgex = yyvsp[-3].dlgex; 2329 2330 assert(yyval.dlgex->style != NULL); 2279 2331 if(!yyval.dlgex->gotstyle) 2280 2332 { 2281 yyval.dlgex->style = WS_POPUP;2333 yyval.dlgex->style->or_mask = WS_POPUP; 2282 2334 yyval.dlgex->gotstyle = TRUE; 2283 2335 } 2284 2336 if(yyval.dlgex->title) 2285 yyval.dlgex->style |= WS_CAPTION;2337 yyval.dlgex->style->or_mask |= WS_CAPTION; 2286 2338 if(yyval.dlgex->font) 2287 yyval.dlgex->style |= DS_SETFONT; 2339 yyval.dlgex->style->or_mask |= DS_SETFONT; 2340 2341 yyval.dlgex->style->or_mask &= ~(yyval.dlgex->style->and_mask); 2342 yyval.dlgex->style->and_mask = 0; 2343 2288 2344 indialog = FALSE; 2289 2345 if(!yyval.dlgex->lvc.language) … … 2291 2347 ; 2292 2348 break;} 2293 case 13 2:2294 #line 888"parser.y"2349 case 136: 2350 #line 913 "parser.y" 2295 2351 { yyval.dlgex=new_dialogex(); ; 2296 2352 break;} 2297 case 13 3:2298 #line 889"parser.y"2299 { yyval.dlgex=dialogex_style(yyvsp[0]. num,yyvsp[-2].dlgex); ;2300 break;} 2301 case 13 4:2302 #line 890"parser.y"2303 { yyval.dlgex=dialogex_exstyle(yyvsp[0]. num,yyvsp[-2].dlgex); ;2304 break;} 2305 case 13 5:2306 #line 891"parser.y"2353 case 137: 2354 #line 914 "parser.y" 2355 { yyval.dlgex=dialogex_style(yyvsp[0].style,yyvsp[-2].dlgex); ; 2356 break;} 2357 case 138: 2358 #line 915 "parser.y" 2359 { yyval.dlgex=dialogex_exstyle(yyvsp[0].style,yyvsp[-2].dlgex); ; 2360 break;} 2361 case 139: 2362 #line 916 "parser.y" 2307 2363 { yyval.dlgex=dialogex_caption(yyvsp[0].str,yyvsp[-2].dlgex); ; 2308 2364 break;} 2309 case 1 36:2310 #line 892"parser.y"2365 case 140: 2366 #line 917 "parser.y" 2311 2367 { yyval.dlgex=dialogex_font(yyvsp[0].fntid,yyvsp[-1].dlgex); ; 2312 2368 break;} 2313 case 1 37:2314 #line 893"parser.y"2369 case 141: 2370 #line 918 "parser.y" 2315 2371 { yyval.dlgex=dialogex_font(yyvsp[0].fntid,yyvsp[-1].dlgex); ; 2316 2372 break;} 2317 case 1 38:2318 #line 894"parser.y"2373 case 142: 2374 #line 919 "parser.y" 2319 2375 { yyval.dlgex=dialogex_class(yyvsp[0].nid,yyvsp[-2].dlgex); ; 2320 2376 break;} 2321 case 1 39:2322 #line 895"parser.y"2377 case 143: 2378 #line 920 "parser.y" 2323 2379 { yyval.dlgex=dialogex_menu(yyvsp[0].nid,yyvsp[-2].dlgex); ; 2324 2380 break;} 2325 case 14 0:2326 #line 896"parser.y"2381 case 144: 2382 #line 921 "parser.y" 2327 2383 { yyval.dlgex=dialogex_language(yyvsp[0].lan,yyvsp[-1].dlgex); ; 2328 2384 break;} 2329 case 14 1:2330 #line 897"parser.y"2385 case 145: 2386 #line 922 "parser.y" 2331 2387 { yyval.dlgex=dialogex_characteristics(yyvsp[0].chars,yyvsp[-1].dlgex); ; 2332 2388 break;} 2333 case 14 2:2334 #line 898"parser.y"2389 case 146: 2390 #line 923 "parser.y" 2335 2391 { yyval.dlgex=dialogex_version(yyvsp[0].ver,yyvsp[-1].dlgex); ; 2336 2392 break;} 2337 case 14 3:2338 #line 9 01"parser.y"2393 case 147: 2394 #line 926 "parser.y" 2339 2395 { yyval.ctl = NULL; ; 2340 2396 break;} 2341 case 14 4:2342 #line 9 02"parser.y"2397 case 148: 2398 #line 927 "parser.y" 2343 2399 { yyval.ctl=ins_ctrl(-1, 0, yyvsp[0].ctl, yyvsp[-2].ctl); ; 2344 2400 break;} 2345 case 14 5:2346 #line 9 03"parser.y"2401 case 149: 2402 #line 928 "parser.y" 2347 2403 { yyval.ctl=ins_ctrl(CT_EDIT, 0, yyvsp[0].ctl, yyvsp[-2].ctl); ; 2348 2404 break;} 2349 case 1 46:2350 #line 9 04"parser.y"2405 case 150: 2406 #line 929 "parser.y" 2351 2407 { yyval.ctl=ins_ctrl(CT_LISTBOX, 0, yyvsp[0].ctl, yyvsp[-2].ctl); ; 2352 2408 break;} 2353 case 1 47:2354 #line 9 05"parser.y"2409 case 151: 2410 #line 930 "parser.y" 2355 2411 { yyval.ctl=ins_ctrl(CT_COMBOBOX, 0, yyvsp[0].ctl, yyvsp[-2].ctl); ; 2356 2412 break;} 2357 case 1 48:2358 #line 9 06"parser.y"2413 case 152: 2414 #line 931 "parser.y" 2359 2415 { yyval.ctl=ins_ctrl(CT_SCROLLBAR, 0, yyvsp[0].ctl, yyvsp[-2].ctl); ; 2360 2416 break;} 2361 case 1 49:2362 #line 9 07"parser.y"2417 case 153: 2418 #line 932 "parser.y" 2363 2419 { yyval.ctl=ins_ctrl(CT_BUTTON, BS_CHECKBOX, yyvsp[0].ctl, yyvsp[-2].ctl); ; 2364 2420 break;} 2365 case 15 0:2366 #line 9 08"parser.y"2421 case 154: 2422 #line 933 "parser.y" 2367 2423 { yyval.ctl=ins_ctrl(CT_BUTTON, BS_DEFPUSHBUTTON, yyvsp[0].ctl, yyvsp[-2].ctl); ; 2368 2424 break;} 2369 case 15 1:2370 #line 9 09"parser.y"2425 case 155: 2426 #line 934 "parser.y" 2371 2427 { yyval.ctl=ins_ctrl(CT_BUTTON, BS_GROUPBOX, yyvsp[0].ctl, yyvsp[-2].ctl);; 2372 2428 break;} 2373 case 15 2:2374 #line 9 10"parser.y"2429 case 156: 2430 #line 935 "parser.y" 2375 2431 { yyval.ctl=ins_ctrl(CT_BUTTON, BS_PUSHBUTTON, yyvsp[0].ctl, yyvsp[-2].ctl); ; 2376 2432 break;} 2377 case 15 3:2378 #line 9 12"parser.y"2433 case 157: 2434 #line 937 "parser.y" 2379 2435 { yyval.ctl=ins_ctrl(CT_BUTTON, BS_RADIOBUTTON, yyvsp[0].ctl, yyvsp[-2].ctl); ; 2380 2436 break;} 2381 case 15 4:2382 #line 9 13"parser.y"2437 case 158: 2438 #line 938 "parser.y" 2383 2439 { yyval.ctl=ins_ctrl(CT_BUTTON, BS_AUTO3STATE, yyvsp[0].ctl, yyvsp[-2].ctl); ; 2384 2440 break;} 2385 case 15 5:2386 #line 9 14"parser.y"2441 case 159: 2442 #line 939 "parser.y" 2387 2443 { yyval.ctl=ins_ctrl(CT_BUTTON, BS_3STATE, yyvsp[0].ctl, yyvsp[-2].ctl); ; 2388 2444 break;} 2389 case 1 56:2390 #line 9 15"parser.y"2445 case 160: 2446 #line 940 "parser.y" 2391 2447 { yyval.ctl=ins_ctrl(CT_BUTTON, BS_AUTOCHECKBOX, yyvsp[0].ctl, yyvsp[-2].ctl); ; 2392 2448 break;} 2393 case 1 57:2394 #line 9 16"parser.y"2449 case 161: 2450 #line 941 "parser.y" 2395 2451 { yyval.ctl=ins_ctrl(CT_BUTTON, BS_AUTORADIOBUTTON, yyvsp[0].ctl, yyvsp[-2].ctl); ; 2396 2452 break;} 2397 case 1 58:2398 #line 9 17"parser.y"2453 case 162: 2454 #line 942 "parser.y" 2399 2455 { yyval.ctl=ins_ctrl(CT_STATIC, SS_LEFT, yyvsp[0].ctl, yyvsp[-2].ctl); ; 2400 2456 break;} 2401 case 1 59:2402 #line 9 18"parser.y"2457 case 163: 2458 #line 943 "parser.y" 2403 2459 { yyval.ctl=ins_ctrl(CT_STATIC, SS_CENTER, yyvsp[0].ctl, yyvsp[-2].ctl); ; 2404 2460 break;} 2405 case 16 0:2406 #line 9 19"parser.y"2461 case 164: 2462 #line 944 "parser.y" 2407 2463 { yyval.ctl=ins_ctrl(CT_STATIC, SS_RIGHT, yyvsp[0].ctl, yyvsp[-2].ctl); ; 2408 2464 break;} 2409 case 16 1:2410 #line 9 21"parser.y"2465 case 165: 2466 #line 946 "parser.y" 2411 2467 { 2412 2468 yyvsp[0].ctl->title = yyvsp[-7].nid; … … 2417 2473 ; 2418 2474 break;} 2419 case 16 2:2420 #line 9 32"parser.y"2475 case 166: 2476 #line 957 "parser.y" 2421 2477 { 2422 2478 yyval.ctl=new_control(); … … 2424 2480 yyval.ctl->id = yyvsp[-16].num; 2425 2481 yyval.ctl->ctlclass = convert_ctlclass(yyvsp[-14].nid); 2426 yyval.ctl->style = yyvsp[-12]. num;2482 yyval.ctl->style = yyvsp[-12].style; 2427 2483 yyval.ctl->gotstyle = TRUE; 2428 2484 yyval.ctl->x = yyvsp[-10].num; … … 2430 2486 yyval.ctl->width = yyvsp[-6].num; 2431 2487 yyval.ctl->height = yyvsp[-4].num; 2432 if(yyvsp[-2]. iptr)2433 { 2434 yyval.ctl->exstyle = *(yyvsp[-2].iptr);2488 if(yyvsp[-2].style) 2489 { 2490 yyval.ctl->exstyle = yyvsp[-2].style; 2435 2491 yyval.ctl->gotexstyle = TRUE; 2436 free(yyvsp[-2].iptr);2437 2492 } 2438 2493 if(yyvsp[-1].iptr) … … 2445 2500 ; 2446 2501 break;} 2447 case 16 3:2448 #line 9 57"parser.y"2502 case 167: 2503 #line 981 "parser.y" 2449 2504 { 2450 2505 yyval.ctl=new_control(); 2451 2506 yyval.ctl->title = yyvsp[-15].nid; 2452 2507 yyval.ctl->id = yyvsp[-13].num; 2453 yyval.ctl->style = yyvsp[-9]. num;2508 yyval.ctl->style = yyvsp[-9].style; 2454 2509 yyval.ctl->gotstyle = TRUE; 2455 2510 yyval.ctl->ctlclass = convert_ctlclass(yyvsp[-11].nid); … … 2461 2516 ; 2462 2517 break;} 2463 case 16 4:2464 #line 9 73"parser.y"2518 case 168: 2519 #line 997 "parser.y" 2465 2520 { 2466 2521 yyval.ctl=new_control(); … … 2489 2544 ; 2490 2545 break;} 2491 case 16 5:2492 #line 10 01"parser.y"2546 case 169: 2547 #line 1025 "parser.y" 2493 2548 { 2494 2549 yyval.ctl = new_control(); … … 2513 2568 ; 2514 2569 break;} 2515 case 1 66:2516 #line 10 24"parser.y"2570 case 170: 2571 #line 1048 "parser.y" 2517 2572 { yyval.raw = NULL; ; 2518 2573 break;} 2519 case 1 67:2520 #line 10 25"parser.y"2574 case 171: 2575 #line 1049 "parser.y" 2521 2576 { yyval.raw = yyvsp[0].raw; ; 2522 2577 break;} 2523 case 1 68:2524 #line 10 28"parser.y"2578 case 172: 2579 #line 1052 "parser.y" 2525 2580 { yyval.iptr = NULL; ; 2526 2581 break;} 2527 case 1 69:2528 #line 10 29"parser.y"2582 case 173: 2583 #line 1053 "parser.y" 2529 2584 { yyval.iptr = new_int(yyvsp[0].num); ; 2530 2585 break;} 2531 case 17 0:2532 #line 10 33"parser.y"2586 case 174: 2587 #line 1057 "parser.y" 2533 2588 { yyval.fntid = new_font_id(yyvsp[-7].num, yyvsp[-5].str, yyvsp[-3].num, yyvsp[-1].num); ; 2534 2589 break;} 2535 case 17 1:2536 #line 10 40"parser.y"2590 case 175: 2591 #line 1064 "parser.y" 2537 2592 { yyval.fntid = NULL; ; 2538 2593 break;} 2539 case 17 2:2540 #line 10 41"parser.y"2594 case 176: 2595 #line 1065 "parser.y" 2541 2596 { yyval.fntid = NULL; ; 2542 2597 break;} 2543 case 17 3:2544 #line 10 45"parser.y"2598 case 177: 2599 #line 1069 "parser.y" 2545 2600 { 2546 2601 if(!yyvsp[0].menitm) … … 2564 2619 ; 2565 2620 break;} 2566 case 17 4:2567 #line 10 68"parser.y"2621 case 178: 2622 #line 1092 "parser.y" 2568 2623 { yyval.menitm = yyvsp[-1].menitm; ; 2569 2624 break;} 2570 case 17 5:2571 #line 10 72"parser.y"2625 case 179: 2626 #line 1096 "parser.y" 2572 2627 {yyval.menitm = NULL;; 2573 2628 break;} 2574 case 1 76:2575 #line 10 73"parser.y"2629 case 180: 2630 #line 1097 "parser.y" 2576 2631 { 2577 2632 yyval.menitm=new_menu_item(); … … 2584 2639 ; 2585 2640 break;} 2586 case 1 77:2587 #line 1 082"parser.y"2641 case 181: 2642 #line 1106 "parser.y" 2588 2643 { 2589 2644 yyval.menitm=new_menu_item(); … … 2593 2648 ; 2594 2649 break;} 2595 case 1 78:2596 #line 1 088"parser.y"2650 case 182: 2651 #line 1112 "parser.y" 2597 2652 { 2598 2653 yyval.menitm = new_menu_item(); … … 2604 2659 ; 2605 2660 break;} 2606 case 1 79:2607 #line 11 07"parser.y"2661 case 183: 2662 #line 1131 "parser.y" 2608 2663 { yyval.num = 0; ; 2609 2664 break;} 2610 case 18 0:2611 #line 11 08"parser.y"2665 case 184: 2666 #line 1132 "parser.y" 2612 2667 { yyval.num = yyvsp[0].num | MF_CHECKED; ; 2613 2668 break;} 2614 case 18 1:2615 #line 11 09"parser.y"2669 case 185: 2670 #line 1133 "parser.y" 2616 2671 { yyval.num = yyvsp[0].num | MF_GRAYED; ; 2617 2672 break;} 2618 case 18 2:2619 #line 11 10"parser.y"2673 case 186: 2674 #line 1134 "parser.y" 2620 2675 { yyval.num = yyvsp[0].num | MF_HELP; ; 2621 2676 break;} 2622 case 18 3:2623 #line 11 11"parser.y"2677 case 187: 2678 #line 1135 "parser.y" 2624 2679 { yyval.num = yyvsp[0].num | MF_DISABLED; ; 2625 2680 break;} 2626 case 18 4:2627 #line 11 12"parser.y"2681 case 188: 2682 #line 1136 "parser.y" 2628 2683 { yyval.num = yyvsp[0].num | MF_MENUBARBREAK; ; 2629 2684 break;} 2630 case 18 5:2631 #line 11 13"parser.y"2685 case 189: 2686 #line 1137 "parser.y" 2632 2687 { yyval.num = yyvsp[0].num | MF_MENUBREAK; ; 2633 2688 break;} 2634 case 1 86:2635 #line 11 17"parser.y"2689 case 190: 2690 #line 1141 "parser.y" 2636 2691 { 2637 2692 if(!win32) … … 2657 2712 ; 2658 2713 break;} 2659 case 1 87:2660 #line 11 42"parser.y"2714 case 191: 2715 #line 1166 "parser.y" 2661 2716 { yyval.menexitm = yyvsp[-1].menexitm; ; 2662 2717 break;} 2663 case 1 88:2664 #line 11 46"parser.y"2718 case 192: 2719 #line 1170 "parser.y" 2665 2720 {yyval.menexitm = NULL; ; 2666 2721 break;} 2667 case 1 89:2668 #line 11 47"parser.y"2722 case 193: 2723 #line 1171 "parser.y" 2669 2724 { 2670 2725 yyval.menexitm = new_menuex_item(); … … 2684 2739 ; 2685 2740 break;} 2686 case 19 0:2687 #line 11 63"parser.y"2741 case 194: 2742 #line 1187 "parser.y" 2688 2743 { 2689 2744 yyval.menexitm = new_menuex_item(); … … 2693 2748 ; 2694 2749 break;} 2695 case 19 1:2696 #line 11 69"parser.y"2750 case 195: 2751 #line 1193 "parser.y" 2697 2752 { 2698 2753 yyval.menexitm = new_menuex_item(); … … 2713 2768 ; 2714 2769 break;} 2715 case 19 2:2716 #line 1 189"parser.y"2770 case 196: 2771 #line 1213 "parser.y" 2717 2772 { yyval.exopt = new_itemex_opt(0, 0, 0, 0); ; 2718 2773 break;} 2719 case 19 3:2720 #line 1 190"parser.y"2774 case 197: 2775 #line 1214 "parser.y" 2721 2776 { 2722 2777 yyval.exopt = new_itemex_opt(yyvsp[0].num, 0, 0, 0); … … 2724 2779 ; 2725 2780 break;} 2726 case 19 4:2727 #line 1 194"parser.y"2781 case 198: 2782 #line 1218 "parser.y" 2728 2783 { 2729 2784 yyval.exopt = new_itemex_opt(yyvsp[-3].iptr ? *(yyvsp[-3].iptr) : 0, yyvsp[-1].iptr ? *(yyvsp[-1].iptr) : 0, yyvsp[0].num, 0); … … 2735 2790 ; 2736 2791 break;} 2737 case 19 5:2738 #line 12 02"parser.y"2792 case 199: 2793 #line 1226 "parser.y" 2739 2794 { 2740 2795 yyval.exopt = new_itemex_opt(yyvsp[-4].iptr ? *(yyvsp[-4].iptr) : 0, yyvsp[-2].iptr ? *(yyvsp[-2].iptr) : 0, yyvsp[0].num, 0); … … 2746 2801 ; 2747 2802 break;} 2748 case 196:2749 #line 12 13"parser.y"2803 case 200: 2804 #line 1237 "parser.y" 2750 2805 { yyval.exopt = new_itemex_opt(0, 0, 0, 0); ; 2751 2806 break;} 2752 case 197:2753 #line 12 14"parser.y"2807 case 201: 2808 #line 1238 "parser.y" 2754 2809 { 2755 2810 yyval.exopt = new_itemex_opt(yyvsp[0].num, 0, 0, 0); … … 2757 2812 ; 2758 2813 break;} 2759 case 198:2760 #line 12 18"parser.y"2814 case 202: 2815 #line 1242 "parser.y" 2761 2816 { 2762 2817 yyval.exopt = new_itemex_opt(yyvsp[-2].iptr ? *(yyvsp[-2].iptr) : 0, yyvsp[0].num, 0, 0); … … 2766 2821 ; 2767 2822 break;} 2768 case 199:2769 #line 12 24"parser.y"2823 case 203: 2824 #line 1248 "parser.y" 2770 2825 { 2771 2826 yyval.exopt = new_itemex_opt(yyvsp[-4].iptr ? *(yyvsp[-4].iptr) : 0, yyvsp[-2].iptr ? *(yyvsp[-2].iptr) : 0, yyvsp[0].num, 0); … … 2777 2832 ; 2778 2833 break;} 2779 case 20 0:2780 #line 12 32"parser.y"2834 case 204: 2835 #line 1256 "parser.y" 2781 2836 { 2782 2837 yyval.exopt = new_itemex_opt(yyvsp[-6].iptr ? *(yyvsp[-6].iptr) : 0, yyvsp[-4].iptr ? *(yyvsp[-4].iptr) : 0, yyvsp[-2].iptr ? *(yyvsp[-2].iptr) : 0, yyvsp[0].num); … … 2790 2845 ; 2791 2846 break;} 2792 case 20 1:2793 #line 12 52"parser.y"2847 case 205: 2848 #line 1276 "parser.y" 2794 2849 { 2795 2850 if(!yyvsp[-1].stt) … … 2831 2886 ; 2832 2887 break;} 2833 case 20 2:2834 #line 1 293"parser.y"2888 case 206: 2889 #line 1317 "parser.y" 2835 2890 { 2836 2891 if((tagstt = find_stringtable(yyvsp[0].lvc)) == NULL) … … 2843 2898 ; 2844 2899 break;} 2845 case 20 3:2846 #line 13 04"parser.y"2900 case 207: 2901 #line 1328 "parser.y" 2847 2902 { yyval.stt = NULL; ; 2848 2903 break;} 2849 case 20 4:2850 #line 13 05"parser.y"2904 case 208: 2905 #line 1329 "parser.y" 2851 2906 { 2852 2907 int i; 2853 2908 assert(tagstt != NULL); 2909 if(yyvsp[-2].num > 65535 || yyvsp[-2].num < -32768) 2910 yyerror("Stringtable entry's ID out of range (%d)", yyvsp[-2].num); 2854 2911 /* Search for the ID */ 2855 2912 for(i = 0; i < tagstt->nentries; i++) … … 2877 2934 ; 2878 2935 break;} 2879 case 2 07:2880 #line 13 41"parser.y"2936 case 211: 2937 #line 1367 "parser.y" 2881 2938 { 2882 2939 yyval.veri = yyvsp[-3].veri; … … 2884 2941 ; 2885 2942 break;} 2886 case 2 08:2887 #line 13 48"parser.y"2943 case 212: 2944 #line 1374 "parser.y" 2888 2945 { yyval.veri = new_versioninfo(); ; 2889 2946 break;} 2890 case 2 09:2891 #line 13 49"parser.y"2947 case 213: 2948 #line 1375 "parser.y" 2892 2949 { 2893 2950 if(yyvsp[-8].veri->gotit.fv) … … 2901 2958 ; 2902 2959 break;} 2903 case 21 0:2904 #line 13 59"parser.y"2960 case 214: 2961 #line 1385 "parser.y" 2905 2962 { 2906 2963 if(yyvsp[-8].veri->gotit.pv) … … 2914 2971 ; 2915 2972 break;} 2916 case 21 1:2917 #line 13 69"parser.y"2973 case 215: 2974 #line 1395 "parser.y" 2918 2975 { 2919 2976 if(yyvsp[-2].veri->gotit.ff) … … 2924 2981 ; 2925 2982 break;} 2926 case 21 2:2927 #line 1 376"parser.y"2983 case 216: 2984 #line 1402 "parser.y" 2928 2985 { 2929 2986 if(yyvsp[-2].veri->gotit.ffm) … … 2934 2991 ; 2935 2992 break;} 2936 case 21 3:2937 #line 1 383"parser.y"2993 case 217: 2994 #line 1409 "parser.y" 2938 2995 { 2939 2996 if(yyvsp[-2].veri->gotit.fo) … … 2944 3001 ; 2945 3002 break;} 2946 case 21 4:2947 #line 1 390"parser.y"3003 case 218: 3004 #line 1416 "parser.y" 2948 3005 { 2949 3006 if(yyvsp[-2].veri->gotit.ft) … … 2954 3011 ; 2955 3012 break;} 2956 case 21 5:2957 #line 1 397"parser.y"3013 case 219: 3014 #line 1423 "parser.y" 2958 3015 { 2959 3016 if(yyvsp[-2].veri->gotit.fst) … … 2964 3021 ; 2965 3022 break;} 2966 case 2 16:2967 #line 14 07"parser.y"3023 case 220: 3024 #line 1433 "parser.y" 2968 3025 { yyval.blk = NULL; ; 2969 3026 break;} 2970 case 2 17:2971 #line 14 08"parser.y"3027 case 221: 3028 #line 1434 "parser.y" 2972 3029 { 2973 3030 yyval.blk = yyvsp[0].blk; … … 2977 3034 ; 2978 3035 break;} 2979 case 2 18:2980 #line 14 17"parser.y"3036 case 222: 3037 #line 1443 "parser.y" 2981 3038 { 2982 3039 yyval.blk = new_ver_block(); … … 2985 3042 ; 2986 3043 break;} 2987 case 2 19:2988 #line 14 25"parser.y"3044 case 223: 3045 #line 1451 "parser.y" 2989 3046 { yyval.val = NULL; ; 2990 3047 break;} 2991 case 22 0:2992 #line 14 26"parser.y"3048 case 224: 3049 #line 1452 "parser.y" 2993 3050 { 2994 3051 yyval.val = yyvsp[0].val; … … 2998 3055 ; 2999 3056 break;} 3000 case 22 1:3001 #line 14 35"parser.y"3057 case 225: 3058 #line 1461 "parser.y" 3002 3059 { 3003 3060 yyval.val = new_ver_value(); … … 3006 3063 ; 3007 3064 break;} 3008 case 22 2:3009 #line 14 40"parser.y"3065 case 226: 3066 #line 1466 "parser.y" 3010 3067 { 3011 3068 yyval.val = new_ver_value(); … … 3015 3072 ; 3016 3073 break;} 3017 case 22 3:3018 #line 14 46"parser.y"3074 case 227: 3075 #line 1472 "parser.y" 3019 3076 { 3020 3077 yyval.val = new_ver_value(); … … 3024 3081 ; 3025 3082 break;} 3026 case 22 4:3027 #line 14 55"parser.y"3083 case 228: 3084 #line 1481 "parser.y" 3028 3085 { yyval.verw = new_ver_words(yyvsp[0].num); ; 3029 3086 break;} 3030 case 22 5:3031 #line 14 56"parser.y"3087 case 229: 3088 #line 1482 "parser.y" 3032 3089 { yyval.verw = add_ver_words(yyvsp[-2].verw, yyvsp[0].num); ; 3033 3090 break;} 3034 case 2 26:3035 #line 14 60"parser.y"3091 case 230: 3092 #line 1486 "parser.y" 3036 3093 { 3037 3094 int nitems; … … 3058 3115 ; 3059 3116 break;} 3060 case 2 27:3061 #line 1 486"parser.y"3117 case 231: 3118 #line 1512 "parser.y" 3062 3119 { yyval.tlbarItems = NULL; ; 3063 3120 break;} 3064 case 2 28:3065 #line 1 487"parser.y"3121 case 232: 3122 #line 1513 "parser.y" 3066 3123 { 3067 3124 toolbar_item_t *idrec = new_toolbar_item(); … … 3070 3127 ; 3071 3128 break;} 3072 case 2 29:3073 #line 1 492"parser.y"3129 case 233: 3130 #line 1518 "parser.y" 3074 3131 { 3075 3132 toolbar_item_t *idrec = new_toolbar_item(); … … 3078 3135 ; 3079 3136 break;} 3080 case 23 0:3081 #line 15 01"parser.y"3137 case 234: 3138 #line 1527 "parser.y" 3082 3139 { yyval.iptr = NULL; ; 3083 3140 break;} 3084 case 23 1:3085 #line 15 02"parser.y"3141 case 235: 3142 #line 1528 "parser.y" 3086 3143 { 3087 3144 if(yyvsp[-1].iptr) … … 3095 3152 ; 3096 3153 break;} 3097 case 23 2:3098 #line 15 12"parser.y"3154 case 236: 3155 #line 1538 "parser.y" 3099 3156 { 3100 3157 if(yyvsp[-1].iptr) … … 3111 3168 ; 3112 3169 break;} 3113 case 23 3:3114 #line 15 27"parser.y"3170 case 237: 3171 #line 1553 "parser.y" 3115 3172 { yyval.iptr = new_int(WRC_MO_PRELOAD); ; 3116 3173 break;} 3117 case 23 4:3118 #line 15 28"parser.y"3174 case 238: 3175 #line 1554 "parser.y" 3119 3176 { yyval.iptr = new_int(WRC_MO_MOVEABLE); ; 3120 3177 break;} 3121 case 23 5:3122 #line 15 29"parser.y"3178 case 239: 3179 #line 1555 "parser.y" 3123 3180 { yyval.iptr = new_int(WRC_MO_DISCARDABLE); ; 3124 3181 break;} 3125 case 2 36:3126 #line 15 30"parser.y"3182 case 240: 3183 #line 1556 "parser.y" 3127 3184 { yyval.iptr = new_int(WRC_MO_PURE); ; 3128 3185 break;} 3129 case 2 37:3130 #line 15 33"parser.y"3186 case 241: 3187 #line 1559 "parser.y" 3131 3188 { yyval.iptr = new_int(~WRC_MO_PRELOAD); ; 3132 3189 break;} 3133 case 2 38:3134 #line 15 34"parser.y"3190 case 242: 3191 #line 1560 "parser.y" 3135 3192 { yyval.iptr = new_int(~WRC_MO_MOVEABLE); ; 3136 3193 break;} 3137 case 2 39:3138 #line 15 35"parser.y"3194 case 243: 3195 #line 1561 "parser.y" 3139 3196 { yyval.iptr = new_int(~WRC_MO_PURE); ; 3140 3197 break;} 3141 case 24 0:3142 #line 15 39"parser.y"3198 case 244: 3199 #line 1565 "parser.y" 3143 3200 { yyval.lvc = new_lvc(); ; 3144 3201 break;} 3145 case 24 1:3146 #line 15 40"parser.y"3202 case 245: 3203 #line 1566 "parser.y" 3147 3204 { 3148 3205 if(!win32) … … 3154 3211 ; 3155 3212 break;} 3156 case 24 2:3157 #line 15 48"parser.y"3213 case 246: 3214 #line 1574 "parser.y" 3158 3215 { 3159 3216 if(!win32) … … 3165 3222 ; 3166 3223 break;} 3167 case 24 3:3168 #line 15 56"parser.y"3224 case 247: 3225 #line 1582 "parser.y" 3169 3226 { 3170 3227 if(!win32) … … 3176 3233 ; 3177 3234 break;} 3178 case 24 4:3179 #line 15 67"parser.y"3235 case 248: 3236 #line 1593 "parser.y" 3180 3237 { yyval.lan = new_language(yyvsp[-2].num, yyvsp[0].num); ; 3181 3238 break;} 3182 case 24 5:3183 #line 15 71"parser.y"3239 case 249: 3240 #line 1597 "parser.y" 3184 3241 { yyval.chars = new_characts(yyvsp[0].num); ; 3185 3242 break;} 3186 case 2 46:3187 #line 1 575"parser.y"3243 case 250: 3244 #line 1601 "parser.y" 3188 3245 { yyval.ver = new_version(yyvsp[0].num); ; 3189 3246 break;} 3190 case 2 47:3191 #line 1 579"parser.y"3247 case 251: 3248 #line 1605 "parser.y" 3192 3249 { yyval.raw = yyvsp[-1].raw; ; 3193 3250 break;} 3194 case 2 48:3195 #line 1 583"parser.y"3251 case 252: 3252 #line 1609 "parser.y" 3196 3253 { yyval.raw = yyvsp[0].raw; ; 3197 3254 break;} 3198 case 2 49:3199 #line 1 584"parser.y"3255 case 253: 3256 #line 1610 "parser.y" 3200 3257 { yyval.raw = int2raw_data(yyvsp[0].num); ; 3201 3258 break;} 3202 case 25 0:3203 #line 1 585"parser.y"3259 case 254: 3260 #line 1611 "parser.y" 3204 3261 { yyval.raw = long2raw_data(yyvsp[0].num); ; 3205 3262 break;} 3206 case 25 1:3207 #line 1 586"parser.y"3263 case 255: 3264 #line 1612 "parser.y" 3208 3265 { yyval.raw = str2raw_data(yyvsp[0].str); ; 3209 3266 break;} 3210 case 25 2:3211 #line 1 587"parser.y"3267 case 256: 3268 #line 1613 "parser.y" 3212 3269 { yyval.raw = merge_raw_data(yyvsp[-2].raw, yyvsp[0].raw); free(yyvsp[0].raw->data); free(yyvsp[0].raw); ; 3213 3270 break;} 3214 case 25 3:3215 #line 1 588"parser.y"3271 case 257: 3272 #line 1614 "parser.y" 3216 3273 { yyval.raw = merge_raw_data_int(yyvsp[-2].raw, yyvsp[0].num); ; 3217 3274 break;} 3218 case 25 4:3219 #line 1 589"parser.y"3275 case 258: 3276 #line 1615 "parser.y" 3220 3277 { yyval.raw = merge_raw_data_long(yyvsp[-2].raw, yyvsp[0].num); ; 3221 3278 break;} 3222 case 25 5:3223 #line 1 590"parser.y"3279 case 259: 3280 #line 1616 "parser.y" 3224 3281 { yyval.raw = merge_raw_data_str(yyvsp[-2].raw, yyvsp[0].str); ; 3225 3282 break;} 3226 case 2 56:3227 #line 1 597"parser.y"3283 case 260: 3284 #line 1623 "parser.y" 3228 3285 { yyval.iptr = 0; ; 3229 3286 break;} 3230 case 2 57:3231 #line 1 598"parser.y"3287 case 261: 3288 #line 1624 "parser.y" 3232 3289 { yyval.iptr = new_int(yyvsp[0].num); ; 3233 3290 break;} 3234 case 258: 3235 #line 1600 "parser.y" 3236 { yyval.num = (yyvsp[0].num) & andmask; ; 3237 break;} 3238 case 259: 3239 #line 1603 "parser.y" 3240 { yyval.num = 0; andmask = -1; ; 3241 break;} 3242 case 260: 3243 #line 1606 "parser.y" 3291 case 262: 3292 #line 1626 "parser.y" 3293 { yyval.num = (yyvsp[0].num); ; 3294 break;} 3295 case 263: 3296 #line 1629 "parser.y" 3244 3297 { yyval.num = (yyvsp[-2].num) + (yyvsp[0].num); ; 3245 3298 break;} 3246 case 26 1:3247 #line 16 07"parser.y"3299 case 264: 3300 #line 1630 "parser.y" 3248 3301 { yyval.num = (yyvsp[-2].num) - (yyvsp[0].num); ; 3249 3302 break;} 3250 case 26 2:3251 #line 16 08"parser.y"3303 case 265: 3304 #line 1631 "parser.y" 3252 3305 { yyval.num = (yyvsp[-2].num) | (yyvsp[0].num); ; 3253 3306 break;} 3254 case 26 3:3255 #line 16 09"parser.y"3307 case 266: 3308 #line 1632 "parser.y" 3256 3309 { yyval.num = (yyvsp[-2].num) & (yyvsp[0].num); ; 3257 3310 break;} 3258 case 26 4:3259 #line 16 10"parser.y"3311 case 267: 3312 #line 1633 "parser.y" 3260 3313 { yyval.num = (yyvsp[-2].num) * (yyvsp[0].num); ; 3261 3314 break;} 3262 case 26 5:3263 #line 16 11"parser.y"3315 case 268: 3316 #line 1634 "parser.y" 3264 3317 { yyval.num = (yyvsp[-2].num) / (yyvsp[0].num); ; 3265 3318 break;} 3266 case 26 6:3267 #line 16 12"parser.y"3319 case 269: 3320 #line 1635 "parser.y" 3268 3321 { yyval.num = ~(yyvsp[0].num); ; 3269 3322 break;} 3270 case 2 67:3271 #line 16 13"parser.y"3323 case 270: 3324 #line 1636 "parser.y" 3272 3325 { yyval.num = -(yyvsp[0].num); ; 3273 3326 break;} 3274 case 2 68:3275 #line 16 15"parser.y"3327 case 271: 3328 #line 1638 "parser.y" 3276 3329 { yyval.num = yyvsp[-1].num; ; 3277 3330 break;} 3278 case 2 69:3279 #line 16 16"parser.y"3331 case 272: 3332 #line 1639 "parser.y" 3280 3333 { yyval.num = yyvsp[0].num; want_rscname = 0; ; 3281 3334 break;} 3282 case 27 0:3283 #line 16 17"parser.y"3284 { yyval.num = 0; andmask &=~(yyvsp[0].num); ;3285 break;} 3286 case 27 1:3287 #line 16 20"parser.y"3335 case 273: 3336 #line 1640 "parser.y" 3337 { yyval.num = ~(yyvsp[0].num); ; 3338 break;} 3339 case 274: 3340 #line 1643 "parser.y" 3288 3341 { yyval.num = yyvsp[0].num; ; 3289 3342 break;} 3290 case 27 2:3291 #line 16 21"parser.y"3343 case 275: 3344 #line 1644 "parser.y" 3292 3345 { yyval.num = yyvsp[0].num; ; 3293 3346 break;} … … 3491 3544 goto yynewstate; 3492 3545 } 3493 #line 16 24"parser.y"3546 #line 1647 "parser.y" 3494 3547 3495 3548 /* Dialog specific functions */ 3496 dialog_t *dialog_style(int st, dialog_t *dlg) 3497 { 3498 DWORD s = 0; 3549 dialog_t *dialog_style(style_t * st, dialog_t *dlg) 3550 { 3499 3551 assert(dlg != NULL); 3552 if(dlg->style == NULL) 3553 { 3554 dlg->style = new_style(0,0); 3555 } 3556 3500 3557 if(dlg->gotstyle) 3501 3558 { 3502 3559 yywarning("Style already defined, or-ing together"); 3503 s = dlg->style;3504 3560 } 3505 dlg->style = st | s; 3561 else 3562 { 3563 dlg->style->or_mask = 0; 3564 dlg->style->and_mask = 0; 3565 } 3566 dlg->style->or_mask |= st->or_mask; 3567 dlg->style->and_mask |= st->and_mask; 3506 3568 dlg->gotstyle = TRUE; 3569 free(st); 3507 3570 return dlg; 3508 3571 } 3509 3572 3510 dialog_t *dialog_exstyle(int st, dialog_t *dlg) 3511 { 3512 DWORD s = 0; 3573 dialog_t *dialog_exstyle(style_t *st, dialog_t *dlg) 3574 { 3513 3575 assert(dlg != NULL); 3576 if(dlg->exstyle == NULL) 3577 { 3578 dlg->exstyle = new_style(0,0); 3579 } 3580 3514 3581 if(dlg->gotexstyle) 3515 3582 { 3516 3583 yywarning("ExStyle already defined, or-ing together"); 3517 s = dlg->style;3518 3584 } 3519 dlg->exstyle = st | s; 3585 else 3586 { 3587 dlg->exstyle->or_mask = 0; 3588 dlg->exstyle->and_mask = 0; 3589 } 3590 dlg->exstyle->or_mask |= st->or_mask; 3591 dlg->exstyle->and_mask |= st->and_mask; 3520 3592 dlg->gotexstyle = TRUE; 3593 free(st); 3521 3594 return dlg; 3522 3595 } … … 3586 3659 3587 3660 /* Controls specific functions */ 3588 control_t *ins_ctrl(int type, int style, control_t *ctrl, control_t *prev) 3589 { 3661 control_t *ins_ctrl(int type, int special_style, control_t *ctrl, control_t *prev) 3662 { 3663 /* Hm... this seems to be jammed in at all time... */ 3664 int defaultstyle = WS_CHILD | WS_VISIBLE; 3665 3590 3666 assert(ctrl != NULL); 3591 3667 ctrl->prev = prev; 3668 3592 3669 if(prev) 3593 3670 prev->next = ctrl; 3671 3594 3672 if(type != -1) 3595 3673 { … … 3599 3677 } 3600 3678 3601 /* Hm... this seems to be jammed in at all time... */3602 ctrl->style |= WS_CHILD | WS_VISIBLE;3603 3679 switch(type) 3604 3680 { 3605 3681 case CT_BUTTON: 3606 ctrl->style |= style; 3607 if(style != BS_GROUPBOX && style != BS_RADIOBUTTON) 3608 ctrl->style |= WS_TABSTOP; 3682 if(special_style != BS_GROUPBOX && special_style != BS_RADIOBUTTON) 3683 defaultstyle |= WS_TABSTOP; 3609 3684 break; 3610 3685 case CT_EDIT: 3611 ctrl->style |= WS_TABSTOP | WS_BORDER;3686 defaultstyle |= WS_TABSTOP | WS_BORDER; 3612 3687 break; 3613 3688 case CT_LISTBOX: 3614 ctrl->style |= LBS_NOTIFY | WS_BORDER;3689 defaultstyle |= LBS_NOTIFY | WS_BORDER; 3615 3690 break; 3616 3691 case CT_COMBOBOX: 3617 ctrl->style |= CBS_SIMPLE;3692 defaultstyle |= CBS_SIMPLE; 3618 3693 break; 3619 3694 case CT_STATIC: 3620 ctrl->style |= style; 3621 if(style == SS_CENTER || style == SS_LEFT || style == SS_RIGHT) 3622 ctrl->style |= WS_GROUP; 3695 if(special_style == SS_CENTER || special_style == SS_LEFT || special_style == SS_RIGHT) 3696 defaultstyle |= WS_GROUP; 3623 3697 break; 3624 3698 } … … 3629 3703 { 3630 3704 case CT_EDIT: 3631 ctrl->style |= ES_LEFT;3705 defaultstyle |= ES_LEFT; 3632 3706 break; 3633 3707 case CT_LISTBOX: 3634 ctrl->style |= LBS_NOTIFY;3708 defaultstyle |= LBS_NOTIFY; 3635 3709 break; 3636 3710 case CT_COMBOBOX: 3637 ctrl->style |= CBS_SIMPLE | WS_TABSTOP;3711 defaultstyle |= CBS_SIMPLE | WS_TABSTOP; 3638 3712 break; 3639 3713 case CT_SCROLLBAR: 3640 ctrl->style |= SBS_HORZ;3714 defaultstyle |= SBS_HORZ; 3641 3715 break; 3642 3716 case CT_BUTTON: 3643 switch(s tyle)3717 switch(special_style) 3644 3718 { 3645 3719 case BS_CHECKBOX: … … 3652 3726 case BS_3STATE: 3653 3727 case BS_AUTOCHECKBOX: 3654 ctrl->style |= WS_TABSTOP;3728 defaultstyle |= WS_TABSTOP; 3655 3729 break; 3656 3730 default: 3657 yywarning("Unknown default button control-style 0x%08x", s tyle);3731 yywarning("Unknown default button control-style 0x%08x", special_style); 3658 3732 case BS_RADIOBUTTON: 3659 3733 break; … … 3662 3736 3663 3737 case CT_STATIC: 3664 switch(s tyle)3738 switch(special_style) 3665 3739 { 3666 3740 case SS_LEFT: 3667 3741 case SS_RIGHT: 3668 3742 case SS_CENTER: 3669 ctrl->style |= WS_GROUP;3743 defaultstyle |= WS_GROUP; 3670 3744 break; 3671 3745 case SS_ICON: /* Special case */ 3672 3746 break; 3673 3747 default: 3674 yywarning("Unknown default static control-style 0x%08x", s tyle);3748 yywarning("Unknown default static control-style 0x%08x", special_style); 3675 3749 break; 3676 3750 } … … 3685 3759 3686 3760 /* The SS_ICON flag is always forced in for icon controls */ 3687 if(type == CT_STATIC && style == SS_ICON) 3688 ctrl->style |= SS_ICON; 3689 3761 if(type == CT_STATIC && special_style == SS_ICON) 3762 defaultstyle |= SS_ICON; 3763 3764 if (!ctrl->gotstyle) 3765 ctrl->style = new_style(0,0); 3766 3767 /* combine all styles */ 3768 ctrl->style->or_mask = ctrl->style->or_mask | defaultstyle | special_style; 3690 3769 ctrl->gotstyle = TRUE; 3691 3770 byebye: 3771 /* combine with NOT mask */ 3772 if (ctrl->gotstyle) 3773 { 3774 ctrl->style->or_mask &= ~(ctrl->style->and_mask); 3775 ctrl->style->and_mask = 0; 3776 } 3777 if (ctrl->gotexstyle) 3778 { 3779 ctrl->exstyle->or_mask &= ~(ctrl->exstyle->and_mask); 3780 ctrl->exstyle->and_mask = 0; 3781 } 3692 3782 return ctrl; 3693 3783 } … … 3731 3821 3732 3822 /* DialogEx specific functions */ 3733 dialogex_t *dialogex_style(int st, dialogex_t *dlg) 3734 { 3735 DWORD s = 0; 3823 dialogex_t *dialogex_style(style_t * st, dialogex_t *dlg) 3824 { 3736 3825 assert(dlg != NULL); 3826 if(dlg->style == NULL) 3827 { 3828 dlg->style = new_style(0,0); 3829 } 3830 3737 3831 if(dlg->gotstyle) 3738 3832 { 3739 3833 yywarning("Style already defined, or-ing together"); 3740 s = dlg->style;3741 3834 } 3742 dlg->style = st | s; 3835 else 3836 { 3837 dlg->style->or_mask = 0; 3838 dlg->style->and_mask = 0; 3839 } 3840 dlg->style->or_mask |= st->or_mask; 3841 dlg->style->and_mask |= st->and_mask; 3743 3842 dlg->gotstyle = TRUE; 3843 free(st); 3744 3844 return dlg; 3745 3845 } 3746 3846 3747 dialogex_t *dialogex_exstyle(int st, dialogex_t *dlg) 3748 { 3749 DWORD s = 0; 3847 dialogex_t *dialogex_exstyle(style_t * st, dialogex_t *dlg) 3848 { 3750 3849 assert(dlg != NULL); 3850 if(dlg->exstyle == NULL) 3851 { 3852 dlg->exstyle = new_style(0,0); 3853 } 3854 3751 3855 if(dlg->gotexstyle) 3752 3856 { 3753 3857 yywarning("ExStyle already defined, or-ing together"); 3754 s = dlg->exstyle;3755 3858 } 3756 dlg->exstyle = st | s; 3859 else 3860 { 3861 dlg->exstyle->or_mask = 0; 3862 dlg->exstyle->and_mask = 0; 3863 } 3864 dlg->exstyle->or_mask |= st->or_mask; 3865 dlg->exstyle->and_mask |= st->and_mask; 3757 3866 dlg->gotexstyle = TRUE; 3867 free(st); 3758 3868 return dlg; 3759 3869 } -
trunk/tools/wrc/y.tab.h
r1355 r3426 40 40 dlginit_t *dginit; 41 41 style_pair_t *styles; 42 style_t *style; 42 43 } YYSTYPE; 43 44 #define tIF 258
Note:
See TracChangeset
for help on using the changeset viewer.