1 2 #ifdef HAVE_CONFIG_H 3 #include "config.h" 4 #endif 5 6 #include "php_compat.h" 7 8 const int gdCosT[] = 9 { 10 1024, 11 1023, 12 1023, 13 1022, 14 1021, 15 1020, 16 1018, 17 1016, 18 1014, 19 1011, 20 1008, 21 1005, 22 1001, 23 997, 24 993, 25 989, 26 984, 27 979, 28 973, 29 968, 30 962, 31 955, 32 949, 33 942, 34 935, 35 928, 36 920, 37 912, 38 904, 39 895, 40 886, 41 877, 42 868, 43 858, 44 848, 45 838, 46 828, 47 817, 48 806, 49 795, 50 784, 51 772, 52 760, 53 748, 54 736, 55 724, 56 711, 57 698, 58 685, 59 671, 60 658, 61 644, 62 630, 63 616, 64 601, 65 587, 66 572, 67 557, 68 542, 69 527, 70 512, 71 496, 72 480, 73 464, 74 448, 75 432, 76 416, 77 400, 78 383, 79 366, 80 350, 81 333, 82 316, 83 299, 84 282, 85 265, 86 247, 87 230, 88 212, 89 195, 90 177, 91 160, 92 142, 93 124, 94 107, 95 89, 96 71, 97 53, 98 35, 99 17, 100 0, 101 -17, 102 -35, 103 -53, 104 -71, 105 -89, 106 -107, 107 -124, 108 -142, 109 -160, 110 -177, 111 -195, 112 -212, 113 -230, 114 -247, 115 -265, 116 -282, 117 -299, 118 -316, 119 -333, 120 -350, 121 -366, 122 -383, 123 -400, 124 -416, 125 -432, 126 -448, 127 -464, 128 -480, 129 -496, 130 -512, 131 -527, 132 -542, 133 -557, 134 -572, 135 -587, 136 -601, 137 -616, 138 -630, 139 -644, 140 -658, 141 -671, 142 -685, 143 -698, 144 -711, 145 -724, 146 -736, 147 -748, 148 -760, 149 -772, 150 -784, 151 -795, 152 -806, 153 -817, 154 -828, 155 -838, 156 -848, 157 -858, 158 -868, 159 -877, 160 -886, 161 -895, 162 -904, 163 -912, 164 -920, 165 -928, 166 -935, 167 -942, 168 -949, 169 -955, 170 -962, 171 -968, 172 -973, 173 -979, 174 -984, 175 -989, 176 -993, 177 -997, 178 -1001, 179 -1005, 180 -1008, 181 -1011, 182 -1014, 183 -1016, 184 -1018, 185 -1020, 186 -1021, 187 -1022, 188 -1023, 189 -1023, 190 -1024, 191 -1023, 192 -1023, 193 -1022, 194 -1021, 195 -1020, 196 -1018, 197 -1016, 198 -1014, 199 -1011, 200 -1008, 201 -1005, 202 -1001, 203 -997, 204 -993, 205 -989, 206 -984, 207 -979, 208 -973, 209 -968, 210 -962, 211 -955, 212 -949, 213 -942, 214 -935, 215 -928, 216 -920, 217 -912, 218 -904, 219 -895, 220 -886, 221 -877, 222 -868, 223 -858, 224 -848, 225 -838, 226 -828, 227 -817, 228 -806, 229 -795, 230 -784, 231 -772, 232 -760, 233 -748, 234 -736, 235 -724, 236 -711, 237 -698, 238 -685, 239 -671, 240 -658, 241 -644, 242 -630, 243 -616, 244 -601, 245 -587, 246 -572, 247 -557, 248 -542, 249 -527, 250 -512, 251 -496, 252 -480, 253 -464, 254 -448, 255 -432, 256 -416, 257 -400, 258 -383, 259 -366, 260 -350, 261 -333, 262 -316, 263 -299, 264 -282, 265 -265, 266 -247, 267 -230, 268 -212, 269 -195, 270 -177, 271 -160, 272 -142, 273 -124, 274 -107, 275 -89, 276 -71, 277 -53, 278 -35, 279 -17, 280 0, 281 17, 282 35, 283 53, 284 71, 285 89, 286 107, 287 124, 288 142, 289 160, 290 177, 291 195, 292 212, 293 230, 294 247, 295 265, 296 282, 297 299, 298 316, 299 333, 300 350, 301 366, 302 383, 303 400, 304 416, 305 432, 306 448, 307 464, 308 480, 309 496, 310 512, 311 527, 312 542, 313 557, 314 572, 315 587, 316 601, 317 616, 318 630, 319 644, 320 658, 321 671, 322 685, 323 698, 324 711, 325 724, 326 736, 327 748, 328 760, 329 772, 330 784, 331 795, 332 806, 333 817, 334 828, 335 838, 336 848, 337 858, 338 868, 339 877, 340 886, 341 895, 342 904, 343 912, 344 920, 345 928, 346 935, 347 942, 348 949, 349 955, 350 962, 351 968, 352 973, 353 979, 354 984, 355 989, 356 993, 357 997, 358 1001, 359 1005, 360 1008, 361 1011, 362 1014, 363 1016, 364 1018, 365 1020, 366 1021, 367 1022, 368 1023, 369 1023 370 }; 371 372 const int gdSinT[] = 373 { 374 0, 375 17, 376 35, 377 53, 378 71, 379 89, 380 107, 381 124, 382 142, 383 160, 384 177, 385 195, 386 212, 387 230, 388 247, 389 265, 390 282, 391 299, 392 316, 393 333, 394 350, 395 366, 396 383, 397 400, 398 416, 399 432, 400 448, 401 464, 402 480, 403 496, 404 512, 405 527, 406 542, 407 557, 408 572, 409 587, 410 601, 411 616, 412 630, 413 644, 414 658, 415 671, 416 685, 417 698, 418 711, 419 724, 420 736, 421 748, 422 760, 423 772, 424 784, 425 795, 426 806, 427 817, 428 828, 429 838, 430 848, 431 858, 432 868, 433 877, 434 886, 435 895, 436 904, 437 912, 438 920, 439 928, 440 935, 441 942, 442 949, 443 955, 444 962, 445 968, 446 973, 447 979, 448 984, 449 989, 450 993, 451 997, 452 1001, 453 1005, 454 1008, 455 1011, 456 1014, 457 1016, 458 1018, 459 1020, 460 1021, 461 1022, 462 1023, 463 1023, 464 1024, 465 1023, 466 1023, 467 1022, 468 1021, 469 1020, 470 1018, 471 1016, 472 1014, 473 1011, 474 1008, 475 1005, 476 1001, 477 997, 478 993, 479 989, 480 984, 481 979, 482 973, 483 968, 484 962, 485 955, 486 949, 487 942, 488 935, 489 928, 490 920, 491 912, 492 904, 493 895, 494 886, 495 877, 496 868, 497 858, 498 848, 499 838, 500 828, 501 817, 502 806, 503 795, 504 784, 505 772, 506 760, 507 748, 508 736, 509 724, 510 711, 511 698, 512 685, 513 671, 514 658, 515 644, 516 630, 517 616, 518 601, 519 587, 520 572, 521 557, 522 542, 523 527, 524 512, 525 496, 526 480, 527 464, 528 448, 529 432, 530 416, 531 400, 532 383, 533 366, 534 350, 535 333, 536 316, 537 299, 538 282, 539 265, 540 247, 541 230, 542 212, 543 195, 544 177, 545 160, 546 142, 547 124, 548 107, 549 89, 550 71, 551 53, 552 35, 553 17, 554 0, 555 -17, 556 -35, 557 -53, 558 -71, 559 -89, 560 -107, 561 -124, 562 -142, 563 -160, 564 -177, 565 -195, 566 -212, 567 -230, 568 -247, 569 -265, 570 -282, 571 -299, 572 -316, 573 -333, 574 -350, 575 -366, 576 -383, 577 -400, 578 -416, 579 -432, 580 -448, 581 -464, 582 -480, 583 -496, 584 -512, 585 -527, 586 -542, 587 -557, 588 -572, 589 -587, 590 -601, 591 -616, 592 -630, 593 -644, 594 -658, 595 -671, 596 -685, 597 -698, 598 -711, 599 -724, 600 -736, 601 -748, 602 -760, 603 -772, 604 -784, 605 -795, 606 -806, 607 -817, 608 -828, 609 -838, 610 -848, 611 -858, 612 -868, 613 -877, 614 -886, 615 -895, 616 -904, 617 -912, 618 -920, 619 -928, 620 -935, 621 -942, 622 -949, 623 -955, 624 -962, 625 -968, 626 -973, 627 -979, 628 -984, 629 -989, 630 -993, 631 -997, 632 -1001, 633 -1005, 634 -1008, 635 -1011, 636 -1014, 637 -1016, 638 -1018, 639 -1020, 640 -1021, 641 -1022, 642 -1023, 643 -1023, 644 -1024, 645 -1023, 646 -1023, 647 -1022, 648 -1021, 649 -1020, 650 -1018, 651 -1016, 652 -1014, 653 -1011, 654 -1008, 655 -1005, 656 -1001, 657 -997, 658 -993, 659 -989, 660 -984, 661 -979, 662 -973, 663 -968, 664 -962, 665 -955, 666 -949, 667 -942, 668 -935, 669 -928, 670 -920, 671 -912, 672 -904, 673 -895, 674 -886, 675 -877, 676 -868, 677 -858, 678 -848, 679 -838, 680 -828, 681 -817, 682 -806, 683 -795, 684 -784, 685 -772, 686 -760, 687 -748, 688 -736, 689 -724, 690 -711, 691 -698, 692 -685, 693 -671, 694 -658, 695 -644, 696 -630, 697 -616, 698 -601, 699 -587, 700 -572, 701 -557, 702 -542, 703 -527, 704 -512, 705 -496, 706 -480, 707 -464, 708 -448, 709 -432, 710 -416, 711 -400, 712 -383, 713 -366, 714 -350, 715 -333, 716 -316, 717 -299, 718 -282, 719 -265, 720 -247, 721 -230, 722 -212, 723 -195, 724 -177, 725 -160, 726 -142, 727 -124, 728 -107, 729 -89, 730 -71, 731 -53, 732 -35, 733 -17 734 }; 735