Updated source to match SDL function prototype style
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 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 103 104 105 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 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 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 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 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 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 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 332 333 334 335 336 337 338 339 340 341 342 343 344 345 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 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 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 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 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 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 5457 5458 5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 5645 5646 5647 5648 5649 5650 5651 5652 5653 5654 5655 5656 5657 5658 5659 5660 5661 5662 5663 5664 5665 5666 5667 5668 5669 5670 5671 5672 5673 5674 5675 5676 5677 5678 5679 5680 5681 5682 5683 5684 5685 5686 5687 5688 5689 5690 5691 5692 5693 5694 5695 5696 5697 5698 5699 5700 5701 5702 5703 5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 5724 5725 5726 5727 5728 5729 5730 5731 5732 5733 5734 5735 5736 5737 5738 5739 5740 5741 5742 5743 5744 5745 5746 5747 5748 5749 5750 5751 5752 5753 5754 5755 5756 5757 5758 5759 5760 5761 5762 5763 5764 5765 5766 5767 5768 5769 5770 5771 5772 5773 5774 5775 5776 5777 5778 5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 5852 5853 5854 5855 5856 5857 5858 5859 5860 5861 5862 5863 5864 5865 5866 5867 5868 5869 5870 5871 5872 5873 5874 5875 5876 5877 5878 5879 5880 5881 5882 5883 5884 5885 5886 5887 5888 5889 5890 5891 5892 5893 5894 5895 5896 5897 5898 5899 5900 5901 5902 5903 5904 5905 5906 5907 5908 5909 5910 5911 5912 5913 5914 5915 5916 5917 5918 5919 5920 5921 5922 5923 5924 5925 5926 5927 5928 5929 5930 5931 5932 5933 5934 5935 5936 5937 5938 5939 5940 5941 5942 5943 5944 5945 5946 5947 5948 5949 5950 5951 5952 5953 5954 5955 5956 5957 5958 5959 5960 5961 5962 5963 5964 5965 5966 5967 5968 5969 5970 5971 5972 5973 5974 5975 5976 5977 5978 5979 5980 5981 5982 5983 5984 5985 5986 5987 5988 5989 5990 5991 5992 5993 5994 5995 5996 5997 5998 5999 6000 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010 6011 6012 6013 6014 6015 6016 6017 6018 6019 6020 6021 6022 6023 6024 6025 6026 6027 6028 6029 6030 6031 6032 6033 6034 6035 6036 6037 6038 6039 6040 6041 6042 6043 6044 6045 6046 6047 6048 6049 6050 6051 6052 6053 6054 6055 6056 6057 6058 6059 6060 6061 6062 6063 6064 6065 6066 6067 6068 6069 6070 6071 6072 6073 6074 6075 6076 6077 6078 6079 6080 6081 6082 6083 6084 6085 6086 6087 6088 6089 6090 6091 6092 6093 6094 6095 6096 6097 6098 6099 6100 6101 6102 6103 6104 6105 6106 6107 6108 6109 6110 6111 6112 6113 6114 6115 6116 6117 6118 6119 6120 6121 6122 6123 6124 6125 6126 6127 6128 6129 6130 6131 6132 6133 6134 6135 6136 6137 6138 6139 6140 6141 6142 6143 6144 6145 6146 6147 6148 6149 6150 6151 6152 6153 6154 6155 6156 6157 6158 6159 6160 6161 6162 6163 6164 6165 6166 6167 6168 6169 6170 6171 6172 6173 6174 6175 6176 6177 6178 6179 6180 6181 6182 6183 6184 6185 6186 6187 6188 6189 6190 6191 6192 6193 6194 6195 6196 6197 6198 6199 6200 6201 6202 6203 6204 6205 6206 6207 6208 6209 6210 6211 6212 6213 6214 6215 6216 6217 6218 6219 6220 6221 6222 6223 6224 6225 6226 6227 6228 6229 6230 6231 6232 6233 6234 6235 6236 6237 6238 6239 6240 6241 6242 6243 6244 6245 6246 6247 6248 6249 6250 6251 6252 6253 6254 6255 6256 6257 6258 6259 6260 6261 6262 6263 6264 6265 6266 6267 6268 6269 6270 6271 6272 6273 6274 6275 6276 6277 6278 6279 6280 6281 6282 6283 6284 6285 6286 6287 6288 6289 6290 6291 6292 6293 6294 6295 6296 6297 6298 6299 6300 6301 6302 6303 6304 6305 6306 6307 6308 6309 6310 6311 6312 6313 6314 6315 6316 6317 6318 6319 6320 6321 6322 6323 6324 6325 6326 6327 6328 6329 6330 6331 6332 6333 6334 6335 6336 6337 6338 6339 6340 6341 6342 6343 6344 6345 6346 6347 6348 6349 6350 6351 6352 6353 6354 6355 6356 6357 6358 6359 6360 6361 6362 6363 6364 6365 6366 6367 6368 6369 6370 6371 6372 6373 6374 6375 6376 6377 6378 6379 6380 6381 6382 6383 6384 6385 6386 6387 6388 6389 6390 6391 6392 6393 6394 6395 6396 6397 6398 6399 6400 6401 6402 6403 6404 6405 6406 6407 6408 6409 6410 6411 6412 6413 6414 6415 6416 6417 6418 6419 6420 6421 6422 6423 6424 6425 6426 6427 6428 6429 6430 6431 6432 6433 6434 6435 6436 6437 6438 6439 6440 6441 6442 6443 6444 6445 6446 6447 6448 6449 6450 6451 6452 6453 6454 6455 6456 6457 6458 6459 6460 6461 6462 6463 6464 6465 6466 6467 6468 6469 6470 6471 6472 6473 6474 6475 6476 6477 6478 6479 6480 6481 6482 6483 6484 6485 6486 6487 6488 6489 6490 6491 6492 6493 6494 6495 6496 6497 6498 6499 6500 6501 6502 6503 6504 6505 6506 6507 6508 6509 6510 6511 6512 6513 6514 6515 6516 6517 6518 6519 6520 6521 6522 6523 6524 6525 6526 6527 6528 6529 6530 6531 6532 6533 6534 6535 6536 6537 6538 6539 6540 6541 6542 6543 6544 6545 6546 6547 6548 6549 6550 6551 6552 6553 6554 6555 6556 6557 6558 6559 6560 6561 6562 6563 6564 6565 6566 6567 6568 6569 6570 6571 6572 6573 6574 6575 6576 6577 6578 6579 6580 6581 6582 6583 6584 6585 6586 6587 6588 6589 6590 6591 6592 6593 6594 6595 6596 6597 6598 6599 6600 6601 6602 6603 6604 6605 6606 6607 6608 6609 6610 6611 6612 6613 6614 6615 6616 6617 6618 6619 6620 6621 6622 6623 6624 6625 6626 6627 6628 6629 6630 6631 6632 6633 6634 6635 6636 6637 6638 6639 6640 6641 6642 6643 6644 6645 6646 6647 6648 6649 6650 6651 6652 6653 6654 6655 6656 6657 6658 6659 6660 6661 6662 6663 6664 6665 6666 6667 6668 6669 6670 6671 6672 6673 6674 6675 6676 6677 6678 6679 6680 6681 6682 6683 6684 6685 6686 6687 6688 6689 6690 6691 6692 6693 6694 6695 6696 6697 6698 6699 6700 6701 6702 6703 6704 6705 6706 6707 6708 6709 6710 6711 6712 6713 6714 6715 6716 6717 6718 6719 6720 6721 6722 6723 6724 6725 6726 6727 6728 6729 6730 6731 6732 6733 6734 6735 6736 6737 6738 6739 6740 6741 6742 6743 6744 6745 6746 6747 6748 6749 6750 6751 6752 6753 6754 6755 6756 6757 6758 6759 6760 6761 6762 6763 6764 6765 6766 6767 6768 6769 6770 6771 6772 6773 6774 6775 6776 6777 6778 6779 6780 6781 6782 6783 6784 6785 6786 6787 6788 6789 6790 6791 6792 6793 6794 6795 6796 6797 6798 6799 6800 6801 6802 6803 6804 6805 6806 6807 6808 6809 6810 6811 6812 6813 6814 6815 6816 6817 6818 6819 6820 6821 6822 6823 6824 6825 6826 6827 6828 6829 6830 6831 6832 6833 6834 6835 6836 6837 6838 6839 6840 6841 6842 6843 6844 6845 6846 6847 6848 6849 6850 6851 6852 6853 6854 6855 6856 6857 6858 6859 6860 6861 6862 6863 6864 6865 6866 6867 6868 6869 6870 6871 6872 6873 6874 6875 6876 6877 6878 6879 6880 6881 6882 6883 6884 6885 6886 6887 6888 6889 6890 6891 6892 6893 6894 6895 6896 6897 6898 6899 6900 6901 6902 6903 6904 6905 6906 6907 6908 6909 6910 6911 6912 6913 6914 6915 6916 6917 6918 6919 6920 6921 6922 6923 6924 6925 6926 6927 6928 6929 6930 6931 6932 6933 6934 6935 6936 6937 6938 6939 6940 6941 6942 6943 6944 6945 6946 6947 6948 6949 6950 6951 6952 6953 6954 6955 6956 6957 6958 6959 6960 6961 6962 6963 6964 6965 6966 6967 6968 6969 6970 6971 6972 6973 6974 6975 6976 6977 6978 6979 6980 6981 6982 6983 6984 6985 6986 6987 6988 6989 6990 6991 6992 6993 6994 6995 6996 6997 6998 6999 7000 7001 7002 7003 7004 7005 7006 7007 7008 7009 7010 7011 7012 7013 7014 7015 7016 7017 7018 7019 7020 7021 7022 7023 7024 7025 7026 7027 7028 7029 7030 7031 7032 7033 7034 7035 7036 7037 7038 7039 7040 7041 7042 7043 7044 7045 7046 7047 7048 7049 7050 7051 7052 7053 7054 7055 7056 7057 7058 7059 7060 7061 7062 7063 7064 7065 7066 7067 7068 7069 7070 7071 7072 7073 7074 7075 7076 7077 7078 7079 7080 7081 7082 7083 7084 7085 7086 7087 7088 7089 7090 7091 7092 7093 7094 7095 7096 7097 7098 7099 7100 7101 7102 7103 7104 7105 7106 7107 7108 7109 7110 7111 7112 7113 7114 7115 7116 7117 7118 7119 7120 7121 7122 7123 7124 7125 7126 7127 7128 7129 7130 7131 7132 7133 7134 7135 7136 7137 7138 7139 7140 7141 7142 7143 7144 7145 7146 7147 7148 7149 7150 7151 7152 7153 7154 7155 7156 7157 7158 7159 7160 7161 7162 7163 7164 7165 7166 7167 7168 7169 7170 7171 7172 7173 7174 7175 7176 7177 7178 7179 7180 7181 7182 7183 7184 7185 7186 7187 7188 7189 7190 7191 7192 7193 7194 7195 7196 7197 7198 7199 7200 7201 7202 7203 7204 7205 7206 7207 7208 7209 7210 7211 7212 7213 7214 7215 7216 7217 7218 7219 7220 7221 7222 7223 7224 7225 7226 7227 7228 7229 7230 7231 7232 7233 7234 7235 7236 7237 7238 7239 7240 7241 7242 7243 7244 7245 7246 7247 7248 7249 7250 7251 7252 7253 7254 7255 7256 7257 7258 7259 7260 7261 7262 7263 7264 7265 7266 7267 7268 7269 7270 7271 7272 7273 7274 7275 7276 7277 7278 7279 7280 7281 7282 7283 7284 7285 7286 7287 7288 7289 7290 7291 7292 7293 7294 7295 7296 7297 7298 7299 7300 7301 7302 7303 7304 7305 7306 7307 7308 7309 7310 7311 7312 7313 7314 7315 7316 7317 7318 7319 7320 7321 7322 7323 7324 7325 7326 7327 7328 7329 7330 7331 7332 7333 7334 7335 7336 7337 7338 7339 7340 7341 7342 7343 7344 7345 7346 7347 7348 7349 7350 7351 7352 7353 7354 7355 7356 7357 7358 7359 7360 7361 7362 7363 7364 7365 7366 7367 7368 7369 7370 7371 7372 7373 7374 7375 7376 7377 7378 7379 7380 7381 7382 7383 7384 7385 7386 7387 7388 7389 7390 7391 7392 7393 7394 7395 7396 7397 7398 7399 7400 7401 7402 7403 7404 7405 7406 7407 7408 7409 7410 7411 7412 7413 7414 7415 7416 7417 7418 7419 7420 7421 7422 7423 7424 7425 7426 7427 7428 7429 7430 7431 7432 7433 7434 7435 7436 7437 7438 7439 7440 7441 7442 7443 7444 7445 7446 7447 7448 7449 7450 7451 7452 7453 7454 7455 7456 7457 7458 7459 7460 7461 7462 7463 7464 7465 7466 7467 7468 7469 7470 7471 7472 7473 7474 7475 7476 7477 7478 7479 7480 7481 7482 7483 7484 7485 7486 7487 7488 7489 7490 7491 7492 7493 7494 7495 7496 7497 7498 7499 7500 7501 7502 7503 7504 7505 7506 7507 7508 7509 7510 7511 7512 7513 7514 7515 7516 7517 7518 7519 7520 7521 7522 7523 7524 7525 7526 7527 7528 7529 7530 7531 7532 7533 7534 7535 7536 7537 7538 7539 7540 7541 7542 7543 7544 7545 7546 7547 7548 7549 7550 7551 7552 7553 7554 7555 7556 7557 7558 7559 7560 7561 7562 7563 7564 7565 7566 7567 7568 7569 7570 7571 7572 7573 7574 7575 7576 7577 7578 7579 7580 7581 7582 7583 7584 7585 7586 7587 7588 7589 7590 7591 7592 7593 7594 7595 7596 7597 7598 7599 7600 7601 7602 7603 7604 7605 7606 7607 7608 7609 7610 7611 7612 7613 7614 7615 7616 7617 7618 7619 7620 7621 7622 7623 7624 7625 7626 7627 7628 7629 7630 7631 7632 7633 7634 7635 7636 7637 7638 7639 7640 7641 7642 7643 7644 7645 7646 7647 7648 7649 7650 7651 7652 7653 7654 7655 7656 7657 7658 7659 7660 7661 7662 7663 7664 7665 7666 7667 7668 7669 7670 7671 7672 7673 7674 7675 7676 7677 7678 7679 7680 7681 7682 7683 7684 7685 7686 7687 7688 7689 7690 7691 7692 7693 7694 7695 7696 7697 7698 7699 7700 7701 7702 7703 7704 7705 7706 7707 7708 7709 7710 7711 7712 7713 7714 7715 7716 7717 7718 7719 7720 7721 7722 7723 7724 7725 7726 7727 7728 7729 7730 7731 7732 7733 7734 7735 7736 7737 7738 7739 7740 7741 7742 7743 7744 7745 7746 7747 7748 7749 7750 7751 7752 7753 7754 7755 7756 7757 7758 7759 7760 7761 7762 7763 7764 7765 7766 7767 7768 7769 7770 7771 7772 7773 7774 7775 7776 7777 7778 7779 7780 7781 7782 7783 7784 7785 7786 7787 7788 7789 7790 7791 7792 7793 7794 7795 7796 7797 7798 7799 7800 7801 7802 7803 7804 7805 7806 7807 7808 7809 7810 7811 7812 7813 7814 7815 7816 7817 7818 7819 7820 7821 7822 7823 7824 7825 7826 7827 7828 7829 7830 7831 7832 7833 7834 7835 7836 7837 7838 7839 7840 7841 7842 7843 7844 7845 7846 7847 7848 7849 7850 7851 7852 7853 7854 7855 7856 7857 7858 7859 7860 7861 7862 7863 7864 7865 7866 7867 7868 7869 7870 7871 7872 7873 7874 7875 7876 7877 7878 7879 7880 7881 7882 7883 7884 7885 7886 7887 7888 7889 7890 7891 7892 7893 7894 7895 7896 7897 7898 7899 7900 7901 7902 7903 7904 7905 7906 7907 7908 7909 7910 7911 7912 7913 7914 7915 7916 7917 7918 7919 7920 7921 7922 7923 7924 7925 7926 7927 7928 7929 7930 7931 7932 7933 7934 7935 7936 7937 7938 7939 7940 7941 7942 7943 7944 7945 7946 7947 7948 7949 7950 7951 7952 7953 7954 7955 7956 7957 7958 7959 7960 7961 7962 7963 7964 7965 7966 7967 7968 7969 7970 7971 7972 7973 7974 7975 7976 7977 7978 7979 7980 7981 7982 7983 7984 7985 7986 7987 7988 7989 7990 7991 7992 7993 7994 7995 7996 7997 7998 7999 8000 8001 8002 8003 8004 8005 8006 8007 8008 8009 8010 8011 8012 8013 8014 8015 8016 8017 8018 8019 8020 8021 8022 8023 8024 8025 8026 8027 8028 8029 8030 8031 8032 8033 8034 8035 8036 8037 8038 8039 8040 8041 8042 8043 8044 8045 8046 8047 8048 8049 8050 8051 8052 8053 8054 8055 8056 8057 8058 8059 8060 8061 8062 8063 8064 8065 8066 8067 8068 8069 8070 8071 8072 8073 8074 8075 8076 8077 8078 8079 8080 8081 8082 8083 8084 8085 8086 8087 8088 8089 8090 8091 8092 8093 8094 8095 8096 8097 8098 8099 8100 8101 8102 8103 8104 8105 8106 8107 8108 8109 8110 8111 8112 8113 8114 8115 8116 8117 8118 8119 8120 8121 8122 8123 8124 8125 8126 8127 8128 8129 8130 8131 8132 8133 8134 8135 8136 8137 8138 8139 8140 8141 8142 8143 8144 8145 8146 8147 8148 8149 8150 8151 8152 8153 8154 8155 8156 8157 8158 8159 8160 8161 8162 8163 8164 8165 8166 8167 8168 8169 8170 8171 8172 8173 8174 8175 8176 8177 8178 8179 8180 8181 8182 8183 8184 8185 8186 8187 8188 8189 8190 8191 8192 8193 8194 8195 8196 8197 8198 8199 8200 8201 8202 8203 8204 8205 8206 8207 8208 8209 8210 8211 8212 8213 8214 8215 8216 8217 8218 8219 8220 8221 8222 8223 8224 8225 8226 8227 8228 8229 8230 8231 8232 8233 8234 8235 8236 8237 8238 8239 8240 8241 8242 8243 8244 8245 8246 8247 8248 8249 8250 8251 8252 8253 8254 8255 8256 8257 8258 8259 8260 8261 8262 8263 8264 8265 8266 8267 8268 8269 8270 8271 8272 8273 8274 8275 8276 8277 8278 8279 8280 8281 8282 8283 8284 8285 8286 8287 8288 8289 8290 8291 8292 8293 8294 8295 8296 8297 8298 8299 8300 8301 8302 8303 8304 8305 8306 8307 8308 8309 8310 8311 8312 8313 8314 8315 8316 8317 8318 8319 8320 8321 8322 8323 8324 8325 8326 8327 8328 8329 8330 8331 8332 8333 8334 8335 8336 8337 8338 8339 8340 8341 8342 8343 8344 8345 8346 8347 8348 8349 8350 8351 8352 8353 8354 8355 8356 8357 8358 8359 8360 8361 8362 8363 8364 8365 8366 8367 8368 8369 8370 8371 8372 8373 8374 8375 8376 8377 8378 8379 8380 8381 8382 8383 8384 8385 8386 8387 8388 8389 8390 8391 8392 8393 8394 8395 8396 8397 8398 8399 8400 8401 8402 8403 8404 8405 8406 8407 8408 8409 8410 8411 8412 8413 8414 8415 8416 8417 8418 8419 8420 8421 8422 8423 8424 8425 8426 8427 8428 8429 8430 8431 8432 8433 8434 8435 8436 8437 8438 8439 8440 8441 8442 8443 8444 8445 8446 8447 8448 8449 8450 8451 8452 8453 8454 8455 8456 8457 8458 8459 8460 8461 8462 8463 8464 8465 8466 8467 8468 8469 8470 8471 8472 8473 8474 8475 8476 8477 8478 8479 8480 8481 8482 8483 8484 8485 8486 8487 8488 8489 8490 8491 8492 8493 8494 8495 8496 8497 8498 8499 8500 8501 8502 8503 8504 8505 8506 8507 8508 8509 8510 8511 8512 8513 8514 8515 8516 8517 8518 8519 8520 8521 8522 8523 8524 8525 8526 8527 8528 8529 8530 8531 8532 8533 8534 8535 8536 8537 8538 8539 8540 8541 8542 8543 8544 8545 8546 8547 8548 8549 8550 8551 8552 8553 8554 8555 8556 8557 8558 8559 8560 8561 8562 8563 8564 8565 8566 8567 8568 8569 8570 8571 8572 8573 8574 8575 8576 8577 8578 8579 8580 8581 8582 8583 8584 8585 8586 8587 8588 8589 8590 8591 8592 8593 8594 8595 8596 8597 8598 8599 8600 8601 8602 8603 8604 8605 8606 8607 8608 8609 8610 8611 8612 8613 8614 8615 8616 8617 8618 8619 8620 8621 8622 8623 8624 8625 8626 8627 8628 8629 8630 8631 8632 8633 8634 8635 8636 8637 8638 8639 8640 8641 8642 8643 8644 8645 8646 8647 8648 8649 8650 8651 8652 8653 8654 8655 8656 8657 8658 8659 8660 8661 8662 8663 8664 8665 8666 8667 8668 8669 8670 8671 8672 8673 8674 8675 8676 8677 8678 8679 8680 8681 8682 8683 8684 8685 8686 8687 8688 8689 8690 8691 8692 8693 8694 8695 8696 8697 8698 8699 8700 8701 8702 8703 8704 8705 8706 8707 8708 8709 8710 8711 8712 8713 8714 8715 8716 8717 8718 8719 8720 8721 8722 8723 8724 8725 8726 8727 8728 8729 8730 8731 8732 8733 8734 8735 8736 8737 8738 8739 8740 8741 8742 8743 8744 8745 8746 8747 8748 8749 8750 8751 8752 8753 8754 8755 8756 8757 8758 8759 8760 8761 8762 8763 8764 8765 8766 8767 8768 8769 8770 8771 8772 8773 8774 8775 8776 8777 8778 8779 8780 8781 8782 8783 8784 8785 8786 8787 8788 8789 8790 8791 8792 8793 8794 8795 8796 8797 8798 8799 8800 8801 8802 8803 8804 8805 8806 8807 8808 8809 8810 8811 8812 8813 8814 8815 8816 8817 8818 8819 8820 8821 8822 8823 8824 8825 8826 8827 8828 8829 8830 8831 8832 8833 8834 8835 8836 8837 8838 8839 8840 8841 8842 8843 8844 8845 8846 8847 8848 8849 8850 8851 8852 8853 8854 8855 8856 8857 8858 8859 8860 8861 8862 8863 8864 8865 8866 8867 8868 8869 8870 8871 8872 8873 8874 8875 8876 8877 8878 8879 8880 8881 8882 8883 8884 8885 8886 8887 8888 8889 8890 8891 8892 8893 8894 8895 8896 8897 8898 8899 8900 8901 8902 8903 8904 8905 8906 8907 8908 8909 8910 8911 8912 8913 8914 8915 8916 8917 8918 8919 8920 8921 8922 8923 8924 8925 8926 8927 8928 8929 8930 8931 8932 8933 8934 8935 8936 8937 8938 8939 8940 8941 8942 8943 8944 8945 8946 8947 8948 8949 8950 8951 8952 8953 8954 8955 8956 8957 8958 8959 8960 8961 8962 8963 8964 8965 8966 8967 8968 8969 8970 8971 8972 8973 8974 8975 8976 8977 8978 8979 8980 8981 8982 8983 8984 8985 8986 8987 8988 8989 8990 8991 8992 8993 8994 8995 8996 8997 8998 8999 9000 9001 9002 9003 9004 9005 9006 9007 9008 9009 9010 9011 9012 9013 9014 9015 9016 9017 9018 9019 9020 9021 9022 9023 9024 9025 9026 9027 9028 9029 9030 9031 9032 9033 9034 9035 9036 9037 9038 9039 9040 9041 9042 9043 9044 9045 9046 9047 9048 9049 9050 9051 9052 9053 9054 9055 9056 9057 9058 9059 9060 9061 9062 9063 9064 9065 9066 9067 9068 9069 9070 9071 9072 9073 9074 9075 9076 9077 9078 9079 9080 9081 9082 9083 9084 9085 9086 9087 9088 9089 9090 9091 9092 9093 9094 9095 9096 9097 9098 9099 9100 9101 9102 9103 9104 9105 9106 9107 9108 9109 9110 9111 9112 9113 9114 9115 9116 9117 9118 9119 9120 9121 9122 9123 9124 9125 9126 9127 9128 9129 9130 9131 9132 9133 9134 9135 9136 9137 9138 9139 9140 9141 9142 9143 9144 9145 9146 9147 9148 9149 9150 9151 9152 9153 9154 9155 9156 9157 9158 9159 9160 9161 9162 9163 9164 9165 9166 9167 9168 9169 9170 9171 9172 9173 9174 9175 9176 9177 9178 9179 9180 9181 9182 9183 9184 9185 9186 9187 9188 9189 9190 9191 9192 9193 9194 9195 9196 9197 9198 9199 9200 9201 9202 9203 9204 9205 9206 9207 9208 9209 9210 9211 9212 9213 9214 9215 9216 9217 9218 9219 9220 9221 9222 9223 9224 9225 9226 9227 9228 9229 9230 9231 9232 9233 9234 9235 9236 9237 9238 9239 9240 9241 9242 9243 9244 9245 9246 9247 9248 9249 9250 9251 9252 9253 9254 9255 9256 9257 9258 9259 9260 9261 9262 9263 9264 9265 9266 9267 9268 9269 9270 9271 9272 9273 9274 9275 9276 9277 9278 9279 9280 9281 9282 9283 9284 9285 9286 9287 9288 9289 9290 9291 9292 9293 9294 9295 9296 9297 9298 9299 9300 9301 9302 9303 9304 9305 9306 9307 9308 9309 9310 9311 9312 9313 9314 9315 9316 9317 9318 9319 9320 9321 9322 9323 9324 9325 9326 9327 9328 9329 9330 9331 9332 9333 9334 9335 9336 9337 9338 9339 9340 9341 9342 9343 9344 9345 9346 9347 9348 9349 9350 9351 9352 9353 9354 9355 9356 9357 9358 9359 9360 9361 9362 9363 9364 9365 9366 9367 9368 9369 9370 9371 9372 9373 9374 9375 9376 9377 9378 9379 9380 9381 9382 9383 9384 9385 9386 9387 9388 9389 9390 9391 9392 9393 9394 9395 9396 9397 9398 9399 9400 9401 9402 9403 9404 9405 9406 9407 9408 9409 9410 9411 9412 9413 9414 9415 9416 9417 9418 9419 9420 9421 9422 9423 9424 9425 9426 9427 9428 9429 9430 9431 9432 9433 9434 9435 9436 9437 9438 9439 9440 9441 9442 9443 9444 9445 9446 9447 9448 9449 9450 9451 9452 9453 9454 9455 9456 9457 9458 9459 9460 9461 9462 9463 9464 9465 9466 9467 9468 9469 9470 9471 9472 9473 9474 9475 9476 9477 9478 9479 9480 9481 9482 9483 9484 9485 9486 9487 9488 9489 9490 9491 9492 9493 9494 9495 9496 9497 9498 9499 9500 9501 9502 9503 9504 9505 9506 9507 9508 9509 9510 9511 9512 9513 9514 9515 9516 9517 9518 9519 9520 9521 9522 9523 9524 9525 9526 9527 9528 9529 9530 9531 9532 9533 9534 9535 9536 9537 9538 9539 9540 9541 9542 9543 9544 9545 9546 9547 9548 9549 9550 9551 9552 9553 9554 9555 9556 9557 9558 9559 9560 9561 9562 9563 9564 9565 9566 9567 9568 9569 9570 9571 9572 9573 9574 9575 9576 9577 9578 9579 9580 9581 9582 9583 9584 9585 9586 9587 9588 9589 9590 9591 9592 9593 9594 9595 9596 9597 9598 9599 9600 9601 9602 9603 9604 9605 9606 9607 9608 9609 9610 9611 9612 9613 9614 9615 9616 9617 9618 9619 9620 9621 9622 9623 9624 9625 9626 9627 9628 9629 9630 9631 9632 9633 9634 9635 9636 9637 9638 9639 9640 9641 9642 9643 9644 9645 9646 9647 9648 9649 9650 9651 9652 9653 9654 9655 9656 9657 9658 9659 9660 9661 9662 9663 9664 9665 9666 9667 9668 9669 9670 9671 9672 9673 9674 9675 9676 9677 9678 9679 9680 9681 9682 9683 9684 9685 9686 9687 9688 9689 9690 9691 9692 9693 9694 9695 9696 9697 9698 9699 9700 9701 9702 9703 9704 9705 9706 9707 9708 9709 9710 9711 9712 9713 9714 9715 9716 9717 9718 9719 9720 9721 9722 9723 9724 9725 9726 9727 9728 9729 9730 9731 9732 9733 9734 9735 9736 9737 9738 9739 9740 9741 9742 9743 9744 9745 9746 9747 9748 9749 9750 9751 9752 9753 9754 9755 9756 9757 9758 9759 9760 9761 9762 9763 9764 9765 9766 9767 9768 9769 9770 9771 9772 9773 9774 9775 9776 9777 9778 9779 9780 9781 9782 9783 9784 9785 9786 9787 9788 9789 9790 9791 9792 9793 9794 9795 9796 9797 9798 9799 9800 9801 9802 9803 9804 9805 9806 9807 9808 9809 9810 9811 9812 9813 9814 9815 9816 9817 9818 9819 9820 9821 9822 9823 9824 9825 9826 9827 9828 9829 9830 9831 9832 9833 9834 9835 9836 9837 9838 9839 9840 9841 9842 9843 9844 9845 9846 9847 9848 9849 9850 9851 9852 9853 9854 9855 9856 9857 9858 9859 9860 9861 9862 9863 9864 9865 9866 9867 9868 9869 9870 9871 9872 9873 9874 9875 9876 9877 9878 9879 9880 9881 9882 9883 9884 9885 9886 9887 9888 9889 9890 9891 9892 9893 9894 9895 9896 9897 9898 9899 9900 9901 9902 9903 9904 9905 9906 9907 9908 9909 9910 9911 9912 9913 9914 9915 9916 9917 9918 9919 9920 9921 9922 9923 9924 9925 9926 9927 9928 9929 9930 9931 9932 9933 9934 9935 9936 9937 9938 9939 9940 9941 9942 9943 9944 9945 9946 9947 9948 9949 9950 9951 9952 9953 9954 9955 9956 9957 9958 9959 9960 9961 9962 9963 9964 9965 9966 9967 9968 9969 9970 9971 9972 9973 9974 9975 9976 9977 9978 9979 9980 9981 9982 9983 9984 9985 9986 9987 9988 9989 9990 9991 9992 9993 9994 9995 9996 9997 9998 9999 10000 10001 10002 10003 10004 10005 10006 10007 10008 10009 10010 10011 10012 10013 10014 10015 10016 10017 10018 10019 10020 10021 10022 10023 10024 10025 10026 10027 10028 10029 10030 10031 10032 10033 10034 10035 10036 10037 10038 10039 10040 10041 10042 10043 10044 10045 10046 10047 10048 10049 10050 10051 10052 10053 10054 10055 10056 10057 10058 10059 10060 10061 10062 10063 10064 10065 10066 10067 10068 10069 10070 10071 10072 10073 10074 10075 10076 10077 10078 10079 10080 10081 10082 10083 10084 10085 10086 10087 10088 10089 10090 10091 10092 10093 10094 10095 10096 10097 10098 10099 10100 10101 10102 10103 10104 10105 10106 10107 10108 10109 10110 10111 10112 10113 10114 10115 10116 10117 10118 10119 10120 10121 10122 10123 10124 10125 10126 10127 10128 10129 10130 10131 10132 10133 10134 10135 10136 10137 10138 10139 10140 10141 10142 10143 10144 10145 10146 10147 10148 10149 10150 10151 10152 10153 10154 10155 10156 10157 10158 10159 10160 10161 10162 10163 10164 10165 10166 10167 10168 10169 10170 10171 10172 10173 10174 10175 10176 10177 10178 10179 10180 10181 10182 10183 10184 10185 10186 10187 10188 10189 10190 10191 10192 10193 10194 10195 10196 10197 10198 10199 10200 10201 10202 10203 10204 10205 10206 10207 10208 10209 10210 10211 10212 10213 10214 10215 10216 10217 10218 10219 10220 10221 10222 10223 10224 10225 10226 10227 10228 10229 10230 10231 10232 10233 10234 10235 10236 10237 10238 10239 10240 10241 10242 10243 10244 10245 10246 10247 10248 10249 10250 10251 10252 10253 10254 10255 10256 10257 10258 10259 10260 10261 10262 10263 10264 10265 10266 10267 10268 10269 10270 10271 10272 10273 10274 10275 10276 10277 10278 10279 10280 10281 10282 10283 10284 10285 10286 10287 10288 10289 10290 10291 10292 10293 10294 10295 10296 10297 10298 10299 10300 10301 10302 10303 10304 10305 10306 10307 10308 10309 10310 10311 10312 10313 10314 10315 10316 10317 10318 10319 10320 10321 10322 10323 10324 10325 10326 10327 10328 10329 10330 10331 10332 10333 10334 10335 10336 10337 10338 10339 10340 10341 10342 10343 10344 10345 10346 10347 10348 10349 10350 10351 10352 10353 10354 10355 10356 10357 10358 10359 10360 10361 10362 10363 10364 10365 10366 10367 10368 10369 10370 10371 10372 10373 10374 10375 10376 10377 10378 10379 10380 10381 10382 10383 10384 10385 10386 10387 10388 10389 10390 10391 10392 10393 10394 10395 10396 10397 10398 10399 10400 10401 10402 10403 10404 10405 10406 10407 10408 10409 10410 10411 10412 10413 10414 10415 10416 10417 10418 10419 10420 10421 10422 10423 10424 10425 10426 10427 10428 10429 10430 10431 10432 10433 10434 10435 10436 10437 10438 10439 10440 10441 10442 10443 10444 10445 10446 10447 10448 10449 10450 10451 10452 10453 10454 10455 10456 10457 10458 10459 10460 10461 10462 10463 10464 10465 10466 10467 10468 10469 10470 10471 10472 10473 10474 10475 10476 10477 10478 10479 10480 10481 10482 10483 10484 10485 10486 10487 10488 10489 10490 10491 10492 10493 10494 10495 10496 10497 10498 10499 10500 10501 10502 10503 10504 10505 10506 10507 10508 10509 10510 10511 10512 10513 10514 10515 10516 10517 10518 10519 10520 10521 10522 10523 10524 10525 10526 10527 10528 10529 10530 10531 10532 10533 10534 10535 10536 10537 10538 10539 10540 10541 10542 10543 10544 10545 10546 10547 10548 10549 10550 10551 10552 10553 10554 10555 10556 10557 10558 10559 10560 10561 10562 10563 10564 10565 10566 10567 10568 10569 10570 10571 10572 10573 10574 10575 10576 10577 10578 10579 10580 10581 10582 10583 10584 10585 10586 10587 10588 10589 10590 10591 10592 10593 10594 10595 10596 10597 10598 10599 10600 10601 10602 10603 10604 10605 10606 10607 10608 10609 10610 10611 10612 10613 10614 10615 10616 10617 10618 10619 10620 10621 10622 10623 10624 10625 10626 10627 10628 10629 10630 10631 10632 10633 10634 10635 10636 10637 10638 10639 10640 10641 10642 10643 10644 10645 10646 10647 10648 10649 10650 10651 10652 10653 10654 10655 10656 10657 10658 10659 10660 10661 10662 10663 10664 10665 10666 10667 10668 10669 10670 10671 10672 10673 10674 10675 10676 10677 10678 10679 10680 10681 10682 10683 10684 10685 10686 10687 10688 10689 10690 10691 10692 10693 10694 10695 10696 10697 10698 10699 10700 10701 10702 10703 10704 10705 10706 10707 10708 10709 10710 10711 10712 10713 10714 10715 10716 10717 10718 10719 10720 10721 10722 10723 10724 10725 10726 10727 10728 10729 10730 10731 10732 10733 10734 10735 10736 10737 10738 10739 10740 10741 10742 10743 10744 10745 10746 10747 10748 10749 10750 10751 10752 10753 10754 10755 10756 10757 10758 10759 10760 10761 10762 10763 10764 10765 10766 10767 10768 10769 10770 10771 10772 10773 10774 10775 10776 10777 10778 10779 10780 10781 10782 10783 10784 10785 10786 10787 10788 10789 10790 10791 10792 10793 10794 10795 10796 10797 10798 10799 10800 10801 10802 10803 10804 10805 10806 10807 10808 10809 10810 10811 10812 10813 10814 10815 10816 10817 10818 10819 10820 10821 10822 10823 10824 10825 10826 10827 10828 10829 10830 10831 10832 10833 10834 10835 10836 10837 10838 10839 10840 10841 10842 10843 10844 10845 10846 10847 10848 10849 10850 10851 10852 10853 10854 10855 10856 10857 10858 10859 10860 10861 10862 10863 10864 10865 10866 10867 10868 10869 10870 10871 10872 10873 10874 10875 10876 10877 10878 10879 10880 10881 10882 10883 10884 10885 10886 10887 10888 10889 10890 10891 10892 10893 10894 10895 10896 10897 10898 10899 10900 10901 10902 10903 10904 10905 10906 10907 10908 10909 10910 10911 10912 10913 10914 10915 10916 10917 10918 10919 10920 10921 10922 10923 10924 10925 10926 10927 10928 10929 10930 10931 10932 10933 10934 10935 10936 10937 10938 10939 10940 10941 10942 10943 10944 10945 10946 10947 10948 10949 10950 10951 10952 10953 10954 10955 10956 10957 10958 10959 10960 10961 10962 10963 10964 10965 10966 10967 10968 10969 10970 10971 10972 10973 10974 10975 10976 10977 10978 10979 10980 10981 10982 10983 10984 10985 10986 10987 10988 10989 10990 10991 10992 10993 10994 10995 10996 10997 10998 10999 11000 11001 11002 11003 11004 11005 11006 11007 11008 11009 11010 11011 11012 11013 11014 11015 11016 11017 11018 11019 11020 11021 11022 11023 11024 11025 11026 11027 11028 11029 11030 11031 11032 11033 11034 11035 11036 11037 11038 11039 11040 11041 11042 11043 11044 11045 11046 11047 11048 11049 11050 11051 11052 11053 11054 11055 11056 11057 11058 11059 11060 11061 11062 11063 11064 11065 11066 11067 11068 11069 11070 11071 11072 11073 11074 11075 11076 11077 11078 11079 11080 11081 11082 11083 11084 11085 11086 11087 11088 11089 11090 11091 11092 11093 11094 11095 11096 11097 11098 11099 11100 11101 11102 11103 11104 11105 11106 11107 11108 11109 11110 11111 11112 11113 11114 11115 11116 11117 11118 11119 11120 11121 11122 11123 11124 11125 11126 11127 11128 11129 11130 11131 11132 11133 11134 11135 11136 11137 11138 11139 11140 11141 11142 11143 11144 11145 11146 11147 11148 11149 11150 11151 11152 11153 11154 11155 11156 11157 11158 11159 11160 11161 11162 11163 11164 11165 11166 11167 11168 11169 11170 11171 11172 11173 11174 11175 11176 11177 11178 11179 11180 11181 11182 11183 11184 11185 11186 11187 11188 11189 11190 11191 11192 11193 11194 11195 11196 11197 11198 11199 11200 11201 11202 11203 11204 11205 11206 11207 11208 11209 11210 11211 11212 11213 11214 11215 11216 11217 11218 11219 11220 11221 11222 11223 11224 11225 11226 11227 11228 11229 11230 11231 11232 11233 11234 11235 11236 11237 11238 11239 11240 11241 11242 11243 11244 11245 11246 11247 11248 11249 11250 11251 11252 11253 11254 11255 11256 11257 11258 11259 11260 11261 11262 11263 11264 11265 11266 11267 11268 11269 11270 11271 11272 11273 11274 11275 11276 11277 11278 11279 11280 11281 11282 11283 11284 11285 11286 11287 11288 11289 11290 11291 11292 11293 11294 11295 11296 11297 11298 11299 11300 11301 11302 11303 11304 11305 11306 11307 11308 11309 11310 11311 11312 11313 11314 11315 11316 11317 11318 11319 11320 11321 11322 11323 11324 11325 11326 11327 11328 11329 11330 11331 11332 11333 11334 11335 11336 11337 11338 11339 11340 11341 11342 11343 11344 11345 11346 11347 11348 11349 11350 11351 11352 11353 11354 11355 11356 11357 11358 11359 11360 11361 11362 11363 11364 11365 11366 11367 11368 11369 11370 11371 11372 11373 11374 11375 11376 11377 11378 11379 11380 11381 11382 11383 11384 11385 11386 11387 11388 11389 11390 11391 11392 11393 11394 11395 11396 11397 11398 11399 11400 11401 11402 11403 11404 11405 11406 11407 11408 11409 11410 11411 11412 11413 11414 11415 11416 11417 11418 11419 11420 11421 11422 11423 11424 11425 11426 11427 11428 11429 11430 11431 11432 11433 11434 11435 11436 11437 11438 11439 11440 11441 11442 11443 11444 11445 11446 11447 11448 11449 11450 11451 11452 11453 11454 11455 11456 11457 11458 11459 11460 11461 11462 11463 11464 11465 11466 11467 11468 11469 11470 11471 11472 11473 11474 11475 11476 11477 11478 11479 11480 11481 11482 11483 11484 11485 11486 11487 11488 11489 11490 11491 11492 11493 11494 11495 11496 11497 11498 11499 11500 11501 11502 11503 11504 11505 11506 11507 11508 11509 11510 11511 11512 11513 11514 11515 11516 11517 11518 11519 11520 11521 11522 11523 11524 11525 11526 11527 11528 11529 11530 11531 11532 11533 11534 11535 11536 11537 11538 11539 11540 11541 11542 11543 11544 11545 11546 11547 11548 11549 11550 11551 11552 11553 11554 11555 11556 11557 11558 11559 11560 11561 11562 11563 11564 11565 11566 11567 11568 11569 11570 11571 11572 11573 11574 11575 11576 11577 11578 11579 11580 11581 11582 11583 11584 11585 11586 11587 11588 11589 11590 11591 11592 11593 11594 11595 11596 11597 11598 11599 11600 11601 11602 11603 11604 11605 11606 11607 11608 11609 11610 11611 11612 11613 11614 11615 11616 11617 11618 11619 11620 11621 11622 11623 11624 11625 11626 11627 11628 11629 11630 11631 11632 11633 11634 11635 11636 11637 11638 11639 11640 11641 11642 11643 11644 11645 11646 11647 11648 11649 11650 11651 11652 11653 11654 11655 11656 11657 11658 11659 11660 11661 11662 11663 11664 11665 11666 11667 11668 11669 11670 11671 11672 11673 11674 11675 11676 11677 11678 11679 11680 11681 11682 11683 11684 11685 11686 11687 11688 11689 11690 11691 11692 11693 11694 11695 11696 11697 11698 11699 11700 11701 11702 11703 11704 11705 11706 11707 11708 11709 11710 11711 11712 11713 11714 11715 11716 11717 11718 11719 11720 11721 11722 11723 11724 11725 11726 11727 11728 11729 11730 11731 11732 11733 11734 11735 11736 11737 11738 11739 11740 11741 11742 11743 11744 11745 11746 11747 11748 11749 11750 11751 11752 11753 11754 11755 11756 11757 11758 11759 11760 11761 11762 11763 11764 11765 11766 11767 11768 11769 11770 11771 11772 11773 11774 11775 11776 11777 11778 11779 11780 11781 11782 11783 11784 11785 11786 11787 11788 11789 11790 11791 11792 11793 11794 11795 11796 11797 11798 11799 11800 11801 11802 11803 11804 11805 11806 11807 11808 11809 11810 11811 11812 11813 11814 11815 11816 11817 11818 11819 11820 11821 11822 11823 11824 11825 11826 11827 11828 11829 11830 11831 11832 11833 11834 11835 11836 11837 11838 11839 11840 11841 11842 11843 11844 11845 11846 11847 11848 11849 11850 11851 11852 11853 11854 11855 11856 11857 11858 11859 11860 11861 11862 11863 11864 11865 11866 11867 11868 11869 11870 11871 11872 11873 11874 11875 11876 11877 11878 11879 11880 11881 11882 11883 11884 11885 11886 11887 11888 11889 11890 11891 11892 11893 11894 11895 11896 11897 11898 11899 11900 11901 11902 11903 11904 11905 11906 11907 11908 11909 11910 11911 11912 11913 11914 11915 11916 11917 11918 11919 11920 11921 11922 11923 11924 11925 11926 11927 11928 11929 11930 11931 11932 11933 11934 11935 11936 11937 11938 11939 11940 11941 11942 11943 11944 11945 11946 11947 11948 11949 11950 11951 11952 11953 11954 11955 11956 11957 11958 11959 11960 11961 11962 11963 11964 11965 11966 11967 11968 11969 11970 11971 11972 11973 11974 11975 11976 11977 11978 11979 11980 11981 11982 11983 11984 11985 11986 11987 11988 11989 11990 11991 11992 11993 11994 11995 11996 11997 11998 11999 12000 12001 12002 12003 12004 12005 12006 12007 12008 12009 12010 12011 12012 12013 12014 12015 12016 12017 12018 12019 12020 12021 12022 12023 12024 12025 12026 12027 12028 12029 12030 12031 12032 12033 12034 12035 12036 12037 12038 12039 12040 12041 12042 12043 12044 12045 12046 12047 12048 12049 12050 12051 12052 12053 12054 12055 12056 12057 12058 12059 12060 12061 12062 12063 12064 12065 12066 12067 12068 12069 12070 12071 12072 12073 12074 12075 12076 12077 12078 12079 12080 12081 12082 12083 12084 12085 12086 12087 12088 12089 12090 12091 12092 12093 12094 12095 12096 12097 12098 12099 12100 12101 12102 12103 12104 12105 12106 12107 12108 12109 12110 12111 12112 12113 12114 12115 12116 12117 12118 12119 12120 12121 12122 12123 12124 12125 12126 12127 12128 12129 12130 12131 12132 12133 12134 12135 12136 12137 12138 12139 12140 12141 12142 12143 12144 12145 12146 12147 12148 12149 12150 12151 12152 12153 12154 12155 12156 12157 12158 12159 12160 12161 12162 12163 12164 12165 12166 12167 12168 12169 12170 12171 12172 12173 12174 12175 12176 12177 12178 12179 12180 12181 12182 12183 12184 12185 12186 12187 12188 12189 12190 12191 12192 12193 12194 12195 12196 12197 12198 12199 12200 12201 12202 12203 12204 12205 12206 12207 12208 12209 12210 12211 12212 12213 12214 12215 12216 12217 12218 12219 12220 12221 12222 12223 12224 12225 12226 12227 12228 12229 12230 12231 12232 12233 12234 12235 12236 12237 12238 12239 12240 12241 12242 12243 12244 12245 12246 12247 12248 12249 12250 12251 12252 12253 12254 12255 12256 12257 12258 12259 12260 12261 12262 12263 12264 12265 12266 12267 12268 12269 12270 12271 12272 12273 12274 12275 12276 12277 12278 12279 12280 12281 12282 12283 12284 12285 12286 12287 12288 12289 12290 12291 12292 12293 12294 12295 12296 12297 12298 12299 12300 12301 12302 12303 12304 12305 12306 12307 12308 12309 12310 12311 12312 12313 12314 12315 12316 12317 12318 12319 12320 12321 12322 12323 12324 12325 12326 12327 12328 12329 12330 12331 12332 12333 12334 12335 12336 12337 12338 12339 12340 12341 12342 12343 12344 12345 12346 12347 12348 12349 12350 12351 12352 12353 12354 12355 12356 12357 12358 12359 12360 12361 12362 12363 12364 12365 12366 12367 12368 12369 12370 12371 12372 12373 12374 12375 12376 12377 12378 12379 12380 12381 12382 12383 12384 12385 12386 12387 12388 12389 12390 12391 12392 12393 12394 12395 12396 12397 12398 12399
diff --git a/src/SDL.c b/src/SDL.c
index 10cbeaa..1be8111 100644
--- a/src/SDL.c
+++ b/src/SDL.c
@@ -442,8 +442,7 @@ void SDL_QuitSubSystem(Uint32 flags)
#endif
}
-Uint32
-SDL_WasInit(Uint32 flags)
+Uint32 SDL_WasInit(Uint32 flags)
{
int i;
int num_subsystems = SDL_arraysize(SDL_SubsystemRefCount);
@@ -531,22 +530,19 @@ void SDL_GetVersion(SDL_version *ver)
}
/* Get the library source revision */
-const char *
-SDL_GetRevision(void)
+const char *SDL_GetRevision(void)
{
return SDL_REVISION;
}
/* Get the library source revision number */
-int
-SDL_GetRevisionNumber(void)
+int SDL_GetRevisionNumber(void)
{
return 0; /* doesn't make sense without Mercurial. */
}
/* Get the name of the platform */
-const char *
-SDL_GetPlatform(void)
+const char *SDL_GetPlatform(void)
{
#if __AIX__
return "AIX";
@@ -619,8 +615,7 @@ SDL_GetPlatform(void)
#endif
}
-SDL_bool
-SDL_IsTablet(void)
+SDL_bool SDL_IsTablet(void)
{
#if __ANDROID__
extern SDL_bool SDL_IsAndroidTablet(void);
@@ -638,9 +633,7 @@ SDL_IsTablet(void)
#if (!defined(HAVE_LIBC) || defined(__WATCOMC__)) && !defined(SDL_STATIC_LIB)
/* Need to include DllMain() on Watcom C for some reason.. */
-BOOL APIENTRY
-_DllMainCRTStartup(HANDLE hModule,
- DWORD ul_reason_for_call, LPVOID lpReserved)
+BOOL APIENTRY _DllMainCRTStartup(HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
{
switch (ul_reason_for_call) {
case DLL_PROCESS_ATTACH:
diff --git a/src/SDL_assert.c b/src/SDL_assert.c
index 85a7090..dc5a220 100644
--- a/src/SDL_assert.c
+++ b/src/SDL_assert.c
@@ -326,9 +326,7 @@ static SDL_assert_state SDLCALL SDL_PromptAssertion(const SDL_assert_data *data,
return state;
}
-SDL_assert_state
-SDL_ReportAssertion(SDL_assert_data *data, const char *func, const char *file,
- int line)
+SDL_assert_state SDL_ReportAssertion(SDL_assert_data *data, const char *func, const char *file, int line)
{
SDL_assert_state state = SDL_ASSERTION_IGNORE;
static int assertion_running = 0;
diff --git a/src/SDL_dataqueue.c b/src/SDL_dataqueue.c
index 4f63fca..2019c30 100644
--- a/src/SDL_dataqueue.c
+++ b/src/SDL_dataqueue.c
@@ -50,8 +50,7 @@ static void SDL_FreeDataQueueList(SDL_DataQueuePacket *packet)
}
}
-SDL_DataQueue *
-SDL_NewDataQueue(const size_t _packetlen, const size_t initialslack)
+SDL_DataQueue *SDL_NewDataQueue(const size_t _packetlen, const size_t initialslack)
{
SDL_DataQueue *queue = (SDL_DataQueue *)SDL_calloc(1, sizeof(SDL_DataQueue));
@@ -316,8 +315,7 @@ SDL_CountDataQueue(SDL_DataQueue *queue)
return retval;
}
-SDL_mutex *
-SDL_GetDataQueueMutex(SDL_DataQueue *queue)
+SDL_mutex *SDL_GetDataQueueMutex(SDL_DataQueue *queue)
{
return queue ? queue->lock : NULL;
}
diff --git a/src/SDL_error.c b/src/SDL_error.c
index 0c31aaf..501d395 100644
--- a/src/SDL_error.c
+++ b/src/SDL_error.c
@@ -61,8 +61,7 @@ int SDL_SetError(SDL_PRINTF_FORMAT_STRING const char *fmt, ...)
}
/* Available for backwards compatibility */
-const char *
-SDL_GetError(void)
+const char *SDL_GetError(void)
{
const SDL_error *error = SDL_GetErrBuf();
return error->error ? error->str : "";
@@ -108,8 +107,7 @@ int main(int argc, char *argv[])
}
#endif
-char *
-SDL_GetErrorMsg(char *errstr, int maxlen)
+char *SDL_GetErrorMsg(char *errstr, int maxlen)
{
const SDL_error *error = SDL_GetErrBuf();
diff --git a/src/SDL_hints.c b/src/SDL_hints.c
index aeee736..ceec0d5 100644
--- a/src/SDL_hints.c
+++ b/src/SDL_hints.c
@@ -45,9 +45,7 @@ typedef struct SDL_Hint
static SDL_Hint *SDL_hints;
-SDL_bool
-SDL_SetHintWithPriority(const char *name, const char *value,
- SDL_HintPriority priority)
+SDL_bool SDL_SetHintWithPriority(const char *name, const char *value, SDL_HintPriority priority)
{
const char *env;
SDL_Hint *hint;
@@ -97,8 +95,7 @@ SDL_SetHintWithPriority(const char *name, const char *value,
return SDL_TRUE;
}
-SDL_bool
-SDL_ResetHint(const char *name)
+SDL_bool SDL_ResetHint(const char *name)
{
const char *env;
SDL_Hint *hint;
@@ -154,14 +151,12 @@ void SDL_ResetHints(void)
}
}
-SDL_bool
-SDL_SetHint(const char *name, const char *value)
+SDL_bool SDL_SetHint(const char *name, const char *value)
{
return SDL_SetHintWithPriority(name, value, SDL_HINT_NORMAL);
}
-const char *
-SDL_GetHint(const char *name)
+const char *SDL_GetHint(const char *name)
{
const char *env;
SDL_Hint *hint;
@@ -178,8 +173,7 @@ SDL_GetHint(const char *name)
return env;
}
-SDL_bool
-SDL_GetStringBoolean(const char *value, SDL_bool default_value)
+SDL_bool SDL_GetStringBoolean(const char *value, SDL_bool default_value)
{
if (value == NULL || !*value) {
return default_value;
@@ -190,8 +184,7 @@ SDL_GetStringBoolean(const char *value, SDL_bool default_value)
return SDL_TRUE;
}
-SDL_bool
-SDL_GetHintBoolean(const char *name, SDL_bool default_value)
+SDL_bool SDL_GetHintBoolean(const char *name, SDL_bool default_value)
{
const char *hint = SDL_GetHint(name);
return SDL_GetStringBoolean(hint, default_value);
diff --git a/src/SDL_log.c b/src/SDL_log.c
index 2dda72d..ab6e7c2 100644
--- a/src/SDL_log.c
+++ b/src/SDL_log.c
@@ -154,8 +154,7 @@ void SDL_LogSetPriority(int category, SDL_LogPriority priority)
}
}
-SDL_LogPriority
-SDL_LogGetPriority(int category)
+SDL_LogPriority SDL_LogGetPriority(int category)
{
SDL_LogLevel *entry;
diff --git a/src/atomic/SDL_atomic.c b/src/atomic/SDL_atomic.c
index 6a9a19b..4e10d52 100644
--- a/src/atomic/SDL_atomic.c
+++ b/src/atomic/SDL_atomic.c
@@ -124,8 +124,7 @@ static SDL_INLINE void leaveLock(void *a)
}
#endif
-SDL_bool
-SDL_AtomicCAS(SDL_atomic_t *a, int oldval, int newval)
+SDL_bool SDL_AtomicCAS(SDL_atomic_t *a, int oldval, int newval)
{
#ifdef HAVE_MSC_ATOMICS
SDL_COMPILE_TIME_ASSERT(atomic_cas, sizeof(long) == sizeof(a->value));
@@ -154,8 +153,7 @@ SDL_AtomicCAS(SDL_atomic_t *a, int oldval, int newval)
#endif
}
-SDL_bool
-SDL_AtomicCASPtr(void **a, void *oldval, void *newval)
+SDL_bool SDL_AtomicCASPtr(void **a, void *oldval, void *newval)
{
#if defined(HAVE_MSC_ATOMICS)
return _InterlockedCompareExchangePointer(a, newval, oldval) == oldval;
@@ -205,8 +203,7 @@ int SDL_AtomicSet(SDL_atomic_t *a, int v)
#endif
}
-void *
-SDL_AtomicSetPtr(void **a, void *v)
+void *SDL_AtomicSetPtr(void **a, void *v)
{
#if defined(HAVE_MSC_ATOMICS)
return _InterlockedExchangePointer(a, v);
@@ -272,8 +269,7 @@ int SDL_AtomicGet(SDL_atomic_t *a)
#endif
}
-void *
-SDL_AtomicGetPtr(void **a)
+void *SDL_AtomicGetPtr(void **a)
{
#ifdef HAVE_ATOMIC_LOAD_N
return __atomic_load_n(a, __ATOMIC_SEQ_CST);
diff --git a/src/atomic/SDL_spinlock.c b/src/atomic/SDL_spinlock.c
index 8905b67..9fd3e61 100644
--- a/src/atomic/SDL_spinlock.c
+++ b/src/atomic/SDL_spinlock.c
@@ -61,8 +61,7 @@ extern __inline int _SDL_xchg_watcom(volatile int *a, int v);
/* *INDENT-ON* */ /* clang-format on */
/* This function is where all the magic happens... */
-SDL_bool
-SDL_AtomicTryLock(SDL_SpinLock *lock)
+SDL_bool SDL_AtomicTryLock(SDL_SpinLock *lock)
{
#if SDL_ATOMIC_DISABLED
/* Terrible terrible damage */
diff --git a/src/audio/SDL_audio.c b/src/audio/SDL_audio.c
index 0a34d4f..60242e6 100644
--- a/src/audio/SDL_audio.c
+++ b/src/audio/SDL_audio.c
@@ -603,8 +603,7 @@ int SDL_QueueAudio(SDL_AudioDeviceID devid, const void *data, Uint32 len)
return rc;
}
-Uint32
-SDL_DequeueAudio(SDL_AudioDeviceID devid, void *data, Uint32 len)
+Uint32 SDL_DequeueAudio(SDL_AudioDeviceID devid, void *data, Uint32 len)
{
SDL_AudioDevice *device = get_audio_device(devid);
Uint32 rc;
@@ -622,8 +621,7 @@ SDL_DequeueAudio(SDL_AudioDeviceID devid, void *data, Uint32 len)
return rc;
}
-Uint32
-SDL_GetQueuedAudioSize(SDL_AudioDeviceID devid)
+Uint32 SDL_GetQueuedAudioSize(SDL_AudioDeviceID devid)
{
Uint32 retval = 0;
SDL_AudioDevice *device = get_audio_device(devid);
@@ -904,8 +902,7 @@ int SDL_GetNumAudioDrivers(void)
return SDL_arraysize(bootstrap) - 1;
}
-const char *
-SDL_GetAudioDriver(int index)
+const char *SDL_GetAudioDriver(int index)
{
if (index >= 0 && index < SDL_GetNumAudioDrivers()) {
return bootstrap[index]->name;
@@ -1012,8 +1009,7 @@ int SDL_AudioInit(const char *driver_name)
/*
* Get the current audio driver name
*/
-const char *
-SDL_GetCurrentAudioDriver()
+const char *SDL_GetCurrentAudioDriver()
{
return current_audio.name;
}
@@ -1073,8 +1069,7 @@ int SDL_GetNumAudioDevices(int iscapture)
return retval;
}
-const char *
-SDL_GetAudioDeviceName(int index, int iscapture)
+const char *SDL_GetAudioDeviceName(int index, int iscapture)
{
SDL_AudioDeviceItem *item;
int i;
@@ -1191,8 +1186,7 @@ static void close_audio_device(SDL_AudioDevice *device)
SDL_free(device);
}
-static Uint16
-GetDefaultSamplesFromFreq(int freq)
+static Uint16 GetDefaultSamplesFromFreq(int freq)
{
/* Pick a default of ~46 ms at desired frequency */
/* !!! FIXME: remove this when the non-Po2 resampling is in. */
@@ -1560,8 +1554,7 @@ int SDL_OpenAudio(SDL_AudioSpec *desired, SDL_AudioSpec *obtained)
return (id == 0) ? -1 : 0;
}
-SDL_AudioDeviceID
-SDL_OpenAudioDevice(const char *device, int iscapture,
+SDL_AudioDeviceID SDL_OpenAudioDevice(const char *device, int iscapture,
const SDL_AudioSpec *desired, SDL_AudioSpec *obtained,
int allowed_changes)
{
@@ -1569,8 +1562,7 @@ SDL_OpenAudioDevice(const char *device, int iscapture,
allowed_changes, 2);
}
-SDL_AudioStatus
-SDL_GetAudioDeviceStatus(SDL_AudioDeviceID devid)
+SDL_AudioStatus SDL_GetAudioDeviceStatus(SDL_AudioDeviceID devid)
{
SDL_AudioDevice *device = get_audio_device(devid);
SDL_AudioStatus status = SDL_AUDIO_STOPPED;
@@ -1584,8 +1576,7 @@ SDL_GetAudioDeviceStatus(SDL_AudioDeviceID devid)
return status;
}
-SDL_AudioStatus
-SDL_GetAudioStatus(void)
+SDL_AudioStatus SDL_GetAudioStatus(void)
{
return SDL_GetAudioDeviceStatus(1);
}
@@ -1697,8 +1688,7 @@ static SDL_AudioFormat format_list[NUM_FORMATS][NUM_FORMATS] = {
AUDIO_S16LSB, AUDIO_U16MSB, AUDIO_U16LSB, AUDIO_U8, AUDIO_S8 },
};
-SDL_AudioFormat
-SDL_FirstAudioFormat(SDL_AudioFormat format)
+SDL_AudioFormat SDL_FirstAudioFormat(SDL_AudioFormat format)
{
for (format_idx = 0; format_idx < NUM_FORMATS; ++format_idx) {
if (format_list[format_idx][0] == format) {
@@ -1709,8 +1699,7 @@ SDL_FirstAudioFormat(SDL_AudioFormat format)
return SDL_NextAudioFormat();
}
-SDL_AudioFormat
-SDL_NextAudioFormat(void)
+SDL_AudioFormat SDL_NextAudioFormat(void)
{
if ((format_idx == NUM_FORMATS) || (format_idx_sub == NUM_FORMATS)) {
return 0;
diff --git a/src/audio/SDL_audiocvt.c b/src/audio/SDL_audiocvt.c
index 01f3a55..ed4333e 100644
--- a/src/audio/SDL_audiocvt.c
+++ b/src/audio/SDL_audiocvt.c
@@ -1005,8 +1005,7 @@ static void SDL_CleanupAudioStreamResampler(SDL_AudioStream *stream)
SDL_free(stream->resampler_state);
}
-SDL_AudioStream *
-SDL_NewAudioStream(const SDL_AudioFormat src_format,
+SDL_AudioStream *SDL_NewAudioStream(const SDL_AudioFormat src_format,
const Uint8 src_channels,
const int src_rate,
const SDL_AudioFormat dst_format,
diff --git a/src/audio/SDL_wave.c b/src/audio/SDL_wave.c
index 6959c56..209a577 100644
--- a/src/audio/SDL_wave.c
+++ b/src/audio/SDL_wave.c
@@ -2077,8 +2077,7 @@ static int WaveLoad(SDL_RWops *src, WaveFile *file, SDL_AudioSpec *spec, Uint8 *
return 0;
}
-SDL_AudioSpec *
-SDL_LoadWAV_RW(SDL_RWops *src, int freesrc, SDL_AudioSpec *spec, Uint8 **audio_buf, Uint32 *audio_len)
+SDL_AudioSpec *SDL_LoadWAV_RW(SDL_RWops *src, int freesrc, SDL_AudioSpec *spec, Uint8 **audio_buf, Uint32 *audio_len)
{
int result;
WaveFile file;
diff --git a/src/audio/arts/SDL_artsaudio.c b/src/audio/arts/SDL_artsaudio.c
index 38e1190..ea4f311 100644
--- a/src/audio/arts/SDL_artsaudio.c
+++ b/src/audio/arts/SDL_artsaudio.c
@@ -86,8 +86,7 @@ static struct
#undef SDL_ARTS_SYM
-static void
-UnloadARTSLibrary()
+static void UnloadARTSLibrary()
{
if (arts_handle != NULL) {
SDL_UnloadObject(arts_handle);
@@ -95,8 +94,7 @@ UnloadARTSLibrary()
}
}
-static int
-LoadARTSLibrary(void)
+static int LoadARTSLibrary(void)
{
int i, retval = -1;
@@ -121,14 +119,12 @@ LoadARTSLibrary(void)
#else
-static void
-UnloadARTSLibrary()
+static void UnloadARTSLibrary()
{
return;
}
-static int
-LoadARTSLibrary(void)
+static int LoadARTSLibrary(void)
{
return 0;
}
@@ -136,8 +132,7 @@ LoadARTSLibrary(void)
#endif /* SDL_AUDIO_DRIVER_ARTS_DYNAMIC */
/* This function waits until it is possible to write a full sound buffer */
-static void
-ARTS_WaitDevice(_THIS)
+static void ARTS_WaitDevice(_THIS)
{
Sint32 ticks;
@@ -163,8 +158,7 @@ ARTS_WaitDevice(_THIS)
}
}
-static void
-ARTS_PlayDevice(_THIS)
+static void ARTS_PlayDevice(_THIS)
{
/* Write the audio data */
int written = SDL_NAME(arts_write) (this->hidden->stream,
@@ -185,15 +179,13 @@ ARTS_PlayDevice(_THIS)
#endif
}
-static Uint8 *
-ARTS_GetDeviceBuf(_THIS)
+static Uint8 *ARTS_GetDeviceBuf(_THIS)
{
return (this->hidden->mixbuf);
}
-static void
-ARTS_CloseDevice(_THIS)
+static void ARTS_CloseDevice(_THIS)
{
if (this->hidden->stream) {
SDL_NAME(arts_close_stream) (this->hidden->stream);
@@ -203,8 +195,7 @@ ARTS_CloseDevice(_THIS)
SDL_free(this->hidden);
}
-static int
-ARTS_Suspend(void)
+static int ARTS_Suspend(void)
{
const Uint32 abortms = SDL_GetTicks() + 3000; /* give up after 3 secs */
while ( (!SDL_NAME(arts_suspended)()) && !SDL_TICKS_PASSED(SDL_GetTicks(), abortms) ) {
@@ -215,8 +206,7 @@ ARTS_Suspend(void)
return SDL_NAME(arts_suspended)();
}
-static int
-ARTS_OpenDevice(_THIS, const char *devname)
+static int ARTS_OpenDevice(_THIS, const char *devname)
{
int rc = 0;
int bits, frag_spec = 0;
@@ -304,15 +294,13 @@ ARTS_OpenDevice(_THIS, const char *devname)
}
-static void
-ARTS_Deinitialize(void)
+static void ARTS_Deinitialize(void)
{
UnloadARTSLibrary();
}
-static SDL_bool
-ARTS_Init(SDL_AudioDriverImpl * impl)
+static SDL_bool ARTS_Init(SDL_AudioDriverImpl * impl)
{
if (LoadARTSLibrary() < 0) {
return SDL_FALSE;
diff --git a/src/audio/esd/SDL_esdaudio.c b/src/audio/esd/SDL_esdaudio.c
index 0f49b09..800caaf 100644
--- a/src/audio/esd/SDL_esdaudio.c
+++ b/src/audio/esd/SDL_esdaudio.c
@@ -64,8 +64,7 @@ static struct
#undef SDL_ESD_SYM
-static void
-UnloadESDLibrary()
+static void UnloadESDLibrary()
{
if (esd_handle != NULL) {
SDL_UnloadObject(esd_handle);
@@ -73,8 +72,7 @@ UnloadESDLibrary()
}
}
-static int
-LoadESDLibrary(void)
+static int LoadESDLibrary(void)
{
int i, retval = -1;
@@ -98,14 +96,12 @@ LoadESDLibrary(void)
#else
-static void
-UnloadESDLibrary()
+static void UnloadESDLibrary()
{
return;
}
-static int
-LoadESDLibrary(void)
+static int LoadESDLibrary(void)
{
return 0;
}
@@ -114,8 +110,7 @@ LoadESDLibrary(void)
/* This function waits until it is possible to write a full sound buffer */
-static void
-ESD_WaitDevice(_THIS)
+static void ESD_WaitDevice(_THIS)
{
Sint32 ticks;
@@ -140,8 +135,7 @@ ESD_WaitDevice(_THIS)
}
}
-static void
-ESD_PlayDevice(_THIS)
+static void ESD_PlayDevice(_THIS)
{
int written = 0;
@@ -164,14 +158,12 @@ ESD_PlayDevice(_THIS)
}
}
-static Uint8 *
-ESD_GetDeviceBuf(_THIS)
+static Uint8 *ESD_GetDeviceBuf(_THIS)
{
return (this->hidden->mixbuf);
}
-static void
-ESD_CloseDevice(_THIS)
+static void ESD_CloseDevice(_THIS)
{
if (this->hidden->audio_fd >= 0) {
SDL_NAME(esd_close) (this->hidden->audio_fd);
@@ -181,8 +173,7 @@ ESD_CloseDevice(_THIS)
}
/* Try to get the name of the program */
-static char *
-get_progname(void)
+static char *get_progname(void)
{
char *progname = NULL;
#ifdef __LINUX__
@@ -207,8 +198,7 @@ get_progname(void)
}
-static int
-ESD_OpenDevice(_THIS, const char *devname)
+static int ESD_OpenDevice(_THIS, const char *devname)
{
esd_format_t format = (ESD_STREAM | ESD_PLAY);
SDL_AudioFormat test_format = 0;
@@ -286,14 +276,12 @@ ESD_OpenDevice(_THIS, const char *devname)
return 0;
}
-static void
-ESD_Deinitialize(void)
+static void ESD_Deinitialize(void)
{
UnloadESDLibrary();
}
-static SDL_bool
-ESD_Init(SDL_AudioDriverImpl * impl)
+static SDL_bool ESD_Init(SDL_AudioDriverImpl * impl)
{
if (LoadESDLibrary() < 0) {
return SDL_FALSE;
diff --git a/src/audio/fusionsound/SDL_fsaudio.c b/src/audio/fusionsound/SDL_fsaudio.c
index dccf1f8..f79ab22 100644
--- a/src/audio/fusionsound/SDL_fsaudio.c
+++ b/src/audio/fusionsound/SDL_fsaudio.c
@@ -77,8 +77,7 @@ static struct
#undef SDL_FS_SYM
-static void
-UnloadFusionSoundLibrary()
+static void UnloadFusionSoundLibrary()
{
if (fs_handle != NULL) {
SDL_UnloadObject(fs_handle);
@@ -86,8 +85,7 @@ UnloadFusionSoundLibrary()
}
}
-static int
-LoadFusionSoundLibrary(void)
+static int LoadFusionSoundLibrary(void)
{
int i, retval = -1;
@@ -112,14 +110,12 @@ LoadFusionSoundLibrary(void)
#else
-static void
-UnloadFusionSoundLibrary()
+static void UnloadFusionSoundLibrary()
{
return;
}
-static int
-LoadFusionSoundLibrary(void)
+static int LoadFusionSoundLibrary(void)
{
return 0;
}
@@ -127,15 +123,13 @@ LoadFusionSoundLibrary(void)
#endif /* SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC */
/* This function waits until it is possible to write a full sound buffer */
-static void
-SDL_FS_WaitDevice(_THIS)
+static void SDL_FS_WaitDevice(_THIS)
{
this->hidden->stream->Wait(this->hidden->stream,
this->hidden->mixsamples);
}
-static void
-SDL_FS_PlayDevice(_THIS)
+static void SDL_FS_PlayDevice(_THIS)
{
DirectResult ret;
@@ -152,15 +146,13 @@ SDL_FS_PlayDevice(_THIS)
}
-static Uint8 *
-SDL_FS_GetDeviceBuf(_THIS)
+static Uint8 *SDL_FS_GetDeviceBuf(_THIS)
{
return (this->hidden->mixbuf);
}
-static void
-SDL_FS_CloseDevice(_THIS)
+static void SDL_FS_CloseDevice(_THIS)
{
if (this->hidden->stream) {
this->hidden->stream->Release(this->hidden->stream);
@@ -173,8 +165,7 @@ SDL_FS_CloseDevice(_THIS)
}
-static int
-SDL_FS_OpenDevice(_THIS, const char *devname)
+static int SDL_FS_OpenDevice(_THIS, const char *devname)
{
int bytes;
SDL_AudioFormat test_format;
@@ -269,15 +260,13 @@ SDL_FS_OpenDevice(_THIS, const char *devname)
}
-static void
-SDL_FS_Deinitialize(void)
+static void SDL_FS_Deinitialize(void)
{
UnloadFusionSoundLibrary();
}
-static SDL_bool
-SDL_FS_Init(SDL_AudioDriverImpl * impl)
+static SDL_bool SDL_FS_Init(SDL_AudioDriverImpl * impl)
{
if (LoadFusionSoundLibrary() < 0) {
return SDL_FALSE;
diff --git a/src/audio/nacl/SDL_naclaudio.c b/src/audio/nacl/SDL_naclaudio.c
index e18f762..cdb01bc 100644
--- a/src/audio/nacl/SDL_naclaudio.c
+++ b/src/audio/nacl/SDL_naclaudio.c
@@ -45,7 +45,8 @@
static void nacl_audio_callback(void* samples, uint32_t buffer_size, PP_TimeDelta latency, void* data);
/* FIXME: Make use of latency if needed */
-static void nacl_audio_callback(void* stream, uint32_t buffer_size, PP_TimeDelta latency, void* data) {
+static void nacl_audio_callback(void* stream, uint32_t buffer_size, PP_TimeDelta latency, void* data)
+{
const int len = (int) buffer_size;
SDL_AudioDevice* _this = (SDL_AudioDevice*) data;
SDL_AudioCallback callback = _this->callbackspec.callback;
@@ -85,7 +86,8 @@ static void nacl_audio_callback(void* stream, uint32_t buffer_size, PP_TimeDelta
SDL_UnlockMutex(_this->mixer_lock);
}
-static void NACLAUDIO_CloseDevice(SDL_AudioDevice *device) {
+static void NACLAUDIO_CloseDevice(SDL_AudioDevice *device)
+{
const PPB_Core *core = PSInterfaceCore();
const PPB_Audio *ppb_audio = PSInterfaceAudio();
SDL_PrivateAudioData *hidden = (SDL_PrivateAudioData *) device->hidden;
@@ -94,8 +96,8 @@ static void NACLAUDIO_CloseDevice(SDL_AudioDevice *device) {
core->ReleaseResource(hidden->audio);
}
-static int
-NACLAUDIO_OpenDevice(_THIS, const char *devname) {
+static int NACLAUDIO_OpenDevice(_THIS, const char *devname)
+{
PP_Instance instance = PSGetInstanceId();
const PPB_Audio *ppb_audio = PSInterfaceAudio();
const PPB_AudioConfig *ppb_audiocfg = PSInterfaceAudioConfig();
@@ -128,8 +130,7 @@ NACLAUDIO_OpenDevice(_THIS, const char *devname) {
return 0;
}
-static SDL_bool
-NACLAUDIO_Init(SDL_AudioDriverImpl * impl)
+static SDL_bool NACLAUDIO_Init(SDL_AudioDriverImpl * impl)
{
if (PSGetInstanceId() == 0) {
return SDL_FALSE;
diff --git a/src/audio/nas/SDL_nasaudio.c b/src/audio/nas/SDL_nasaudio.c
index 0339ea8..d680720 100644
--- a/src/audio/nas/SDL_nasaudio.c
+++ b/src/audio/nas/SDL_nasaudio.c
@@ -56,8 +56,7 @@ static AuEventHandlerRec *(*NAS_AuRegisterEventHandler)
static const char *nas_library = SDL_AUDIO_DRIVER_NAS_DYNAMIC;
static void *nas_handle = NULL;
-static int
-load_nas_sym(const char *fn, void **addr)
+static int load_nas_sym(const char *fn, void **addr)
{
*addr = SDL_LoadFunction(nas_handle, fn);
if (*addr == NULL) {
@@ -73,8 +72,7 @@ load_nas_sym(const char *fn, void **addr)
#define SDL_NAS_SYM(x) NAS_##x = x
#endif
-static int
-load_nas_syms(void)
+static int load_nas_syms(void)
{
SDL_NAS_SYM(AuCloseServer);
SDL_NAS_SYM(AuNextEvent);
@@ -94,8 +92,7 @@ load_nas_syms(void)
#ifdef SDL_AUDIO_DRIVER_NAS_DYNAMIC
-static void
-UnloadNASLibrary(void)
+static void UnloadNASLibrary(void)
{
if (nas_handle != NULL) {
SDL_UnloadObject(nas_handle);
@@ -103,8 +100,7 @@ UnloadNASLibrary(void)
}
}
-static int
-LoadNASLibrary(void)
+static int LoadNASLibrary(void)
{
int retval = 0;
if (nas_handle == NULL) {
@@ -130,13 +126,11 @@ LoadNASLibrary(void)
#else
-static void
-UnloadNASLibrary(void)
+static void UnloadNASLibrary(void)
{
}
-static int
-LoadNASLibrary(void)
+static int LoadNASLibrary(void)
{
load_nas_syms();
return 0;
@@ -145,8 +139,7 @@ LoadNASLibrary(void)
#endif /* SDL_AUDIO_DRIVER_NAS_DYNAMIC */
/* This function waits until it is possible to write a full sound buffer */
-static void
-NAS_WaitDevice(_THIS)
+static void NAS_WaitDevice(_THIS)
{
while (this->hidden->buf_free < this->hidden->mixlen) {
AuEvent ev;
@@ -155,8 +148,7 @@ NAS_WaitDevice(_THIS)
}
}
-static void
-NAS_PlayDevice(_THIS)
+static void NAS_PlayDevice(_THIS)
{
while (this->hidden->mixlen > this->hidden->buf_free) {
/*
@@ -182,14 +174,12 @@ NAS_PlayDevice(_THIS)
#endif
}
-static Uint8 *
-NAS_GetDeviceBuf(_THIS)
+static Uint8 *NAS_GetDeviceBuf(_THIS)
{
return (this->hidden->mixbuf);
}
-static int
-NAS_CaptureFromDevice(_THIS, void *buffer, int buflen)
+static int NAS_CaptureFromDevice(_THIS, void *buffer, int buflen)
{
struct SDL_PrivateAudioData *h = this->hidden;
int retval;
@@ -210,8 +200,7 @@ NAS_CaptureFromDevice(_THIS, void *buffer, int buflen)
return retval;
}
-static void
-NAS_FlushCapture(_THIS)
+static void NAS_FlushCapture(_THIS)
{
struct SDL_PrivateAudioData *h = this->hidden;
AuUint32 total = 0;
@@ -227,8 +216,7 @@ NAS_FlushCapture(_THIS)
} while ((br == sizeof(buf)) && (total < this->spec.size));
}
-static void
-NAS_CloseDevice(_THIS)
+static void NAS_CloseDevice(_THIS)
{
if (this->hidden->aud) {
NAS_AuCloseServer(this->hidden->aud);
@@ -237,8 +225,7 @@ NAS_CloseDevice(_THIS)
SDL_free(this->hidden);
}
-static AuBool
-event_handler(AuServer * aud, AuEvent * ev, AuEventHandlerRec * hnd)
+static AuBool event_handler(AuServer * aud, AuEvent * ev, AuEventHandlerRec * hnd)
{
SDL_AudioDevice *this = (SDL_AudioDevice *) hnd->data;
struct SDL_PrivateAudioData *h = this->hidden;
@@ -281,8 +268,7 @@ event_handler(AuServer * aud, AuEvent * ev, AuEventHandlerRec * hnd)
return AuTrue;
}
-static AuDeviceID
-find_device(_THIS)
+static AuDeviceID find_device(_THIS)
{
/* These "Au" things are all macros, not functions... */
struct SDL_PrivateAudioData *h = this->hidden;
@@ -310,8 +296,7 @@ find_device(_THIS)
return AuNone;
}
-static int
-NAS_OpenDevice(_THIS, const char *devname)
+static int NAS_OpenDevice(_THIS, const char *devname)
{
AuElement elms[3];
int buffer_size;
@@ -414,14 +399,12 @@ NAS_OpenDevice(_THIS, const char *devname)
return 0;
}
-static void
-NAS_Deinitialize(void)
+static void NAS_Deinitialize(void)
{
UnloadNASLibrary();
}
-static SDL_bool
-NAS_Init(SDL_AudioDriverImpl * impl)
+static SDL_bool NAS_Init(SDL_AudioDriverImpl * impl)
{
if (LoadNASLibrary() < 0) {
return SDL_FALSE;
diff --git a/src/audio/paudio/SDL_paudio.c b/src/audio/paudio/SDL_paudio.c
index 64d4fbb..5c5c36f 100644
--- a/src/audio/paudio/SDL_paudio.c
+++ b/src/audio/paudio/SDL_paudio.c
@@ -69,8 +69,7 @@ static char devsettings[][3] = {
{'\0', '\0', '\0'}
};
-static int
-OpenUserDefinedDevice(char *path, int maxlen, int flags)
+static int OpenUserDefinedDevice(char *path, int maxlen, int flags)
{
const char *audiodev;
int fd;
@@ -90,8 +89,7 @@ OpenUserDefinedDevice(char *path, int maxlen, int flags)
return fd;
}
-static int
-OpenAudioPath(char *path, int maxlen, int flags, int classic)
+static int OpenAudioPath(char *path, int maxlen, int flags, int classic)
{
struct stat sb;
int cycle = 0;
@@ -123,8 +121,7 @@ OpenAudioPath(char *path, int maxlen, int flags, int classic)
}
/* This function waits until it is possible to write a full sound buffer */
-static void
-PAUDIO_WaitDevice(_THIS)
+static void PAUDIO_WaitDevice(_THIS)
{
fd_set fdset;
@@ -176,8 +173,7 @@ PAUDIO_WaitDevice(_THIS)
}
}
-static void
-PAUDIO_PlayDevice(_THIS)
+static void PAUDIO_PlayDevice(_THIS)
{
int written = 0;
const Uint8 *mixbuf = this->hidden->mixbuf;
@@ -206,14 +202,12 @@ PAUDIO_PlayDevice(_THIS)
#endif
}
-static Uint8 *
-PAUDIO_GetDeviceBuf(_THIS)
+static Uint8 *PAUDIO_GetDeviceBuf(_THIS)
{
return this->hidden->mixbuf;
}
-static void
-PAUDIO_CloseDevice(_THIS)
+static void PAUDIO_CloseDevice(_THIS)
{
if (this->hidden->audio_fd >= 0) {
close(this->hidden->audio_fd);
@@ -222,8 +216,7 @@ PAUDIO_CloseDevice(_THIS)
SDL_free(this->hidden);
}
-static int
-PAUDIO_OpenDevice(_THIS, const char *devname)
+static int PAUDIO_OpenDevice(_THIS, const char *devname)
{
const char *workaround = SDL_getenv("SDL_DSP_NOSELECT");
char audiodev[1024];
@@ -462,8 +455,7 @@ PAUDIO_OpenDevice(_THIS, const char *devname)
return 0;
}
-static SDL_bool
-PAUDIO_Init(SDL_AudioDriverImpl * impl)
+static SDL_bool PAUDIO_Init(SDL_AudioDriverImpl * impl)
{
/* !!! FIXME: not right for device enum? */
int fd = OpenAudioPath(NULL, 0, OPEN_FLAGS, 0);
diff --git a/src/audio/qsa/SDL_qsa_audio.c b/src/audio/qsa/SDL_qsa_audio.c
index 828d258..0ab4774 100644
--- a/src/audio/qsa/SDL_qsa_audio.c
+++ b/src/audio/qsa/SDL_qsa_audio.c
@@ -74,15 +74,13 @@ uint32_t qsa_playback_devices;
QSA_Device qsa_capture_device[QSA_MAX_DEVICES];
uint32_t qsa_capture_devices;
-static SDL_INLINE int
-QSA_SetError(const char *fn, int status)
+static int QSA_SetError(const char *fn, int status)
{
return SDL_SetError("QSA: %s() failed: %s", fn, snd_strerror(status));
}
/* !!! FIXME: does this need to be here? Does the SDL version not work? */
-static void
-QSA_ThreadInit(_THIS)
+static void QSA_ThreadInit(_THIS)
{
/* Increase default 10 priority to 25 to avoid jerky sound */
struct sched_param param;
@@ -93,8 +91,7 @@ QSA_ThreadInit(_THIS)
}
/* PCM channel parameters initialize function */
-static void
-QSA_InitAudioParams(snd_pcm_channel_params_t * cpars)
+static void QSA_InitAudioParams(snd_pcm_channel_params_t * cpars)
{
SDL_zerop(cpars);
cpars->channel = SND_PCM_CHANNEL_PLAYBACK;
@@ -111,8 +108,7 @@ QSA_InitAudioParams(snd_pcm_channel_params_t * cpars)
}
/* This function waits until it is possible to write a full sound buffer */
-static void
-QSA_WaitDevice(_THIS)
+static void QSA_WaitDevice(_THIS)
{
int result;
@@ -137,8 +133,7 @@ QSA_WaitDevice(_THIS)
}
}
-static void
-QSA_PlayDevice(_THIS)
+static void QSA_PlayDevice(_THIS)
{
snd_pcm_channel_status_t cstatus;
int written;
@@ -230,14 +225,12 @@ QSA_PlayDevice(_THIS)
}
}
-static Uint8 *
-QSA_GetDeviceBuf(_THIS)
+static Uint8 *QSA_GetDeviceBuf(_THIS)
{
return this->hidden->pcm_buf;
}
-static void
-QSA_CloseDevice(_THIS)
+static void QSA_CloseDevice(_THIS)
{
if (this->hidden->audio_handle != NULL) {
if (!this->iscapture) {
@@ -256,8 +249,7 @@ QSA_CloseDevice(_THIS)
SDL_free(this->hidden);
}
-static int
-QSA_OpenDevice(_THIS, const char *devname)
+static int QSA_OpenDevice(_THIS, const char *devname)
{
const QSA_Device *device = (const QSA_Device *) this->handle;
SDL_bool iscapture = this->iscapture;
@@ -435,8 +427,7 @@ QSA_OpenDevice(_THIS, const char *devname)
return 0;
}
-static void
-QSA_DetectDevices(void)
+static void QSA_DetectDevices(void)
{
uint32_t it;
uint32_t cards;
@@ -581,8 +572,7 @@ QSA_DetectDevices(void)
}
}
-static void
-QSA_Deinitialize(void)
+static void QSA_Deinitialize(void)
{
/* Clear devices array on shutdown */
/* !!! FIXME: we zero these on init...any reason to do it here? */
@@ -592,8 +582,7 @@ QSA_Deinitialize(void)
qsa_capture_devices = 0;
}
-static SDL_bool
-QSA_Init(SDL_AudioDriverImpl * impl)
+static SDL_bool QSA_Init(SDL_AudioDriverImpl * impl)
{
/* Clear devices array */
SDL_zeroa(qsa_playback_device);
diff --git a/src/audio/sun/SDL_sunaudio.c b/src/audio/sun/SDL_sunaudio.c
index 7ad441a..25deb90 100644
--- a/src/audio/sun/SDL_sunaudio.c
+++ b/src/audio/sun/SDL_sunaudio.c
@@ -55,15 +55,13 @@
static Uint8 snd2au(int sample);
/* Audio driver bootstrap functions */
-static void
-SUNAUDIO_DetectDevices(void)
+static void SUNAUDIO_DetectDevices(void)
{
SDL_EnumUnixAudioDevices(1, (int (*)(int)) NULL);
}
#ifdef DEBUG_AUDIO
-void
-CheckUnderflow(_THIS)
+void CheckUnderflow(_THIS)
{
#ifdef AUDIO_GETBUFINFO
audio_info_t info;
@@ -78,8 +76,7 @@ CheckUnderflow(_THIS)
}
#endif
-static void
-SUNAUDIO_WaitDevice(_THIS)
+static void SUNAUDIO_WaitDevice(_THIS)
{
#ifdef AUDIO_GETBUFINFO
#define SLEEP_FUDGE 10 /* 10 ms scheduling fudge factor */
@@ -102,8 +99,7 @@ SUNAUDIO_WaitDevice(_THIS)
#endif
}
-static void
-SUNAUDIO_PlayDevice(_THIS)
+static void SUNAUDIO_PlayDevice(_THIS)
{
/* Write the audio data */
if (this->hidden->ulaw_only) {
@@ -170,14 +166,12 @@ SUNAUDIO_PlayDevice(_THIS)
}
}
-static Uint8 *
-SUNAUDIO_GetDeviceBuf(_THIS)
+static Uint8 *SUNAUDIO_GetDeviceBuf(_THIS)
{
return (this->hidden->mixbuf);
}
-static void
-SUNAUDIO_CloseDevice(_THIS)
+static void SUNAUDIO_CloseDevice(_THIS)
{
SDL_free(this->hidden->ulaw_buf);
if (this->hidden->audio_fd >= 0) {
@@ -187,8 +181,7 @@ SUNAUDIO_CloseDevice(_THIS)
SDL_free(this->hidden);
}
-static int
-SUNAUDIO_OpenDevice(_THIS, const char *devname)
+static int SUNAUDIO_OpenDevice(_THIS, const char *devname)
{
#ifdef AUDIO_SETINFO
int enc;
@@ -359,8 +352,7 @@ SUNAUDIO_OpenDevice(_THIS, const char *devname)
/* provided "as is" without express or implied warranty. */
/************************************************************************/
-static Uint8
-snd2au(int sample)
+static Uint8 snd2au(int sample)
{
int mask;
@@ -394,8 +386,7 @@ snd2au(int sample)
return (mask & sample);
}
-static SDL_bool
-SUNAUDIO_Init(SDL_AudioDriverImpl * impl)
+static SDL_bool SUNAUDIO_Init(SDL_AudioDriverImpl * impl)
{
/* Set the function pointers */
impl->DetectDevices = SUNAUDIO_DetectDevices;
diff --git a/src/audio/winmm/SDL_winmm.c b/src/audio/winmm/SDL_winmm.c
index 92e38bd..d0c4b97 100644
--- a/src/audio/winmm/SDL_winmm.c
+++ b/src/audio/winmm/SDL_winmm.c
@@ -97,16 +97,13 @@ static void DetectWave##typ##Devs(void) { \
DETECT_DEV_IMPL(SDL_FALSE, Out, WAVEOUTCAPS)
DETECT_DEV_IMPL(SDL_TRUE, In, WAVEINCAPS)
-static void
-WINMM_DetectDevices(void)
+static void WINMM_DetectDevices(void)
{
DetectWaveInDevs();
DetectWaveOutDevs();
}
-static void CALLBACK
-CaptureSound(HWAVEIN hwi, UINT uMsg, DWORD_PTR dwInstance,
- DWORD_PTR dwParam1, DWORD_PTR dwParam2)
+static void CALLBACK CaptureSound(HWAVEIN hwi, UINT uMsg, DWORD_PTR dwInstance, DWORD_PTR dwParam1, DWORD_PTR dwParam2)
{
SDL_AudioDevice *this = (SDL_AudioDevice *) dwInstance;
@@ -120,9 +117,7 @@ CaptureSound(HWAVEIN hwi, UINT uMsg, DWORD_PTR dwInstance,
/* The Win32 callback for filling the WAVE device */
-static void CALLBACK
-FillSound(HWAVEOUT hwo, UINT uMsg, DWORD_PTR dwInstance,
- DWORD_PTR dwParam1, DWORD_PTR dwParam2)
+static void CALLBACK FillSound(HWAVEOUT hwo, UINT uMsg, DWORD_PTR dwInstance, DWORD_PTR dwParam1, DWORD_PTR dwParam2)
{
SDL_AudioDevice *this = (SDL_AudioDevice *) dwInstance;
@@ -134,8 +129,7 @@ FillSound(HWAVEOUT hwo, UINT uMsg, DWORD_PTR dwInstance,
ReleaseSemaphore(this->hidden->audio_sem, 1, NULL);
}
-static int
-SetMMerror(const char *function, MMRESULT code)
+static int SetMMerror(const char *function, MMRESULT code)
{
int len;
char errbuf[MAXERRORLENGTH];
@@ -151,22 +145,19 @@ SetMMerror(const char *function, MMRESULT code)
return SDL_SetError("%s", errbuf);
}
-static void
-WINMM_WaitDevice(_THIS)
+static void WINMM_WaitDevice(_THIS)
{
/* Wait for an audio chunk to finish */
WaitForSingleObject(this->hidden->audio_sem, INFINITE);
}
-static Uint8 *
-WINMM_GetDeviceBuf(_THIS)
+static Uint8 *WINMM_GetDeviceBuf(_THIS)
{
return (Uint8 *) (this->hidden->
wavebuf[this->hidden->next_buffer].lpData);
}
-static void
-WINMM_PlayDevice(_THIS)
+static void WINMM_PlayDevice(_THIS)
{
/* Queue it up */
waveOutWrite(this->hidden->hout,
@@ -175,8 +166,7 @@ WINMM_PlayDevice(_THIS)
this->hidden->next_buffer = (this->hidden->next_buffer + 1) % NUM_BUFFERS;
}
-static int
-WINMM_CaptureFromDevice(_THIS, void *buffer, int buflen)
+static int WINMM_CaptureFromDevice(_THIS, void *buffer, int buflen)
{
const int nextbuf = this->hidden->next_buffer;
MMRESULT result;
@@ -202,8 +192,7 @@ WINMM_CaptureFromDevice(_THIS, void *buffer, int buflen)
return this->spec.size;
}
-static void
-WINMM_FlushCapture(_THIS)
+static void WINMM_FlushCapture(_THIS)
{
/* Wait for an audio chunk to finish */
if (WaitForSingleObject(this->hidden->audio_sem, 0) == WAIT_OBJECT_0) {
@@ -216,8 +205,7 @@ WINMM_FlushCapture(_THIS)
}
}
-static void
-WINMM_CloseDevice(_THIS)
+static void WINMM_CloseDevice(_THIS)
{
int i;
@@ -258,8 +246,7 @@ WINMM_CloseDevice(_THIS)
SDL_free(this->hidden);
}
-static SDL_bool
-PrepWaveFormat(_THIS, UINT devId, WAVEFORMATEX *pfmt, const int iscapture)
+static SDL_bool PrepWaveFormat(_THIS, UINT devId, WAVEFORMATEX *pfmt, const int iscapture)
{
SDL_zerop(pfmt);
@@ -282,8 +269,7 @@ PrepWaveFormat(_THIS, UINT devId, WAVEFORMATEX *pfmt, const int iscapture)
}
}
-static int
-WINMM_OpenDevice(_THIS, const char *devname)
+static int WINMM_OpenDevice(_THIS, const char *devname)
{
SDL_AudioFormat test_format;
SDL_bool iscapture = this->iscapture;
@@ -431,8 +417,7 @@ WINMM_OpenDevice(_THIS, const char *devname)
return 0; /* Ready to go! */
}
-static SDL_bool
-WINMM_Init(SDL_AudioDriverImpl * impl)
+static SDL_bool WINMM_Init(SDL_AudioDriverImpl * impl)
{
/* Set the function pointers */
impl->DetectDevices = WINMM_DetectDevices;
diff --git a/src/core/freebsd/SDL_evdev_kbd_freebsd.c b/src/core/freebsd/SDL_evdev_kbd_freebsd.c
index a5cedbf..57a4697 100644
--- a/src/core/freebsd/SDL_evdev_kbd_freebsd.c
+++ b/src/core/freebsd/SDL_evdev_kbd_freebsd.c
@@ -221,8 +221,7 @@ static void kbd_register_emerg_cleanup(SDL_EVDEV_keyboard_state *kbd)
}
}
-SDL_EVDEV_keyboard_state *
-SDL_EVDEV_kbd_init(void)
+SDL_EVDEV_keyboard_state *SDL_EVDEV_kbd_init(void)
{
SDL_EVDEV_keyboard_state *kbd;
struct mouse_info mData;
diff --git a/src/core/linux/SDL_dbus.c b/src/core/linux/SDL_dbus.c
index 0298e64..1572049 100644
--- a/src/core/linux/SDL_dbus.c
+++ b/src/core/linux/SDL_dbus.c
@@ -193,8 +193,7 @@ void SDL_DBus_Quit(void)
inhibit_handle = NULL;
}
-SDL_DBusContext *
-SDL_DBus_GetContext(void)
+SDL_DBusContext *SDL_DBus_GetContext(void)
{
if (dbus_handle == NULL || !dbus.session_conn) {
SDL_DBus_Init();
@@ -246,8 +245,7 @@ static SDL_bool SDL_DBus_CallMethodInternal(DBusConnection *conn, const char *no
return retval;
}
-SDL_bool
-SDL_DBus_CallMethodOnConnection(DBusConnection *conn, const char *node, const char *path, const char *interface, const char *method, ...)
+SDL_bool SDL_DBus_CallMethodOnConnection(DBusConnection *conn, const char *node, const char *path, const char *interface, const char *method, ...)
{
SDL_bool retval;
va_list ap;
@@ -257,8 +255,7 @@ SDL_DBus_CallMethodOnConnection(DBusConnection *conn, const char *node, const ch
return retval;
}
-SDL_bool
-SDL_DBus_CallMethod(const char *node, const char *path, const char *interface, const char *method, ...)
+SDL_bool SDL_DBus_CallMethod(const char *node, const char *path, const char *interface, const char *method, ...)
{
SDL_bool retval;
va_list ap;
@@ -315,8 +312,7 @@ static SDL_bool SDL_DBus_CallWithBasicReply(DBusConnection *conn, DBusMessage *m
return retval;
}
-SDL_bool
-SDL_DBus_CallVoidMethodOnConnection(DBusConnection *conn, const char *node, const char *path, const char *interface, const char *method, ...)
+SDL_bool SDL_DBus_CallVoidMethodOnConnection(DBusConnection *conn, const char *node, const char *path, const char *interface, const char *method, ...)
{
SDL_bool retval;
va_list ap;
@@ -326,8 +322,7 @@ SDL_DBus_CallVoidMethodOnConnection(DBusConnection *conn, const char *node, cons
return retval;
}
-SDL_bool
-SDL_DBus_CallVoidMethod(const char *node, const char *path, const char *interface, const char *method, ...)
+SDL_bool SDL_DBus_CallVoidMethod(const char *node, const char *path, const char *interface, const char *method, ...)
{
SDL_bool retval;
va_list ap;
@@ -337,8 +332,7 @@ SDL_DBus_CallVoidMethod(const char *node, const char *path, const char *interfac
return retval;
}
-SDL_bool
-SDL_DBus_QueryPropertyOnConnection(DBusConnection *conn, const char *node, const char *path, const char *interface, const char *property, const int expectedtype, void *result)
+SDL_bool SDL_DBus_QueryPropertyOnConnection(DBusConnection *conn, const char *node, const char *path, const char *interface, const char *property, const int expectedtype, void *result)
{
SDL_bool retval = SDL_FALSE;
@@ -355,8 +349,7 @@ SDL_DBus_QueryPropertyOnConnection(DBusConnection *conn, const char *node, const
return retval;
}
-SDL_bool
-SDL_DBus_QueryProperty(const char *node, const char *path, const char *interface, const char *property, const int expectedtype, void *result)
+SDL_bool SDL_DBus_QueryProperty(const char *node, const char *path, const char *interface, const char *property, const int expectedtype, void *result)
{
return SDL_DBus_QueryPropertyOnConnection(dbus.session_conn, node, path, interface, property, expectedtype, result);
}
@@ -407,8 +400,7 @@ failed:
return SDL_FALSE;
}
-SDL_bool
-SDL_DBus_ScreensaverInhibit(SDL_bool inhibit)
+SDL_bool SDL_DBus_ScreensaverInhibit(SDL_bool inhibit)
{
const char *default_inhibit_reason = "Playing a game";
diff --git a/src/core/linux/SDL_evdev_kbd.c b/src/core/linux/SDL_evdev_kbd.c
index 6535fdf..632bbd2 100644
--- a/src/core/linux/SDL_evdev_kbd.c
+++ b/src/core/linux/SDL_evdev_kbd.c
@@ -296,8 +296,7 @@ static void kbd_register_emerg_cleanup(SDL_EVDEV_keyboard_state *kbd)
}
}
-SDL_EVDEV_keyboard_state *
-SDL_EVDEV_kbd_init(void)
+SDL_EVDEV_keyboard_state *SDL_EVDEV_kbd_init(void)
{
SDL_EVDEV_keyboard_state *kbd;
char flag_state;
@@ -805,8 +804,7 @@ void SDL_EVDEV_kbd_keycode(SDL_EVDEV_keyboard_state *state, unsigned int keycode
#elif !defined(SDL_INPUT_FBSDKBIO) /* !SDL_INPUT_LINUXKD */
-SDL_EVDEV_keyboard_state *
-SDL_EVDEV_kbd_init(void)
+SDL_EVDEV_keyboard_state *SDL_EVDEV_kbd_init(void)
{
return NULL;
}
diff --git a/src/core/linux/SDL_fcitx.c b/src/core/linux/SDL_fcitx.c
index 244aa23..2388681 100644
--- a/src/core/linux/SDL_fcitx.c
+++ b/src/core/linux/SDL_fcitx.c
@@ -83,8 +83,7 @@ static char *GetAppName()
return SDL_strdup("SDL_App");
}
-static size_t
-Fcitx_GetPreeditString(SDL_DBusContext *dbus,
+static size_t Fcitx_GetPreeditString(SDL_DBusContext *dbus,
DBusMessage *msg,
char **ret,
Sint32 *start_pos,
@@ -369,8 +368,7 @@ static Uint32 Fcitx_ModState(void)
return fcitx_mods;
}
-SDL_bool
-SDL_Fcitx_Init()
+SDL_bool SDL_Fcitx_Init()
{
fcitx_client.dbus = SDL_DBus_GetContext();
@@ -406,8 +404,7 @@ void SDL_Fcitx_Reset(void)
FcitxClientICCallMethod(&fcitx_client, "CloseIC");
}
-SDL_bool
-SDL_Fcitx_ProcessKeyEvent(Uint32 keysym, Uint32 keycode, Uint8 state)
+SDL_bool SDL_Fcitx_ProcessKeyEvent(Uint32 keysym, Uint32 keycode, Uint8 state)
{
Uint32 mod_state = Fcitx_ModState();
Uint32 handled = SDL_FALSE;
diff --git a/src/core/linux/SDL_ibus.c b/src/core/linux/SDL_ibus.c
index f7007c1..60b69b7 100644
--- a/src/core/linux/SDL_ibus.c
+++ b/src/core/linux/SDL_ibus.c
@@ -555,8 +555,7 @@ static SDL_bool IBus_CheckConnection(SDL_DBusContext *dbus)
return SDL_FALSE;
}
-SDL_bool
-SDL_IBus_Init(void)
+SDL_bool SDL_IBus_Init(void)
{
SDL_bool result = SDL_FALSE;
SDL_DBusContext *dbus = SDL_DBus_GetContext();
@@ -671,8 +670,7 @@ void SDL_IBus_Reset(void)
IBus_SimpleMessage("Reset");
}
-SDL_bool
-SDL_IBus_ProcessKeyEvent(Uint32 keysym, Uint32 keycode, Uint8 state)
+SDL_bool SDL_IBus_ProcessKeyEvent(Uint32 keysym, Uint32 keycode, Uint8 state)
{
Uint32 result = 0;
SDL_DBusContext *dbus = SDL_DBus_GetContext();
@@ -717,16 +715,16 @@ void SDL_IBus_UpdateTextRect(const SDL_Rect *rect)
}
SDL_GetWindowPosition(focused_win, &x, &y);
-
-#if SDL_VIDEO_DRIVER_X11
+
+#if SDL_VIDEO_DRIVER_X11
if (info.subsystem == SDL_SYSWM_X11) {
SDL_DisplayData *displaydata = (SDL_DisplayData *) SDL_GetDisplayForWindow(focused_win)->driverdata;
-
+
Display *x_disp = info.info.x11.display;
Window x_win = info.info.x11.window;
int x_screen = displaydata->screen;
Window unused;
-
+
X11_XTranslateCoordinates(x_disp, x_win, RootWindow(x_disp, x_screen), 0, 0, &x, &y, &unused);
}
#endif
diff --git a/src/core/linux/SDL_ime.c b/src/core/linux/SDL_ime.c
index 1a25fa6..f40e83c 100644
--- a/src/core/linux/SDL_ime.c
+++ b/src/core/linux/SDL_ime.c
@@ -83,8 +83,7 @@ static void InitIME()
#endif /* HAVE_IBUS_IBUS_H */
}
-SDL_bool
-SDL_IME_Init(void)
+SDL_bool SDL_IME_Init(void)
{
InitIME();
@@ -127,8 +126,7 @@ void SDL_IME_Reset(void)
}
}
-SDL_bool
-SDL_IME_ProcessKeyEvent(Uint32 keysym, Uint32 keycode, Uint8 state)
+SDL_bool SDL_IME_ProcessKeyEvent(Uint32 keysym, Uint32 keycode, Uint8 state)
{
if (SDL_IME_ProcessKeyEvent_Real) {
return SDL_IME_ProcessKeyEvent_Real(keysym, keycode, state);
diff --git a/src/core/linux/SDL_udev.c b/src/core/linux/SDL_udev.c
index ff99011..39368c7 100644
--- a/src/core/linux/SDL_udev.c
+++ b/src/core/linux/SDL_udev.c
@@ -222,8 +222,7 @@ void SDL_UDEV_Scan(void)
_this->syms.udev_enumerate_unref(enumerate);
}
-SDL_bool
-SDL_UDEV_GetProductInfo(const char *device_path, Uint16 *vendor, Uint16 *product, Uint16 *version)
+SDL_bool SDL_UDEV_GetProductInfo(const char *device_path, Uint16 *vendor, Uint16 *product, Uint16 *version)
{
struct udev_enumerate *enumerate = NULL;
struct udev_list_entry *devs = NULL;
@@ -550,8 +549,7 @@ void SDL_UDEV_DelCallback(SDL_UDEV_Callback cb)
}
}
-const SDL_UDEV_Symbols *
-SDL_UDEV_GetUdevSyms(void)
+const SDL_UDEV_Symbols *SDL_UDEV_GetUdevSyms(void)
{
if (SDL_UDEV_Init() < 0) {
SDL_SetError("Could not initialize UDEV");
diff --git a/src/core/windows/SDL_immdevice.c b/src/core/windows/SDL_immdevice.c
index 377b3b1..831d9e7 100644
--- a/src/core/windows/SDL_immdevice.c
+++ b/src/core/windows/SDL_immdevice.c
@@ -505,8 +505,7 @@ int SDL_IMMDevice_GetDefaultAudioInfo(char **name, SDL_AudioSpec *spec, int isca
return 0;
}
-SDL_AudioFormat
-WaveFormatToSDLFormat(WAVEFORMATEX *waveformat)
+SDL_AudioFormat WaveFormatToSDLFormat(WAVEFORMATEX *waveformat)
{
if ((waveformat->wFormatTag == WAVE_FORMAT_IEEE_FLOAT) && (waveformat->wBitsPerSample == 32)) {
return AUDIO_F32SYS;
diff --git a/src/core/windows/SDL_windows.c b/src/core/windows/SDL_windows.c
index 682aaf1..350198e 100644
--- a/src/core/windows/SDL_windows.c
+++ b/src/core/windows/SDL_windows.c
@@ -122,8 +122,7 @@ void WIN_CoUninitialize(void)
}
#ifndef __WINRT__
-void *
-WIN_LoadComBaseFunction(const char *name)
+void *WIN_LoadComBaseFunction(const char *name)
{
static SDL_bool s_bLoaded;
static HMODULE s_hComBase;
@@ -248,8 +247,7 @@ has the same problem.)
WASAPI doesn't need this. This is just for DirectSound/WinMM.
*/
-char *
-WIN_LookupAudioDeviceName(const WCHAR *name, const GUID *guid)
+char *WIN_LookupAudioDeviceName(const WCHAR *name, const GUID *guid)
{
#if defined(__WINRT__) || defined(__XBOXONE__) || defined(__XBOXSERIES__)
return WIN_StringToUTF8(name); /* No registry access on WinRT/UWP and Xbox, go with what we've got. */
@@ -370,8 +368,7 @@ int SDL_Direct3D9GetAdapterIndex(int displayIndex)
return 0; /* D3DADAPTER_DEFAULT */
}
-SDL_bool
-SDL_DXGIGetOutputInfo(int displayIndex, int *adapterIndex, int *outputIndex)
+SDL_bool SDL_DXGIGetOutputInfo(int displayIndex, int *adapterIndex, int *outputIndex)
{
(void)displayIndex;
if (adapterIndex) {
diff --git a/src/cpuinfo/SDL_cpuinfo.c b/src/cpuinfo/SDL_cpuinfo.c
index 0ceadfd..337ae33 100644
--- a/src/cpuinfo/SDL_cpuinfo.c
+++ b/src/cpuinfo/SDL_cpuinfo.c
@@ -991,92 +991,77 @@ SDL_bool SDL_HasRDTSC(void)
return CPU_FEATURE_AVAILABLE(CPU_HAS_RDTSC);
}
-SDL_bool
-SDL_HasAltiVec(void)
+SDL_bool SDL_HasAltiVec(void)
{
return CPU_FEATURE_AVAILABLE(CPU_HAS_ALTIVEC);
}
-SDL_bool
-SDL_HasMMX(void)
+SDL_bool SDL_HasMMX(void)
{
return CPU_FEATURE_AVAILABLE(CPU_HAS_MMX);
}
-SDL_bool
-SDL_Has3DNow(void)
+SDL_bool SDL_Has3DNow(void)
{
return CPU_FEATURE_AVAILABLE(CPU_HAS_3DNOW);
}
-SDL_bool
-SDL_HasSSE(void)
+SDL_bool SDL_HasSSE(void)
{
return CPU_FEATURE_AVAILABLE(CPU_HAS_SSE);
}
-SDL_bool
-SDL_HasSSE2(void)
+SDL_bool SDL_HasSSE2(void)
{
return CPU_FEATURE_AVAILABLE(CPU_HAS_SSE2);
}
-SDL_bool
-SDL_HasSSE3(void)
+SDL_bool SDL_HasSSE3(void)
{
return CPU_FEATURE_AVAILABLE(CPU_HAS_SSE3);
}
-SDL_bool
-SDL_HasSSE41(void)
+SDL_bool SDL_HasSSE41(void)
{
return CPU_FEATURE_AVAILABLE(CPU_HAS_SSE41);
}
-SDL_bool
-SDL_HasSSE42(void)
+SDL_bool SDL_HasSSE42(void)
{
return CPU_FEATURE_AVAILABLE(CPU_HAS_SSE42);
}
-SDL_bool
-SDL_HasAVX(void)
+SDL_bool SDL_HasAVX(void)
{
return CPU_FEATURE_AVAILABLE(CPU_HAS_AVX);
}
-SDL_bool
-SDL_HasAVX2(void)
+SDL_bool SDL_HasAVX2(void)
{
return CPU_FEATURE_AVAILABLE(CPU_HAS_AVX2);
}
-SDL_bool
-SDL_HasAVX512F(void)
+SDL_bool SDL_HasAVX512F(void)
{
return CPU_FEATURE_AVAILABLE(CPU_HAS_AVX512F);
}
-SDL_bool
-SDL_HasARMSIMD(void)
+SDL_bool SDL_HasARMSIMD(void)
{
return CPU_FEATURE_AVAILABLE(CPU_HAS_ARM_SIMD);
}
-SDL_bool
-SDL_HasNEON(void)
+SDL_bool SDL_HasNEON(void)
{
return CPU_FEATURE_AVAILABLE(CPU_HAS_NEON);
}
-SDL_bool
-SDL_HasLSX(void)
+SDL_bool SDL_HasLSX(void)
{
return CPU_FEATURE_AVAILABLE(CPU_HAS_LSX);
}
-SDL_bool
-SDL_HasLASX(void)
+SDL_bool SDL_HasLASX(void)
{
return CPU_FEATURE_AVAILABLE(CPU_HAS_LASX);
}
@@ -1155,8 +1140,7 @@ int SDL_GetSystemRAM(void)
return SDL_SystemRAM;
}
-size_t
-SDL_SIMDGetAlignment(void)
+size_t SDL_SIMDGetAlignment(void)
{
if (SDL_SIMDAlignment == 0xFFFFFFFF) {
SDL_GetCPUFeatures(); /* make sure this has been calculated */
@@ -1165,8 +1149,7 @@ SDL_SIMDGetAlignment(void)
return SDL_SIMDAlignment;
}
-void *
-SDL_SIMDAlloc(const size_t len)
+void *SDL_SIMDAlloc(const size_t len)
{
const size_t alignment = SDL_SIMDGetAlignment();
const size_t padding = (alignment - (len % alignment)) % alignment;
@@ -1190,8 +1173,7 @@ SDL_SIMDAlloc(const size_t len)
return retval;
}
-void *
-SDL_SIMDRealloc(void *mem, const size_t len)
+void *SDL_SIMDRealloc(void *mem, const size_t len)
{
const size_t alignment = SDL_SIMDGetAlignment();
const size_t padding = (alignment - (len % alignment)) % alignment;
diff --git a/src/dynapi/SDL_dynapi.c b/src/dynapi/SDL_dynapi.c
index 43a07b9..7069594 100644
--- a/src/dynapi/SDL_dynapi.c
+++ b/src/dynapi/SDL_dynapi.c
@@ -350,8 +350,7 @@ static Sint32 initialize_jumptable(Uint32 apiver, void *table, Uint32 tablesize)
typedef Sint32(SDLCALL *SDL_DYNAPI_ENTRYFN)(Uint32 apiver, void *table, Uint32 tablesize);
extern DECLSPEC Sint32 SDLCALL SDL_DYNAPI_entry(Uint32, void *, Uint32);
-Sint32
-SDL_DYNAPI_entry(Uint32 apiver, void *table, Uint32 tablesize)
+Sint32 SDL_DYNAPI_entry(Uint32 apiver, void *table, Uint32 tablesize)
{
return initialize_jumptable(apiver, table, tablesize);
}
diff --git a/src/events/SDL_keyboard.c b/src/events/SDL_keyboard.c
index 0bd46de..7abefde 100644
--- a/src/events/SDL_keyboard.c
+++ b/src/events/SDL_keyboard.c
@@ -640,8 +640,7 @@ static const char *SDL_scancode_names[SDL_NUM_SCANCODES] = {
};
/* Taken from SDL_iconv() */
-char *
-SDL_UCS4ToUTF8(Uint32 ch, char *dst)
+char *SDL_UCS4ToUTF8(Uint32 ch, char *dst)
{
Uint8 *p = (Uint8 *)dst;
if (ch <= 0x7F) {
@@ -756,8 +755,7 @@ void SDL_SetScancodeName(SDL_Scancode scancode, const char *name)
SDL_scancode_names[scancode] = name;
}
-SDL_Window *
-SDL_GetKeyboardFocus(void)
+SDL_Window *SDL_GetKeyboardFocus(void)
{
SDL_Keyboard *keyboard = &SDL_keyboard;
@@ -1011,8 +1009,7 @@ void SDL_ReleaseAutoReleaseKeys(void)
}
}
-SDL_bool
-SDL_HardwareKeyboardKeyPressed(void)
+SDL_bool SDL_HardwareKeyboardKeyPressed(void)
{
SDL_Keyboard *keyboard = &SDL_keyboard;
SDL_Scancode scancode;
@@ -1089,8 +1086,7 @@ void SDL_KeyboardQuit(void)
{
}
-const Uint8 *
-SDL_GetKeyboardState(int *numkeys)
+const Uint8 *SDL_GetKeyboardState(int *numkeys)
{
SDL_Keyboard *keyboard = &SDL_keyboard;
@@ -1100,8 +1096,7 @@ SDL_GetKeyboardState(int *numkeys)
return keyboard->keystate;
}
-SDL_Keymod
-SDL_GetModState(void)
+SDL_Keymod SDL_GetModState(void)
{
SDL_Keyboard *keyboard = &SDL_keyboard;
@@ -1126,8 +1121,7 @@ void SDL_ToggleModState(const SDL_Keymod modstate, const SDL_bool toggle)
}
}
-SDL_Keycode
-SDL_GetKeyFromScancode(SDL_Scancode scancode)
+SDL_Keycode SDL_GetKeyFromScancode(SDL_Scancode scancode)
{
SDL_Keyboard *keyboard = &SDL_keyboard;
@@ -1139,8 +1133,7 @@ SDL_GetKeyFromScancode(SDL_Scancode scancode)
return keyboard->keymap[scancode];
}
-SDL_Keycode
-SDL_GetDefaultKeyFromScancode(SDL_Scancode scancode)
+SDL_Keycode SDL_GetDefaultKeyFromScancode(SDL_Scancode scancode)
{
if (((int)scancode) < SDL_SCANCODE_UNKNOWN || scancode >= SDL_NUM_SCANCODES) {
SDL_InvalidParamError("scancode");
@@ -1150,8 +1143,7 @@ SDL_GetDefaultKeyFromScancode(SDL_Scancode scancode)
return SDL_default_keymap[scancode];
}
-SDL_Scancode
-SDL_GetScancodeFromKey(SDL_Keycode key)
+SDL_Scancode SDL_GetScancodeFromKey(SDL_Keycode key)
{
SDL_Keyboard *keyboard = &SDL_keyboard;
SDL_Scancode scancode;
@@ -1165,8 +1157,7 @@ SDL_GetScancodeFromKey(SDL_Keycode key)
return SDL_SCANCODE_UNKNOWN;
}
-const char *
-SDL_GetScancodeName(SDL_Scancode scancode)
+const char *SDL_GetScancodeName(SDL_Scancode scancode)
{
const char *name;
if (((int)scancode) < SDL_SCANCODE_UNKNOWN || scancode >= SDL_NUM_SCANCODES) {
@@ -1204,8 +1195,7 @@ SDL_Scancode SDL_GetScancodeFromName(const char *name)
return SDL_SCANCODE_UNKNOWN;
}
-const char *
-SDL_GetKeyName(SDL_Keycode key)
+const char *SDL_GetKeyName(SDL_Keycode key)
{
static char name[8];
char *end;
@@ -1242,8 +1232,7 @@ SDL_GetKeyName(SDL_Keycode key)
}
}
-SDL_Keycode
-SDL_GetKeyFromName(const char *name)
+SDL_Keycode SDL_GetKeyFromName(const char *name)
{
SDL_Keycode key;
diff --git a/src/events/SDL_keysym_to_scancode.c b/src/events/SDL_keysym_to_scancode.c
index aaf7922..df0b6b1 100644
--- a/src/events/SDL_keysym_to_scancode.c
+++ b/src/events/SDL_keysym_to_scancode.c
@@ -387,8 +387,7 @@ static const struct {
};
/* *INDENT-ON* */ /* clang-format on */
-SDL_Scancode
-SDL_GetScancodeFromKeySym(Uint32 keysym, Uint32 keycode)
+SDL_Scancode SDL_GetScancodeFromKeySym(Uint32 keysym, Uint32 keycode)
{
int i;
Uint32 linux_keycode = 0;
diff --git a/src/events/SDL_mouse.c b/src/events/SDL_mouse.c
index 5d8d1d2..000b22d 100644
--- a/src/events/SDL_mouse.c
+++ b/src/events/SDL_mouse.c
@@ -226,8 +226,7 @@ void SDL_SetDefaultCursor(SDL_Cursor *cursor)
}
}
-SDL_Mouse *
-SDL_GetMouse(void)
+SDL_Mouse *SDL_GetMouse(void)
{
return &SDL_mouse;
}
@@ -245,8 +244,7 @@ static Uint32 GetButtonState(SDL_Mouse *mouse, SDL_bool include_touch)
return buttonstate;
}
-SDL_Window *
-SDL_GetMouseFocus(void)
+SDL_Window *SDL_GetMouseFocus(void)
{
SDL_Mouse *mouse = SDL_GetMouse();
@@ -261,8 +259,7 @@ SDL_GetMouseFocus(void)
* -flibit
*/
#if 0
-void
-SDL_ResetMouse(void)
+void SDL_ResetMouse(void)
{
SDL_Mouse *mouse = SDL_GetMouse();
Uint32 buttonState = GetButtonState(mouse, SDL_FALSE);
@@ -946,8 +943,7 @@ void SDL_MouseQuit(void)
SDL_MouseRelativeWarpMotionChanged, mouse);
}
-Uint32
-SDL_GetMouseState(int *x, int *y)
+Uint32 SDL_GetMouseState(int *x, int *y)
{
SDL_Mouse *mouse = SDL_GetMouse();
@@ -960,8 +956,7 @@ SDL_GetMouseState(int *x, int *y)
return GetButtonState(mouse, SDL_TRUE);
}
-Uint32
-SDL_GetRelativeMouseState(int *x, int *y)
+Uint32 SDL_GetRelativeMouseState(int *x, int *y)
{
SDL_Mouse *mouse = SDL_GetMouse();
@@ -976,8 +971,7 @@ SDL_GetRelativeMouseState(int *x, int *y)
return GetButtonState(mouse, SDL_TRUE);
}
-Uint32
-SDL_GetGlobalMouseState(int *x, int *y)
+Uint32 SDL_GetGlobalMouseState(int *x, int *y)
{
SDL_Mouse *mouse = SDL_GetMouse();
@@ -1133,8 +1127,7 @@ int SDL_SetRelativeMouseMode(SDL_bool enabled)
return 0;
}
-SDL_bool
-SDL_GetRelativeMouseMode()
+SDL_bool SDL_GetRelativeMouseMode()
{
SDL_Mouse *mouse = SDL_GetMouse();
@@ -1219,8 +1212,7 @@ int SDL_CaptureMouse(SDL_bool enabled)
return SDL_UpdateMouseCapture(SDL_FALSE);
}
-SDL_Cursor *
-SDL_CreateCursor(const Uint8 *data, const Uint8 *mask,
+SDL_Cursor *SDL_CreateCursor(const Uint8 *data, const Uint8 *mask,
int w, int h, int hot_x, int hot_y)
{
SDL_Surface *surface;
@@ -1268,8 +1260,7 @@ SDL_CreateCursor(const Uint8 *data, const Uint8 *mask,
return cursor;
}
-SDL_Cursor *
-SDL_CreateColorCursor(SDL_Surface *surface, int hot_x, int hot_y)
+SDL_Cursor *SDL_CreateColorCursor(SDL_Surface *surface, int hot_x, int hot_y)
{
SDL_Mouse *mouse = SDL_GetMouse();
SDL_Surface *temp = NULL;
@@ -1311,8 +1302,7 @@ SDL_CreateColorCursor(SDL_Surface *surface, int hot_x, int hot_y)
return cursor;
}
-SDL_Cursor *
-SDL_CreateSystemCursor(SDL_SystemCursor id)
+SDL_Cursor *SDL_CreateSystemCursor(SDL_SystemCursor id)
{
SDL_Mouse *mouse = SDL_GetMouse();
SDL_Cursor *cursor;
@@ -1379,8 +1369,7 @@ void SDL_SetCursor(SDL_Cursor *cursor)
}
}
-SDL_Cursor *
-SDL_GetCursor(void)
+SDL_Cursor *SDL_GetCursor(void)
{
SDL_Mouse *mouse = SDL_GetMouse();
@@ -1390,8 +1379,7 @@ SDL_GetCursor(void)
return mouse->cur_cursor;
}
-SDL_Cursor *
-SDL_GetDefaultCursor(void)
+SDL_Cursor *SDL_GetDefaultCursor(void)
{
SDL_Mouse *mouse = SDL_GetMouse();
diff --git a/src/events/SDL_touch.c b/src/events/SDL_touch.c
index 963e0ac..cff41b0 100644
--- a/src/events/SDL_touch.c
+++ b/src/events/SDL_touch.c
@@ -50,8 +50,7 @@ int SDL_GetNumTouchDevices(void)
return SDL_num_touch;
}
-SDL_TouchID
-SDL_GetTouchDevice(int index)
+SDL_TouchID SDL_GetTouchDevice(int index)
{
if (index < 0 || index >= SDL_num_touch) {
SDL_SetError("Unknown touch device index %d", index);
@@ -60,8 +59,7 @@ SDL_GetTouchDevice(int index)
return SDL_touchDevices[index]->id;
}
-const char *
-SDL_GetTouchName(int index)
+const char *SDL_GetTouchName(int index)
{
if (index < 0 || index >= SDL_num_touch) {
SDL_SetError("Unknown touch device");
@@ -84,8 +82,7 @@ static int SDL_GetTouchIndex(SDL_TouchID id)
return -1;
}
-SDL_Touch *
-SDL_GetTouch(SDL_TouchID id)
+SDL_Touch *SDL_GetTouch(SDL_TouchID id)
{
int index = SDL_GetTouchIndex(id);
if (index < 0 || index >= SDL_num_touch) {
@@ -100,8 +97,7 @@ SDL_GetTouch(SDL_TouchID id)
return SDL_touchDevices[index];
}
-SDL_TouchDeviceType
-SDL_GetTouchDeviceType(SDL_TouchID id)
+SDL_TouchDeviceType SDL_GetTouchDeviceType(SDL_TouchID id)
{
SDL_Touch *touch = SDL_GetTouch(id);
if (touch) {
@@ -139,8 +135,7 @@ int SDL_GetNumTouchFingers(SDL_TouchID touchID)
return 0;
}
-SDL_Finger *
-SDL_GetTouchFinger(SDL_TouchID touchID, int index)
+SDL_Finger *SDL_GetTouchFinger(SDL_TouchID touchID, int index)
{
SDL_Touch *touch = SDL_GetTouch(touchID);
if (touch == NULL) {
diff --git a/src/file/SDL_rwops.c b/src/file/SDL_rwops.c
index 3e3f4bb..e5a1674 100644
--- a/src/file/SDL_rwops.c
+++ b/src/file/SDL_rwops.c
@@ -522,8 +522,7 @@ static int SDLCALL mem_close(SDL_RWops *context)
/* Functions to create SDL_RWops structures from various data sources */
-SDL_RWops *
-SDL_RWFromFile(const char *file, const char *mode)
+SDL_RWops *SDL_RWFromFile(const char *file, const char *mode)
{
SDL_RWops *rwops = NULL;
if (file == NULL || !*file || mode == NULL || !*mode) {
@@ -616,8 +615,7 @@ SDL_RWFromFile(const char *file, const char *mode)
}
#ifdef HAVE_STDIO_H
-SDL_RWops *
-SDL_RWFromFP(FILE * fp, SDL_bool autoclose)
+SDL_RWops *SDL_RWFromFP(FILE * fp, SDL_bool autoclose)
{
SDL_RWops *rwops = NULL;
@@ -635,16 +633,14 @@ SDL_RWFromFP(FILE * fp, SDL_bool autoclose)
return rwops;
}
#else
-SDL_RWops *
-SDL_RWFromFP(void * fp, SDL_bool autoclose)
+SDL_RWops *SDL_RWFromFP(void * fp, SDL_bool autoclose)
{
SDL_SetError("SDL not compiled with stdio support");
return NULL;
}
#endif /* HAVE_STDIO_H */
-SDL_RWops *
-SDL_RWFromMem(void *mem, int size)
+SDL_RWops *SDL_RWFromMem(void *mem, int size)
{
SDL_RWops *rwops = NULL;
if (mem == NULL) {
@@ -671,8 +667,7 @@ SDL_RWFromMem(void *mem, int size)
return rwops;
}
-SDL_RWops *
-SDL_RWFromConstMem(const void *mem, int size)
+SDL_RWops *SDL_RWFromConstMem(const void *mem, int size)
{
SDL_RWops *rwops = NULL;
if (mem == NULL) {
@@ -699,8 +694,7 @@ SDL_RWFromConstMem(const void *mem, int size)
return rwops;
}
-SDL_RWops *
-SDL_AllocRW(void)
+SDL_RWops *SDL_AllocRW(void)
{
SDL_RWops *area;
@@ -719,8 +713,7 @@ void SDL_FreeRW(SDL_RWops *area)
}
/* Load all the data from an SDL data stream */
-void *
-SDL_LoadFile_RW(SDL_RWops *src, size_t *datasize, int freesrc)
+void *SDL_LoadFile_RW(SDL_RWops *src, size_t *datasize, int freesrc)
{
static const Sint64 FILE_CHUNK_SIZE = 1024;
Sint64 size;
@@ -771,26 +764,22 @@ done:
return data;
}
-void *
-SDL_LoadFile(const char *file, size_t *datasize)
+void *SDL_LoadFile(const char *file, size_t *datasize)
{
return SDL_LoadFile_RW(SDL_RWFromFile(file, "rb"), datasize, 1);
}
-Sint64
-SDL_RWsize(SDL_RWops *context)
+Sint64 SDL_RWsize(SDL_RWops *context)
{
return context->size(context);
}
-Sint64
-SDL_RWseek(SDL_RWops *context, Sint64 offset, int whence)
+Sint64 SDL_RWseek(SDL_RWops *context, Sint64 offset, int whence)
{
return context->seek(context, offset, whence);
}
-Sint64
-SDL_RWtell(SDL_RWops *context)
+Sint64 SDL_RWtell(SDL_RWops *context)
{
return context->seek(context, 0, RW_SEEK_CUR);
}
@@ -822,8 +811,7 @@ Uint8 SDL_ReadU8(SDL_RWops *src)
return value;
}
-Uint16
-SDL_ReadLE16(SDL_RWops *src)
+Uint16 SDL_ReadLE16(SDL_RWops *src)
{
Uint16 value = 0;
@@ -831,8 +819,7 @@ SDL_ReadLE16(SDL_RWops *src)
return SDL_SwapLE16(value);
}
-Uint16
-SDL_ReadBE16(SDL_RWops *src)
+Uint16 SDL_ReadBE16(SDL_RWops *src)
{
Uint16 value = 0;
@@ -840,8 +827,7 @@ SDL_ReadBE16(SDL_RWops *src)
return SDL_SwapBE16(value);
}
-Uint32
-SDL_ReadLE32(SDL_RWops *src)
+Uint32 SDL_ReadLE32(SDL_RWops *src)
{
Uint32 value = 0;
@@ -849,8 +835,7 @@ SDL_ReadLE32(SDL_RWops *src)
return SDL_SwapLE32(value);
}
-Uint32
-SDL_ReadBE32(SDL_RWops *src)
+Uint32 SDL_ReadBE32(SDL_RWops *src)
{
Uint32 value = 0;
@@ -858,8 +843,7 @@ SDL_ReadBE32(SDL_RWops *src)
return SDL_SwapBE32(value);
}
-Uint64
-SDL_ReadLE64(SDL_RWops *src)
+Uint64 SDL_ReadLE64(SDL_RWops *src)
{
Uint64 value = 0;
@@ -867,8 +851,7 @@ SDL_ReadLE64(SDL_RWops *src)
return SDL_SwapLE64(value);
}
-Uint64
-SDL_ReadBE64(SDL_RWops *src)
+Uint64 SDL_ReadBE64(SDL_RWops *src)
{
Uint64 value = 0;
diff --git a/src/file/n3ds/SDL_rwopsromfs.c b/src/file/n3ds/SDL_rwopsromfs.c
index fbe8be8..467bae3 100644
--- a/src/file/n3ds/SDL_rwopsromfs.c
+++ b/src/file/n3ds/SDL_rwopsromfs.c
@@ -23,21 +23,20 @@
#include "SDL_error.h"
/* Checks if the mode is a kind of reading */
-SDL_FORCE_INLINE SDL_bool IsReadMode(const char *mode);
+static SDL_bool IsReadMode(const char *mode);
/* Checks if the file starts with the given prefix */
-SDL_FORCE_INLINE SDL_bool HasPrefix(const char *file, const char *prefix);
+static SDL_bool HasPrefix(const char *file, const char *prefix);
-SDL_FORCE_INLINE FILE *TryOpenFile(const char *file, const char *mode);
-SDL_FORCE_INLINE FILE *TryOpenInRomfs(const char *file, const char *mode);
+static FILE *TryOpenFile(const char *file, const char *mode);
+static FILE *TryOpenInRomfs(const char *file, const char *mode);
/* Nintendo 3DS applications may embed resources in the executable. The
resources are stored in a special read-only partition prefixed with
'romfs:/'. As such, when opening a file, we should first try the romfs
unless sdmc is specifically mentionned.
*/
-FILE *
-N3DS_FileOpen(const char *file, const char *mode)
+FILE *N3DS_FileOpen(const char *file, const char *mode)
{
/* romfs are read-only */
if (!IsReadMode(mode)) {
@@ -52,20 +51,17 @@ N3DS_FileOpen(const char *file, const char *mode)
return TryOpenFile(file, mode);
}
-SDL_FORCE_INLINE SDL_bool
-IsReadMode(const char *mode)
+static SDL_bool IsReadMode(const char *mode)
{
return SDL_strchr(mode, 'r') != NULL;
}
-SDL_FORCE_INLINE SDL_bool
-HasPrefix(const char *file, const char *prefix)
+static SDL_bool HasPrefix(const char *file, const char *prefix)
{
return SDL_strncmp(prefix, file, SDL_strlen(prefix)) == 0;
}
-SDL_FORCE_INLINE FILE *
-TryOpenFile(const char *file, const char *mode)
+static FILE *TryOpenFile(const char *file, const char *mode)
{
FILE *fp = NULL;
@@ -77,8 +73,7 @@ TryOpenFile(const char *file, const char *mode)
return fp;
}
-SDL_FORCE_INLINE FILE *
-TryOpenInRomfs(const char *file, const char *mode)
+static FILE *TryOpenInRomfs(const char *file, const char *mode)
{
FILE *fp = NULL;
char *prefixed_filepath = NULL;
diff --git a/src/filesystem/android/SDL_sysfilesystem.c b/src/filesystem/android/SDL_sysfilesystem.c
index da39798..9df6790 100644
--- a/src/filesystem/android/SDL_sysfilesystem.c
+++ b/src/filesystem/android/SDL_sysfilesystem.c
@@ -32,16 +32,14 @@
#include "SDL_system.h"
-char *
-SDL_GetBasePath(void)
+char *SDL_GetBasePath(void)
{
/* The current working directory is / on Android */
SDL_Unsupported();
return NULL;
}
-char *
-SDL_GetPrefPath(const char *org, const char *app)
+char *SDL_GetPrefPath(const char *org, const char *app)
{
const char *path = SDL_AndroidGetInternalStoragePath();
if (path) {
diff --git a/src/filesystem/cocoa/SDL_sysfilesystem.m b/src/filesystem/cocoa/SDL_sysfilesystem.m
index f80c0be..94ee783 100644
--- a/src/filesystem/cocoa/SDL_sysfilesystem.m
+++ b/src/filesystem/cocoa/SDL_sysfilesystem.m
@@ -33,8 +33,7 @@
#include "SDL_stdinc.h"
#include "SDL_filesystem.h"
-char *
-SDL_GetBasePath(void)
+char *SDL_GetBasePath(void)
{
@autoreleasepool {
NSBundle *bundle = [NSBundle mainBundle];
@@ -68,8 +67,7 @@ SDL_GetBasePath(void)
}
}
-char *
-SDL_GetPrefPath(const char *org, const char *app)
+char *SDL_GetPrefPath(const char *org, const char *app)
{
@autoreleasepool {
char *retval = NULL;
diff --git a/src/filesystem/dummy/SDL_sysfilesystem.c b/src/filesystem/dummy/SDL_sysfilesystem.c
index 7492a5d..83819ed 100644
--- a/src/filesystem/dummy/SDL_sysfilesystem.c
+++ b/src/filesystem/dummy/SDL_sysfilesystem.c
@@ -28,15 +28,13 @@
#include "SDL_error.h"
#include "SDL_filesystem.h"
-char *
-SDL_GetBasePath(void)
+char *SDL_GetBasePath(void)
{
SDL_Unsupported();
return NULL;
}
-char *
-SDL_GetPrefPath(const char *org, const char *app)
+char *SDL_GetPrefPath(const char *org, const char *app)
{
SDL_Unsupported();
return NULL;
diff --git a/src/filesystem/emscripten/SDL_sysfilesystem.c b/src/filesystem/emscripten/SDL_sysfilesystem.c
index 4796dba..af39e36 100644
--- a/src/filesystem/emscripten/SDL_sysfilesystem.c
+++ b/src/filesystem/emscripten/SDL_sysfilesystem.c
@@ -32,15 +32,13 @@
#include <emscripten/emscripten.h>
-char *
-SDL_GetBasePath(void)
+char *SDL_GetBasePath(void)
{
char *retval = "/";
return SDL_strdup(retval);
}
-char *
-SDL_GetPrefPath(const char *org, const char *app)
+char *SDL_GetPrefPath(const char *org, const char *app)
{
const char *append = "/libsdl/";
char *retval;
diff --git a/src/filesystem/haiku/SDL_sysfilesystem.cc b/src/filesystem/haiku/SDL_sysfilesystem.cc
index b560aa6..b6dc7d1 100644
--- a/src/filesystem/haiku/SDL_sysfilesystem.cc
+++ b/src/filesystem/haiku/SDL_sysfilesystem.cc
@@ -34,8 +34,7 @@
#include "SDL_stdinc.h"
#include "SDL_filesystem.h"
-char *
-SDL_GetBasePath(void)
+char *SDL_GetBasePath(void)
{
image_info info;
int32 cookie = 0;
@@ -69,8 +68,7 @@ SDL_GetBasePath(void)
}
-char *
-SDL_GetPrefPath(const char *org, const char *app)
+char *SDL_GetPrefPath(const char *org, const char *app)
{
// !!! FIXME: is there a better way to do this?
const char *home = SDL_getenv("HOME");
diff --git a/src/filesystem/n3ds/SDL_sysfilesystem.c b/src/filesystem/n3ds/SDL_sysfilesystem.c
index 6286699..fe2fd3f 100644
--- a/src/filesystem/n3ds/SDL_sysfilesystem.c
+++ b/src/filesystem/n3ds/SDL_sysfilesystem.c
@@ -35,15 +35,13 @@
SDL_FORCE_INLINE char *MakePrefPath(const char *app);
SDL_FORCE_INLINE int CreatePrefPathDir(const char *pref);
-char *
-SDL_GetBasePath(void)
+char *SDL_GetBasePath(void)
{
char *base_path = SDL_strdup("romfs:/");
return base_path;
}
-char *
-SDL_GetPrefPath(const char *org, const char *app)
+char *SDL_GetPrefPath(const char *org, const char *app)
{
char *pref_path = NULL;
if (app == NULL) {
diff --git a/src/filesystem/nacl/SDL_sysfilesystem.c b/src/filesystem/nacl/SDL_sysfilesystem.c
index 9a067aa..91e7a98 100644
--- a/src/filesystem/nacl/SDL_sysfilesystem.c
+++ b/src/filesystem/nacl/SDL_sysfilesystem.c
@@ -24,15 +24,13 @@
#ifdef SDL_FILESYSTEM_NACL
-char *
-SDL_GetBasePath(void)
+char *SDL_GetBasePath(void)
{
SDL_Unsupported();
return NULL;
}
-char *
-SDL_GetPrefPath(const char *org, const char *app)
+char *SDL_GetPrefPath(const char *org, const char *app)
{
SDL_Unsupported();
return NULL;
diff --git a/src/filesystem/os2/SDL_sysfilesystem.c b/src/filesystem/os2/SDL_sysfilesystem.c
index 8eccd76..fb7d528 100644
--- a/src/filesystem/os2/SDL_sysfilesystem.c
+++ b/src/filesystem/os2/SDL_sysfilesystem.c
@@ -36,8 +36,7 @@
#include <os2.h>
-char *
-SDL_GetBasePath(void)
+char *SDL_GetBasePath(void)
{
PTIB tib;
PPIB pib;
@@ -71,8 +70,7 @@ SDL_GetBasePath(void)
return OS2_SysToUTF8(acBuf);
}
-char *
-SDL_GetPrefPath(const char *org, const char *app)
+char *SDL_GetPrefPath(const char *org, const char *app)
{
PSZ pszPath;
CHAR acBuf[CCHMAXPATH];
diff --git a/src/filesystem/ps2/SDL_sysfilesystem.c b/src/filesystem/ps2/SDL_sysfilesystem.c
index 75edcdf..86dcb14 100644
--- a/src/filesystem/ps2/SDL_sysfilesystem.c
+++ b/src/filesystem/ps2/SDL_sysfilesystem.c
@@ -31,8 +31,7 @@
#include "SDL_error.h"
#include "SDL_filesystem.h"
-char *
-SDL_GetBasePath(void)
+char *SDL_GetBasePath(void)
{
char *retval;
size_t len;
@@ -78,8 +77,7 @@ static void recursive_mkdir(const char *dir)
mkdir(tmp, S_IRWXU);
}
-char *
-SDL_GetPrefPath(const char *org, const char *app)
+char *SDL_GetPrefPath(const char *org, const char *app)
{
char *retval = NULL;
size_t len;
diff --git a/src/filesystem/psp/SDL_sysfilesystem.c b/src/filesystem/psp/SDL_sysfilesystem.c
index 63f90a7..c163fa1 100644
--- a/src/filesystem/psp/SDL_sysfilesystem.c
+++ b/src/filesystem/psp/SDL_sysfilesystem.c
@@ -31,8 +31,7 @@
#include "SDL_error.h"
#include "SDL_filesystem.h"
-char *
-SDL_GetBasePath(void)
+char *SDL_GetBasePath(void)
{
char *retval = NULL;
size_t len;
@@ -46,8 +45,7 @@ SDL_GetBasePath(void)
return retval;
}
-char *
-SDL_GetPrefPath(const char *org, const char *app)
+char *SDL_GetPrefPath(const char *org, const char *app)
{
char *retval = NULL;
size_t len;
diff --git a/src/filesystem/riscos/SDL_sysfilesystem.c b/src/filesystem/riscos/SDL_sysfilesystem.c
index 97296ec..2537340 100644
--- a/src/filesystem/riscos/SDL_sysfilesystem.c
+++ b/src/filesystem/riscos/SDL_sysfilesystem.c
@@ -129,8 +129,7 @@ static _kernel_oserror *createDirectoryRecursive(char *path)
return _kernel_swi(OS_File, ®s, ®s);
}
-char *
-SDL_GetBasePath(void)
+char *SDL_GetBasePath(void)
{
_kernel_swi_regs regs;
_kernel_oserror *error;
@@ -157,8 +156,7 @@ SDL_GetBasePath(void)
return retval;
}
-char *
-SDL_GetPrefPath(const char *org, const char *app)
+char *SDL_GetPrefPath(const char *org, const char *app)
{
char *canon, *dir, *retval;
size_t len;
diff --git a/src/filesystem/unix/SDL_sysfilesystem.c b/src/filesystem/unix/SDL_sysfilesystem.c
index 565d0b9..42e6e48 100644
--- a/src/filesystem/unix/SDL_sysfilesystem.c
+++ b/src/filesystem/unix/SDL_sysfilesystem.c
@@ -45,8 +45,7 @@
/* QNX's /proc/self/exefile is a text file and not a symlink. */
#if !defined(__QNXNTO__)
-static char *
-readSymLink(const char *path)
+static char *readSymLink(const char *path)
{
char *retval = NULL;
ssize_t len = 64;
@@ -129,8 +128,7 @@ static char *search_path_for_binary(const char *bin)
}
#endif
-char *
-SDL_GetBasePath(void)
+char *SDL_GetBasePath(void)
{
char *retval = NULL;
@@ -271,8 +269,7 @@ SDL_GetBasePath(void)
return retval;
}
-char *
-SDL_GetPrefPath(const char *org, const char *app)
+char *SDL_GetPrefPath(const char *org, const char *app)
{
/*
* We use XDG's base directory spec, even if you're not on Linux.
diff --git a/src/filesystem/vita/SDL_sysfilesystem.c b/src/filesystem/vita/SDL_sysfilesystem.c
index afca9d8..bb57270 100644
--- a/src/filesystem/vita/SDL_sysfilesystem.c
+++ b/src/filesystem/vita/SDL_sysfilesystem.c
@@ -39,16 +39,14 @@
#include "SDL_filesystem.h"
#include "SDL_rwops.h"
-char *
-SDL_GetBasePath(void)
+char *SDL_GetBasePath(void)
{
const char *basepath = "app0:/";
char *retval = SDL_strdup(basepath);
return retval;
}
-char *
-SDL_GetPrefPath(const char *org, const char *app)
+char *SDL_GetPrefPath(const char *org, const char *app)
{
const char *envr = "ux0:/data/";
char *retval = NULL;
diff --git a/src/filesystem/windows/SDL_sysfilesystem.c b/src/filesystem/windows/SDL_sysfilesystem.c
index e0a1e94..0684270 100644
--- a/src/filesystem/windows/SDL_sysfilesystem.c
+++ b/src/filesystem/windows/SDL_sysfilesystem.c
@@ -32,8 +32,7 @@
#include "SDL_stdinc.h"
#include "SDL_filesystem.h"
-char *
-SDL_GetBasePath(void)
+char *SDL_GetBasePath(void)
{
DWORD buflen = 128;
WCHAR *path = NULL;
@@ -83,8 +82,7 @@ SDL_GetBasePath(void)
return retval;
}
-char *
-SDL_GetPrefPath(const char *org, const char *app)
+char *SDL_GetPrefPath(const char *org, const char *app)
{
/*
* Vista and later has a new API for this, but SHGetFolderPath works there,
@@ -175,15 +173,13 @@ SDL_GetPrefPath(const char *org, const char *app)
#ifdef SDL_FILESYSTEM_XBOX
#include "SDL_filesystem.h"
#include "SDL_error.h"
-char *
-SDL_GetBasePath(void)
+char *SDL_GetBasePath(void)
{
SDL_Unsupported();
return NULL;
}
-char *
-SDL_GetPrefPath(const char *org, const char *app)
+char *SDL_GetPrefPath(const char *org, const char *app)
{
SDL_Unsupported();
return NULL;
diff --git a/src/haptic/SDL_haptic.c b/src/haptic/SDL_haptic.c
index c3220da..ee64bcb 100644
--- a/src/haptic/SDL_haptic.c
+++ b/src/haptic/SDL_haptic.c
@@ -85,8 +85,7 @@ int SDL_NumHaptics(void)
/*
* Gets the name of a Haptic device by index.
*/
-const char *
-SDL_HapticName(int device_index)
+const char *SDL_HapticName(int device_index)
{
if ((device_index < 0) || (device_index >= SDL_NumHaptics())) {
SDL_SetError("Haptic: There are %d haptic devices available",
@@ -99,8 +98,7 @@ SDL_HapticName(int device_index)
/*
* Opens a Haptic device.
*/
-SDL_Haptic *
-SDL_HapticOpen(int device_index)
+SDL_Haptic *SDL_HapticOpen(int device_index)
{
SDL_Haptic *haptic;
SDL_Haptic *hapticlist;
@@ -211,8 +209,7 @@ int SDL_MouseIsHaptic(void)
/*
* Returns the haptic device if mouse is haptic or NULL elsewise.
*/
-SDL_Haptic *
-SDL_HapticOpenFromMouse(void)
+SDL_Haptic *SDL_HapticOpenFromMouse(void)
{
int device_index;
@@ -257,8 +254,7 @@ int SDL_JoystickIsHaptic(SDL_Joystick *joystick)
/*
* Opens a haptic device from a joystick.
*/
-SDL_Haptic *
-SDL_HapticOpenFromJoystick(SDL_Joystick *joystick)
+SDL_Haptic *SDL_HapticOpenFromJoystick(SDL_Joystick *joystick)
{
SDL_Haptic *haptic;
SDL_Haptic *hapticlist;
@@ -415,8 +411,7 @@ int SDL_HapticNumEffectsPlaying(SDL_Haptic *haptic)
/*
* Returns supported effects by the device.
*/
-unsigned int
-SDL_HapticQuery(SDL_Haptic *haptic)
+unsigned int SDL_HapticQuery(SDL_Haptic *haptic)
{
if (!ValidHaptic(haptic)) {
return 0; /* same as if no effects were supported */
diff --git a/src/haptic/android/SDL_syshaptic.c b/src/haptic/android/SDL_syshaptic.c
index 4d137ae..111c43c 100644
--- a/src/haptic/android/SDL_syshaptic.c
+++ b/src/haptic/android/SDL_syshaptic.c
@@ -89,8 +89,7 @@ static SDL_hapticlist_item *HapticByDevId(int device_id)
return NULL;
}
-const char *
-SDL_SYS_HapticName(int index)
+const char *SDL_SYS_HapticName(int index)
{
SDL_hapticlist_item *item = HapticByOrder(index);
if (item == NULL) {
diff --git a/src/haptic/darwin/SDL_syshaptic.c b/src/haptic/darwin/SDL_syshaptic.c
index e2acb37..dea1ee7 100644
--- a/src/haptic/darwin/SDL_syshaptic.c
+++ b/src/haptic/darwin/SDL_syshaptic.c
@@ -319,8 +319,7 @@ int MacHaptic_MaybeRemoveDevice(io_object_t device)
/*
* Return the name of a haptic device, does not need to be opened.
*/
-const char *
-SDL_SYS_HapticName(int index)
+const char *SDL_SYS_HapticName(int index)
{
SDL_hapticlist_item *item;
item = HapticByDevIndex(index);
diff --git a/src/haptic/dummy/SDL_syshaptic.c b/src/haptic/dummy/SDL_syshaptic.c
index 479a0d4..433093c 100644
--- a/src/haptic/dummy/SDL_syshaptic.c
+++ b/src/haptic/dummy/SDL_syshaptic.c
@@ -40,8 +40,7 @@ int SDL_SYS_NumHaptics(void)
return 0;
}
-const char *
-SDL_SYS_HapticName(int index)
+const char *SDL_SYS_HapticName(int index)
{
SDL_SYS_LogicError();
return NULL;
diff --git a/src/haptic/linux/SDL_syshaptic.c b/src/haptic/linux/SDL_syshaptic.c
index 5c07a5c..55a8ca1 100644
--- a/src/haptic/linux/SDL_syshaptic.c
+++ b/src/haptic/linux/SDL_syshaptic.c
@@ -351,8 +351,7 @@ static const char *SDL_SYS_HapticNameFromFD(int fd)
/*
* Return the name of a haptic device, does not need to be opened.
*/
-const char *
-SDL_SYS_HapticName(int index)
+const char *SDL_SYS_HapticName(int index)
{
SDL_hapticlist_item *item;
int fd;
diff --git a/src/haptic/windows/SDL_windowshaptic.c b/src/haptic/windows/SDL_windowshaptic.c
index 59c1e50..01a4a7e 100644
--- a/src/haptic/windows/SDL_windowshaptic.c
+++ b/src/haptic/windows/SDL_windowshaptic.c
@@ -136,8 +136,7 @@ static SDL_hapticlist_item *HapticByDevIndex(int device_index)
/*
* Return the name of a haptic device, does not need to be opened.
*/
-const char *
-SDL_SYS_HapticName(int index)
+const char *SDL_SYS_HapticName(int index)
{
SDL_hapticlist_item *item = HapticByDevIndex(index);
return item->name;
diff --git a/src/hidapi/SDL_hidapi.c b/src/hidapi/SDL_hidapi.c
index 6af0719..6c3e43f 100644
--- a/src/hidapi/SDL_hidapi.c
+++ b/src/hidapi/SDL_hidapi.c
@@ -198,14 +198,12 @@ static int SDL_inotify_init1(void)
}
#endif
-static int
-StrHasPrefix(const char *string, const char *prefix)
+static int StrHasPrefix(const char *string, const char *prefix)
{
return SDL_strncmp(string, prefix, SDL_strlen(prefix)) == 0;
}
-static int
-StrIsInteger(const char *string)
+static int StrIsInteger(const char *string)
{
const char *p;
@@ -223,8 +221,7 @@ StrIsInteger(const char *string)
}
#endif /* HAVE_INOTIFY */
-static void
-HIDAPI_InitializeDiscovery()
+static void HIDAPI_InitializeDiscovery()
{
SDL_HIDAPI_discovery.m_bInitialized = SDL_TRUE;
SDL_HIDAPI_discovery.m_unDeviceChangeCounter = 1;
@@ -363,8 +360,7 @@ HIDAPI_InitializeDiscovery()
}
}
-static void
-HIDAPI_UpdateDiscovery()
+static void HIDAPI_UpdateDiscovery()
{
if (!SDL_HIDAPI_discovery.m_bInitialized) {
HIDAPI_InitializeDiscovery();
@@ -481,8 +477,7 @@ HIDAPI_UpdateDiscovery()
}
}
-static void
-HIDAPI_ShutdownDiscovery()
+static void HIDAPI_ShutdownDiscovery()
{
if (!SDL_HIDAPI_discovery.m_bInitialized) {
return;
@@ -813,8 +808,7 @@ static struct
#ifndef __FreeBSD__
/* this is awkwardly inlined, so we need to re-implement it here
* so we can override the libusb_control_transfer call */
-static int
-SDL_libusb_get_string_descriptor(libusb_device_handle *dev,
+static int SDL_libusb_get_string_descriptor(libusb_device_handle *dev,
uint8_t descriptor_index, uint16_t lang_id,
unsigned char *data, int length)
{
@@ -965,8 +959,7 @@ static char device_magic;
#if HAVE_PLATFORM_BACKEND || HAVE_DRIVER_BACKEND || defined(HAVE_LIBUSB)
-static SDL_hid_device *
-CreateHIDDeviceWrapper(void *device, const struct hidapi_backend *backend)
+static SDL_hid_device *CreateHIDDeviceWrapper(void *device, const struct hidapi_backend *backend)
{
SDL_hid_device *wrapper = (SDL_hid_device *)SDL_malloc(sizeof(*wrapper));
wrapper->magic = &device_magic;
@@ -977,8 +970,7 @@ CreateHIDDeviceWrapper(void *device, const struct hidapi_backend *backend)
#endif /* HAVE_PLATFORM_BACKEND || HAVE_DRIVER_BACKEND || HAVE_LIBUSB */
-static void
-DeleteHIDDeviceWrapper(SDL_hid_device *device)
+static void DeleteHIDDeviceWrapper(SDL_hid_device *device)
{
device->magic = NULL;
SDL_free(device);
@@ -1006,8 +998,7 @@ DeleteHIDDeviceWrapper(SDL_hid_device *device)
pDst->var = NULL; \
}
-static void
-CopyHIDDeviceInfo(struct SDL_hid_device_info *pSrc, struct SDL_hid_device_info *pDst)
+static void CopyHIDDeviceInfo(struct SDL_hid_device_info *pSrc, struct SDL_hid_device_info *pDst)
{
COPY_IF_EXISTS(path)
pDst->vendor_id = pSrc->vendor_id;
diff --git a/src/joystick/darwin/SDL_iokitjoystick.c b/src/joystick/darwin/SDL_iokitjoystick.c
index 3d748eb..0ac9b50 100644
--- a/src/joystick/darwin/SDL_iokitjoystick.c
+++ b/src/joystick/darwin/SDL_iokitjoystick.c
@@ -701,15 +701,13 @@ static void DARWIN_JoystickDetect(void)
}
}
-const char *
-DARWIN_JoystickGetDeviceName(int device_index)
+const char *DARWIN_JoystickGetDeviceName(int device_index)
{
recDevice *device = GetDeviceForIndex(device_index);
return device ? device->product : "UNKNOWN";
}
-const char *
-DARWIN_JoystickGetDevicePath(int device_index)
+const char *DARWIN_JoystickGetDevicePath(int device_index)
{
return NULL;
}
diff --git a/src/joystick/hidapi/SDL_hidapi_switch.c b/src/joystick/hidapi/SDL_hidapi_switch.c
index 67902fc..3b6a9c8 100644
--- a/src/joystick/hidapi/SDL_hidapi_switch.c
+++ b/src/joystick/hidapi/SDL_hidapi_switch.c
@@ -1764,8 +1764,7 @@ static void HandleSimpleControllerState(SDL_Joystick *joystick, SDL_DriverSwitch
ctx->m_lastSimpleState = *packet;
}
-static void
-SendSensorUpdate(SDL_Joystick *joystick, SDL_DriverSwitch_Context *ctx, SDL_SensorType type, Uint64 timestamp_us, const Sint16 *values)
+static void SendSensorUpdate(SDL_Joystick *joystick, SDL_DriverSwitch_Context *ctx, SDL_SensorType type, Uint64 timestamp_us, const Sint16 *values)
{
float data[3];
diff --git a/src/joystick/hidapi/SDL_hidapijoystick.c b/src/joystick/hidapi/SDL_hidapijoystick.c
index 6364930..2e7d605 100644
--- a/src/joystick/hidapi/SDL_hidapijoystick.c
+++ b/src/joystick/hidapi/SDL_hidapijoystick.c
@@ -1163,8 +1163,7 @@ static SDL_bool HIDAPI_IsEquivalentToDevice(Uint16 vendor_id, Uint16 product_id,
return SDL_FALSE;
}
-SDL_bool
-HIDAPI_IsDeviceTypePresent(SDL_GameControllerType type)
+SDL_bool HIDAPI_IsDeviceTypePresent(SDL_GameControllerType type)
{
SDL_HIDAPI_Device *device;
SDL_bool result = SDL_FALSE;
@@ -1245,8 +1244,7 @@ SDL_bool HIDAPI_IsDevicePresent(Uint16 vendor_id, Uint16 product_id, Uint16 vers
return result;
}
-SDL_JoystickType
-HIDAPI_GetJoystickTypeFromGUID(SDL_JoystickGUID guid)
+SDL_JoystickType HIDAPI_GetJoystickTypeFromGUID(SDL_JoystickGUID guid)
{
SDL_HIDAPI_Device *device;
SDL_JoystickType type = SDL_JOYSTICK_TYPE_UNKNOWN;
@@ -1263,8 +1261,7 @@ HIDAPI_GetJoystickTypeFromGUID(SDL_JoystickGUID guid)
return type;
}
-SDL_GameControllerType
-HIDAPI_GetGameControllerTypeFromGUID(SDL_JoystickGUID guid)
+SDL_GameControllerType HIDAPI_GetGameControllerTypeFromGUID(SDL_JoystickGUID guid)
{
SDL_HIDAPI_Device *device;
SDL_GameControllerType type = SDL_CONTROLLER_TYPE_UNKNOWN;
diff --git a/src/joystick/iphoneos/SDL_mfijoystick.m b/src/joystick/iphoneos/SDL_mfijoystick.m
index 8ed87e6..b9aeed7 100644
--- a/src/joystick/iphoneos/SDL_mfijoystick.m
+++ b/src/joystick/iphoneos/SDL_mfijoystick.m
@@ -1726,8 +1726,7 @@ static GCControllerDirectionPad *GetDirectionalPadForController(GCController *co
static char elementName[256];
-const char *
-IOS_GameControllerGetAppleSFSymbolsNameForButton(SDL_GameController *gamecontroller, SDL_GameControllerButton button)
+const char *IOS_GameControllerGetAppleSFSymbolsNameForButton(SDL_GameController *gamecontroller, SDL_GameControllerButton button)
{
elementName[0] = '\0';
#if defined(SDL_JOYSTICK_MFI) && defined(ENABLE_PHYSICAL_INPUT_PROFILE)
@@ -1842,8 +1841,7 @@ IOS_GameControllerGetAppleSFSymbolsNameForButton(SDL_GameController *gamecontrol
return elementName;
}
-const char *
-IOS_GameControllerGetAppleSFSymbolsNameForAxis(SDL_GameController *gamecontroller, SDL_GameControllerAxis axis)
+const char *IOS_GameControllerGetAppleSFSymbolsNameForAxis(SDL_GameController *gamecontroller, SDL_GameControllerAxis axis)
{
elementName[0] = '\0';
#if defined(SDL_JOYSTICK_MFI) && defined(ENABLE_PHYSICAL_INPUT_PROFILE)
diff --git a/src/joystick/windows/SDL_dinputjoystick.c b/src/joystick/windows/SDL_dinputjoystick.c
index 8826f90..bac7956 100644
--- a/src/joystick/windows/SDL_dinputjoystick.c
+++ b/src/joystick/windows/SDL_dinputjoystick.c
@@ -593,8 +593,7 @@ err:
#undef CHECK
}
-SDL_bool
-SDL_DINPUT_JoystickPresent(Uint16 vendor_id, Uint16 product_id, Uint16 version_number)
+SDL_bool SDL_DINPUT_JoystickPresent(Uint16 vendor_id, Uint16 product_id, Uint16 version_number)
{
Joystick_PresentData data;
@@ -945,8 +944,7 @@ int SDL_DINPUT_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumbl
return 0;
}
-Uint32
-SDL_DINPUT_JoystickGetCapabilities(SDL_Joystick *joystick)
+Uint32 SDL_DINPUT_JoystickGetCapabilities(SDL_Joystick *joystick)
{
Uint32 result = 0;
@@ -1177,8 +1175,7 @@ void SDL_DINPUT_JoystickDetect(JoyStick_DeviceData **pContext)
{
}
-SDL_bool
-SDL_DINPUT_JoystickPresent(Uint16 vendor, Uint16 product, Uint16 version)
+SDL_bool SDL_DINPUT_JoystickPresent(Uint16 vendor, Uint16 product, Uint16 version)
{
return SDL_FALSE;
}
@@ -1193,8 +1190,7 @@ int SDL_DINPUT_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumbl
return SDL_Unsupported();
}
-Uint32
-SDL_DINPUT_JoystickGetCapabilities(SDL_Joystick *joystick)
+Uint32 SDL_DINPUT_JoystickGetCapabilities(SDL_Joystick *joystick)
{
return 0;
}
diff --git a/src/joystick/windows/SDL_rawinputjoystick.c b/src/joystick/windows/SDL_rawinputjoystick.c
index 59b1695..c0d9513 100644
--- a/src/joystick/windows/SDL_rawinputjoystick.c
+++ b/src/joystick/windows/SDL_rawinputjoystick.c
@@ -883,14 +883,12 @@ static int RAWINPUT_JoystickGetCount(void)
return SDL_RAWINPUT_numjoysticks;
}
-SDL_bool
-RAWINPUT_IsEnabled()
+SDL_bool RAWINPUT_IsEnabled()
{
return SDL_RAWINPUT_inited;
}
-SDL_bool
-RAWINPUT_IsDevicePresent(Uint16 vendor_id, Uint16 product_id, Uint16 version, const char *name)
+SDL_bool RAWINPUT_IsDevicePresent(Uint16 vendor_id, Uint16 product_id, Uint16 version, const char *name)
{
SDL_RAWINPUT_Device *device;
@@ -1874,8 +1872,7 @@ static void RAWINPUT_JoystickClose(SDL_Joystick *joystick)
}
}
-SDL_bool
-RAWINPUT_RegisterNotifications(HWND hWnd)
+SDL_bool RAWINPUT_RegisterNotifications(HWND hWnd)
{
RAWINPUTDEVICE rid[SDL_arraysize(subscribed_devices)];
int i;
diff --git a/src/joystick/windows/SDL_xinputjoystick.c b/src/joystick/windows/SDL_xinputjoystick.c
index 66e5f8b..a0cf911 100644
--- a/src/joystick/windows/SDL_xinputjoystick.c
+++ b/src/joystick/windows/SDL_xinputjoystick.c
@@ -497,8 +497,7 @@ int SDL_XINPUT_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumbl
return 0;
}
-Uint32
-SDL_XINPUT_JoystickGetCapabilities(SDL_Joystick *joystick)
+Uint32 SDL_XINPUT_JoystickGetCapabilities(SDL_Joystick *joystick)
{
return SDL_JOYCAP_RUMBLE;
}
@@ -583,8 +582,7 @@ int SDL_XINPUT_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumbl
return SDL_Unsupported();
}
-Uint32
-SDL_XINPUT_JoystickGetCapabilities(SDL_Joystick *joystick)
+Uint32 SDL_XINPUT_JoystickGetCapabilities(SDL_Joystick *joystick)
{
return 0;
}
diff --git a/src/loadso/dlopen/SDL_sysloadso.c b/src/loadso/dlopen/SDL_sysloadso.c
index fb9c1d7..7e80cbf 100644
--- a/src/loadso/dlopen/SDL_sysloadso.c
+++ b/src/loadso/dlopen/SDL_sysloadso.c
@@ -34,8 +34,7 @@
#include "../../video/uikit/SDL_uikitvideo.h"
#endif
-void *
-SDL_LoadObject(const char *sofile)
+void *SDL_LoadObject(const char *sofile)
{
void *handle;
const char *loaderror;
@@ -55,8 +54,7 @@ SDL_LoadObject(const char *sofile)
return handle;
}
-void *
-SDL_LoadFunction(void *handle, const char *name)
+void *SDL_LoadFunction(void *handle, const char *name)
{
void *symbol = dlsym(handle, name);
if (symbol == NULL) {
diff --git a/src/loadso/dummy/SDL_sysloadso.c b/src/loadso/dummy/SDL_sysloadso.c
index 1cb8f19..e9c2e28 100644
--- a/src/loadso/dummy/SDL_sysloadso.c
+++ b/src/loadso/dummy/SDL_sysloadso.c
@@ -27,16 +27,14 @@
#include "SDL_loadso.h"
-void *
-SDL_LoadObject(const char *sofile)
+void *SDL_LoadObject(const char *sofile)
{
const char *loaderror = "SDL_LoadObject() not implemented";
SDL_SetError("Failed loading %s: %s", sofile, loaderror);
return NULL;
}
-void *
-SDL_LoadFunction(void *handle, const char *name)
+void *SDL_LoadFunction(void *handle, const char *name)
{
const char *loaderror = "SDL_LoadFunction() not implemented";
SDL_SetError("Failed loading %s: %s", name, loaderror);
diff --git a/src/loadso/os2/SDL_sysloadso.c b/src/loadso/os2/SDL_sysloadso.c
index 56c1271..c5c8b3b 100644
--- a/src/loadso/os2/SDL_sysloadso.c
+++ b/src/loadso/os2/SDL_sysloadso.c
@@ -32,8 +32,7 @@
#define INCL_DOSERRORS
#include <os2.h>
-void *
-SDL_LoadObject(const char *sofile)
+void *SDL_LoadObject(const char *sofile)
{
ULONG ulRC;
HMODULE hModule;
@@ -65,8 +64,7 @@ SDL_LoadObject(const char *sofile)
return (void *)hModule;
}
-void *
-SDL_LoadFunction(void *handle, const char *name)
+void *SDL_LoadFunction(void *handle, const char *name)
{
ULONG ulRC;
PFN pFN;
@@ -90,8 +88,7 @@ SDL_LoadFunction(void *handle, const char *name)
return (void *)pFN;
}
-void
-SDL_UnloadObject(void *handle)
+void SDL_UnloadObject(void *handle)
{
if (handle != NULL) {
DosFreeModule((HMODULE)handle);
diff --git a/src/loadso/windows/SDL_sysloadso.c b/src/loadso/windows/SDL_sysloadso.c
index d3744a1..ca43370 100644
--- a/src/loadso/windows/SDL_sysloadso.c
+++ b/src/loadso/windows/SDL_sysloadso.c
@@ -29,8 +29,7 @@
#include "SDL_loadso.h"
-void *
-SDL_LoadObject(const char *sofile)
+void *SDL_LoadObject(const char *sofile)
{
void *handle;
LPTSTR tstr;
@@ -61,8 +60,7 @@ SDL_LoadObject(const char *sofile)
return handle;
}
-void *
-SDL_LoadFunction(void *handle, const char *name)
+void *SDL_LoadFunction(void *handle, const char *name)
{
void *symbol = (void *)GetProcAddress((HMODULE)handle, name);
if (symbol == NULL) {
diff --git a/src/locale/SDL_locale.c b/src/locale/SDL_locale.c
index 258aac9..0c8f611 100644
--- a/src/locale/SDL_locale.c
+++ b/src/locale/SDL_locale.c
@@ -87,8 +87,7 @@ static SDL_Locale *build_locales_from_csv_string(char *csv)
return retval;
}
-SDL_Locale *
-SDL_GetPreferredLocales(void)
+SDL_Locale *SDL_GetPreferredLocales(void)
{
char locbuf[128]; /* enough for 21 "xx_YY," language strings. */
const char *hint = SDL_GetHint(SDL_HINT_PREFERRED_LOCALES);
diff --git a/src/locale/haiku/SDL_syslocale.cc b/src/locale/haiku/SDL_syslocale.cc
index 6dc4ad2..70af4df 100644
--- a/src/locale/haiku/SDL_syslocale.cc
+++ b/src/locale/haiku/SDL_syslocale.cc
@@ -26,8 +26,7 @@
#include "../../SDL_internal.h"
#include "../SDL_syslocale.h"
-void
-SDL_SYS_GetPreferredLocales(char *buf, size_t buflen)
+void SDL_SYS_GetPreferredLocales(char *buf, size_t buflen)
{
BLocaleRoster *roster = BLocaleRoster::Default();
roster->Refresh();
diff --git a/src/main/haiku/SDL_BeApp.cc b/src/main/haiku/SDL_BeApp.cc
index f1cf482..63af36b 100644
--- a/src/main/haiku/SDL_BeApp.cc
+++ b/src/main/haiku/SDL_BeApp.cc
@@ -105,8 +105,7 @@ static int StartBeApp(void *unused)
}
-static int
-StartBeLooper()
+static int StartBeLooper()
{
if (!be_app) {
SDL_AppThread = SDL_CreateThreadInternal(StartBeApp, "SDLApplication", 0, NULL);
@@ -141,8 +140,7 @@ StartBeLooper()
/* Initialize the Be Application, if it's not already started */
-int
-SDL_InitBeApp(void)
+int SDL_InitBeApp(void)
{
/* Create the BApplication that handles appserver interaction */
if (SDL_BeAppActive <= 0) {
@@ -160,8 +158,7 @@ SDL_InitBeApp(void)
}
/* Quit the Be Application, if there's nothing left to do */
-void
-SDL_QuitBeApp(void)
+void SDL_QuitBeApp(void)
{
/* Decrement the application reference count */
--SDL_BeAppActive;
diff --git a/src/main/nacl/SDL_nacl_main.c b/src/main/nacl/SDL_nacl_main.c
index 3d7833d..10d94e2 100644
--- a/src/main/nacl/SDL_nacl_main.c
+++ b/src/main/nacl/SDL_nacl_main.c
@@ -33,20 +33,19 @@
extern void NACL_SetScreenResolution(int width, int height, Uint32 format);
-int
-nacl_main(int argc, char *argv[])
+int nacl_main(int argc, char *argv[])
{
int status;
PSEvent* ps_event;
- PP_Resource event;
+ PP_Resource event;
struct PP_Rect rect;
int ready = 0;
const PPB_View *ppb_view = PSInterfaceView();
-
+
/* This is started in a worker thread by ppapi_simple! */
-
+
/* Wait for the first PSE_INSTANCE_DIDCHANGEVIEW event before starting the app */
-
+
PSEventSetFilter(PSE_INSTANCE_DIDCHANGEVIEW);
while (!ready) {
/* Process all waiting events without blocking */
@@ -65,13 +64,13 @@ nacl_main(int argc, char *argv[])
PSEventRelease(ps_event);
}
}
-
- /* Do a default httpfs mount on /,
- * apps can override this by unmounting /
+
+ /* Do a default httpfs mount on /,
+ * apps can override this by unmounting /
* and remounting with the desired configuration
*/
nacl_io_init_ppapi(PSGetInstanceId(), PSGetInterface);
-
+
umount("/");
mount(
"", /* source */
@@ -79,7 +78,7 @@ nacl_main(int argc, char *argv[])
"httpfs", /* filesystemtype */
0, /* mountflags */
""); /* data specific to the html5fs type */
-
+
/* Everything is ready, start the user main function */
SDL_SetMainReady();
status = SDL_main(argc, argv);
diff --git a/src/misc/haiku/SDL_sysurl.cc b/src/misc/haiku/SDL_sysurl.cc
index 08a2e55..68b0310 100644
--- a/src/misc/haiku/SDL_sysurl.cc
+++ b/src/misc/haiku/SDL_sysurl.cc
@@ -22,8 +22,7 @@
#include "../SDL_sysurl.h"
#include <Url.h>
-int
-SDL_SYS_OpenURL(const char *url)
+int SDL_SYS_OpenURL(const char *url)
{
BUrl burl(url);
const status_t rc = burl.OpenWithPreferredApplication(false);
diff --git a/src/power/SDL_power.c b/src/power/SDL_power.c
index 20b80f7..63ba382 100644
--- a/src/power/SDL_power.c
+++ b/src/power/SDL_power.c
@@ -85,8 +85,7 @@ static SDL_GetPowerInfo_Impl implementations[] = {
};
#endif
-SDL_PowerState
-SDL_GetPowerInfo(int *seconds, int *percent)
+SDL_PowerState SDL_GetPowerInfo(int *seconds, int *percent)
{
#ifndef SDL_POWER_DISABLED
const int total = sizeof(implementations) / sizeof(implementations[0]);
diff --git a/src/power/android/SDL_syspower.c b/src/power/android/SDL_syspower.c
index d0dbbcc..3dccdec 100644
--- a/src/power/android/SDL_syspower.c
+++ b/src/power/android/SDL_syspower.c
@@ -28,8 +28,7 @@
#include "../../core/android/SDL_android.h"
-SDL_bool
-SDL_GetPowerInfo_Android(SDL_PowerState *state, int *seconds, int *percent)
+SDL_bool SDL_GetPowerInfo_Android(SDL_PowerState *state, int *seconds, int *percent)
{
int battery;
int plugged;
diff --git a/src/power/emscripten/SDL_syspower.c b/src/power/emscripten/SDL_syspower.c
index 1d2989c..6a1f317 100644
--- a/src/power/emscripten/SDL_syspower.c
+++ b/src/power/emscripten/SDL_syspower.c
@@ -27,8 +27,7 @@
#include "SDL_power.h"
-SDL_bool
-SDL_GetPowerInfo_Emscripten(SDL_PowerState *state, int *seconds, int *percent)
+SDL_bool SDL_GetPowerInfo_Emscripten(SDL_PowerState *state, int *seconds, int *percent)
{
EmscriptenBatteryEvent batteryState;
int haveBattery = 0;
diff --git a/src/power/haiku/SDL_syspower.c b/src/power/haiku/SDL_syspower.c
index 068637f..6e7dd92 100644
--- a/src/power/haiku/SDL_syspower.c
+++ b/src/power/haiku/SDL_syspower.c
@@ -42,8 +42,7 @@
#include "SDL_power.h"
-SDL_bool
-SDL_GetPowerInfo_Haiku(SDL_PowerState *state, int *seconds, int *percent)
+SDL_bool SDL_GetPowerInfo_Haiku(SDL_PowerState *state, int *seconds, int *percent)
{
const int fd = open("/dev/misc/apm", O_RDONLY | O_CLOEXEC);
SDL_bool need_details = SDL_FALSE;
diff --git a/src/power/linux/SDL_syspower.c b/src/power/linux/SDL_syspower.c
index bda8c42..84100e8 100644
--- a/src/power/linux/SDL_syspower.c
+++ b/src/power/linux/SDL_syspower.c
@@ -229,9 +229,7 @@ static void check_proc_acpi_ac_adapter(const char *node, SDL_bool *have_ac)
}
}
-SDL_bool
-SDL_GetPowerInfo_Linux_proc_acpi(SDL_PowerState *state,
- int *seconds, int *percent)
+SDL_bool SDL_GetPowerInfo_Linux_proc_acpi(SDL_PowerState *state, int *seconds, int *percent)
{
struct dirent *dent = NULL;
DIR *dirp = NULL;
@@ -314,9 +312,7 @@ static SDL_bool int_string(char *str, int *val)
}
/* http://lxr.linux.no/linux+v2.6.29/drivers/char/apm-emulation.c */
-SDL_bool
-SDL_GetPowerInfo_Linux_proc_apm(SDL_PowerState *state,
- int *seconds, int *percent)
+SDL_bool SDL_GetPowerInfo_Linux_proc_apm(SDL_PowerState *state, int *seconds, int *percent)
{
SDL_bool need_details = SDL_FALSE;
int ac_status = 0;
@@ -422,8 +418,7 @@ SDL_GetPowerInfo_Linux_proc_apm(SDL_PowerState *state,
return SDL_TRUE;
}
-SDL_bool
-SDL_GetPowerInfo_Linux_sys_class_power_supply(SDL_PowerState *state, int *seconds, int *percent)
+SDL_bool SDL_GetPowerInfo_Linux_sys_class_power_supply(SDL_PowerState *state, int *seconds, int *percent)
{
const char *base = sys_class_power_supply_path;
struct dirent *dent;
@@ -612,8 +607,7 @@ static void check_upower_device(DBusConnection *conn, const char *path, SDL_Powe
}
#endif
-SDL_bool
-SDL_GetPowerInfo_Linux_org_freedesktop_upower(SDL_PowerState *state, int *seconds, int *percent)
+SDL_bool SDL_GetPowerInfo_Linux_org_freedesktop_upower(SDL_PowerState *state, int *seconds, int *percent)
{
SDL_bool retval = SDL_FALSE;
diff --git a/src/power/macosx/SDL_syspower.c b/src/power/macosx/SDL_syspower.c
index b598a36..b6af768 100644
--- a/src/power/macosx/SDL_syspower.c
+++ b/src/power/macosx/SDL_syspower.c
@@ -138,8 +138,7 @@ static void checkps(CFDictionaryRef dict, SDL_bool *have_ac, SDL_bool *have_batt
#undef GETVAL
#undef STRMATCH
-SDL_bool
-SDL_GetPowerInfo_MacOSX(SDL_PowerState *state, int *seconds, int *percent)
+SDL_bool SDL_GetPowerInfo_MacOSX(SDL_PowerState *state, int *seconds, int *percent)
{
CFTypeRef blob = IOPSCopyPowerSourcesInfo();
diff --git a/src/power/n3ds/SDL_syspower.c b/src/power/n3ds/SDL_syspower.c
index f7393b7..b565643 100644
--- a/src/power/n3ds/SDL_syspower.c
+++ b/src/power/n3ds/SDL_syspower.c
@@ -35,8 +35,7 @@ SDL_FORCE_INLINE int GetBatteryPercentage(void);
#define BATTERY_PERCENT_REG 0xB
#define BATTERY_PERCENT_REG_SIZE 2
-SDL_bool
-SDL_GetPowerInfo_N3DS(SDL_PowerState *state, int *seconds, int *percent)
+SDL_bool SDL_GetPowerInfo_N3DS(SDL_PowerState *state, int *seconds, int *percent)
{
*state = GetPowerState();
*percent = GetBatteryPercentage();
@@ -45,8 +44,7 @@ SDL_GetPowerInfo_N3DS(SDL_PowerState *state, int *seconds, int *percent)
return SDL_TRUE;
}
-SDL_FORCE_INLINE SDL_PowerState
-GetPowerState(void)
+static SDL_PowerState GetPowerState(void)
{
bool is_plugged;
u8 is_charging;
@@ -66,8 +64,7 @@ GetPowerState(void)
return SDL_POWERSTATE_ON_BATTERY;
}
-SDL_FORCE_INLINE int
-ReadStateFromPTMU(bool *is_plugged, u8 *is_charging)
+static int ReadStateFromPTMU(bool *is_plugged, u8 *is_charging)
{
if (R_FAILED(ptmuInit())) {
return SDL_SetError("Failed to initialise PTMU service");
diff --git a/src/power/psp/SDL_syspower.c b/src/power/psp/SDL_syspower.c
index 3825907..2811978 100644
--- a/src/power/psp/SDL_syspower.c
+++ b/src/power/psp/SDL_syspower.c
@@ -27,9 +27,7 @@
#include "SDL_power.h"
#include <psppower.h>
-SDL_bool
-SDL_GetPowerInfo_PSP(SDL_PowerState *state, int *seconds,
- int *percent)
+SDL_bool SDL_GetPowerInfo_PSP(SDL_PowerState *state, int *seconds, int *percent)
{
int battery = scePowerIsBatteryExist();
int plugged = scePowerIsPowerOnline();
diff --git a/src/power/uikit/SDL_syspower.m b/src/power/uikit/SDL_syspower.m
index e62033c..5b9076b 100644
--- a/src/power/uikit/SDL_syspower.m
+++ b/src/power/uikit/SDL_syspower.m
@@ -52,8 +52,7 @@ void SDL_UIKit_UpdateBatteryMonitoring(void)
}
#endif /* !TARGET_OS_TV */
-SDL_bool
-SDL_GetPowerInfo_UIKit(SDL_PowerState *state, int *seconds, int *percent)
+SDL_bool SDL_GetPowerInfo_UIKit(SDL_PowerState *state, int *seconds, int *percent)
{
#if TARGET_OS_TV
*state = SDL_POWERSTATE_NO_BATTERY;
diff --git a/src/power/vita/SDL_syspower.c b/src/power/vita/SDL_syspower.c
index 926fa44..6c28e92 100644
--- a/src/power/vita/SDL_syspower.c
+++ b/src/power/vita/SDL_syspower.c
@@ -27,9 +27,7 @@
#include "SDL_power.h"
#include <psp2/power.h>
-SDL_bool
-SDL_GetPowerInfo_VITA(SDL_PowerState *state, int *seconds,
- int *percent)
+SDL_bool SDL_GetPowerInfo_VITA(SDL_PowerState *state, int *seconds, int *percent)
{
int battery = 1;
int plugged = scePowerIsPowerOnline();
diff --git a/src/power/windows/SDL_syspower.c b/src/power/windows/SDL_syspower.c
index d110c24..f1d7d88 100644
--- a/src/power/windows/SDL_syspower.c
+++ b/src/power/windows/SDL_syspower.c
@@ -27,8 +27,7 @@
#include "SDL_power.h"
-SDL_bool
-SDL_GetPowerInfo_Windows(SDL_PowerState *state, int *seconds, int *percent)
+SDL_bool SDL_GetPowerInfo_Windows(SDL_PowerState *state, int *seconds, int *percent)
{
SYSTEM_POWER_STATUS status;
SDL_bool need_details = SDL_FALSE;
diff --git a/src/power/winrt/SDL_syspower.cpp b/src/power/winrt/SDL_syspower.cpp
index 8d3629c..2a46de7 100644
--- a/src/power/winrt/SDL_syspower.cpp
+++ b/src/power/winrt/SDL_syspower.cpp
@@ -26,8 +26,7 @@
#include "SDL_power.h"
extern "C"
-SDL_bool
-SDL_GetPowerInfo_WinRT(SDL_PowerState * state, int *seconds, int *percent)
+SDL_bool SDL_GetPowerInfo_WinRT(SDL_PowerState * state, int *seconds, int *percent)
{
/* TODO, WinRT: Battery info is available on at least one WinRT platform (Windows Phone 8). Implement SDL_GetPowerInfo_WinRT as appropriate. */
/* Notes:
diff --git a/src/render/SDL_render.c b/src/render/SDL_render.c
index 422e37a..5831b10 100644
--- a/src/render/SDL_render.c
+++ b/src/render/SDL_render.c
@@ -283,8 +283,7 @@ int SDL_RenderFlush(SDL_Renderer *renderer)
return FlushRenderCommands(renderer);
}
-void *
-SDL_AllocateRenderVertices(SDL_Renderer *renderer, const size_t numbytes, const size_t alignment, size_t *offset)
+void *SDL_AllocateRenderVertices(SDL_Renderer *renderer, const size_t numbytes, const size_t alignment, size_t *offset)
{
const size_t needed = renderer->vertex_data_used + numbytes + alignment;
const size_t current_offset = renderer->vertex_data_used;
@@ -934,8 +933,7 @@ static void SDL_CalculateSimulatedVSyncInterval(SDL_Renderer *renderer, SDL_Wind
}
#endif /* !SDL_RENDER_DISABLED */
-SDL_Renderer *
-SDL_CreateRenderer(SDL_Window *window, int index, Uint32 flags)
+SDL_Renderer *SDL_CreateRenderer(SDL_Window *window, int index, Uint32 flags)
{
#if !SDL_RENDER_DISABLED
SDL_Renderer *renderer = NULL;
@@ -1103,8 +1101,7 @@ error:
#endif
}
-SDL_Renderer *
-SDL_CreateSoftwareRenderer(SDL_Surface *surface)
+SDL_Renderer *SDL_CreateSoftwareRenderer(SDL_Surface *surface)
{
#if !SDL_RENDER_DISABLED && SDL_VIDEO_RENDER_SW
SDL_Renderer *renderer;
@@ -1133,14 +1130,12 @@ SDL_CreateSoftwareRenderer(SDL_Surface *surface)
#endif /* !SDL_RENDER_DISABLED */
}
-SDL_Renderer *
-SDL_GetRenderer(SDL_Window *window)
+SDL_Renderer *SDL_GetRenderer(SDL_Window *window)
{
return (SDL_Renderer *)SDL_GetWindowData(window, SDL_WINDOWRENDERDATA);
}
-SDL_Window *
-SDL_RenderGetWindow(SDL_Renderer *renderer)
+SDL_Window *SDL_RenderGetWindow(SDL_Renderer *renderer)
{
CHECK_RENDERER_MAGIC(renderer, NULL);
return renderer->window;
@@ -1239,8 +1234,7 @@ static SDL_ScaleMode SDL_GetScaleMode(void)
}
}
-SDL_Texture *
-SDL_CreateTexture(SDL_Renderer *renderer, Uint32 format, int access, int w, int h)
+SDL_Texture *SDL_CreateTexture(SDL_Renderer *renderer, Uint32 format, int access, int w, int h)
{
SDL_Texture *texture;
SDL_bool texture_is_fourcc_and_target;
@@ -1350,8 +1344,7 @@ SDL_CreateTexture(SDL_Renderer *renderer, Uint32 format, int access, int w, int
return texture;
}
-SDL_Texture *
-SDL_CreateTextureFromSurface(SDL_Renderer *renderer, SDL_Surface *surface)
+SDL_Texture *SDL_CreateTextureFromSurface(SDL_Renderer *renderer, SDL_Surface *surface)
{
const SDL_PixelFormat *fmt;
SDL_bool needAlpha;
@@ -1648,8 +1641,7 @@ int SDL_SetTextureUserData(SDL_Texture *texture, void *userdata)
return 0;
}
-void *
-SDL_GetTextureUserData(SDL_Texture *texture)
+void *SDL_GetTextureUserData(SDL_Texture *texture)
{
CHECK_TEXTURE_MAGIC(texture, NULL);
@@ -2173,8 +2165,7 @@ void SDL_UnlockTexture(SDL_Texture *texture)
texture->locked_surface = NULL;
}
-SDL_bool
-SDL_RenderTargetSupported(SDL_Renderer *renderer)
+SDL_bool SDL_RenderTargetSupported(SDL_Renderer *renderer)
{
if (renderer == NULL || !renderer->SetRenderTarget) {
return SDL_FALSE;
@@ -2261,8 +2252,7 @@ int SDL_SetRenderTarget(SDL_Renderer *renderer, SDL_Texture *texture)
return FlushRenderCommandsIfNotBatching(renderer);
}
-SDL_Texture *
-SDL_GetRenderTarget(SDL_Renderer *renderer)
+SDL_Texture *SDL_GetRenderTarget(SDL_Renderer *renderer)
{
CHECK_RENDERER_MAGIC(renderer, NULL);
@@ -2428,9 +2418,7 @@ int SDL_RenderSetIntegerScale(SDL_Renderer *renderer, SDL_bool enable)
return UpdateLogicalSize(renderer, SDL_TRUE);
}
-SDL_bool
- SDLCALL
- SDL_RenderGetIntegerScale(SDL_Renderer *renderer)
+SDL_bool SDL_RenderGetIntegerScale(SDL_Renderer *renderer)
{
CHECK_RENDERER_MAGIC(renderer, SDL_FALSE);
@@ -2515,8 +2503,7 @@ void SDL_RenderGetClipRect(SDL_Renderer *renderer, SDL_Rect *rect)
}
}
-SDL_bool
-SDL_RenderIsClipEnabled(SDL_Renderer *renderer)
+SDL_bool SDL_RenderIsClipEnabled(SDL_Renderer *renderer)
{
CHECK_RENDERER_MAGIC(renderer, SDL_FALSE)
return renderer->clipping_enabled;
@@ -4382,8 +4369,7 @@ int SDL_GL_UnbindTexture(SDL_Texture *texture)
return SDL_Unsupported();
}
-void *
-SDL_RenderGetMetalLayer(SDL_Renderer *renderer)
+void *SDL_RenderGetMetalLayer(SDL_Renderer *renderer)
{
CHECK_RENDERER_MAGIC(renderer, NULL);
@@ -4394,8 +4380,7 @@ SDL_RenderGetMetalLayer(SDL_Renderer *renderer)
return NULL;
}
-void *
-SDL_RenderGetMetalCommandEncoder(SDL_Renderer *renderer)
+void *SDL_RenderGetMetalCommandEncoder(SDL_Renderer *renderer)
{
CHECK_RENDERER_MAGIC(renderer, NULL);
@@ -4446,8 +4431,7 @@ static SDL_BlendMode SDL_GetLongBlendMode(SDL_BlendMode blendMode)
return blendMode;
}
-SDL_BlendMode
-SDL_ComposeCustomBlendMode(SDL_BlendFactor srcColorFactor, SDL_BlendFactor dstColorFactor,
+SDL_BlendMode SDL_ComposeCustomBlendMode(SDL_BlendFactor srcColorFactor, SDL_BlendFactor dstColorFactor,
SDL_BlendOperation colorOperation,
SDL_BlendFactor srcAlphaFactor, SDL_BlendFactor dstAlphaFactor,
SDL_BlendOperation alphaOperation)
@@ -4457,43 +4441,37 @@ SDL_ComposeCustomBlendMode(SDL_BlendFactor srcColorFactor, SDL_BlendFactor dstCo
return SDL_GetShortBlendMode(blendMode);
}
-SDL_BlendFactor
-SDL_GetBlendModeSrcColorFactor(SDL_BlendMode blendMode)
+SDL_BlendFactor SDL_GetBlendModeSrcColorFactor(SDL_BlendMode blendMode)
{
blendMode = SDL_GetLongBlendMode(blendMode);
return (SDL_BlendFactor)(((Uint32)blendMode >> 4) & 0xF);
}
-SDL_BlendFactor
-SDL_GetBlendModeDstColorFactor(SDL_BlendMode blendMode)
+SDL_BlendFactor SDL_GetBlendModeDstColorFactor(SDL_BlendMode blendMode)
{
blendMode = SDL_GetLongBlendMode(blendMode);
return (SDL_BlendFactor)(((Uint32)blendMode >> 8) & 0xF);
}
-SDL_BlendOperation
-SDL_GetBlendModeColorOperation(SDL_BlendMode blendMode)
+SDL_BlendOperation SDL_GetBlendModeColorOperation(SDL_BlendMode blendMode)
{
blendMode = SDL_GetLongBlendMode(blendMode);
return (SDL_BlendOperation)(((Uint32)blendMode >> 0) & 0xF);
}
-SDL_BlendFactor
-SDL_GetBlendModeSrcAlphaFactor(SDL_BlendMode blendMode)
+SDL_BlendFactor SDL_GetBlendModeSrcAlphaFactor(SDL_BlendMode blendMode)
{
blendMode = SDL_GetLongBlendMode(blendMode);
return (SDL_BlendFactor)(((Uint32)blendMode >> 20) & 0xF);
}
-SDL_BlendFactor
-SDL_GetBlendModeDstAlphaFactor(SDL_BlendMode blendMode)
+SDL_BlendFactor SDL_GetBlendModeDstAlphaFactor(SDL_BlendMode blendMode)
{
blendMode = SDL_GetLongBlendMode(blendMode);
return (SDL_BlendFactor)(((Uint32)blendMode >> 24) & 0xF);
}
-SDL_BlendOperation
-SDL_GetBlendModeAlphaOperation(SDL_BlendMode blendMode)
+SDL_BlendOperation SDL_GetBlendModeAlphaOperation(SDL_BlendMode blendMode)
{
blendMode = SDL_GetLongBlendMode(blendMode);
return (SDL_BlendOperation)(((Uint32)blendMode >> 16) & 0xF);
diff --git a/src/render/SDL_yuv_sw.c b/src/render/SDL_yuv_sw.c
index 198c415..c4385e2 100644
--- a/src/render/SDL_yuv_sw.c
+++ b/src/render/SDL_yuv_sw.c
@@ -28,8 +28,7 @@
#include "../video/SDL_yuv_c.h"
#include "SDL_cpuinfo.h"
-SDL_SW_YUVTexture *
-SDL_SW_CreateYUVTexture(Uint32 format, int w, int h)
+SDL_SW_YUVTexture *SDL_SW_CreateYUVTexture(Uint32 format, int w, int h)
{
SDL_SW_YUVTexture *swdata;
diff --git a/src/render/direct3d/SDL_render_d3d.c b/src/render/direct3d/SDL_render_d3d.c
index e995a38..5470a7d 100644
--- a/src/render/direct3d/SDL_render_d3d.c
+++ b/src/render/direct3d/SDL_render_d3d.c
@@ -1546,8 +1546,7 @@ static int D3D_SetVSync(SDL_Renderer *renderer, const int vsync)
return 0;
}
-SDL_Renderer *
-D3D_CreateRenderer(SDL_Window *window, Uint32 flags)
+SDL_Renderer *D3D_CreateRenderer(SDL_Window *window, Uint32 flags)
{
SDL_Renderer *renderer;
D3D_RenderData *data;
@@ -1736,8 +1735,7 @@ SDL_RenderDriver D3D_RenderDriver = {
#if defined(__WIN32__) || defined(__WINGDK__)
/* This function needs to always exist on Windows, for the Dynamic API. */
-IDirect3DDevice9 *
-SDL_RenderGetD3D9Device(SDL_Renderer *renderer)
+IDirect3DDevice9 *SDL_RenderGetD3D9Device(SDL_Renderer *renderer)
{
IDirect3DDevice9 *device = NULL;
diff --git a/src/render/direct3d11/SDL_render_d3d11.c b/src/render/direct3d11/SDL_render_d3d11.c
index a2f8b0e..06d6621 100644
--- a/src/render/direct3d11/SDL_render_d3d11.c
+++ b/src/render/direct3d11/SDL_render_d3d11.c
@@ -200,8 +200,7 @@ static const GUID SDL_IID_ID3D11DeviceContext1 = { 0xbb2c6faa, 0xb5fb, 0x4082, {
#pragma GCC diagnostic pop
#endif
-Uint32
-D3D11_DXGIFormatToSDLPixelFormat(DXGI_FORMAT dxgiFormat)
+Uint32 D3D11_DXGIFormatToSDLPixelFormat(DXGI_FORMAT dxgiFormat)
{
switch (dxgiFormat) {
case DXGI_FORMAT_B8G8R8A8_UNORM:
@@ -2300,8 +2299,7 @@ static int D3D11_SetVSync(SDL_Renderer *renderer, const int vsync)
}
#endif
-SDL_Renderer *
-D3D11_CreateRenderer(SDL_Window *window, Uint32 flags)
+SDL_Renderer *D3D11_CreateRenderer(SDL_Window *window, Uint32 flags)
{
SDL_Renderer *renderer;
D3D11_RenderData *data;
@@ -2413,8 +2411,7 @@ SDL_RenderDriver D3D11_RenderDriver = {
#if defined(__WIN32__) || defined(__WINGDK__)
/* This function needs to always exist on Windows, for the Dynamic API. */
-ID3D11Device *
-SDL_RenderGetD3D11Device(SDL_Renderer *renderer)
+ID3D11Device *SDL_RenderGetD3D11Device(SDL_Renderer *renderer)
{
ID3D11Device *device = NULL;
diff --git a/src/render/direct3d12/SDL_render_d3d12.c b/src/render/direct3d12/SDL_render_d3d12.c
index c32deaf..9e69cef 100644
--- a/src/render/direct3d12/SDL_render_d3d12.c
+++ b/src/render/direct3d12/SDL_render_d3d12.c
@@ -276,8 +276,7 @@ UINT D3D12_Align(UINT location, UINT alignment)
return (location + (alignment - 1)) & ~(alignment - 1);
}
-Uint32
-D3D12_DXGIFormatToSDLPixelFormat(DXGI_FORMAT dxgiFormat)
+Uint32 D3D12_DXGIFormatToSDLPixelFormat(DXGI_FORMAT dxgiFormat)
{
switch (dxgiFormat) {
case DXGI_FORMAT_B8G8R8A8_UNORM:
@@ -2949,8 +2948,7 @@ static int D3D12_SetVSync(SDL_Renderer *renderer, const int vsync)
return 0;
}
-SDL_Renderer *
-D3D12_CreateRenderer(SDL_Window *window, Uint32 flags)
+SDL_Renderer *D3D12_CreateRenderer(SDL_Window *window, Uint32 flags)
{
SDL_Renderer *renderer;
D3D12_RenderData *data;
diff --git a/src/render/metal/SDL_render_metal.m b/src/render/metal/SDL_render_metal.m
index ef3e8f7..c226560 100644
--- a/src/render/metal/SDL_render_metal.m
+++ b/src/render/metal/SDL_render_metal.m
@@ -159,8 +159,7 @@ typedef struct METAL_ShaderPipelines
@implementation METAL_TextureData
@end
-static int
-IsMetalAvailable(const SDL_SysWMinfo *syswm)
+static int IsMetalAvailable(const SDL_SysWMinfo *syswm)
{
if (syswm->subsystem != SDL_SYSWM_COCOA && syswm->subsystem != SDL_SYSWM_UIKIT) {
return SDL_SetError("Metal render target only supports Cocoa and UIKit video targets at the moment.");
@@ -179,8 +178,7 @@ IsMetalAvailable(const SDL_SysWMinfo *syswm)
static const MTLBlendOperation invalidBlendOperation = (MTLBlendOperation)0xFFFFFFFF;
static const MTLBlendFactor invalidBlendFactor = (MTLBlendFactor)0xFFFFFFFF;
-static MTLBlendOperation
-GetBlendOperation(SDL_BlendOperation operation)
+static MTLBlendOperation GetBlendOperation(SDL_BlendOperation operation)
{
switch (operation) {
case SDL_BLENDOPERATION_ADD: return MTLBlendOperationAdd;
@@ -192,8 +190,7 @@ GetBlendOperation(SDL_BlendOperation operation)
}
}
-static MTLBlendFactor
-GetBlendFactor(SDL_BlendFactor factor)
+static MTLBlendFactor GetBlendFactor(SDL_BlendFactor factor)
{
switch (factor) {
case SDL_BLENDFACTOR_ZERO: return MTLBlendFactorZero;
@@ -210,8 +207,7 @@ GetBlendFactor(SDL_BlendFactor factor)
}
}
-static NSString *
-GetVertexFunctionName(SDL_MetalVertexFunction function)
+static NSString *GetVertexFunctionName(SDL_MetalVertexFunction function)
{
switch (function) {
case SDL_METAL_VERTEX_SOLID: return @"SDL_Solid_vertex";
@@ -220,8 +216,7 @@ GetVertexFunctionName(SDL_MetalVertexFunction function)
}
}
-static NSString *
-GetFragmentFunctionName(SDL_MetalFragmentFunction function)
+static NSString *GetFragmentFunctionName(SDL_MetalFragmentFunction function)
{
switch (function) {
case SDL_METAL_FRAGMENT_SOLID: return @"SDL_Solid_fragment";
@@ -233,9 +228,7 @@ GetFragmentFunctionName(SDL_MetalFragmentFunction function)
}
}
-static id<MTLRenderPipelineState>
-MakePipelineState(METAL_RenderData *data, METAL_PipelineCache *cache,
- NSString *blendlabel, SDL_BlendMode blendmode)
+static id<MTLRenderPipelineState> MakePipelineState(METAL_RenderData *data, METAL_PipelineCache *cache, NSString *blendlabel, SDL_BlendMode blendmode)
{
MTLRenderPipelineDescriptor *mtlpipedesc;
MTLVertexDescriptor *vertdesc;
@@ -328,8 +321,7 @@ MakePipelineState(METAL_RenderData *data, METAL_PipelineCache *cache,
}
}
-static void
-MakePipelineCache(METAL_RenderData *data, METAL_PipelineCache *cache, const char *label,
+static void MakePipelineCache(METAL_RenderData *data, METAL_PipelineCache *cache, const char *label,
MTLPixelFormat rtformat, SDL_MetalVertexFunction vertfn, SDL_MetalFragmentFunction fragfn)
{
SDL_zerop(cache);
@@ -348,8 +340,7 @@ MakePipelineCache(METAL_RenderData *data, METAL_PipelineCache *cache, const char
MakePipelineState(data, cache, @" (blend=mul)", SDL_BLENDMODE_MUL);
}
-static void
-DestroyPipelineCache(METAL_PipelineCache *cache)
+static void DestroyPipelineCache(METAL_PipelineCache *cache)
{
if (cache != NULL) {
for (int i = 0; i < cache->count; i++) {
@@ -360,8 +351,7 @@ DestroyPipelineCache(METAL_PipelineCache *cache)
}
}
-void
-MakeShaderPipelines(METAL_RenderData *data, METAL_ShaderPipelines *pipelines, MTLPixelFormat rtformat)
+static void MakeShaderPipelines(METAL_RenderData *data, METAL_ShaderPipelines *pipelines, MTLPixelFormat rtformat)
{
SDL_zerop(pipelines);
@@ -374,8 +364,7 @@ MakeShaderPipelines(METAL_RenderData *data, METAL_ShaderPipelines *pipelines, MT
MakePipelineCache(data, &pipelines->caches[SDL_METAL_FRAGMENT_NV21], "SDL NV21 pipeline", rtformat, SDL_METAL_VERTEX_COPY, SDL_METAL_FRAGMENT_NV21);
}
-static METAL_ShaderPipelines *
-ChooseShaderPipelines(METAL_RenderData *data, MTLPixelFormat rtformat)
+static METAL_ShaderPipelines *ChooseShaderPipelines(METAL_RenderData *data, MTLPixelFormat rtformat)
{
METAL_ShaderPipelines *allpipelines = data.allpipelines;
int count = data.pipelinescount;
@@ -401,8 +390,7 @@ ChooseShaderPipelines(METAL_RenderData *data, MTLPixelFormat rtformat)
return &data.allpipelines[count];
}
-static void
-DestroyAllPipelines(METAL_ShaderPipelines *allpipelines, int count)
+static void DestroyAllPipelines(METAL_ShaderPipelines *allpipelines, int count)
{
if (allpipelines != NULL) {
for (int i = 0; i < count; i++) {
@@ -415,8 +403,7 @@ DestroyAllPipelines(METAL_ShaderPipelines *allpipelines, int count)
}
}
-static inline id<MTLRenderPipelineState>
-ChoosePipelineState(METAL_RenderData *data, METAL_ShaderPipelines *pipelines, SDL_MetalFragmentFunction fragfn, SDL_BlendMode blendmode)
+static inline id<MTLRenderPipelineState> ChoosePipelineState(METAL_RenderData *data, METAL_ShaderPipelines *pipelines, SDL_MetalFragmentFunction fragfn, SDL_BlendMode blendmode)
{
METAL_PipelineCache *cache = &pipelines->caches[fragfn];
@@ -429,8 +416,7 @@ ChoosePipelineState(METAL_RenderData *data, METAL_ShaderPipelines *pipelines, SD
return MakePipelineState(data, cache, [NSString stringWithFormat:@" (blend=custom 0x%x)", blendmode], blendmode);
}
-static SDL_bool
-METAL_ActivateRenderCommandEncoder(SDL_Renderer * renderer, MTLLoadAction load, MTLClearColor *clear_color, id<MTLBuffer> vertex_buffer)
+static SDL_bool METAL_ActivateRenderCommandEncoder(SDL_Renderer * renderer, MTLLoadAction load, MTLClearColor *clear_color, id<MTLBuffer> vertex_buffer)
{
METAL_RenderData *data = (__bridge METAL_RenderData *) renderer->driverdata;
@@ -497,13 +483,11 @@ METAL_ActivateRenderCommandEncoder(SDL_Renderer * renderer, MTLLoadAction load,
return SDL_TRUE;
}
-static void
-METAL_WindowEvent(SDL_Renderer * renderer, const SDL_WindowEvent *event)
+static void METAL_WindowEvent(SDL_Renderer * renderer, const SDL_WindowEvent *event)
{
}
-static int
-METAL_GetOutputSize(SDL_Renderer * renderer, int *w, int *h)
+static int METAL_GetOutputSize(SDL_Renderer * renderer, int *w, int *h)
{ @autoreleasepool {
METAL_RenderData *data = (__bridge METAL_RenderData *) renderer->driverdata;
if (w) {
@@ -515,8 +499,7 @@ METAL_GetOutputSize(SDL_Renderer * renderer, int *w, int *h)
return 0;
}}
-static SDL_bool
-METAL_SupportsBlendMode(SDL_Renderer * renderer, SDL_BlendMode blendMode)
+static SDL_bool METAL_SupportsBlendMode(SDL_Renderer * renderer, SDL_BlendMode blendMode)
{
SDL_BlendFactor srcColorFactor = SDL_GetBlendModeSrcColorFactor(blendMode);
SDL_BlendFactor srcAlphaFactor = SDL_GetBlendModeSrcAlphaFactor(blendMode);
@@ -536,8 +519,7 @@ METAL_SupportsBlendMode(SDL_Renderer * renderer, SDL_BlendMode blendMode)
return SDL_TRUE;
}
-static int
-METAL_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture)
+static int METAL_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture)
{ @autoreleasepool {
METAL_RenderData *data = (__bridge METAL_RenderData *) renderer->driverdata;
MTLPixelFormat pixfmt;
@@ -645,8 +627,7 @@ METAL_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture)
return 0;
}}
-static void
-METAL_UploadTextureData(id<MTLTexture> texture, SDL_Rect rect, int slice,
+static void METAL_UploadTextureData(id<MTLTexture> texture, SDL_Rect rect, int slice,
const void * pixels, int pitch)
{
[texture replaceRegion:MTLRegionMake2D(rect.x, rect.y, rect.w, rect.h)
@@ -657,8 +638,7 @@ METAL_UploadTextureData(id<MTLTexture> texture, SDL_Rect rect, int slice,
bytesPerImage:0];
}
-static MTLStorageMode
-METAL_GetStorageMode(id<MTLResource> resource)
+static MTLStorageMode METAL_GetStorageMode(id<MTLResource> resource)
{
/* iOS 8 does not have this method. */
if ([resource respondsToSelector:@selector(storageMode)]) {
@@ -667,8 +647,7 @@ METAL_GetStorageMode(id<MTLResource> resource)
return MTLStorageModeShared;
}
-static int
-METAL_UpdateTextureInternal(SDL_Renderer * renderer, METAL_TextureData *texturedata,
+static int METAL_UpdateTextureInternal(SDL_Renderer * renderer, METAL_TextureData *texturedata,
id<MTLTexture> texture, SDL_Rect rect, int slice,
const void * pixels, int pitch)
{
@@ -736,8 +715,7 @@ METAL_UpdateTextureInternal(SDL_Renderer * renderer, METAL_TextureData *textured
return 0;
}
-static int
-METAL_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture,
+static int METAL_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture,
const SDL_Rect * rect, const void *pixels, int pitch)
{ @autoreleasepool {
METAL_TextureData *texturedata = (__bridge METAL_TextureData *)texture->driverdata;
@@ -782,8 +760,7 @@ METAL_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture,
}}
#if SDL_HAVE_YUV
-static int
-METAL_UpdateTextureYUV(SDL_Renderer * renderer, SDL_Texture * texture,
+static int METAL_UpdateTextureYUV(SDL_Renderer * renderer, SDL_Texture * texture,
const SDL_Rect * rect,
const Uint8 *Yplane, int Ypitch,
const Uint8 *Uplane, int Upitch,
@@ -814,8 +791,7 @@ METAL_UpdateTextureYUV(SDL_Renderer * renderer, SDL_Texture * texture,
return 0;
}}
-static int
-METAL_UpdateTextureNV(SDL_Renderer * renderer, SDL_Texture * texture,
+static int METAL_UpdateTextureNV(SDL_Renderer * renderer, SDL_Texture * texture,
const SDL_Rect * rect,
const Uint8 *Yplane, int Ypitch,
const Uint8 *UVplane, int UVpitch)
@@ -842,8 +818,7 @@ METAL_UpdateTextureNV(SDL_Renderer * renderer, SDL_Texture * texture,
}}
#endif
-static int
-METAL_LockTexture(SDL_Renderer * renderer, SDL_Texture * texture,
+static int METAL_LockTexture(SDL_Renderer * renderer, SDL_Texture * texture,
const SDL_Rect * rect, void **pixels, int *pitch)
{ @autoreleasepool {
METAL_RenderData *data = (__bridge METAL_RenderData *) renderer->driverdata;
@@ -877,8 +852,7 @@ METAL_LockTexture(SDL_Renderer * renderer, SDL_Texture * texture,
return 0;
}}
-static void
-METAL_UnlockTexture(SDL_Renderer * renderer, SDL_Texture * texture)
+static void METAL_UnlockTexture(SDL_Renderer * renderer, SDL_Texture * texture)
{ @autoreleasepool {
METAL_RenderData *data = (__bridge METAL_RenderData *) renderer->driverdata;
METAL_TextureData *texturedata = (__bridge METAL_TextureData *)texture->driverdata;
@@ -961,8 +935,7 @@ METAL_UnlockTexture(SDL_Renderer * renderer, SDL_Texture * texture)
texturedata.hasdata = YES;
}}
-static void
-METAL_SetTextureScaleMode(SDL_Renderer * renderer, SDL_Texture * texture, SDL_ScaleMode scaleMode)
+static void METAL_SetTextureScaleMode(SDL_Renderer * renderer, SDL_Texture * texture, SDL_ScaleMode scaleMode)
{ @autoreleasepool {
METAL_RenderData *data = (__bridge METAL_RenderData *) renderer->driverdata;
METAL_TextureData *texturedata = (__bridge METAL_TextureData *)texture->driverdata;
@@ -974,8 +947,7 @@ METAL_SetTextureScaleMode(SDL_Renderer * renderer, SDL_Texture * texture, SDL_Sc
}
}}
-static int
-METAL_SetRenderTarget(SDL_Renderer * renderer, SDL_Texture * texture)
+static int METAL_SetRenderTarget(SDL_Renderer * renderer, SDL_Texture * texture)
{ @autoreleasepool {
METAL_RenderData *data = (__bridge METAL_RenderData *) renderer->driverdata;
@@ -996,8 +968,7 @@ METAL_SetRenderTarget(SDL_Renderer * renderer, SDL_Texture * texture)
}}
-static int
-METAL_QueueSetViewport(SDL_Renderer * renderer, SDL_RenderCommand *cmd)
+static int METAL_QueueSetViewport(SDL_Renderer * renderer, SDL_RenderCommand *cmd)
{
float projection[4][4]; /* Prepare an orthographic projection */
const int w = cmd->data.viewport.rect.w;
@@ -1021,8 +992,7 @@ METAL_QueueSetViewport(SDL_Renderer * renderer, SDL_RenderCommand *cmd)
return 0;
}
-static int
-METAL_QueueSetDrawColor(SDL_Renderer *renderer, SDL_RenderCommand *cmd)
+static int METAL_QueueSetDrawColor(SDL_Renderer *renderer, SDL_RenderCommand *cmd)
{
const size_t vertlen = sizeof(float) * 4;
float *verts = (float *) SDL_AllocateRenderVertices(renderer, vertlen, DEVICE_ALIGN(16), &cmd->data.color.first);
@@ -1040,8 +1010,7 @@ METAL_QueueSetDrawColor(SDL_Renderer *renderer, SDL_RenderCommand *cmd)
return 0;
}
-static int
-METAL_QueueDrawPoints(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL_FPoint * points, int count)
+static int METAL_QueueDrawPoints(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL_FPoint * points, int count)
{
const SDL_Color color = {
cmd->data.draw.r,
@@ -1065,8 +1034,7 @@ METAL_QueueDrawPoints(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL
return 0;
}
-static int
-METAL_QueueDrawLines(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL_FPoint * points, int count)
+static int METAL_QueueDrawLines(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL_FPoint * points, int count)
{
const SDL_Color color = {
cmd->data.draw.r,
@@ -1119,8 +1087,7 @@ METAL_QueueDrawLines(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL_
return 0;
}
-static int
-METAL_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *texture,
+static int METAL_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *texture,
const float *xy, int xy_stride, const SDL_Color *color, int color_stride, const float *uv, int uv_stride,
int num_vertices, const void *indices, int num_indices, int size_indices,
float scale_x, float scale_y)
@@ -1181,8 +1148,7 @@ typedef struct
size_t color_offset;
} METAL_DrawStateCache;
-static SDL_bool
-SetDrawState(SDL_Renderer *renderer, const SDL_RenderCommand *cmd, const SDL_MetalFragmentFunction shader,
+static SDL_bool SetDrawState(SDL_Renderer *renderer, const SDL_RenderCommand *cmd, const SDL_MetalFragmentFunction shader,
const size_t constants_offset, id<MTLBuffer> mtlbufvertex, METAL_DrawStateCache *statecache)
{
METAL_RenderData *data = (__bridge METAL_RenderData *) renderer->driverdata;
@@ -1262,8 +1228,7 @@ SetDrawState(SDL_Renderer *renderer, const SDL_RenderCommand *cmd, const SDL_Met
return SDL_TRUE;
}
-static SDL_bool
-SetCopyState(SDL_Renderer *renderer, const SDL_RenderCommand *cmd, const size_t constants_offset,
+static SDL_bool SetCopyState(SDL_Renderer *renderer, const SDL_RenderCommand *cmd, const size_t constants_offset,
id<MTLBuffer> mtlbufvertex, METAL_DrawStateCache *statecache)
{
METAL_RenderData *data = (__bridge METAL_RenderData *) renderer->driverdata;
@@ -1295,8 +1260,7 @@ SetCopyState(SDL_Renderer *renderer, const SDL_RenderCommand *cmd, const size_t
return SDL_TRUE;
}
-static int
-METAL_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *vertices, size_t vertsize)
+static int METAL_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *vertices, size_t vertsize)
{ @autoreleasepool {
METAL_RenderData *data = (__bridge METAL_RenderData *) renderer->driverdata;
id<MTLBuffer> mtlbufvertex = nil;
@@ -1437,8 +1401,7 @@ METAL_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *ver
return 0;
}}
-static int
-METAL_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect,
+static int METAL_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect,
Uint32 pixel_format, void * pixels, int pitch)
{ @autoreleasepool {
METAL_RenderData *data = (__bridge METAL_RenderData *) renderer->driverdata;
@@ -1490,8 +1453,7 @@ METAL_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect,
return status;
}}
-static int
-METAL_RenderPresent(SDL_Renderer * renderer)
+static int METAL_RenderPresent(SDL_Renderer * renderer)
{ @autoreleasepool {
METAL_RenderData *data = (__bridge METAL_RenderData *) renderer->driverdata;
SDL_bool ready = SDL_TRUE;
@@ -1528,15 +1490,13 @@ METAL_RenderPresent(SDL_Renderer * renderer)
return 0;
}}
-static void
-METAL_DestroyTexture(SDL_Renderer * renderer, SDL_Texture * texture)
+static void METAL_DestroyTexture(SDL_Renderer * renderer, SDL_Texture * texture)
{ @autoreleasepool {
CFBridgingRelease(texture->driverdata);
texture->driverdata = NULL;
}}
-static void
-METAL_DestroyRenderer(SDL_Renderer * renderer)
+static void METAL_DestroyRenderer(SDL_Renderer * renderer)
{ @autoreleasepool {
if (renderer->driverdata) {
METAL_RenderData *data = CFBridgingRelease(renderer->driverdata);
@@ -1557,15 +1517,13 @@ METAL_DestroyRenderer(SDL_Renderer * renderer)
SDL_free(renderer);
}}
-static void *
-METAL_GetMetalLayer(SDL_Renderer * renderer)
+static void *METAL_GetMetalLayer(SDL_Renderer * renderer)
{ @autoreleasepool {
METAL_RenderData *data = (__bridge METAL_RenderData *) renderer->driverdata;
return (__bridge void*)data.mtllayer;
}}
-static void *
-METAL_GetMetalCommandEncoder(SDL_Renderer * renderer)
+static void *METAL_GetMetalCommandEncoder(SDL_Renderer * renderer)
{ @autoreleasepool {
// note that data.mtlcmdencoder can be nil if METAL_ActivateRenderCommandEncoder fails.
// Before SDL 2.0.18, it might have returned a non-nil encoding that might not have been
@@ -1576,8 +1534,7 @@ METAL_GetMetalCommandEncoder(SDL_Renderer * renderer)
return (__bridge void*)data.mtlcmdencoder;
}}
-static int
-METAL_SetVSync(SDL_Renderer * renderer, const int vsync)
+static int METAL_SetVSync(SDL_Renderer * renderer, const int vsync)
{
#if (defined(__MACOSX__) && defined(MAC_OS_X_VERSION_10_13)) || TARGET_OS_MACCATALYST
if (@available(macOS 10.13, *)) {
@@ -1623,8 +1580,7 @@ static SDL_MetalView GetWindowView(SDL_Window *window)
return nil;
}
-static SDL_Renderer *
-METAL_CreateRenderer(SDL_Window * window, Uint32 flags)
+static SDL_Renderer *METAL_CreateRenderer(SDL_Window * window, Uint32 flags)
{ @autoreleasepool {
SDL_Renderer *renderer = NULL;
METAL_RenderData *data = NULL;
diff --git a/src/render/opengl/SDL_shaders_gl.c b/src/render/opengl/SDL_shaders_gl.c
index a1fa255..82b04ce 100644
--- a/src/render/opengl/SDL_shaders_gl.c
+++ b/src/render/opengl/SDL_shaders_gl.c
@@ -490,8 +490,7 @@ static void DestroyShaderProgram(GL_ShaderContext *ctx, GL_ShaderData *data)
ctx->glDeleteObjectARB(data->program);
}
-GL_ShaderContext *
-GL_CreateShaderContext(void)
+GL_ShaderContext *GL_CreateShaderContext(void)
{
GL_ShaderContext *ctx;
SDL_bool shaders_supported;
diff --git a/src/render/psp/SDL_render_psp.c b/src/render/psp/SDL_render_psp.c
index 4fb6a64..95a48d9 100644
--- a/src/render/psp/SDL_render_psp.c
+++ b/src/render/psp/SDL_render_psp.c
@@ -1291,8 +1291,7 @@ static int PSP_SetVSync(SDL_Renderer *renderer, const int vsync)
return 0;
}
-SDL_Renderer *
-PSP_CreateRenderer(SDL_Window *window, Uint32 flags)
+SDL_Renderer *PSP_CreateRenderer(SDL_Window *window, Uint32 flags)
{
SDL_Renderer *renderer;
diff --git a/src/render/software/SDL_render_sw.c b/src/render/software/SDL_render_sw.c
index e142909..3196844 100644
--- a/src/render/software/SDL_render_sw.c
+++ b/src/render/software/SDL_render_sw.c
@@ -986,8 +986,7 @@ static void SW_DestroyRenderer(SDL_Renderer *renderer)
SDL_free(renderer);
}
-SDL_Renderer *
-SW_CreateRendererForSurface(SDL_Surface *surface)
+SDL_Renderer *SW_CreateRendererForSurface(SDL_Surface *surface)
{
SDL_Renderer *renderer;
SW_RenderData *data;
diff --git a/src/render/software/SDL_rotate.c b/src/render/software/SDL_rotate.c
index 6ebc5e1..d51df2f 100644
--- a/src/render/software/SDL_rotate.c
+++ b/src/render/software/SDL_rotate.c
@@ -488,8 +488,7 @@ When using the NONE and MOD modes, color and alpha modulation must be applied be
*/
-SDL_Surface *
-SDLgfx_rotateSurface(SDL_Surface *src, double angle, int smooth, int flipx, int flipy,
+SDL_Surface *SDLgfx_rotateSurface(SDL_Surface *src, double angle, int smooth, int flipx, int flipy,
const SDL_Rect *rect_dest, double cangle, double sangle, const SDL_FPoint *center)
{
SDL_Surface *rz_dst;
diff --git a/src/render/vitagxm/SDL_render_vita_gxm.c b/src/render/vitagxm/SDL_render_vita_gxm.c
index cbe8b04..434a7e4 100644
--- a/src/render/vitagxm/SDL_render_vita_gxm.c
+++ b/src/render/vitagxm/SDL_render_vita_gxm.c
@@ -211,8 +211,7 @@ static int VITA_GXM_SetVSync(SDL_Renderer *renderer, const int vsync)
return 0;
}
-SDL_Renderer *
-VITA_GXM_CreateRenderer(SDL_Window *window, Uint32 flags)
+SDL_Renderer *VITA_GXM_CreateRenderer(SDL_Window *window, Uint32 flags)
{
SDL_Renderer *renderer;
VITA_GXM_RenderData *data;
diff --git a/src/render/vitagxm/SDL_render_vita_gxm_memory.c b/src/render/vitagxm/SDL_render_vita_gxm_memory.c
index 24e75ba..a5a4aac 100644
--- a/src/render/vitagxm/SDL_render_vita_gxm_memory.c
+++ b/src/render/vitagxm/SDL_render_vita_gxm_memory.c
@@ -25,8 +25,7 @@
#include "SDL_render_vita_gxm_memory.h"
-void *
-vita_mem_alloc(unsigned int type, unsigned int size, unsigned int alignment, unsigned int attribs, SceUID *uid)
+void *vita_mem_alloc(unsigned int type, unsigned int size, unsigned int alignment, unsigned int attribs, SceUID *uid)
{
void *mem;
@@ -63,8 +62,7 @@ void vita_mem_free(SceUID uid)
sceKernelFreeMemBlock(uid);
}
-void *
-vita_gpu_mem_alloc(VITA_GXM_RenderData *data, unsigned int size)
+void *vita_gpu_mem_alloc(VITA_GXM_RenderData *data, unsigned int size)
{
void *mem;
@@ -122,8 +120,7 @@ void vita_gpu_mem_destroy(VITA_GXM_RenderData *data)
}
}
-void *
-vita_mem_vertex_usse_alloc(unsigned int size, SceUID *uid, unsigned int *usse_offset)
+void *vita_mem_vertex_usse_alloc(unsigned int size, SceUID *uid, unsigned int *usse_offset)
{
void *mem = NULL;
@@ -150,8 +147,7 @@ void vita_mem_vertex_usse_free(SceUID uid)
sceKernelFreeMemBlock(uid);
}
-void *
-vita_mem_fragment_usse_alloc(unsigned int size, SceUID *uid, unsigned int *usse_offset)
+void *vita_mem_fragment_usse_alloc(unsigned int size, SceUID *uid, unsigned int *usse_offset)
{
void *mem = NULL;
diff --git a/src/render/vitagxm/SDL_render_vita_gxm_tools.c b/src/render/vitagxm/SDL_render_vita_gxm_tools.c
index 0e5cc46..772a703 100644
--- a/src/render/vitagxm/SDL_render_vita_gxm_tools.c
+++ b/src/render/vitagxm/SDL_render_vita_gxm_tools.c
@@ -81,8 +81,7 @@ static void patcher_host_free(void *user_data, void *mem)
SDL_free(mem);
}
-void *
-pool_malloc(VITA_GXM_RenderData *data, unsigned int size)
+void *pool_malloc(VITA_GXM_RenderData *data, unsigned int size)
{
if ((data->pool_index + size) < VITA_GXM_POOL_SIZE) {
@@ -94,8 +93,7 @@ pool_malloc(VITA_GXM_RenderData *data, unsigned int size)
return NULL;
}
-void *
-pool_memalign(VITA_GXM_RenderData *data, unsigned int size, unsigned int alignment)
+void *pool_memalign(VITA_GXM_RenderData *data, unsigned int size, unsigned int alignment)
{
unsigned int new_index = (data->pool_index + alignment - 1) & ~(alignment - 1);
if ((new_index + size) < VITA_GXM_POOL_SIZE) {
@@ -959,8 +957,7 @@ gxm_texture_get_format(const gxm_texture *texture)
return sceGxmTextureGetFormat(&texture->gxm_tex);
}
-void *
-gxm_texture_get_datap(const gxm_texture *texture)
+void *gxm_texture_get_datap(const gxm_texture *texture)
{
return sceGxmTextureGetData(&texture->gxm_tex);
}
@@ -985,8 +982,7 @@ static SceGxmColorFormat tex_format_to_color_format(SceGxmTextureFormat format)
}
}
-gxm_texture *
-create_gxm_texture(VITA_GXM_RenderData *data, unsigned int w, unsigned int h, SceGxmTextureFormat format, unsigned int isRenderTarget, unsigned int *return_w, unsigned int *return_h, unsigned int *return_pitch, float *return_wscale)
+gxm_texture *create_gxm_texture(VITA_GXM_RenderData *data, unsigned int w, unsigned int h, SceGxmTextureFormat format, unsigned int isRenderTarget, unsigned int *return_w, unsigned int *return_h, unsigned int *return_pitch, float *return_wscale)
{
gxm_texture *texture = SDL_calloc(1, sizeof(gxm_texture));
int aligned_w = ALIGN(w, 8);
diff --git a/src/stdlib/SDL_getenv.c b/src/stdlib/SDL_getenv.c
index e42a70c..466867a 100644
--- a/src/stdlib/SDL_getenv.c
+++ b/src/stdlib/SDL_getenv.c
@@ -168,8 +168,7 @@ int SDL_setenv(const char *name, const char *value, int overwrite)
/* Retrieve a variable named "name" from the environment */
#if defined(HAVE_GETENV)
-char *
-SDL_getenv(const char *name)
+char *SDL_getenv(const char *name)
{
#if defined(__ANDROID__)
/* Make sure variables from the application manifest are available */
@@ -184,8 +183,7 @@ SDL_getenv(const char *name)
return getenv(name);
}
#elif defined(__WIN32__) || defined(__WINGDK__)
-char *
-SDL_getenv(const char *name)
+char *SDL_getenv(const char *name)
{
size_t bufferlen;
@@ -211,8 +209,7 @@ SDL_getenv(const char *name)
return SDL_envmem;
}
#else
-char *
-SDL_getenv(const char *name)
+char *SDL_getenv(const char *name)
{
size_t len, i;
char *value;
diff --git a/src/stdlib/SDL_iconv.c b/src/stdlib/SDL_iconv.c
index 2c281e2..3ab535b 100644
--- a/src/stdlib/SDL_iconv.c
+++ b/src/stdlib/SDL_iconv.c
@@ -40,8 +40,7 @@
SDL_COMPILE_TIME_ASSERT(iconv_t, sizeof(iconv_t) <= sizeof(SDL_iconv_t));
-SDL_iconv_t
-SDL_iconv_open(const char *tocode, const char *fromcode)
+SDL_iconv_t SDL_iconv_open(const char *tocode, const char *fromcode)
{
return (SDL_iconv_t)((uintptr_t)iconv_open(tocode, fromcode));
}
@@ -51,8 +50,7 @@ int SDL_iconv_close(SDL_iconv_t cd)
return iconv_close((iconv_t)((uintptr_t)cd));
}
-size_t
-SDL_iconv(SDL_iconv_t cd,
+size_t SDL_iconv(SDL_iconv_t cd,
const char **inbuf, size_t *inbytesleft,
char **outbuf, size_t *outbytesleft)
{
@@ -196,8 +194,7 @@ static const char *getlocale(char *buffer, size_t bufsize)
return buffer;
}
-SDL_iconv_t
-SDL_iconv_open(const char *tocode, const char *fromcode)
+SDL_iconv_t SDL_iconv_open(const char *tocode, const char *fromcode)
{
int src_fmt = ENCODING_UNKNOWN;
int dst_fmt = ENCODING_UNKNOWN;
@@ -789,9 +786,7 @@ int SDL_iconv_close(SDL_iconv_t cd)
#endif /* !HAVE_ICONV */
-char *
-SDL_iconv_string(const char *tocode, const char *fromcode, const char *inbuf,
- size_t inbytesleft)
+char *SDL_iconv_string(const char *tocode, const char *fromcode, const char *inbuf, size_t inbytesleft)
{
SDL_iconv_t cd;
char *string;
diff --git a/src/stdlib/SDL_qsort.c b/src/stdlib/SDL_qsort.c
index 17180a9..5d1c7ef 100644
--- a/src/stdlib/SDL_qsort.c
+++ b/src/stdlib/SDL_qsort.c
@@ -28,8 +28,7 @@
#include "SDL_stdinc.h"
#if defined(HAVE_QSORT)
-void
-SDL_qsort(void *base, size_t nmemb, size_t size, int (*compare) (const void *, const void *))
+void SDL_qsort(void *base, size_t nmemb, size_t size, int (*compare) (const void *, const void *))
{
qsort(base, nmemb, size, compare);
}
@@ -534,8 +533,7 @@ extern void qsortG(void *base, size_t nmemb, size_t size,
#endif /* HAVE_QSORT */
-void *
-SDL_bsearch(const void *key, const void *base, size_t nmemb, size_t size, int (*compare)(const void *, const void *))
+void *SDL_bsearch(const void *key, const void *base, size_t nmemb, size_t size, int (*compare)(const void *, const void *))
{
#if defined(HAVE_BSEARCH)
return bsearch(key, base, nmemb, size, compare);
diff --git a/src/stdlib/SDL_stdlib.c b/src/stdlib/SDL_stdlib.c
index 9b4ff28..8c9d196 100644
--- a/src/stdlib/SDL_stdlib.c
+++ b/src/stdlib/SDL_stdlib.c
@@ -518,8 +518,7 @@ int SDL_tolower(int x) { return ((x) >= 'A') && ((x) <= 'Z') ? ('a' + ((x) - 'A'
/* This file contains a portable memcpy manipulation function for SDL */
-void *
-SDL_memcpy(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src, size_t len)
+void *SDL_memcpy(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src, size_t len)
{
#ifdef __GNUC__
/* Presumably this is well tuned for speed.
@@ -571,8 +570,7 @@ SDL_memcpy(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src,
#endif /* __GNUC__ */
}
-void *
-SDL_memset(SDL_OUT_BYTECAP(len) void *dst, int c, size_t len)
+void *SDL_memset(SDL_OUT_BYTECAP(len) void *dst, int c, size_t len)
{
#if defined(HAVE_MEMSET)
return memset(dst, c, len);
diff --git a/src/stdlib/SDL_string.c b/src/stdlib/SDL_string.c
index e5c5f15..d71f2da 100644
--- a/src/stdlib/SDL_string.c
+++ b/src/stdlib/SDL_string.c
@@ -55,8 +55,7 @@ static unsigned UTF8_TrailingBytes(unsigned char c)
}
#if !defined(HAVE_VSSCANF) || !defined(HAVE_STRTOL) || !defined(HAVE_STRTOUL) || !defined(HAVE_STRTOD)
-static size_t
-SDL_ScanLong(const char *text, int count, int radix, long *valuep)
+static size_t SDL_ScanLong(const char *text, int count, int radix, long *valuep)
{
const char *textstart = text;
long value = 0;
@@ -100,8 +99,7 @@ SDL_ScanLong(const char *text, int count, int radix, long *valuep)
#endif
#if !defined(HAVE_VSSCANF) || !defined(HAVE_STRTOUL) || !defined(HAVE_STRTOD)
-static size_t
-SDL_ScanUnsignedLong(const char *text, int count, int radix, unsigned long *valuep)
+static size_t SDL_ScanUnsignedLong(const char *text, int count, int radix, unsigned long *valuep)
{
const char *textstart = text;
unsigned long value = 0;
@@ -140,8 +138,7 @@ SDL_ScanUnsignedLong(const char *text, int count, int radix, unsigned long *valu
#endif
#ifndef HAVE_VSSCANF
-static size_t
-SDL_ScanUintPtrT(const char *text, int radix, uintptr_t *valuep)
+static size_t SDL_ScanUintPtrT(const char *text, int radix, uintptr_t *valuep)
{
const char *textstart = text;
uintptr_t value = 0;
@@ -172,8 +169,7 @@ SDL_ScanUintPtrT(const char *text, int radix, uintptr_t *valuep)
#endif
#if !defined(HAVE_VSSCANF) || !defined(HAVE_STRTOLL) || !defined(HAVE_STRTOULL)
-static size_t
-SDL_ScanLongLong(const char *text, int count, int radix, Sint64 *valuep)
+static size_t SDL_ScanLongLong(const char *text, int count, int radix, Sint64 *valuep)
{
const char *textstart = text;
Sint64 value = 0;
@@ -217,8 +213,7 @@ SDL_ScanLongLong(const char *text, int count, int radix, Sint64 *valuep)
#endif
#if !defined(HAVE_VSSCANF) || !defined(HAVE_STRTOULL)
-static size_t
-SDL_ScanUnsignedLongLong(const char *text, int count, int radix, Uint64 *valuep)
+static size_t SDL_ScanUnsignedLongLong(const char *text, int count, int radix, Uint64 *valuep)
{
const char *textstart = text;
Uint64 value = 0;
@@ -257,8 +252,7 @@ SDL_ScanUnsignedLongLong(const char *text, int count, int radix, Uint64 *valuep)
#endif
#if !defined(HAVE_VSSCANF) || !defined(HAVE_STRTOD)
-static size_t
-SDL_ScanFloat(const char *text, double *valuep)
+static size_t SDL_ScanFloat(const char *text, double *valuep)
{
const char *textstart = text;
unsigned long lvalue = 0;
@@ -292,8 +286,7 @@ SDL_ScanFloat(const char *text, double *valuep)
}
#endif
-void *
-SDL_memmove(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src, size_t len)
+void *SDL_memmove(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src, size_t len)
{
#if defined(HAVE_MEMMOVE)
return memmove(dst, src, len);
@@ -404,8 +397,7 @@ SDL_wcslcat(SDL_INOUT_Z_CAP(maxlen) wchar_t *dst, const wchar_t *src, size_t max
#endif /* HAVE_WCSLCAT */
}
-wchar_t *
-SDL_wcsdup(const wchar_t *string)
+wchar_t *SDL_wcsdup(const wchar_t *string)
{
size_t len = ((SDL_wcslen(string) + 1) * sizeof(wchar_t));
wchar_t *newstr = (wchar_t *)SDL_malloc(len);
@@ -415,8 +407,7 @@ SDL_wcsdup(const wchar_t *string)
return newstr;
}
-wchar_t *
-SDL_wcsstr(const wchar_t *haystack, const wchar_t *needle)
+wchar_t *SDL_wcsstr(const wchar_t *haystack, const wchar_t *needle)
{
#if defined(HAVE_WCSSTR)
return SDL_const_cast(wchar_t *, wcsstr(haystack, needle));
@@ -645,8 +636,7 @@ SDL_strlcat(SDL_INOUT_Z_CAP(maxlen) char *dst, const char *src, size_t maxlen)
#endif /* HAVE_STRLCAT */
}
-char *
-SDL_strdup(const char *string)
+char *SDL_strdup(const char *string)
{
size_t len = SDL_strlen(string) + 1;
char *newstr = (char *)SDL_malloc(len);
@@ -656,8 +646,7 @@ SDL_strdup(const char *string)
return newstr;
}
-char *
-SDL_strrev(char *string)
+char *SDL_strrev(char *string)
{
#if defined(HAVE__STRREV)
return _strrev(string);
@@ -675,8 +664,7 @@ SDL_strrev(char *string)
#endif /* HAVE__STRREV */
}
-char *
-SDL_strupr(char *string)
+char *SDL_strupr(char *string)
{
#if defined(HAVE__STRUPR)
return _strupr(string);
@@ -690,8 +678,7 @@ SDL_strupr(char *string)
#endif /* HAVE__STRUPR */
}
-char *
-SDL_strlwr(char *string)
+char *SDL_strlwr(char *string)
{
#if defined(HAVE__STRLWR)
return _strlwr(string);
@@ -705,8 +692,7 @@ SDL_strlwr(char *string)
#endif /* HAVE__STRLWR */
}
-char *
-SDL_strchr(const char *string, int c)
+char *SDL_strchr(const char *string, int c)
{
#ifdef HAVE_STRCHR
return SDL_const_cast(char *, strchr(string, c));
@@ -726,8 +712,7 @@ SDL_strchr(const char *string, int c)
#endif /* HAVE_STRCHR */
}
-char *
-SDL_strrchr(const char *string, int c)
+char *SDL_strrchr(const char *string, int c)
{
#ifdef HAVE_STRRCHR
return SDL_const_cast(char *, strrchr(string, c));
@@ -745,8 +730,7 @@ SDL_strrchr(const char *string, int c)
#endif /* HAVE_STRRCHR */
}
-char *
-SDL_strstr(const char *haystack, const char *needle)
+char *SDL_strstr(const char *haystack, const char *needle)
{
#if defined(HAVE_STRSTR)
return SDL_const_cast(char *, strstr(haystack, needle));
@@ -762,8 +746,7 @@ SDL_strstr(const char *haystack, const char *needle)
#endif /* HAVE_STRSTR */
}
-char *
-SDL_strcasestr(const char *haystack, const char *needle)
+char *SDL_strcasestr(const char *haystack, const char *needle)
{
#if defined(HAVE_STRCASESTR)
return SDL_const_cast(char *, strcasestr(haystack, needle));
@@ -789,8 +772,7 @@ static const char ntoa_table[] = {
};
#endif /* ntoa() conversion table */
-char *
-SDL_itoa(int value, char *string, int radix)
+char *SDL_itoa(int value, char *string, int radix)
{
#ifdef HAVE_ITOA
return itoa(value, string, radix);
@@ -799,8 +781,7 @@ SDL_itoa(int value, char *string, int radix)
#endif /* HAVE_ITOA */
}
-char *
-SDL_uitoa(unsigned int value, char *string, int radix)
+char *SDL_uitoa(unsigned int value, char *string, int radix)
{
#ifdef HAVE__UITOA
return _uitoa(value, string, radix);
@@ -809,8 +790,7 @@ SDL_uitoa(unsigned int value, char *string, int radix)
#endif /* HAVE__UITOA */
}
-char *
-SDL_ltoa(long value, char *string, int radix)
+char *SDL_ltoa(long value, char *string, int radix)
{
#if defined(HAVE__LTOA)
return _ltoa(value, string, radix);
@@ -828,8 +808,7 @@ SDL_ltoa(long value, char *string, int radix)
#endif /* HAVE__LTOA */
}
-char *
-SDL_ultoa(unsigned long value, char *string, int radix)
+char *SDL_ultoa(unsigned long value, char *string, int radix)
{
#if defined(HAVE__ULTOA)
return _ultoa(value, string, radix);
@@ -853,8 +832,7 @@ SDL_ultoa(unsigned long value, char *string, int radix)
#endif /* HAVE__ULTOA */
}
-char *
-SDL_lltoa(Sint64 value, char *string, int radix)
+char *SDL_lltoa(Sint64 value, char *string, int radix)
{
#if defined(HAVE__I64TOA)
return _i64toa(value, string, radix);
@@ -872,8 +850,7 @@ SDL_lltoa(Sint64 value, char *string, int radix)
#endif /* HAVE__I64TOA */
}
-char *
-SDL_ulltoa(Uint64 value, char *string, int radix)
+char *SDL_ulltoa(Uint64 value, char *string, int radix)
{
#if defined(HAVE__UI64TOA)
return _ui64toa(value, string, radix);
@@ -964,8 +941,7 @@ SDL_strtoul(const char *string, char **endp, int base)
#endif /* HAVE_STRTOUL */
}
-Sint64
-SDL_strtoll(const char *string, char **endp, int base)
+Sint64 SDL_strtoll(const char *string, char **endp, int base)
{
#if defined(HAVE_STRTOLL)
return strtoll(string, endp, base);
@@ -989,8 +965,7 @@ SDL_strtoll(const char *string, char **endp, int base)
#endif /* HAVE_STRTOLL */
}
-Uint64
-SDL_strtoull(const char *string, char **endp, int base)
+Uint64 SDL_strtoull(const char *string, char **endp, int base)
{
#if defined(HAVE_STRTOULL)
return strtoull(string, endp, base);
@@ -1491,8 +1466,7 @@ typedef struct
int precision;
} SDL_FormatInfo;
-static size_t
-SDL_PrintString(char *text, size_t maxlen, SDL_FormatInfo *info, const char *string)
+static size_t SDL_PrintString(char *text, size_t maxlen, SDL_FormatInfo *info, const char *string)
{
size_t length = 0;
size_t slen, sz;
@@ -1577,8 +1551,7 @@ static void SDL_IntPrecisionAdjust(char *num, size_t maxlen, SDL_FormatInfo *inf
}
}
-static size_t
-SDL_PrintLong(char *text, size_t maxlen, SDL_FormatInfo *info, long value)
+static size_t SDL_PrintLong(char *text, size_t maxlen, SDL_FormatInfo *info, long value)
{
char num[130], *p = num;
@@ -1591,8 +1564,7 @@ SDL_PrintLong(char *text, size_t maxlen, SDL_FormatInfo *info, long value)
return SDL_PrintString(text, maxlen, info, num);
}
-static size_t
-SDL_PrintUnsignedLong(char *text, size_t maxlen, SDL_FormatInfo *info, unsigned long value)
+static size_t SDL_PrintUnsignedLong(char *text, size_t maxlen, SDL_FormatInfo *info, unsigned long value)
{
char num[130];
@@ -1601,8 +1573,7 @@ SDL_PrintUnsignedLong(char *text, size_t maxlen, SDL_FormatInfo *info, unsigned
return SDL_PrintString(text, maxlen, info, num);
}
-static size_t
-SDL_PrintLongLong(char *text, size_t maxlen, SDL_FormatInfo *info, Sint64 value)
+static size_t SDL_PrintLongLong(char *text, size_t maxlen, SDL_FormatInfo *info, Sint64 value)
{
char num[130], *p = num;
@@ -1615,8 +1586,7 @@ SDL_PrintLongLong(char *text, size_t maxlen, SDL_FormatInfo *info, Sint64 value)
return SDL_PrintString(text, maxlen, info, num);
}
-static size_t
-SDL_PrintUnsignedLongLong(char *text, size_t maxlen, SDL_FormatInfo *info, Uint64 value)
+static size_t SDL_PrintUnsignedLongLong(char *text, size_t maxlen, SDL_FormatInfo *info, Uint64 value)
{
char num[130];
@@ -1625,8 +1595,7 @@ SDL_PrintUnsignedLongLong(char *text, size_t maxlen, SDL_FormatInfo *info, Uint6
return SDL_PrintString(text, maxlen, info, num);
}
-static size_t
-SDL_PrintFloat(char *text, size_t maxlen, SDL_FormatInfo *info, double arg)
+static size_t SDL_PrintFloat(char *text, size_t maxlen, SDL_FormatInfo *info, double arg)
{
size_t length = 0;
diff --git a/src/test/SDL_test_common.c b/src/test/SDL_test_common.c
index b06ca72..8781cc5 100644
--- a/src/test/SDL_test_common.c
+++ b/src/test/SDL_test_common.c
@@ -58,8 +58,7 @@ static void SDL_snprintfcat(SDL_OUT_Z_CAP(maxlen) char *text, size_t maxlen, SDL
va_end(ap);
}
-SDLTest_CommonState *
-SDLTest_CommonCreateState(char **argv, Uint32 flags)
+SDLTest_CommonState *SDLTest_CommonCreateState(char **argv, Uint32 flags)
{
int i;
SDLTest_CommonState *state;
@@ -630,8 +629,7 @@ static char *common_usage_video = NULL;
static char *common_usage_audio = NULL;
static char *common_usage_videoaudio = NULL;
-const char *
-SDLTest_CommonUsage(SDLTest_CommonState *state)
+const char *SDLTest_CommonUsage(SDLTest_CommonState *state)
{
switch (state->flags & (SDL_INIT_VIDEO | SDL_INIT_AUDIO)) {
@@ -646,8 +644,7 @@ SDLTest_CommonUsage(SDLTest_CommonState *state)
}
}
-SDL_bool
-SDLTest_CommonDefaultArgs(SDLTest_CommonState *state, const int argc, char **argv)
+SDL_bool SDLTest_CommonDefaultArgs(SDLTest_CommonState *state, const int argc, char **argv)
{
int i = 1;
while (i < argc) {
@@ -1052,8 +1049,7 @@ static SDL_HitTestResult SDLCALL SDLTest_ExampleHitTestCallback(SDL_Window *win,
return SDL_HITTEST_NORMAL;
}
-SDL_bool
-SDLTest_CommonInit(SDLTest_CommonState *state)
+SDL_bool SDLTest_CommonInit(SDLTest_CommonState *state)
{
int i, j, m, n, w, h;
SDL_DisplayMode fullscreen_mode;
diff --git a/src/test/SDL_test_fuzzer.c b/src/test/SDL_test_fuzzer.c
index 1c79b99..b59cbb3 100644
--- a/src/test/SDL_test_fuzzer.c
+++ b/src/test/SDL_test_fuzzer.c
@@ -87,40 +87,35 @@ Sint8 SDLTest_RandomSint8()
return (Sint8)SDLTest_RandomInt(&rndContext) & 0x000000FF;
}
-Uint16
-SDLTest_RandomUint16()
+Uint16 SDLTest_RandomUint16()
{
fuzzerInvocationCounter++;
return (Uint16)SDLTest_RandomInt(&rndContext) & 0x0000FFFF;
}
-Sint16
-SDLTest_RandomSint16()
+Sint16 SDLTest_RandomSint16()
{
fuzzerInvocationCounter++;
return (Sint16)SDLTest_RandomInt(&rndContext) & 0x0000FFFF;
}
-Sint32
-SDLTest_RandomSint32()
+Sint32 SDLTest_RandomSint32()
{
fuzzerInvocationCounter++;
return (Sint32)SDLTest_RandomInt(&rndContext);
}
-Uint32
-SDLTest_RandomUint32()
+Uint32 SDLTest_RandomUint32()
{
fuzzerInvocationCounter++;
return (Uint32)SDLTest_RandomInt(&rndContext);
}
-Uint64
-SDLTest_RandomUint64()
+Uint64 SDLTest_RandomUint64()
{
union
{
@@ -137,8 +132,7 @@ SDLTest_RandomUint64()
return value.v64;
}
-Sint64
-SDLTest_RandomSint64()
+Sint64 SDLTest_RandomSint64()
{
union
{
@@ -155,8 +149,7 @@ SDLTest_RandomSint64()
return (Sint64)value.v64;
}
-Sint32
-SDLTest_RandomIntegerInRange(Sint32 pMin, Sint32 pMax)
+Sint32 SDLTest_RandomIntegerInRange(Sint32 pMin, Sint32 pMax)
{
Sint64 min = pMin;
Sint64 max = pMax;
@@ -270,8 +263,7 @@ Uint8 SDLTest_RandomUint8BoundaryValue(Uint8 boundary1, Uint8 boundary2, SDL_boo
validDomain);
}
-Uint16
-SDLTest_RandomUint16BoundaryValue(Uint16 boundary1, Uint16 boundary2, SDL_bool validDomain)
+Uint16 SDLTest_RandomUint16BoundaryValue(Uint16 boundary1, Uint16 boundary2, SDL_bool validDomain)
{
/* max value for Uint16 */
const Uint64 maxValue = USHRT_MAX;
@@ -280,8 +272,7 @@ SDLTest_RandomUint16BoundaryValue(Uint16 boundary1, Uint16 boundary2, SDL_bool v
validDomain);
}
-Uint32
-SDLTest_RandomUint32BoundaryValue(Uint32 boundary1, Uint32 boundary2, SDL_bool validDomain)
+Uint32 SDLTest_RandomUint32BoundaryValue(Uint32 boundary1, Uint32 boundary2, SDL_bool validDomain)
{
/* max value for Uint32 */
#if ((ULONG_MAX) == (UINT_MAX))
@@ -294,8 +285,7 @@ SDLTest_RandomUint32BoundaryValue(Uint32 boundary1, Uint32 boundary2, SDL_bool v
validDomain);
}
-Uint64
-SDLTest_RandomUint64BoundaryValue(Uint64 boundary1, Uint64 boundary2, SDL_bool validDomain)
+Uint64 SDLTest_RandomUint64BoundaryValue(Uint64 boundary1, Uint64 boundary2, SDL_bool validDomain)
{
/* max value for Uint64 */
const Uint64 maxValue = UINT64_MAX;
@@ -400,8 +390,7 @@ Sint8 SDLTest_RandomSint8BoundaryValue(Sint8 boundary1, Sint8 boundary2, SDL_boo
validDomain);
}
-Sint16
-SDLTest_RandomSint16BoundaryValue(Sint16 boundary1, Sint16 boundary2, SDL_bool validDomain)
+Sint16 SDLTest_RandomSint16BoundaryValue(Sint16 boundary1, Sint16 boundary2, SDL_bool validDomain)
{
/* min & max values for Sint16 */
const Sint64 maxValue = SHRT_MAX;
@@ -411,8 +400,7 @@ SDLTest_RandomSint16BoundaryValue(Sint16 boundary1, Sint16 boundary2, SDL_bool v
validDomain);
}
-Sint32
-SDLTest_RandomSint32BoundaryValue(Sint32 boundary1, Sint32 boundary2, SDL_bool validDomain)
+Sint32 SDLTest_RandomSint32BoundaryValue(Sint32 boundary1, Sint32 boundary2, SDL_bool validDomain)
{
/* min & max values for Sint32 */
#if ((ULONG_MAX) == (UINT_MAX))
@@ -427,8 +415,7 @@ SDLTest_RandomSint32BoundaryValue(Sint32 boundary1, Sint32 boundary2, SDL_bool v
validDomain);
}
-Sint64
-SDLTest_RandomSint64BoundaryValue(Sint64 boundary1, Sint64 boundary2, SDL_bool validDomain)
+Sint64 SDLTest_RandomSint64BoundaryValue(Sint64 boundary1, Sint64 boundary2, SDL_bool validDomain)
{
/* min & max values for Sint64 */
const Sint64 maxValue = INT64_MAX;
@@ -469,14 +456,12 @@ SDLTest_RandomDouble()
return r;
}
-char *
-SDLTest_RandomAsciiString()
+char *SDLTest_RandomAsciiString()
{
return SDLTest_RandomAsciiStringWithMaximumLength(255);
}
-char *
-SDLTest_RandomAsciiStringWithMaximumLength(int maxLength)
+char *SDLTest_RandomAsciiStringWithMaximumLength(int maxLength)
{
int size;
@@ -490,8 +475,7 @@ SDLTest_RandomAsciiStringWithMaximumLength(int maxLength)
return SDLTest_RandomAsciiStringOfSize(size);
}
-char *
-SDLTest_RandomAsciiStringOfSize(int size)
+char *SDLTest_RandomAsciiStringOfSize(int size)
{
char *string;
int counter;
diff --git a/src/test/SDL_test_harness.c b/src/test/SDL_test_harness.c
index 2ce1c16..6141513 100644
--- a/src/test/SDL_test_harness.c
+++ b/src/test/SDL_test_harness.c
@@ -50,8 +50,7 @@ static Uint32 SDLTest_TestCaseTimeout = 3600;
*
* \returns The generated seed string
*/
-char *
-SDLTest_GenerateRunSeed(const int length)
+char *SDLTest_GenerateRunSeed(const int length)
{
char *seed = NULL;
SDLTest_RandomContext randomContext;
diff --git a/src/test/SDL_test_log.c b/src/test/SDL_test_log.c
index fd48b3c..d69e3da 100644
--- a/src/test/SDL_test_log.c
+++ b/src/test/SDL_test_log.c
@@ -43,8 +43,7 @@
/* work around compiler warning on older GCCs. */
#if (defined(__GNUC__) && (__GNUC__ <= 2))
-static size_t
-strftime_gcc2_workaround(char *s, size_t max, const char *fmt, const struct tm *tm)
+static size_t strftime_gcc2_workaround(char *s, size_t max, const char *fmt, const struct tm *tm)
{
return strftime(s, max, fmt, tm);
}
diff --git a/src/thread/SDL_thread.c b/src/thread/SDL_thread.c
index 6b26fa1..aa8e2b1 100644
--- a/src/thread/SDL_thread.c
+++ b/src/thread/SDL_thread.c
@@ -28,15 +28,13 @@
#include "SDL_hints.h"
#include "../SDL_error_c.h"
-SDL_TLSID
-SDL_TLSCreate()
+SDL_TLSID SDL_TLSCreate()
{
static SDL_atomic_t SDL_tls_id;
return SDL_AtomicIncRef(&SDL_tls_id) + 1;
}
-void *
-SDL_TLSGet(SDL_TLSID id)
+void *SDL_TLSGet(SDL_TLSID id)
{
SDL_TLSData *storage;
@@ -115,8 +113,7 @@ typedef struct SDL_TLSEntry
static SDL_mutex *SDL_generic_TLS_mutex;
static SDL_TLSEntry *SDL_generic_TLS;
-SDL_TLSData *
-SDL_Generic_GetTLSData(void)
+SDL_TLSData *SDL_Generic_GetTLSData(void)
{
SDL_threadID thread = SDL_ThreadID();
SDL_TLSEntry *entry;
@@ -218,8 +215,7 @@ static void SDLCALL SDL_FreeErrBuf(void *data)
#endif
/* Routine to get the thread-specific error variable */
-SDL_error *
-SDL_GetErrBuf(void)
+SDL_error *SDL_GetErrBuf(void)
{
#if SDL_THREADS_DISABLED
return SDL_GetStaticErrBuf();
@@ -320,14 +316,12 @@ void SDL_RunThread(SDL_Thread *thread)
#endif
#ifdef SDL_PASSED_BEGINTHREAD_ENDTHREAD
-SDL_Thread *
-SDL_CreateThreadWithStackSize(int(SDLCALL *fn)(void *),
+SDL_Thread *SDL_CreateThreadWithStackSize(int(SDLCALL *fn)(void *),
const char *name, const size_t stacksize, void *data,
pfnSDL_CurrentBeginThread pfnBeginThread,
pfnSDL_CurrentEndThread pfnEndThread)
#else
-SDL_Thread *
-SDL_CreateThreadWithStackSize(int(SDLCALL *fn)(void *),
+SDL_Thread *SDL_CreateThreadWithStackSize(int(SDLCALL *fn)(void *),
const char *name, const size_t stacksize, void *data)
#endif
{
@@ -375,14 +369,12 @@ SDL_CreateThreadWithStackSize(int(SDLCALL *fn)(void *),
}
#ifdef SDL_PASSED_BEGINTHREAD_ENDTHREAD
-DECLSPEC SDL_Thread *SDLCALL
-SDL_CreateThread(int(SDLCALL *fn)(void *),
+DECLSPEC SDL_Thread *SDLCALL SDL_CreateThread(int(SDLCALL *fn)(void *),
const char *name, void *data,
pfnSDL_CurrentBeginThread pfnBeginThread,
pfnSDL_CurrentEndThread pfnEndThread)
#else
-DECLSPEC SDL_Thread *SDLCALL
-SDL_CreateThread(int(SDLCALL *fn)(void *),
+DECLSPEC SDL_Thread *SDLCALL SDL_CreateThread(int(SDLCALL *fn)(void *),
const char *name, void *data)
#endif
{
@@ -408,8 +400,7 @@ SDL_CreateThread(int(SDLCALL *fn)(void *),
#endif
}
-SDL_Thread *
-SDL_CreateThreadInternal(int(SDLCALL *fn)(void *), const char *name,
+SDL_Thread *SDL_CreateThreadInternal(int(SDLCALL *fn)(void *), const char *name,
const size_t stacksize, void *data)
{
#ifdef SDL_PASSED_BEGINTHREAD_ENDTHREAD
@@ -419,8 +410,7 @@ SDL_CreateThreadInternal(int(SDLCALL *fn)(void *), const char *name,
#endif
}
-SDL_threadID
-SDL_GetThreadID(SDL_Thread *thread)
+SDL_threadID SDL_GetThreadID(SDL_Thread *thread)
{
SDL_threadID id;
@@ -432,8 +422,7 @@ SDL_GetThreadID(SDL_Thread *thread)
return id;
}
-const char *
-SDL_GetThreadName(SDL_Thread *thread)
+const char *SDL_GetThreadName(SDL_Thread *thread)
{
if (thread) {
return thread->name;
diff --git a/src/thread/generic/SDL_syscond.c b/src/thread/generic/SDL_syscond.c
index 25ead4c..a192929 100644
--- a/src/thread/generic/SDL_syscond.c
+++ b/src/thread/generic/SDL_syscond.c
@@ -53,8 +53,7 @@ typedef struct SDL_cond_generic
} SDL_cond_generic;
/* Create a condition variable */
-SDL_cond *
-SDL_CreateCond_generic(void)
+SDL_cond *SDL_CreateCond_generic(void)
{
SDL_cond_generic *cond;
diff --git a/src/thread/generic/SDL_sysmutex.c b/src/thread/generic/SDL_sysmutex.c
index 5f44a60..daafbb6 100644
--- a/src/thread/generic/SDL_sysmutex.c
+++ b/src/thread/generic/SDL_sysmutex.c
@@ -33,8 +33,7 @@ struct SDL_mutex
};
/* Create a mutex */
-SDL_mutex *
-SDL_CreateMutex(void)
+SDL_mutex *SDL_CreateMutex(void)
{
SDL_mutex *mutex;
diff --git a/src/thread/generic/SDL_syssem.c b/src/thread/generic/SDL_syssem.c
index d038091..fc9794e 100644
--- a/src/thread/generic/SDL_syssem.c
+++ b/src/thread/generic/SDL_syssem.c
@@ -28,8 +28,7 @@
#if SDL_THREADS_DISABLED
-SDL_sem *
-SDL_CreateSemaphore(Uint32 initial_value)
+SDL_sem *SDL_CreateSemaphore(Uint32 initial_value)
{
SDL_SetError("SDL not built with thread support");
return (SDL_sem *)0;
@@ -54,8 +53,7 @@ int SDL_SemWait(SDL_sem *sem)
return SDL_SetError("SDL not built with thread support");
}
-Uint32
-SDL_SemValue(SDL_sem *sem)
+Uint32 SDL_SemValue(SDL_sem *sem)
{
return 0;
}
@@ -75,8 +73,7 @@ struct SDL_semaphore
SDL_cond *count_nonzero;
};
-SDL_sem *
-SDL_CreateSemaphore(Uint32 initial_value)
+SDL_sem *SDL_CreateSemaphore(Uint32 initial_value)
{
SDL_sem *sem;
@@ -172,8 +169,7 @@ int SDL_SemWait(SDL_sem *sem)
return SDL_SemWaitTimeout(sem, SDL_MUTEX_MAXWAIT);
}
-Uint32
-SDL_SemValue(SDL_sem *sem)
+Uint32 SDL_SemValue(SDL_sem *sem)
{
Uint32 value;
diff --git a/src/thread/generic/SDL_systhread.c b/src/thread/generic/SDL_systhread.c
index cc1c8e9..98c5d65 100644
--- a/src/thread/generic/SDL_systhread.c
+++ b/src/thread/generic/SDL_systhread.c
@@ -41,8 +41,7 @@ void SDL_SYS_SetupThread(const char *name)
return;
}
-SDL_threadID
-SDL_ThreadID(void)
+SDL_threadID SDL_ThreadID(void)
{
return 0;
}
diff --git a/src/thread/generic/SDL_systls.c b/src/thread/generic/SDL_systls.c
index 2e8961e..612ad37 100644
--- a/src/thread/generic/SDL_systls.c
+++ b/src/thread/generic/SDL_systls.c
@@ -22,8 +22,7 @@
#include "../../SDL_internal.h"
#include "../SDL_thread_c.h"
-SDL_TLSData *
-SDL_SYS_GetTLSData(void)
+SDL_TLSData *SDL_SYS_GetTLSData(void)
{
return SDL_Generic_GetTLSData();
}
diff --git a/src/thread/n3ds/SDL_syscond.c b/src/thread/n3ds/SDL_syscond.c
index 4615941..05e0462 100644
--- a/src/thread/n3ds/SDL_syscond.c
+++ b/src/thread/n3ds/SDL_syscond.c
@@ -32,8 +32,7 @@ struct SDL_cond
};
/* Create a condition variable */
-SDL_cond *
-SDL_CreateCond(void)
+SDL_cond *SDL_CreateCond(void)
{
SDL_cond *cond = (SDL_cond *)SDL_malloc(sizeof(SDL_cond));
if (cond) {
diff --git a/src/thread/n3ds/SDL_sysmutex.c b/src/thread/n3ds/SDL_sysmutex.c
index f45fa71..09e0e0a 100644
--- a/src/thread/n3ds/SDL_sysmutex.c
+++ b/src/thread/n3ds/SDL_sysmutex.c
@@ -27,8 +27,7 @@
#include "SDL_sysmutex_c.h"
/* Create a mutex */
-SDL_mutex *
-SDL_CreateMutex(void)
+SDL_mutex *SDL_CreateMutex(void)
{
SDL_mutex *mutex;
diff --git a/src/thread/n3ds/SDL_systhread.c b/src/thread/n3ds/SDL_systhread.c
index 9d2645e..4dfb8fc 100644
--- a/src/thread/n3ds/SDL_systhread.c
+++ b/src/thread/n3ds/SDL_systhread.c
@@ -67,8 +67,7 @@ int SDL_SYS_CreateThread(SDL_Thread *thread)
return 0;
}
-static size_t
-GetStackSize(size_t requested_size)
+static size_t GetStackSize(size_t requested_size)
{
if (requested_size == 0) {
return N3DS_THREAD_STACK_SIZE_DEFAULT;
@@ -90,8 +89,7 @@ void SDL_SYS_SetupThread(const char *name)
return;
}
-SDL_threadID
-SDL_ThreadID(void)
+SDL_threadID SDL_ThreadID(void)
{
u32 thread_ID = 0;
svcGetThreadId(&thread_ID, CUR_THREAD_HANDLE);
diff --git a/src/thread/ngage/SDL_sysmutex.cpp b/src/thread/ngage/SDL_sysmutex.cpp
index daeef5e..7261704 100644
--- a/src/thread/ngage/SDL_sysmutex.cpp
+++ b/src/thread/ngage/SDL_sysmutex.cpp
@@ -40,8 +40,7 @@ static TInt NewMutex(const TDesC &aName, TAny *aPtr1, TAny *)
}
/* Create a mutex */
-SDL_mutex *
-SDL_CreateMutex(void)
+SDL_mutex *SDL_CreateMutex(void)
{
RMutex rmutex;
@@ -84,8 +83,7 @@ int SDL_LockMutex(SDL_mutex *mutex) SDL_NO_THREAD_SAFETY_ANALYSIS /* clang doesn
/* Try to lock the mutex */
#if 0
-int
-SDL_TryLockMutex(SDL_mutex *mutex)
+int SDL_TryLockMutex(SDL_mutex *mutex)
{
if (mutex == NULL)
{
diff --git a/src/thread/ngage/SDL_syssem.cpp b/src/thread/ngage/SDL_syssem.cpp
index 0684f51..20133c6 100644
--- a/src/thread/ngage/SDL_syssem.cpp
+++ b/src/thread/ngage/SDL_syssem.cpp
@@ -77,8 +77,7 @@ static void WaitAll(SDL_sem *sem)
}
}
-SDL_sem *
-SDL_CreateSemaphore(Uint32 initial_value)
+SDL_sem *SDL_CreateSemaphore(Uint32 initial_value)
{
RSemaphore s;
TInt status = CreateUnique(NewSema, &s, &initial_value);
@@ -150,8 +149,7 @@ int SDL_SemWait(SDL_sem *sem)
return SDL_SemWaitTimeout(sem, SDL_MUTEX_MAXWAIT);
}
-Uint32
-SDL_SemValue(SDL_sem *sem)
+Uint32 SDL_SemValue(SDL_sem *sem)
{
if (sem == NULL) {
SDL_InvalidParamError("sem");
diff --git a/src/thread/ngage/SDL_systhread.cpp b/src/thread/ngage/SDL_systhread.cpp
index b0fb543..fb2958d 100644
--- a/src/thread/ngage/SDL_systhread.cpp
+++ b/src/thread/ngage/SDL_systhread.cpp
@@ -80,8 +80,7 @@ void SDL_SYS_SetupThread(const char *name)
return;
}
-SDL_threadID
-SDL_ThreadID(void)
+SDL_threadID SDL_ThreadID(void)
{
RThread current;
TThreadId id = current.Id();
diff --git a/src/thread/os2/SDL_sysmutex.c b/src/thread/os2/SDL_sysmutex.c
index bb5ff21..4a7f6e8 100644
--- a/src/thread/os2/SDL_sysmutex.c
+++ b/src/thread/os2/SDL_sysmutex.c
@@ -37,8 +37,7 @@ struct SDL_mutex {
};
/* Create a mutex */
-SDL_mutex *
-SDL_CreateMutex(void)
+SDL_mutex *SDL_CreateMutex(void)
{
ULONG ulRC;
HMTX hMtx;
@@ -53,8 +52,7 @@ SDL_CreateMutex(void)
}
/* Free the mutex */
-void
-SDL_DestroyMutex(SDL_mutex * mutex)
+void SDL_DestroyMutex(SDL_mutex * mutex)
{
HMTX hMtx = (HMTX)mutex;
if (hMtx != NULLHANDLE) {
@@ -66,8 +64,7 @@ SDL_DestroyMutex(SDL_mutex * mutex)
}
/* Lock the mutex */
-int
-SDL_LockMutex(SDL_mutex * mutex) SDL_NO_THREAD_SAFETY_ANALYSIS /* clang doesn't know about NULL mutexes */
+int SDL_LockMutex(SDL_mutex * mutex) SDL_NO_THREAD_SAFETY_ANALYSIS /* clang doesn't know about NULL mutexes */
{
ULONG ulRC;
HMTX hMtx = (HMTX)mutex;
@@ -85,8 +82,7 @@ SDL_LockMutex(SDL_mutex * mutex) SDL_NO_THREAD_SAFETY_ANALYSIS /* clang doesn't
}
/* try Lock the mutex */
-int
-SDL_TryLockMutex(SDL_mutex * mutex)
+int SDL_TryLockMutex(SDL_mutex * mutex)
{
ULONG ulRC;
HMTX hMtx = (HMTX)mutex;
@@ -108,8 +104,7 @@ SDL_TryLockMutex(SDL_mutex * mutex)
}
/* Unlock the mutex */
-int
-SDL_UnlockMutex(SDL_mutex * mutex) SDL_NO_THREAD_SAFETY_ANALYSIS /* clang doesn't know about NULL mutexes */
+int SDL_UnlockMutex(SDL_mutex * mutex) SDL_NO_THREAD_SAFETY_ANALYSIS /* clang doesn't know about NULL mutexes */
{
ULONG ulRC;
HMTX hMtx = (HMTX)mutex;
diff --git a/src/thread/os2/SDL_syssem.c b/src/thread/os2/SDL_syssem.c
index 3c9cdbd..407867d 100644
--- a/src/thread/os2/SDL_syssem.c
+++ b/src/thread/os2/SDL_syssem.c
@@ -39,8 +39,7 @@ struct SDL_semaphore {
};
-SDL_sem *
-SDL_CreateSemaphore(Uint32 initial_value)
+SDL_sem *SDL_CreateSemaphore(Uint32 initial_value)
{
ULONG ulRC;
SDL_sem *pSDLSem = SDL_malloc(sizeof(SDL_sem));
@@ -70,8 +69,7 @@ SDL_CreateSemaphore(Uint32 initial_value)
return pSDLSem;
}
-void
-SDL_DestroySemaphore(SDL_sem * sem)
+void SDL_DestroySemaphore(SDL_sem * sem)
{
if (!sem) return;
@@ -80,8 +78,7 @@ SDL_DestroySemaphore(SDL_sem * sem)
SDL_free(sem);
}
-int
-SDL_SemWaitTimeout(SDL_sem * sem, Uint32 timeout)
+int SDL_SemWaitTimeout(SDL_sem * sem, Uint32 timeout)
{
ULONG ulRC;
ULONG ulStartTime, ulCurTime;
@@ -129,20 +126,17 @@ SDL_SemWaitTimeout(SDL_sem * sem, Uint32 timeout)
return 0;
}
-int
-SDL_SemTryWait(SDL_sem * sem)
+int SDL_SemTryWait(SDL_sem * sem)
{
return SDL_SemWaitTimeout(sem, 0);
}
-int
-SDL_SemWait(SDL_sem * sem)
+int SDL_SemWait(SDL_sem * sem)
{
return SDL_SemWaitTimeout(sem, SDL_MUTEX_MAXWAIT);
}
-Uint32
-SDL_SemValue(SDL_sem * sem)
+Uint32 SDL_SemValue(SDL_sem * sem)
{
ULONG ulRC;
@@ -161,8 +155,7 @@ SDL_SemValue(SDL_sem * sem)
return ulRC;
}
-int
-SDL_SemPost(SDL_sem * sem)
+int SDL_SemPost(SDL_sem * sem)
{
ULONG ulRC;
diff --git a/src/thread/os2/SDL_systhread.c b/src/thread/os2/SDL_systhread.c
index 69296ff..b255589 100644
--- a/src/thread/os2/SDL_systhread.c
+++ b/src/thread/os2/SDL_systhread.c
@@ -54,8 +54,7 @@ static void RunThread(void *data)
pfnEndThread();
}
-int
-SDL_SYS_CreateThread(SDL_Thread * thread,
+int SDL_SYS_CreateThread(SDL_Thread * thread,
pfnSDL_CurrentBeginThread pfnBeginThread,
pfnSDL_CurrentEndThread pfnEndThread)
{
@@ -80,14 +79,12 @@ SDL_SYS_CreateThread(SDL_Thread * thread,
return 0;
}
-void
-SDL_SYS_SetupThread(const char *name)
+void SDL_SYS_SetupThread(const char *name)
{
/* nothing. */
}
-SDL_threadID
-SDL_ThreadID(void)
+SDL_threadID SDL_ThreadID(void)
{
PTIB tib;
PPIB pib;
@@ -96,8 +93,7 @@ SDL_ThreadID(void)
return tib->tib_ptib2->tib2_ultid;
}
-int
-SDL_SYS_SetThreadPriority(SDL_ThreadPriority priority)
+int SDL_SYS_SetThreadPriority(SDL_ThreadPriority priority)
{
ULONG ulRC;
@@ -112,8 +108,7 @@ SDL_SYS_SetThreadPriority(SDL_ThreadPriority priority)
return 0;
}
-void
-SDL_SYS_WaitThread(SDL_Thread * thread)
+void SDL_SYS_WaitThread(SDL_Thread * thread)
{
ULONG ulRC = DosWaitThread((PTID)&thread->handle, DCWW_WAIT);
@@ -122,8 +117,7 @@ SDL_SYS_WaitThread(SDL_Thread * thread)
}
}
-void
-SDL_SYS_DetachThread(SDL_Thread * thread)
+void SDL_SYS_DetachThread(SDL_Thread * thread)
{
/* nothing. */
}
diff --git a/src/thread/psp/SDL_syscond.c b/src/thread/psp/SDL_syscond.c
index 1f3c0c3..a16187c 100644
--- a/src/thread/psp/SDL_syscond.c
+++ b/src/thread/psp/SDL_syscond.c
@@ -40,8 +40,7 @@ struct SDL_cond
};
/* Create a condition variable */
-SDL_cond *
-SDL_CreateCond(void)
+SDL_cond *SDL_CreateCond(void)
{
SDL_cond *cond;
diff --git a/src/thread/psp/SDL_sysmutex.c b/src/thread/psp/SDL_sysmutex.c
index 82de82f..3b3cf37 100644
--- a/src/thread/psp/SDL_sysmutex.c
+++ b/src/thread/psp/SDL_sysmutex.c
@@ -38,8 +38,7 @@ struct SDL_mutex
};
/* Create a mutex */
-SDL_mutex *
-SDL_CreateMutex(void)
+SDL_mutex *SDL_CreateMutex(void)
{
SDL_mutex *mutex = NULL;
SceInt32 res = 0;
diff --git a/src/thread/pthread/SDL_syscond.c b/src/thread/pthread/SDL_syscond.c
index 6069f7f..5b8aeb4 100644
--- a/src/thread/pthread/SDL_syscond.c
+++ b/src/thread/pthread/SDL_syscond.c
@@ -35,8 +35,7 @@ struct SDL_cond
};
/* Create a condition variable */
-SDL_cond *
-SDL_CreateCond(void)
+SDL_cond *SDL_CreateCond(void)
{
SDL_cond *cond;
diff --git a/src/thread/pthread/SDL_sysmutex.c b/src/thread/pthread/SDL_sysmutex.c
index 6f39471..9b24e16 100644
--- a/src/thread/pthread/SDL_sysmutex.c
+++ b/src/thread/pthread/SDL_sysmutex.c
@@ -39,8 +39,7 @@ struct SDL_mutex
#endif
};
-SDL_mutex *
-SDL_CreateMutex(void)
+SDL_mutex *SDL_CreateMutex(void)
{
SDL_mutex *mutex;
pthread_mutexattr_t attr;
diff --git a/src/thread/pthread/SDL_syssem.c b/src/thread/pthread/SDL_syssem.c
index 90e386c..fee50bb 100644
--- a/src/thread/pthread/SDL_syssem.c
+++ b/src/thread/pthread/SDL_syssem.c
@@ -42,8 +42,7 @@ struct SDL_semaphore
};
/* Create a semaphore, initialized with value */
-SDL_sem *
-SDL_CreateSemaphore(Uint32 initial_value)
+SDL_sem *SDL_CreateSemaphore(Uint32 initial_value)
{
SDL_sem *sem = (SDL_sem *)SDL_malloc(sizeof(SDL_sem));
if (sem != NULL) {
@@ -172,8 +171,7 @@ int SDL_SemWaitTimeout(SDL_sem *sem, Uint32 timeout)
return retval;
}
-Uint32
-SDL_SemValue(SDL_sem *sem)
+Uint32 SDL_SemValue(SDL_sem *sem)
{
int ret = 0;
diff --git a/src/thread/pthread/SDL_systhread.c b/src/thread/pthread/SDL_systhread.c
index 3bf1f58..5316807 100644
--- a/src/thread/pthread/SDL_systhread.c
+++ b/src/thread/pthread/SDL_systhread.c
@@ -181,8 +181,7 @@ void SDL_SYS_SetupThread(const char *name)
#endif
}
-SDL_threadID
-SDL_ThreadID(void)
+SDL_threadID SDL_ThreadID(void)
{
return (SDL_threadID)pthread_self();
}
diff --git a/src/thread/pthread/SDL_systls.c b/src/thread/pthread/SDL_systls.c
index f436f1f..f0be2f8 100644
--- a/src/thread/pthread/SDL_systls.c
+++ b/src/thread/pthread/SDL_systls.c
@@ -30,8 +30,7 @@
static pthread_key_t thread_local_storage = INVALID_PTHREAD_KEY;
static SDL_bool generic_local_storage = SDL_FALSE;
-SDL_TLSData *
-SDL_SYS_GetTLSData(void)
+SDL_TLSData *SDL_SYS_GetTLSData(void)
{
if (thread_local_storage == INVALID_PTHREAD_KEY && !generic_local_storage) {
static SDL_SpinLock lock;
diff --git a/src/thread/vita/SDL_syscond.c b/src/thread/vita/SDL_syscond.c
index 74d8246..6327565 100644
--- a/src/thread/vita/SDL_syscond.c
+++ b/src/thread/vita/SDL_syscond.c
@@ -40,8 +40,7 @@ struct SDL_cond
};
/* Create a condition variable */
-SDL_cond *
-SDL_CreateCond(void)
+SDL_cond *SDL_CreateCond(void)
{
SDL_cond *cond;
diff --git a/src/thread/vita/SDL_sysmutex.c b/src/thread/vita/SDL_sysmutex.c
index 26052c7..232ae04 100644
--- a/src/thread/vita/SDL_sysmutex.c
+++ b/src/thread/vita/SDL_sysmutex.c
@@ -34,8 +34,7 @@ struct SDL_mutex
};
/* Create a mutex */
-SDL_mutex *
-SDL_CreateMutex(void)
+SDL_mutex *SDL_CreateMutex(void)
{
SDL_mutex *mutex = NULL;
SceInt32 res = 0;
diff --git a/src/thread/windows/SDL_syscond_cv.c b/src/thread/windows/SDL_syscond_cv.c
index 4e67925..905d416 100644
--- a/src/thread/windows/SDL_syscond_cv.c
+++ b/src/thread/windows/SDL_syscond_cv.c
@@ -218,8 +218,7 @@ static const SDL_cond_impl_t SDL_cond_impl_generic = {
&SDL_CondWaitTimeout_generic,
};
-SDL_cond *
-SDL_CreateCond(void)
+SDL_cond *SDL_CreateCond(void)
{
if (SDL_cond_impl_active.Create == NULL) {
/* Default to generic implementation, works with all mutex implementations */
diff --git a/src/thread/windows/SDL_sysmutex.c b/src/thread/windows/SDL_sysmutex.c
index 1231aa3..70fd0ed 100644
--- a/src/thread/windows/SDL_sysmutex.c
+++ b/src/thread/windows/SDL_sysmutex.c
@@ -243,8 +243,7 @@ static const SDL_mutex_impl_t SDL_mutex_impl_cs = {
* Runtime selection and redirection
*/
-SDL_mutex *
-SDL_CreateMutex(void)
+SDL_mutex *SDL_CreateMutex(void)
{
if (SDL_mutex_impl_active.Create == NULL) {
/* Default to fallback implementation */
diff --git a/src/thread/windows/SDL_syssem.c b/src/thread/windows/SDL_syssem.c
index b1b609d..6853549 100644
--- a/src/thread/windows/SDL_syssem.c
+++ b/src/thread/windows/SDL_syssem.c
@@ -377,8 +377,7 @@ static const SDL_sem_impl_t SDL_sem_impl_kern = {
* Runtime selection and redirection
*/
-SDL_sem *
-SDL_CreateSemaphore(Uint32 initial_value)
+SDL_sem *SDL_CreateSemaphore(Uint32 initial_value)
{
if (SDL_sem_impl_active.Create == NULL) {
/* Default to fallback implementation */
@@ -436,8 +435,7 @@ int SDL_SemWait(SDL_sem *sem)
return SDL_sem_impl_active.Wait(sem);
}
-Uint32
-SDL_SemValue(SDL_sem *sem)
+Uint32 SDL_SemValue(SDL_sem *sem)
{
return SDL_sem_impl_active.Value(sem);
}
diff --git a/src/thread/windows/SDL_systhread.c b/src/thread/windows/SDL_systhread.c
index 95cba20..1691469 100644
--- a/src/thread/windows/SDL_systhread.c
+++ b/src/thread/windows/SDL_systhread.c
@@ -164,8 +164,7 @@ void SDL_SYS_SetupThread(const char *name)
}
}
-SDL_threadID
-SDL_ThreadID(void)
+SDL_threadID SDL_ThreadID(void)
{
return (SDL_threadID)GetCurrentThreadId();
}
diff --git a/src/thread/windows/SDL_systls.c b/src/thread/windows/SDL_systls.c
index 998a637..b4be434 100644
--- a/src/thread/windows/SDL_systls.c
+++ b/src/thread/windows/SDL_systls.c
@@ -43,8 +43,7 @@
static DWORD thread_local_storage = TLS_OUT_OF_INDEXES;
static SDL_bool generic_local_storage = SDL_FALSE;
-SDL_TLSData *
-SDL_SYS_GetTLSData(void)
+SDL_TLSData *SDL_SYS_GetTLSData(void)
{
if (thread_local_storage == TLS_OUT_OF_INDEXES && !generic_local_storage) {
static SDL_SpinLock lock;
diff --git a/src/timer/SDL_timer.c b/src/timer/SDL_timer.c
index bfd55af..874f154 100644
--- a/src/timer/SDL_timer.c
+++ b/src/timer/SDL_timer.c
@@ -274,8 +274,7 @@ void SDL_TimerQuit(void)
}
}
-SDL_TimerID
-SDL_AddTimer(Uint32 interval, SDL_TimerCallback callback, void *param)
+SDL_TimerID SDL_AddTimer(Uint32 interval, SDL_TimerCallback callback, void *param)
{
SDL_TimerData *data = &SDL_timer_data;
SDL_Timer *timer;
@@ -337,8 +336,7 @@ SDL_AddTimer(Uint32 interval, SDL_TimerCallback callback, void *param)
return entry->timerID;
}
-SDL_bool
-SDL_RemoveTimer(SDL_TimerID id)
+SDL_bool SDL_RemoveTimer(SDL_TimerID id)
{
SDL_TimerData *data = &SDL_timer_data;
SDL_TimerMap *prev, *entry;
@@ -420,8 +418,7 @@ void SDL_TimerQuit(void)
}
}
-SDL_TimerID
-SDL_AddTimer(Uint32 interval, SDL_TimerCallback callback, void *param)
+SDL_TimerID SDL_AddTimer(Uint32 interval, SDL_TimerCallback callback, void *param)
{
SDL_TimerData *data = &SDL_timer_data;
SDL_TimerMap *entry;
@@ -446,8 +443,7 @@ SDL_AddTimer(Uint32 interval, SDL_TimerCallback callback, void *param)
return entry->timerID;
}
-SDL_bool
-SDL_RemoveTimer(SDL_TimerID id)
+SDL_bool SDL_RemoveTimer(SDL_TimerID id)
{
SDL_TimerData *data = &SDL_timer_data;
SDL_TimerMap *prev, *entry;
@@ -480,8 +476,7 @@ SDL_RemoveTimer(SDL_TimerID id)
which wraps back to zero every ~49 days. The newer SDL_GetTicks64()
doesn't have this problem, so we just wrap that function and clamp to
the low 32-bits for binary compatibility. */
-Uint32
-SDL_GetTicks(void)
+Uint32 SDL_GetTicks(void)
{
return (Uint32)(SDL_GetTicks64() & 0xFFFFFFFF);
}
diff --git a/src/timer/dummy/SDL_systimer.c b/src/timer/dummy/SDL_systimer.c
index a7a62c7..8b32357 100644
--- a/src/timer/dummy/SDL_systimer.c
+++ b/src/timer/dummy/SDL_systimer.c
@@ -39,8 +39,7 @@ void SDL_TicksQuit(void)
ticks_started = SDL_FALSE;
}
-Uint64
-SDL_GetTicks64(void)
+Uint64 SDL_GetTicks64(void)
{
if (!ticks_started) {
SDL_TicksInit();
@@ -50,14 +49,12 @@ SDL_GetTicks64(void)
return 0;
}
-Uint64
-SDL_GetPerformanceCounter(void)
+Uint64 SDL_GetPerformanceCounter(void)
{
return SDL_GetTicks();
}
-Uint64
-SDL_GetPerformanceFrequency(void)
+Uint64 SDL_GetPerformanceFrequency(void)
{
return 1000;
}
diff --git a/src/timer/haiku/SDL_systimer.c b/src/timer/haiku/SDL_systimer.c
index ebe4d49..1c2970b 100644
--- a/src/timer/haiku/SDL_systimer.c
+++ b/src/timer/haiku/SDL_systimer.c
@@ -45,8 +45,7 @@ void SDL_TicksQuit(void)
ticks_started = SDL_FALSE;
}
-Uint64
-SDL_GetTicks64(void)
+Uint64 SDL_GetTicks64(void)
{
if (!ticks_started) {
SDL_TicksInit();
@@ -55,14 +54,12 @@ SDL_GetTicks64(void)
return (Uint64)((system_time() - start) / 1000);
}
-Uint64
-SDL_GetPerformanceCounter(void)
+Uint64 SDL_GetPerformanceCounter(void)
{
return system_time();
}
-Uint64
-SDL_GetPerformanceFrequency(void)
+Uint64 SDL_GetPerformanceFrequency(void)
{
return 1000000;
}
diff --git a/src/timer/n3ds/SDL_systimer.c b/src/timer/n3ds/SDL_systimer.c
index d1570b9..2a9c38b 100644
--- a/src/timer/n3ds/SDL_systimer.c
+++ b/src/timer/n3ds/SDL_systimer.c
@@ -44,8 +44,7 @@ void SDL_TicksQuit(void)
ticks_started = SDL_FALSE;
}
-Uint64
-SDL_GetTicks64(void)
+Uint64 SDL_GetTicks64(void)
{
u64 elapsed;
if (!ticks_started) {
@@ -56,14 +55,12 @@ SDL_GetTicks64(void)
return elapsed / CPU_TICKS_PER_MSEC;
}
-Uint64
-SDL_GetPerformanceCounter(void)
+Uint64 SDL_GetPerformanceCounter(void)
{
return svcGetSystemTick();
}
-Uint64
-SDL_GetPerformanceFrequency(void)
+Uint64 SDL_GetPerformanceFrequency(void)
{
return SYSCLOCK_ARM11;
}
diff --git a/src/timer/ngage/SDL_systimer.cpp b/src/timer/ngage/SDL_systimer.cpp
index 8f21b28..e2a45ce 100644
--- a/src/timer/ngage/SDL_systimer.cpp
+++ b/src/timer/ngage/SDL_systimer.cpp
@@ -56,8 +56,7 @@ void SDL_TicksQuit(void)
ticks_started = SDL_FALSE;
}
-Uint64
-SDL_GetTicks64(void)
+Uint64 SDL_GetTicks64(void)
{
if (!ticks_started) {
SDL_TicksInit();
@@ -69,14 +68,12 @@ SDL_GetTicks64(void)
return (Uint64)(deltaTics * tickPeriodMilliSeconds);
}
-Uint64
-SDL_GetPerformanceCounter(void)
+Uint64 SDL_GetPerformanceCounter(void)
{
return (Uint64)User::TickCount();
}
-Uint64
-SDL_GetPerformanceFrequency(void)
+Uint64 SDL_GetPerformanceFrequency(void)
{
return 1000000;
}
diff --git a/src/timer/os2/SDL_systimer.c b/src/timer/os2/SDL_systimer.c
index 0f2c670..0828300 100644
--- a/src/timer/os2/SDL_systimer.c
+++ b/src/timer/os2/SDL_systimer.c
@@ -43,8 +43,7 @@ static SDL_bool ticks_started = SDL_FALSE;
static ULONG ulTmrFreq = 0;
static ULLONG ullTmrStart = 0;
-void
-SDL_TicksInit(void)
+void SDL_TicksInit(void)
{
ULONG ulTmrStart; /* for 32-bit fallback. */
ULONG ulRC;
@@ -70,14 +69,12 @@ SDL_TicksInit(void)
ullTmrStart = (ULLONG) ulTmrStart;
}
-void
-SDL_TicksQuit(void)
+void SDL_TicksQuit(void)
{
ticks_started = SDL_FALSE;
}
-Uint64
-SDL_GetTicks64(void)
+Uint64 SDL_GetTicks64(void)
{
Uint64 ui64Result;
ULLONG ullTmrNow;
@@ -99,8 +96,7 @@ SDL_GetTicks64(void)
return ui64Result;
}
-Uint64
-SDL_GetPerformanceCounter(void)
+Uint64 SDL_GetPerformanceCounter(void)
{
QWORD qwTmrNow;
@@ -110,14 +106,12 @@ SDL_GetPerformanceCounter(void)
return *((Uint64 *)&qwTmrNow);
}
-Uint64
-SDL_GetPerformanceFrequency(void)
+Uint64 SDL_GetPerformanceFrequency(void)
{
return (ulTmrFreq == 0)? 1000 : (Uint64)ulTmrFreq;
}
-void
-SDL_Delay(Uint32 ms)
+void SDL_Delay(Uint32 ms)
{
HTIMER hTimer = NULLHANDLE;
ULONG ulRC;
diff --git a/src/timer/ps2/SDL_systimer.c b/src/timer/ps2/SDL_systimer.c
index 133b350..910f7a6 100644
--- a/src/timer/ps2/SDL_systimer.c
+++ b/src/timer/ps2/SDL_systimer.c
@@ -49,8 +49,7 @@ void SDL_TicksQuit(void)
ticks_started = SDL_FALSE;
}
-Uint64
-SDL_GetTicks64(void)
+Uint64 SDL_GetTicks64(void)
{
uint64_t now;
@@ -62,14 +61,12 @@ SDL_GetTicks64(void)
return (Uint64)((now - start) / (kBUSCLK / CLOCKS_PER_SEC));
}
-Uint64
-SDL_GetPerformanceCounter(void)
+Uint64 SDL_GetPerformanceCounter(void)
{
return SDL_GetTicks64();
}
-Uint64
-SDL_GetPerformanceFrequency(void)
+Uint64 SDL_GetPerformanceFrequency(void)
{
return 1000;
}
diff --git a/src/timer/psp/SDL_systimer.c b/src/timer/psp/SDL_systimer.c
index b934834..5337c77 100644
--- a/src/timer/psp/SDL_systimer.c
+++ b/src/timer/psp/SDL_systimer.c
@@ -49,8 +49,7 @@ void SDL_TicksQuit(void)
ticks_started = SDL_FALSE;
}
-Uint64
-SDL_GetTicks64(void)
+Uint64 SDL_GetTicks64(void)
{
struct timeval now;
@@ -62,14 +61,12 @@ SDL_GetTicks64(void)
return (Uint64)(((Sint64)(now.tv_sec - start.tv_sec) * 1000) + ((now.tv_usec - start.tv_usec) / 1000));
}
-Uint64
-SDL_GetPerformanceCounter(void)
+Uint64 SDL_GetPerformanceCounter(void)
{
return SDL_GetTicks64();
}
-Uint64
-SDL_GetPerformanceFrequency(void)
+Uint64 SDL_GetPerformanceFrequency(void)
{
return 1000;
}
diff --git a/src/timer/unix/SDL_systimer.c b/src/timer/unix/SDL_systimer.c
index a625365..5fe367e 100644
--- a/src/timer/unix/SDL_systimer.c
+++ b/src/timer/unix/SDL_systimer.c
@@ -101,8 +101,7 @@ void SDL_TicksQuit(void)
ticks_started = SDL_FALSE;
}
-Uint64
-SDL_GetTicks64(void)
+Uint64 SDL_GetTicks64(void)
{
if (!ticks_started) {
SDL_TicksInit();
@@ -127,8 +126,7 @@ SDL_GetTicks64(void)
}
}
-Uint64
-SDL_GetPerformanceCounter(void)
+Uint64 SDL_GetPerformanceCounter(void)
{
Uint64 ticks;
if (!ticks_started) {
@@ -160,8 +158,7 @@ SDL_GetPerformanceCounter(void)
return ticks;
}
-Uint64
-SDL_GetPerformanceFrequency(void)
+Uint64 SDL_GetPerformanceFrequency(void)
{
if (!ticks_started) {
SDL_TicksInit();
diff --git a/src/timer/vita/SDL_systimer.c b/src/timer/vita/SDL_systimer.c
index e5815ed..f954bb7 100644
--- a/src/timer/vita/SDL_systimer.c
+++ b/src/timer/vita/SDL_systimer.c
@@ -49,8 +49,7 @@ void SDL_TicksQuit(void)
ticks_started = SDL_FALSE;
}
-Uint64
-SDL_GetTicks64(void)
+Uint64 SDL_GetTicks64(void)
{
uint64_t now;
@@ -62,14 +61,12 @@ SDL_GetTicks64(void)
return (Uint64)((now - start) / 1000);
}
-Uint64
-SDL_GetPerformanceCounter(void)
+Uint64 SDL_GetPerformanceCounter(void)
{
return sceKernelGetProcessTimeWide();
}
-Uint64
-SDL_GetPerformanceFrequency(void)
+Uint64 SDL_GetPerformanceFrequency(void)
{
return 1000000;
}
diff --git a/src/timer/windows/SDL_systimer.c b/src/timer/windows/SDL_systimer.c
index ad4c0b4..e51c891 100644
--- a/src/timer/windows/SDL_systimer.c
+++ b/src/timer/windows/SDL_systimer.c
@@ -106,8 +106,7 @@ void SDL_TicksQuit(void)
ticks_started = SDL_FALSE;
}
-Uint64
-SDL_GetTicks64(void)
+Uint64 SDL_GetTicks64(void)
{
LARGE_INTEGER now;
BOOL rc;
@@ -121,8 +120,7 @@ SDL_GetTicks64(void)
return (Uint64)(((now.QuadPart - start_ticks.QuadPart) * 1000) / ticks_per_second.QuadPart);
}
-Uint64
-SDL_GetPerformanceCounter(void)
+Uint64 SDL_GetPerformanceCounter(void)
{
LARGE_INTEGER counter;
const BOOL rc = QueryPerformanceCounter(&counter);
@@ -130,8 +128,7 @@ SDL_GetPerformanceCounter(void)
return (Uint64)counter.QuadPart;
}
-Uint64
-SDL_GetPerformanceFrequency(void)
+Uint64 SDL_GetPerformanceFrequency(void)
{
LARGE_INTEGER frequency;
const BOOL rc = QueryPerformanceFrequency(&frequency);
diff --git a/src/video/SDL_blit_0.c b/src/video/SDL_blit_0.c
index 358909f..9b303c4 100644
--- a/src/video/SDL_blit_0.c
+++ b/src/video/SDL_blit_0.c
@@ -507,8 +507,7 @@ static void Blit4bto4Key(SDL_BlitInfo *info)
}
}
-SDL_BlitFunc
-SDL_CalculateBlit0(SDL_Surface *surface)
+SDL_BlitFunc SDL_CalculateBlit0(SDL_Surface *surface)
{
int which;
diff --git a/src/video/SDL_blit_1.c b/src/video/SDL_blit_1.c
index f7c5b80..a616067 100644
--- a/src/video/SDL_blit_1.c
+++ b/src/video/SDL_blit_1.c
@@ -514,8 +514,7 @@ static const SDL_BlitFunc one_blitkey[] = {
(SDL_BlitFunc)NULL, Blit1to1Key, Blit1to2Key, Blit1to3Key, Blit1to4Key
};
-SDL_BlitFunc
-SDL_CalculateBlit1(SDL_Surface *surface)
+SDL_BlitFunc SDL_CalculateBlit1(SDL_Surface *surface)
{
int which;
SDL_PixelFormat *dstfmt;
diff --git a/src/video/SDL_blit_A.c b/src/video/SDL_blit_A.c
index eae1706..316f3f3 100644
--- a/src/video/SDL_blit_A.c
+++ b/src/video/SDL_blit_A.c
@@ -1417,8 +1417,7 @@ static void BlitNtoNPixelAlpha(SDL_BlitInfo *info)
}
}
-SDL_BlitFunc
-SDL_CalculateBlitA(SDL_Surface *surface)
+SDL_BlitFunc SDL_CalculateBlitA(SDL_Surface *surface)
{
SDL_PixelFormat *sf = surface->format;
SDL_PixelFormat *df = surface->map->dst->format;
diff --git a/src/video/SDL_blit_N.c b/src/video/SDL_blit_N.c
index fafb0e3..7c0b010 100644
--- a/src/video/SDL_blit_N.c
+++ b/src/video/SDL_blit_N.c
@@ -54,8 +54,7 @@ enum blit_features
#endif
#ifdef __MACOSX__
#include <sys/sysctl.h>
-static size_t
-GetL3CacheSize(void)
+static size_t GetL3CacheSize(void)
{
const char key[] = "hw.l3cachesize";
u_int64_t result = 0;
@@ -69,8 +68,7 @@ GetL3CacheSize(void)
return result;
}
#else
-static size_t
-GetL3CacheSize(void)
+static size_t GetL3CacheSize(void)
{
/* XXX: Just guess G4 */
return 2097152;
@@ -3344,8 +3342,7 @@ static const struct blit_table *const normal_blit[] = {
/* Mask matches table, or table entry is zero */
#define MASKOK(x, y) (((x) == (y)) || ((y) == 0x00000000))
-SDL_BlitFunc
-SDL_CalculateBlitN(SDL_Surface *surface)
+SDL_BlitFunc SDL_CalculateBlitN(SDL_Surface *surface)
{
SDL_PixelFormat *srcfmt;
SDL_PixelFormat *dstfmt;
diff --git a/src/video/SDL_bmp.c b/src/video/SDL_bmp.c
index 244cc79..82147a5 100644
--- a/src/video/SDL_bmp.c
+++ b/src/video/SDL_bmp.c
@@ -195,8 +195,7 @@ static void CorrectAlphaChannel(SDL_Surface *surface)
}
}
-SDL_Surface *
-SDL_LoadBMP_RW(SDL_RWops *src, int freesrc)
+SDL_Surface *SDL_LoadBMP_RW(SDL_RWops *src, int freesrc)
{
SDL_bool was_error;
Sint64 fp_offset = 0;
diff --git a/src/video/SDL_clipboard.c b/src/video/SDL_clipboard.c
index 6e6ac0d..e18668c 100644
--- a/src/video/SDL_clipboard.c
+++ b/src/video/SDL_clipboard.c
@@ -63,8 +63,7 @@ int SDL_SetPrimarySelectionText(const char *text)
}
}
-char *
-SDL_GetClipboardText(void)
+char *SDL_GetClipboardText(void)
{
SDL_VideoDevice *_this = SDL_GetVideoDevice();
@@ -84,8 +83,7 @@ SDL_GetClipboardText(void)
}
}
-char *
-SDL_GetPrimarySelectionText(void)
+char *SDL_GetPrimarySelectionText(void)
{
SDL_VideoDevice *_this = SDL_GetVideoDevice();
@@ -105,8 +103,7 @@ SDL_GetPrimarySelectionText(void)
}
}
-SDL_bool
-SDL_HasClipboardText(void)
+SDL_bool SDL_HasClipboardText(void)
{
SDL_VideoDevice *_this = SDL_GetVideoDevice();
@@ -126,8 +123,7 @@ SDL_HasClipboardText(void)
}
}
-SDL_bool
-SDL_HasPrimarySelectionText(void)
+SDL_bool SDL_HasPrimarySelectionText(void)
{
SDL_VideoDevice *_this = SDL_GetVideoDevice();
diff --git a/src/video/SDL_egl.c b/src/video/SDL_egl.c
index 6e6ae49..8e5f165 100644
--- a/src/video/SDL_egl.c
+++ b/src/video/SDL_egl.c
@@ -242,8 +242,7 @@ SDL_bool SDL_EGL_HasExtension(_THIS, SDL_EGL_ExtensionType type, const char *ext
return SDL_FALSE;
}
-void *
-SDL_EGL_GetProcAddress(_THIS, const char *proc)
+void *SDL_EGL_GetProcAddress(_THIS, const char *proc)
{
void *retval = NULL;
if (_this->egl_data != NULL) {
@@ -934,8 +933,7 @@ int SDL_EGL_ChooseConfig(_THIS)
return SDL_EGL_SetError("Couldn't find matching EGL config", "eglChooseConfig");
}
-SDL_GLContext
-SDL_EGL_CreateContext(_THIS, EGLSurface egl_surface)
+SDL_GLContext SDL_EGL_CreateContext(_THIS, EGLSurface egl_surface)
{
/* max 14 values plus terminator. */
EGLint attribs[15];
@@ -1179,8 +1177,7 @@ void SDL_EGL_DeleteContext(_THIS, SDL_GLContext context)
}
}
-EGLSurface *
-SDL_EGL_CreateSurface(_THIS, NativeWindowType nw)
+EGLSurface *SDL_EGL_CreateSurface(_THIS, NativeWindowType nw)
{
#if SDL_VIDEO_DRIVER_ANDROID
EGLint format_wanted;
diff --git a/src/video/SDL_pixels.c b/src/video/SDL_pixels.c
index 6b48f72..81892e7 100644
--- a/src/video/SDL_pixels.c
+++ b/src/video/SDL_pixels.c
@@ -85,8 +85,7 @@ Uint8 *SDL_expand_byte[9] = {
#define CASE(X) \
case X: \
return #X;
-const char *
-SDL_GetPixelFormatName(Uint32 format)
+const char *SDL_GetPixelFormatName(Uint32 format)
{
switch (format) {
@@ -136,9 +135,8 @@ SDL_GetPixelFormatName(Uint32 format)
}
#undef CASE
-SDL_bool
-SDL_PixelFormatEnumToMasks(Uint32 format, int *bpp, Uint32 *Rmask,
- Uint32 *Gmask, Uint32 *Bmask, Uint32 *Amask)
+SDL_bool SDL_PixelFormatEnumToMasks(Uint32 format, int *bpp, Uint32 *Rmask,
+ Uint32 *Gmask, Uint32 *Bmask, Uint32 *Amask)
{
Uint32 masks[4];
@@ -295,9 +293,7 @@ SDL_PixelFormatEnumToMasks(Uint32 format, int *bpp, Uint32 *Rmask,
return SDL_TRUE;
}
-Uint32
-SDL_MasksToPixelFormatEnum(int bpp, Uint32 Rmask, Uint32 Gmask, Uint32 Bmask,
- Uint32 Amask)
+Uint32 SDL_MasksToPixelFormatEnum(int bpp, Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask)
{
switch (bpp) {
case 1:
@@ -505,8 +501,7 @@ SDL_MasksToPixelFormatEnum(int bpp, Uint32 Rmask, Uint32 Gmask, Uint32 Bmask,
static SDL_PixelFormat *formats;
static SDL_SpinLock formats_lock = 0;
-SDL_PixelFormat *
-SDL_AllocFormat(Uint32 pixel_format)
+SDL_PixelFormat *SDL_AllocFormat(Uint32 pixel_format)
{
SDL_PixelFormat *format;
@@ -653,8 +648,7 @@ void SDL_FreeFormat(SDL_PixelFormat *format)
SDL_free(format);
}
-SDL_Palette *
-SDL_AllocPalette(int ncolors)
+SDL_Palette *SDL_AllocPalette(int ncolors)
{
SDL_Palette *palette;
@@ -856,8 +850,7 @@ void SDL_DetectPalette(SDL_Palette *pal, SDL_bool *is_opaque, SDL_bool *has_alph
}
/* Find the opaque pixel value corresponding to an RGB triple */
-Uint32
-SDL_MapRGB(const SDL_PixelFormat *format, Uint8 r, Uint8 g, Uint8 b)
+Uint32 SDL_MapRGB(const SDL_PixelFormat *format, Uint8 r, Uint8 g, Uint8 b)
{
if (format->palette == NULL) {
return (r >> format->Rloss) << format->Rshift | (g >> format->Gloss) << format->Gshift | (b >> format->Bloss) << format->Bshift | format->Amask;
@@ -867,9 +860,7 @@ SDL_MapRGB(const SDL_PixelFormat *format, Uint8 r, Uint8 g, Uint8 b)
}
/* Find the pixel value corresponding to an RGBA quadruple */
-Uint32
-SDL_MapRGBA(const SDL_PixelFormat *format, Uint8 r, Uint8 g, Uint8 b,
- Uint8 a)
+Uint32 SDL_MapRGBA(const SDL_PixelFormat *format, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
{
if (format->palette == NULL) {
return (r >> format->Rloss) << format->Rshift | (g >> format->Gloss) << format->Gshift | (b >> format->Bloss) << format->Bshift | ((Uint32)(a >> format->Aloss) << format->Ashift & format->Amask);
@@ -997,8 +988,7 @@ static Uint8 *MapNto1(SDL_PixelFormat *src, SDL_PixelFormat *dst, int *identical
return Map1to1(&dithered, pal, identical);
}
-SDL_BlitMap *
-SDL_AllocBlitMap(void)
+SDL_BlitMap *SDL_AllocBlitMap(void)
{
SDL_BlitMap *map;
@@ -1137,8 +1127,7 @@ void SDL_FreeBlitMap(SDL_BlitMap *map)
}
}
-void
-SDL_CalculateGammaRamp(float gamma, Uint16 * ramp)
+void SDL_CalculateGammaRamp(float gamma, Uint16 * ramp)
{
int i;
diff --git a/src/video/SDL_rect.c b/src/video/SDL_rect.c
index 0259652..1b461d2 100644
--- a/src/video/SDL_rect.c
+++ b/src/video/SDL_rect.c
@@ -25,8 +25,7 @@
/* There's no float version of this at the moment, because it's not a public API
and internally we only need the int version. */
-SDL_bool
-SDL_GetSpanEnclosingRect(int width, int height,
+SDL_bool SDL_GetSpanEnclosingRect(int width, int height,
int numrects, const SDL_Rect *rects, SDL_Rect *span)
{
int i;
diff --git a/src/video/SDL_rect_impl.h b/src/video/SDL_rect_impl.h
index a3e6d16..b0e3901 100644
--- a/src/video/SDL_rect_impl.h
+++ b/src/video/SDL_rect_impl.h
@@ -21,8 +21,7 @@
/* This file is #included twice to support int and float versions with the same code. */
-SDL_bool
-SDL_HASINTERSECTION(const RECTTYPE *A, const RECTTYPE *B)
+SDL_bool SDL_HASINTERSECTION(const RECTTYPE *A, const RECTTYPE *B)
{
SCALARTYPE Amin, Amax, Bmin, Bmax;
@@ -67,8 +66,7 @@ SDL_HASINTERSECTION(const RECTTYPE *A, const RECTTYPE *B)
return SDL_TRUE;
}
-SDL_bool
-SDL_INTERSECTRECT(const RECTTYPE *A, const RECTTYPE *B, RECTTYPE *result)
+SDL_bool SDL_INTERSECTRECT(const RECTTYPE *A, const RECTTYPE *B, RECTTYPE *result)
{
SCALARTYPE Amin, Amax, Bmin, Bmax;
@@ -289,9 +287,7 @@ static int COMPUTEOUTCODE(const RECTTYPE *rect, SCALARTYPE x, SCALARTYPE y)
return code;
}
-SDL_bool
-SDL_INTERSECTRECTANDLINE(const RECTTYPE *rect, SCALARTYPE *X1, SCALARTYPE *Y1, SCALARTYPE *X2,
- SCALARTYPE *Y2)
+SDL_bool SDL_INTERSECTRECTANDLINE(const RECTTYPE *rect, SCALARTYPE *X1, SCALARTYPE *Y1, SCALARTYPE *X2, SCALARTYPE *Y2)
{
SCALARTYPE x = 0;
SCALARTYPE y = 0;
diff --git a/src/video/SDL_shape.c b/src/video/SDL_shape.c
index 509f029..a0b977b 100644
--- a/src/video/SDL_shape.c
+++ b/src/video/SDL_shape.c
@@ -28,8 +28,7 @@
#include "SDL_shape.h"
#include "SDL_shape_internals.h"
-SDL_Window *
-SDL_CreateShapedWindow(const char *title, unsigned int x, unsigned int y, unsigned int w, unsigned int h, Uint32 flags)
+SDL_Window *SDL_CreateShapedWindow(const char *title, unsigned int x, unsigned int y, unsigned int w, unsigned int h, Uint32 flags)
{
SDL_Window *result = NULL;
result = SDL_CreateWindow(title, -1000, -1000, w, h, (flags | SDL_WINDOW_BORDERLESS) & (~SDL_WINDOW_FULLSCREEN) & (~SDL_WINDOW_RESIZABLE) /* & (~SDL_WINDOW_SHOWN) */);
@@ -54,8 +53,7 @@ SDL_CreateShapedWindow(const char *title, unsigned int x, unsigned int y, unsign
return NULL;
}
-SDL_bool
-SDL_IsShapedWindow(const SDL_Window *window)
+SDL_bool SDL_IsShapedWindow(const SDL_Window *window)
{
if (window == NULL) {
return SDL_FALSE;
@@ -217,8 +215,7 @@ static SDL_ShapeTree *RecursivelyCalculateShapeTree(SDL_WindowShapeMode mode, SD
return result;
}
-SDL_ShapeTree *
-SDL_CalculateShapeTree(SDL_WindowShapeMode mode, SDL_Surface *shape)
+SDL_ShapeTree *SDL_CalculateShapeTree(SDL_WindowShapeMode mode, SDL_Surface *shape)
{
SDL_Rect dimensions;
SDL_ShapeTree *result = NULL;
diff --git a/src/video/SDL_stretch.c b/src/video/SDL_stretch.c
index da46bb2..ec2bed5 100644
--- a/src/video/SDL_stretch.c
+++ b/src/video/SDL_stretch.c
@@ -193,8 +193,7 @@ static int SDL_UpperSoftStretch(SDL_Surface *src, const SDL_Rect *srcrect,
// OK with clang 12.0.0 / Xcode
__attribute__((noinline))
#endif
-static void
-get_scaler_datas(int src_nb, int dst_nb, int *fp_start, int *fp_step, int *left_pad, int *right_pad)
+static void get_scaler_datas(int src_nb, int dst_nb, int *fp_start, int *fp_step, int *left_pad, int *right_pad)
{
int step = FIXED_POINT(src_nb) / (dst_nb); /* source step in fixed point */
@@ -575,8 +574,7 @@ static SDL_INLINE void INTERPOL_BILINEAR_NEON(const Uint32 *s0, const Uint32 *s1
*dst = vget_lane_u32(CAST_uint32x2_t e0, 0);
}
-static int
-scale_mat_NEON(const Uint32 *src, int src_w, int src_h, int src_pitch, Uint32 *dst, int dst_w, int dst_h, int dst_pitch)
+static int scale_mat_NEON(const Uint32 *src, int src_w, int src_h, int src_pitch, Uint32 *dst, int dst_w, int dst_h, int dst_pitch)
{
BILINEAR___START
diff --git a/src/video/SDL_surface.c b/src/video/SDL_surface.c
index a3d2dd3..a81ff7b 100644
--- a/src/video/SDL_surface.c
+++ b/src/video/SDL_surface.c
@@ -42,8 +42,7 @@ SDL_COMPILE_TIME_ASSERT(can_indicate_overflow, SDL_SIZE_MAX > SDL_MAX_SINT32);
*
* for FOURCC, use SDL_CalculateYUVSize()
*/
-static size_t
-SDL_CalculatePitch(Uint32 format, size_t width, SDL_bool minimal)
+static size_t SDL_CalculatePitch(Uint32 format, size_t width, SDL_bool minimal)
{
size_t pitch;
@@ -75,8 +74,7 @@ SDL_CalculatePitch(Uint32 format, size_t width, SDL_bool minimal)
* Create an empty RGB surface of the appropriate depth using the given
* enum SDL_PIXELFORMAT_* format
*/
-SDL_Surface *
-SDL_CreateRGBSurfaceWithFormat(Uint32 flags, int width, int height, int depth,
+SDL_Surface *SDL_CreateRGBSurfaceWithFormat(Uint32 flags, int width, int height, int depth,
Uint32 format)
{
size_t pitch;
@@ -187,8 +185,7 @@ SDL_CreateRGBSurfaceWithFormat(Uint32 flags, int width, int height, int depth,
/*
* Create an empty RGB surface of the appropriate depth
*/
-SDL_Surface *
-SDL_CreateRGBSurface(Uint32 flags,
+SDL_Surface *SDL_CreateRGBSurface(Uint32 flags,
int width, int height, int depth,
Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask)
{
@@ -207,8 +204,7 @@ SDL_CreateRGBSurface(Uint32 flags,
/*
* Create an RGB surface from an existing memory buffer
*/
-SDL_Surface *
-SDL_CreateRGBSurfaceFrom(void *pixels,
+SDL_Surface *SDL_CreateRGBSurfaceFrom(void *pixels,
int width, int height, int depth, int pitch,
Uint32 Rmask, Uint32 Gmask, Uint32 Bmask,
Uint32 Amask)
@@ -258,8 +254,7 @@ SDL_CreateRGBSurfaceFrom(void *pixels,
* Create an RGB surface from an existing memory buffer using the given given
* enum SDL_PIXELFORMAT_* format
*/
-SDL_Surface *
-SDL_CreateRGBSurfaceWithFormatFrom(void *pixels,
+SDL_Surface *SDL_CreateRGBSurfaceWithFormatFrom(void *pixels,
int width, int height, int depth, int pitch,
Uint32 format)
{
@@ -333,8 +328,7 @@ int SDL_SetSurfaceRLE(SDL_Surface *surface, int flag)
return 0;
}
-SDL_bool
-SDL_HasSurfaceRLE(SDL_Surface *surface)
+SDL_bool SDL_HasSurfaceRLE(SDL_Surface *surface)
{
if (surface == NULL) {
return SDL_FALSE;
@@ -377,8 +371,7 @@ int SDL_SetColorKey(SDL_Surface *surface, int flag, Uint32 key)
return 0;
}
-SDL_bool
-SDL_HasColorKey(SDL_Surface *surface)
+SDL_bool SDL_HasColorKey(SDL_Surface *surface)
{
if (surface == NULL) {
return SDL_FALSE;
@@ -643,8 +636,7 @@ int SDL_GetSurfaceBlendMode(SDL_Surface *surface, SDL_BlendMode *blendMode)
return 0;
}
-SDL_bool
-SDL_SetClipRect(SDL_Surface *surface, const SDL_Rect *rect)
+SDL_bool SDL_SetClipRect(SDL_Surface *surface, const SDL_Rect *rect)
{
SDL_Rect full_rect;
@@ -1132,8 +1124,7 @@ void SDL_UnlockSurface(SDL_Surface *surface)
/*
* Creates a new surface identical to the existing surface
*/
-SDL_Surface *
-SDL_DuplicateSurface(SDL_Surface *surface)
+SDL_Surface *SDL_DuplicateSurface(SDL_Surface *surface)
{
return SDL_ConvertSurface(surface, surface->format, surface->flags);
}
@@ -1141,8 +1132,7 @@ SDL_DuplicateSurface(SDL_Surface *surface)
/*
* Convert a surface into the specified pixel format.
*/
-SDL_Surface *
-SDL_ConvertSurface(SDL_Surface * surface, const SDL_PixelFormat * format,
+SDL_Surface *SDL_ConvertSurface(SDL_Surface * surface, const SDL_PixelFormat * format,
Uint32 flags)
{
SDL_Surface *convert;
@@ -1373,8 +1363,7 @@ SDL_ConvertSurface(SDL_Surface * surface, const SDL_PixelFormat * format,
return convert;
}
-SDL_Surface *
-SDL_ConvertSurfaceFormat(SDL_Surface * surface, Uint32 pixel_format,
+SDL_Surface *SDL_ConvertSurfaceFormat(SDL_Surface * surface, Uint32 pixel_format,
Uint32 flags)
{
SDL_PixelFormat *fmt;
diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c
index 455d058..73a4d2c 100644
--- a/src/video/SDL_video.c
+++ b/src/video/SDL_video.c
@@ -409,8 +409,7 @@ int SDL_GetNumVideoDrivers(void)
return SDL_arraysize(bootstrap) - 1;
}
-const char *
-SDL_GetVideoDriver(int index)
+const char *SDL_GetVideoDriver(int index)
{
if (index >= 0 && index < SDL_GetNumVideoDrivers()) {
return bootstrap[index]->name;
@@ -564,8 +563,7 @@ pre_driver_error:
return -1;
}
-const char *
-SDL_GetCurrentVideoDriver()
+const char *SDL_GetCurrentVideoDriver()
{
if (_this == NULL) {
SDL_UninitializedVideo();
@@ -574,14 +572,12 @@ SDL_GetCurrentVideoDriver()
return _this->name;
}
-SDL_VideoDevice *
-SDL_GetVideoDevice(void)
+SDL_VideoDevice *SDL_GetVideoDevice(void)
{
return _this;
}
-SDL_bool
-SDL_OnVideoThread()
+SDL_bool SDL_OnVideoThread()
{
return (_this && SDL_ThreadID() == _this->thread) ? SDL_TRUE : SDL_FALSE;
}
@@ -669,22 +665,19 @@ int SDL_GetIndexOfDisplay(SDL_VideoDisplay *display)
return 0;
}
-void *
-SDL_GetDisplayDriverData(int displayIndex)
+void *SDL_GetDisplayDriverData(int displayIndex)
{
CHECK_DISPLAY_INDEX(displayIndex, NULL);
return _this->displays[displayIndex].driverdata;
}
-SDL_bool
-SDL_IsVideoContextExternal(void)
+SDL_bool SDL_IsVideoContextExternal(void)
{
return SDL_GetHintBoolean(SDL_HINT_VIDEO_EXTERNAL_CONTEXT, SDL_FALSE);
}
-const char *
-SDL_GetDisplayName(int displayIndex)
+const char *SDL_GetDisplayName(int displayIndex)
{
CHECK_DISPLAY_INDEX(displayIndex, NULL);
@@ -773,8 +766,7 @@ int SDL_GetDisplayDPI(int displayIndex, float *ddpi, float *hdpi, float *vdpi)
return -1;
}
-SDL_DisplayOrientation
-SDL_GetDisplayOrientation(int displayIndex)
+SDL_DisplayOrientation SDL_GetDisplayOrientation(int displayIndex)
{
SDL_VideoDisplay *display;
@@ -784,8 +776,7 @@ SDL_GetDisplayOrientation(int displayIndex)
return display->orientation;
}
-SDL_bool
-SDL_AddDisplayMode(SDL_VideoDisplay *display, const SDL_DisplayMode *mode)
+SDL_bool SDL_AddDisplayMode(SDL_VideoDisplay *display, const SDL_DisplayMode *mode)
{
SDL_DisplayMode *modes;
int i, nmodes;
@@ -1013,8 +1004,7 @@ static SDL_DisplayMode *SDL_GetClosestDisplayModeForDisplay(SDL_VideoDisplay *di
return NULL;
}
-SDL_DisplayMode *
-SDL_GetClosestDisplayMode(int displayIndex,
+SDL_DisplayMode *SDL_GetClosestDisplayMode(int displayIndex,
const SDL_DisplayMode *mode,
SDL_DisplayMode *closest)
{
@@ -1082,8 +1072,7 @@ static int SDL_SetDisplayModeForDisplay(SDL_VideoDisplay *display, const SDL_Dis
return 0;
}
-SDL_VideoDisplay *
-SDL_GetDisplay(int displayIndex)
+SDL_VideoDisplay *SDL_GetDisplay(int displayIndex)
{
CHECK_DISPLAY_INDEX(displayIndex, NULL);
@@ -1227,8 +1216,7 @@ int SDL_GetWindowDisplayIndex(SDL_Window *window)
}
}
-SDL_VideoDisplay *
-SDL_GetDisplayForWindow(SDL_Window *window)
+SDL_VideoDisplay *SDL_GetDisplayForWindow(SDL_Window *window)
{
int displayIndex = SDL_GetWindowDisplayIndex(window);
if (displayIndex >= 0) {
@@ -1302,8 +1290,7 @@ int SDL_GetWindowDisplayMode(SDL_Window *window, SDL_DisplayMode *mode)
return 0;
}
-void *
-SDL_GetWindowICCProfile(SDL_Window *window, size_t *size)
+void *SDL_GetWindowICCProfile(SDL_Window *window, size_t *size)
{
if (!_this->GetWindowICCProfile) {
SDL_Unsupported();
@@ -1312,8 +1299,7 @@ SDL_GetWindowICCProfile(SDL_Window *window, size_t *size)
return _this->GetWindowICCProfile(_this, window, size);
}
-Uint32
-SDL_GetWindowPixelFormat(SDL_Window *window)
+Uint32 SDL_GetWindowPixelFormat(SDL_Window *window)
{
SDL_VideoDisplay *display;
@@ -1589,8 +1575,7 @@ static int SDL_DllNotSupported(const char *name)
return SDL_SetError("No dynamic %s support in current SDL video driver (%s)", name, _this->name);
}
-SDL_Window *
-SDL_CreateWindow(const char *title, int x, int y, int w, int h, Uint32 flags)
+SDL_Window *SDL_CreateWindow(const char *title, int x, int y, int w, int h, Uint32 flags)
{
SDL_Window *window;
Uint32 type_flags, graphics_flags;
@@ -1791,8 +1776,7 @@ SDL_CreateWindow(const char *title, int x, int y, int w, int h, Uint32 flags)
return window;
}
-SDL_Window *
-SDL_CreateWindowFrom(const void *data)
+SDL_Window *SDL_CreateWindowFrom(const void *data)
{
SDL_Window *window;
Uint32 flags = SDL_WINDOW_FOREIGN;
@@ -2000,22 +1984,19 @@ int SDL_RecreateWindow(SDL_Window *window, Uint32 flags)
return 0;
}
-SDL_bool
-SDL_HasWindows(void)
+SDL_bool SDL_HasWindows(void)
{
return _this && _this->windows != NULL;
}
-Uint32
-SDL_GetWindowID(SDL_Window *window)
+Uint32 SDL_GetWindowID(SDL_Window *window)
{
CHECK_WINDOW_MAGIC(window, 0);
return window->id;
}
-SDL_Window *
-SDL_GetWindowFromID(Uint32 id)
+SDL_Window *SDL_GetWindowFromID(Uint32 id)
{
SDL_Window *window;
@@ -2030,8 +2011,7 @@ SDL_GetWindowFromID(Uint32 id)
return NULL;
}
-Uint32
-SDL_GetWindowFlags(SDL_Window *window)
+Uint32 SDL_GetWindowFlags(SDL_Window *window)
{
CHECK_WINDOW_MAGIC(window, 0);
@@ -2054,8 +2034,7 @@ void SDL_SetWindowTitle(SDL_Window *window, const char *title)
}
}
-const char *
-SDL_GetWindowTitle(SDL_Window *window)
+const char *SDL_GetWindowTitle(SDL_Window *window)
{
CHECK_WINDOW_MAGIC(window, "");
@@ -2083,8 +2062,7 @@ void SDL_SetWindowIcon(SDL_Window *window, SDL_Surface *icon)
}
}
-void *
-SDL_SetWindowData(SDL_Window *window, const char *name, void *userdata)
+void *SDL_SetWindowData(SDL_Window *window, const char *name, void *userdata)
{
SDL_WindowUserData *prev, *data;
@@ -2130,8 +2108,7 @@ SDL_SetWindowData(SDL_Window *window, const char *name, void *userdata)
return NULL;
}
-void *
-SDL_GetWindowData(SDL_Window *window, const char *name)
+void *SDL_GetWindowData(SDL_Window *window, const char *name)
{
SDL_WindowUserData *data;
@@ -2693,8 +2670,7 @@ static SDL_Surface *SDL_CreateWindowFramebuffer(SDL_Window *window)
return SDL_CreateRGBSurfaceFrom(pixels, window->w, window->h, bpp, pitch, Rmask, Gmask, Bmask, Amask);
}
-SDL_Surface *
-SDL_GetWindowSurface(SDL_Window *window)
+SDL_Surface *SDL_GetWindowSurface(SDL_Window *window)
{
CHECK_WINDOW_MAGIC(window, NULL);
@@ -2740,8 +2716,7 @@ int SDL_UpdateWindowSurfaceRects(SDL_Window *window, const SDL_Rect *rects,
return _this->UpdateWindowFramebuffer(_this, window, rects, numrects);
}
-int
-SDL_SetWindowBrightness(SDL_Window * window, float brightness)
+int SDL_SetWindowBrightness(SDL_Window * window, float brightness)
{
Uint16 ramp[256];
int status;
@@ -2756,16 +2731,14 @@ SDL_SetWindowBrightness(SDL_Window * window, float brightness)
return status;
}
-float
-SDL_GetWindowBrightness(SDL_Window * window)
+float SDL_GetWindowBrightness(SDL_Window * window)
{
CHECK_WINDOW_MAGIC(window, 1.0f);
return window->brightness;
}
-int
-SDL_SetWindowOpacity(SDL_Window * window, float opacity)
+int SDL_SetWindowOpacity(SDL_Window * window, float opacity)
{
int retval;
CHECK_WINDOW_MAGIC(window, -1);
@@ -2823,8 +2796,7 @@ int SDL_SetWindowInputFocus(SDL_Window *window)
}
-int
-SDL_SetWindowGammaRamp(SDL_Window * window, const Uint16 * red,
+int SDL_SetWindowGammaRamp(SDL_Window * window, const Uint16 * red,
const Uint16 * green,
const Uint16 * blue)
{
@@ -2857,8 +2829,7 @@ SDL_SetWindowGammaRamp(SDL_Window * window, const Uint16 * red,
}
}
-int
-SDL_GetWindowGammaRamp(SDL_Window * window, Uint16 * red,
+int SDL_GetWindowGammaRamp(SDL_Window * window, Uint16 * red,
Uint16 * green,
Uint16 * blue)
{
@@ -2902,8 +2873,7 @@ SDL_GetWindowGammaRamp(SDL_Window * window, Uint16 * red,
return 0;
}
-void
-SDL_UpdateWindowGrab(SDL_Window * window)
+void SDL_UpdateWindowGrab(SDL_Window * window)
{
SDL_bool keyboard_grabbed, mouse_grabbed;
@@ -2989,28 +2959,24 @@ void SDL_SetWindowMouseGrab(SDL_Window *window, SDL_bool grabbed)
SDL_UpdateWindowGrab(window);
}
-SDL_bool
-SDL_GetWindowGrab(SDL_Window *window)
+SDL_bool SDL_GetWindowGrab(SDL_Window *window)
{
return SDL_GetWindowKeyboardGrab(window) || SDL_GetWindowMouseGrab(window);
}
-SDL_bool
-SDL_GetWindowKeyboardGrab(SDL_Window *window)
+SDL_bool SDL_GetWindowKeyboardGrab(SDL_Window *window)
{
CHECK_WINDOW_MAGIC(window, SDL_FALSE);
return window == _this->grabbed_window && (_this->grabbed_window->flags & SDL_WINDOW_KEYBOARD_GRABBED);
}
-SDL_bool
-SDL_GetWindowMouseGrab(SDL_Window *window)
+SDL_bool SDL_GetWindowMouseGrab(SDL_Window *window)
{
CHECK_WINDOW_MAGIC(window, SDL_FALSE);
return window == _this->grabbed_window && (_this->grabbed_window->flags & SDL_WINDOW_MOUSE_GRABBED);
}
-SDL_Window *
-SDL_GetGrabbedWindow(void)
+SDL_Window *SDL_GetGrabbedWindow(void)
{
if (_this->grabbed_window &&
(_this->grabbed_window->flags & (SDL_WINDOW_MOUSE_GRABBED | SDL_WINDOW_KEYBOARD_GRABBED))) {
@@ -3036,8 +3002,7 @@ int SDL_SetWindowMouseRect(SDL_Window *window, const SDL_Rect *rect)
return 0;
}
-const SDL_Rect *
-SDL_GetWindowMouseRect(SDL_Window *window)
+const SDL_Rect *SDL_GetWindowMouseRect(SDL_Window *window)
{
CHECK_WINDOW_MAGIC(window, NULL);
@@ -3198,8 +3163,7 @@ void SDL_OnWindowFocusLost(SDL_Window *window)
/* !!! FIXME: is this different than SDL_GetKeyboardFocus()?
!!! FIXME: Also, SDL_GetKeyboardFocus() is O(1), this isn't. */
-SDL_Window *
-SDL_GetFocusWindow(void)
+SDL_Window *SDL_GetFocusWindow(void)
{
SDL_Window *window;
@@ -3308,8 +3272,7 @@ void SDL_DestroyWindow(SDL_Window *window)
SDL_free(window);
}
-SDL_bool
-SDL_IsScreenSaverEnabled()
+SDL_bool SDL_IsScreenSaverEnabled()
{
if (_this == NULL) {
return SDL_TRUE;
@@ -3417,8 +3380,7 @@ int SDL_GL_LoadLibrary(const char *path)
return retval;
}
-void *
-SDL_GL_GetProcAddress(const char *proc)
+void *SDL_GL_GetProcAddress(const char *proc)
{
void *func;
@@ -3439,8 +3401,7 @@ SDL_GL_GetProcAddress(const char *proc)
return func;
}
-void
-SDL_GL_UnloadLibrary(void)
+void SDL_GL_UnloadLibrary(void)
{
if (_this == NULL) {
SDL_UninitializedVideo();
@@ -3463,8 +3424,7 @@ static SDL_INLINE SDL_bool isAtLeastGL3(const char *verstr)
}
#endif
-SDL_bool
-SDL_GL_ExtensionSupported(const char *extension)
+SDL_bool SDL_GL_ExtensionSupported(const char *extension)
{
#if SDL_VIDEO_OPENGL || SDL_VIDEO_OPENGL_ES || SDL_VIDEO_OPENGL_ES2
const GLubyte *(APIENTRY * glGetStringFunc)(GLenum);
@@ -3580,8 +3540,7 @@ void SDL_GL_DeduceMaxSupportedESProfile(int *major, int *minor)
#endif
}
-void
-SDL_GL_ResetAttributes()
+void SDL_GL_ResetAttributes()
{
if (_this == NULL) {
return;
@@ -4020,8 +3979,7 @@ int SDL_GL_GetAttribute(SDL_GLattr attr, int *value)
#define NOT_AN_OPENGL_WINDOW "The specified window isn't an OpenGL window"
-SDL_GLContext
-SDL_GL_CreateContext(SDL_Window *window)
+SDL_GLContext SDL_GL_CreateContext(SDL_Window *window)
{
SDL_GLContext ctx = NULL;
CHECK_WINDOW_MAGIC(window, NULL);
@@ -4079,8 +4037,7 @@ int SDL_GL_MakeCurrent(SDL_Window *window, SDL_GLContext context)
return retval;
}
-SDL_Window *
-SDL_GL_GetCurrentWindow(void)
+SDL_Window *SDL_GL_GetCurrentWindow(void)
{
if (_this == NULL) {
SDL_UninitializedVideo();
@@ -4089,8 +4046,7 @@ SDL_GL_GetCurrentWindow(void)
return (SDL_Window *)SDL_TLSGet(_this->current_glwin_tls);
}
-SDL_GLContext
-SDL_GL_GetCurrentContext(void)
+SDL_GLContext SDL_GL_GetCurrentContext(void)
{
if (_this == NULL) {
SDL_UninitializedVideo();
@@ -4238,8 +4194,7 @@ static void CreateMaskFromColorKeyOrAlpha(SDL_Surface * icon, Uint8 * mask, int
/*
* Sets the window manager icon for the display window.
*/
-void
-SDL_WM_SetIcon(SDL_Surface * icon, Uint8 * mask)
+void SDL_WM_SetIcon(SDL_Surface * icon, Uint8 * mask)
{
if (icon && _this->SetIcon) {
/* Generate a mask if necessary, and create the icon! */
@@ -4267,8 +4222,7 @@ SDL_WM_SetIcon(SDL_Surface * icon, Uint8 * mask)
}
#endif
-SDL_bool
-SDL_GetWindowWMInfo(SDL_Window * window, struct SDL_SysWMinfo *info)
+SDL_bool SDL_GetWindowWMInfo(SDL_Window * window, struct SDL_SysWMinfo *info)
{
CHECK_WINDOW_MAGIC(window, SDL_FALSE);
@@ -4314,8 +4268,7 @@ void SDL_ClearComposition(void)
}
}
-SDL_bool
-SDL_IsTextInputShown(void)
+SDL_bool SDL_IsTextInputShown(void)
{
if (_this && _this->IsTextInputShown) {
return _this->IsTextInputShown(_this);
@@ -4324,8 +4277,7 @@ SDL_IsTextInputShown(void)
return SDL_FALSE;
}
-SDL_bool
-SDL_IsTextInputActive(void)
+SDL_bool SDL_IsTextInputActive(void)
{
return SDL_GetEventState(SDL_TEXTINPUT) == SDL_ENABLE;
}
@@ -4359,8 +4311,7 @@ void SDL_SetTextInputRect(const SDL_Rect *rect)
}
}
-SDL_bool
-SDL_HasScreenKeyboardSupport(void)
+SDL_bool SDL_HasScreenKeyboardSupport(void)
{
if (_this && _this->HasScreenKeyboardSupport) {
return _this->HasScreenKeyboardSupport(_this);
@@ -4368,8 +4319,7 @@ SDL_HasScreenKeyboardSupport(void)
return SDL_FALSE;
}
-SDL_bool
-SDL_IsScreenKeyboardShown(SDL_Window *window)
+SDL_bool SDL_IsScreenKeyboardShown(SDL_Window *window)
{
if (window && _this && _this->IsScreenKeyboardShown) {
return _this->IsScreenKeyboardShown(_this, window);
@@ -4614,8 +4564,7 @@ int SDL_ShowSimpleMessageBox(Uint32 flags, const char *title, const char *messag
#endif
}
-SDL_bool
-SDL_ShouldAllowTopmost(void)
+SDL_bool SDL_ShouldAllowTopmost(void)
{
return SDL_GetHintBoolean(SDL_HINT_ALLOW_TOPMOST, SDL_TRUE);
}
@@ -4803,8 +4752,7 @@ void SDL_Vulkan_GetDrawableSize(SDL_Window *window, int *w, int *h)
}
}
-SDL_MetalView
-SDL_Metal_CreateView(SDL_Window *window)
+SDL_MetalView SDL_Metal_CreateView(SDL_Window *window)
{
CHECK_WINDOW_MAGIC(window, NULL);
@@ -4831,8 +4779,7 @@ void SDL_Metal_DestroyView(SDL_MetalView view)
}
}
-void *
-SDL_Metal_GetLayer(SDL_MetalView view)
+void *SDL_Metal_GetLayer(SDL_MetalView view)
{
if (_this && _this->Metal_GetLayer) {
if (view) {
diff --git a/src/video/android/SDL_androidclipboard.c b/src/video/android/SDL_androidclipboard.c
index 54461ad..bd80a01 100644
--- a/src/video/android/SDL_androidclipboard.c
+++ b/src/video/android/SDL_androidclipboard.c
@@ -31,8 +31,7 @@ int Android_SetClipboardText(_THIS, const char *text)
return Android_JNI_SetClipboardText(text);
}
-char *
-Android_GetClipboardText(_THIS)
+char *Android_GetClipboardText(_THIS)
{
return Android_JNI_GetClipboardText();
}
diff --git a/src/video/android/SDL_androidgl.c b/src/video/android/SDL_androidgl.c
index 7dada14..e54dbbe 100644
--- a/src/video/android/SDL_androidgl.c
+++ b/src/video/android/SDL_androidgl.c
@@ -45,8 +45,7 @@ int Android_GLES_MakeCurrent(_THIS, SDL_Window *window, SDL_GLContext context)
}
}
-SDL_GLContext
-Android_GLES_CreateContext(_THIS, SDL_Window *window)
+SDL_GLContext Android_GLES_CreateContext(_THIS, SDL_Window *window)
{
SDL_GLContext ret;
diff --git a/src/video/android/SDL_androidkeyboard.c b/src/video/android/SDL_androidkeyboard.c
index 9c8698d..ba65201 100644
--- a/src/video/android/SDL_androidkeyboard.c
+++ b/src/video/android/SDL_androidkeyboard.c
@@ -336,14 +336,12 @@ int Android_OnKeyUp(int keycode)
return SDL_SendKeyboardKey(SDL_RELEASED, TranslateKeycode(keycode));
}
-SDL_bool
-Android_HasScreenKeyboardSupport(_THIS)
+SDL_bool Android_HasScreenKeyboardSupport(_THIS)
{
return SDL_TRUE;
}
-SDL_bool
-Android_IsScreenKeyboardShown(_THIS, SDL_Window *window)
+SDL_bool Android_IsScreenKeyboardShown(_THIS, SDL_Window *window)
{
return Android_JNI_IsScreenKeyboardShown();
}
diff --git a/src/video/android/SDL_androidwindow.c b/src/video/android/SDL_androidwindow.c
index d9eaf5f..9b35739 100644
--- a/src/video/android/SDL_androidwindow.c
+++ b/src/video/android/SDL_androidwindow.c
@@ -197,8 +197,7 @@ void Android_DestroyWindow(_THIS, SDL_Window *window)
SDL_UnlockMutex(Android_ActivityMutex);
}
-SDL_bool
-Android_GetWindowWMInfo(_THIS, SDL_Window *window, SDL_SysWMinfo *info)
+SDL_bool Android_GetWindowWMInfo(_THIS, SDL_Window *window, SDL_SysWMinfo *info)
{
SDL_WindowData *data = (SDL_WindowData *)window->driverdata;
diff --git a/src/video/cocoa/SDL_cocoaclipboard.m b/src/video/cocoa/SDL_cocoaclipboard.m
index ca50bd7..c64f2e4 100644
--- a/src/video/cocoa/SDL_cocoaclipboard.m
+++ b/src/video/cocoa/SDL_cocoaclipboard.m
@@ -25,8 +25,7 @@
#include "SDL_cocoavideo.h"
#include "../../events/SDL_clipboardevents_c.h"
-int
-Cocoa_SetClipboardText(_THIS, const char *text)
+int Cocoa_SetClipboardText(_THIS, const char *text)
{ @autoreleasepool
{
SDL_VideoData *data = (__bridge SDL_VideoData *) _this->driverdata;
@@ -44,8 +43,7 @@ Cocoa_SetClipboardText(_THIS, const char *text)
return 0;
}}
-char *
-Cocoa_GetClipboardText(_THIS)
+char *Cocoa_GetClipboardText(_THIS)
{ @autoreleasepool
{
NSPasteboard *pasteboard;
@@ -73,8 +71,7 @@ Cocoa_GetClipboardText(_THIS)
return text;
}}
-SDL_bool
-Cocoa_HasClipboardText(_THIS)
+SDL_bool Cocoa_HasClipboardText(_THIS)
{
SDL_bool result = SDL_FALSE;
char *text = Cocoa_GetClipboardText(_this);
@@ -85,8 +82,7 @@ Cocoa_HasClipboardText(_THIS)
return result;
}
-void
-Cocoa_CheckClipboardUpdate(SDL_VideoData * data)
+void Cocoa_CheckClipboardUpdate(SDL_VideoData * data)
{ @autoreleasepool
{
NSPasteboard *pasteboard;
diff --git a/src/video/cocoa/SDL_cocoaevents.m b/src/video/cocoa/SDL_cocoaevents.m
index b929389..99db10c 100644
--- a/src/video/cocoa/SDL_cocoaevents.m
+++ b/src/video/cocoa/SDL_cocoaevents.m
@@ -314,8 +314,7 @@ static void Cocoa_DispatchEvent(NSEvent *theEvent)
static SDLAppDelegate *appDelegate = nil;
-static NSString *
-GetApplicationName(void)
+static NSString *GetApplicationName(void)
{
NSString *appName;
@@ -332,8 +331,7 @@ GetApplicationName(void)
return appName;
}
-static bool
-LoadMainMenuNibIfAvailable(void)
+static bool LoadMainMenuNibIfAvailable(void)
{
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1080
NSDictionary *infoDict;
@@ -346,20 +344,19 @@ LoadMainMenuNibIfAvailable(void)
infoDict = [[NSBundle mainBundle] infoDictionary];
if (infoDict) {
mainNibFileName = [infoDict valueForKey:@"NSMainNibFile"];
-
+
if (mainNibFileName) {
success = [[NSBundle mainBundle] loadNibNamed:mainNibFileName owner:[NSApplication sharedApplication] topLevelObjects:nil];
}
}
-
+
return success;
#else
return false;
#endif
}
-static void
-CreateApplicationMenus(void)
+static void CreateApplicationMenus(void)
{
NSString *appName;
NSString *title;
@@ -372,7 +369,7 @@ CreateApplicationMenus(void)
if (NSApp == nil) {
return;
}
-
+
mainMenu = [[NSMenu alloc] init];
/* Create the main menu bar */
@@ -430,7 +427,7 @@ CreateApplicationMenus(void)
[windowMenu addItemWithTitle:@"Minimize" action:@selector(performMiniaturize:) keyEquivalent:@"m"];
[windowMenu addItemWithTitle:@"Zoom" action:@selector(performZoom:) keyEquivalent:@""];
-
+
/* Add the fullscreen toggle menu option. */
/* Cocoa should update the title to Enter or Exit Full Screen automatically.
* But if not, then just fallback to Toggle Full Screen.
@@ -448,8 +445,7 @@ CreateApplicationMenus(void)
[NSApp setWindowsMenu:windowMenu];
}
-void
-Cocoa_RegisterApp(void)
+void Cocoa_RegisterApp(void)
{ @autoreleasepool
{
/* This can get called more than once! Be careful what you initialize! */
@@ -470,7 +466,7 @@ Cocoa_RegisterApp(void)
*/
if ([NSApp mainMenu] == nil) {
bool nibLoaded;
-
+
nibLoaded = LoadMainMenuNibIfAvailable();
if (!nibLoaded) {
CreateApplicationMenus();
@@ -507,8 +503,7 @@ Cocoa_RegisterApp(void)
}
}}
-int
-Cocoa_PumpEventsUntilDate(_THIS, NSDate *expiration, bool accumulate)
+int Cocoa_PumpEventsUntilDate(_THIS, NSDate *expiration, bool accumulate)
{
for ( ; ; ) {
NSEvent *event = [NSApp nextEventMatchingMask:NSEventMaskAny untilDate:expiration inMode:NSDefaultRunLoopMode dequeue:YES ];
@@ -529,8 +524,7 @@ Cocoa_PumpEventsUntilDate(_THIS, NSDate *expiration, bool accumulate)
return 1;
}
-int
-Cocoa_WaitEventTimeout(_THIS, int timeout)
+int Cocoa_WaitEventTimeout(_THIS, int timeout)
{ @autoreleasepool
{
if (timeout > 0) {
@@ -545,8 +539,7 @@ Cocoa_WaitEventTimeout(_THIS, int timeout)
return 1;
}}
-void
-Cocoa_PumpEvents(_THIS)
+void Cocoa_PumpEvents(_THIS)
{ @autoreleasepool
{
Cocoa_PumpEventsUntilDate(_this, [NSDate distantPast], true);
@@ -568,8 +561,7 @@ void Cocoa_SendWakeupEvent(_THIS, SDL_Window *window)
[NSApp postEvent: event atStart: YES];
}}
-void
-Cocoa_SuspendScreenSaver(_THIS)
+void Cocoa_SuspendScreenSaver(_THIS)
{ @autoreleasepool
{
SDL_VideoData *data = (__bridge SDL_VideoData *)_this->driverdata;
diff --git a/src/video/cocoa/SDL_cocoakeyboard.m b/src/video/cocoa/SDL_cocoakeyboard.m
index 9c49deb..08ee18d 100644
--- a/src/video/cocoa/SDL_cocoakeyboard.m
+++ b/src/video/cocoa/SDL_cocoakeyboard.m
@@ -197,8 +197,7 @@ static bool IsModifierKeyPressed(unsigned int flags,
return target_pressed;
}
-static void
-HandleModifiers(_THIS, SDL_Scancode code, unsigned int modifierFlags)
+static void HandleModifiers(_THIS, SDL_Scancode code, unsigned int modifierFlags)
{
bool pressed = false;
@@ -237,8 +236,7 @@ HandleModifiers(_THIS, SDL_Scancode code, unsigned int modifierFlags)
}
}
-static void
-UpdateKeymap(SDL_VideoData *data, SDL_bool send_event)
+static void UpdateKeymap(SDL_VideoData *data, SDL_bool send_event)
{
TISInputSourceRef key_layout;
const void *chr_data;
@@ -280,7 +278,7 @@ UpdateKeymap(SDL_VideoData *data, SDL_bool send_event)
continue;
}
- /*
+ /*
* Swap the scancode for these two wrongly translated keys
* UCKeyTranslate() function does not do its job properly for ISO layout keyboards, where the key '@',
* which is located in the top left corner of the keyboard right under the Escape key, and the additional
@@ -313,8 +311,7 @@ cleanup:
CFRelease(key_layout);
}
-void
-Cocoa_InitKeyboard(_THIS)
+void Cocoa_InitKeyboard(_THIS)
{
SDL_VideoData *data = (__bridge SDL_VideoData *) _this->driverdata;
@@ -332,8 +329,7 @@ Cocoa_InitKeyboard(_THIS)
SDL_ToggleModState(KMOD_CAPS, (data.modifierFlags & NSEventModifierFlagCapsLock) ? SDL_TRUE : SDL_FALSE);
}
-void
-Cocoa_StartTextInput(_THIS)
+void Cocoa_StartTextInput(_THIS)
{ @autoreleasepool
{
NSView *parentView;
@@ -364,8 +360,7 @@ Cocoa_StartTextInput(_THIS)
}
}}
-void
-Cocoa_StopTextInput(_THIS)
+void Cocoa_StopTextInput(_THIS)
{ @autoreleasepool
{
SDL_VideoData *data = (__bridge SDL_VideoData *) _this->driverdata;
@@ -376,8 +371,7 @@ Cocoa_StopTextInput(_THIS)
}
}}
-void
-Cocoa_SetTextInputRect(_THIS, const SDL_Rect *rect)
+void Cocoa_SetTextInputRect(_THIS, const SDL_Rect *rect)
{
SDL_VideoData *data = (__bridge SDL_VideoData *) _this->driverdata;
@@ -389,8 +383,7 @@ Cocoa_SetTextInputRect(_THIS, const SDL_Rect *rect)
[data.fieldEdit setInputRect:rect];
}
-void
-Cocoa_HandleKeyEvent(_THIS, NSEvent *event)
+void Cocoa_HandleKeyEvent(_THIS, NSEvent *event)
{
unsigned short scancode;
SDL_Scancode code;
@@ -452,8 +445,7 @@ Cocoa_HandleKeyEvent(_THIS, NSEvent *event)
}
}
-void
-Cocoa_QuitKeyboard(_THIS)
+void Cocoa_QuitKeyboard(_THIS)
{
}
@@ -466,8 +458,7 @@ typedef enum {
extern CGSConnection _CGSDefaultConnection(void);
extern CGError CGSSetGlobalHotKeyOperatingMode(CGSConnection connection, CGSGlobalHotKeyOperatingMode mode);
-void
-Cocoa_SetWindowKeyboardGrab(_THIS, SDL_Window * window, SDL_bool grabbed)
+void Cocoa_SetWindowKeyboardGrab(_THIS, SDL_Window * window, SDL_bool grabbed)
{
#if SDL_MAC_NO_SANDBOX
CGSSetGlobalHotKeyOperatingMode(_CGSDefaultConnection(), grabbed ? CGSGlobalHotKeyDisable : CGSGlobalHotKeyEnable);
diff --git a/src/video/cocoa/SDL_cocoamessagebox.m b/src/video/cocoa/SDL_cocoamessagebox.m
index a8d8943..a8f29a9 100644
--- a/src/video/cocoa/SDL_cocoamessagebox.m
+++ b/src/video/cocoa/SDL_cocoamessagebox.m
@@ -69,8 +69,7 @@
@end
-static void
-Cocoa_ShowMessageBoxImpl(const SDL_MessageBoxData *messageboxdata, int *buttonid, int *returnValue)
+static void Cocoa_ShowMessageBoxImpl(const SDL_MessageBoxData *messageboxdata, int *buttonid, int *returnValue)
{
NSAlert* alert;
const SDL_MessageBoxButtonData *buttons = messageboxdata->buttons;
@@ -130,8 +129,7 @@ Cocoa_ShowMessageBoxImpl(const SDL_MessageBoxData *messageboxdata, int *buttonid
}
/* Display a Cocoa message box */
-int
-Cocoa_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid)
+int Cocoa_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid)
{ @autoreleasepool
{
__block int returnValue = 0;
diff --git a/src/video/cocoa/SDL_cocoametalview.m b/src/video/cocoa/SDL_cocoametalview.m
index 2f1b73b..fab4652 100644
--- a/src/video/cocoa/SDL_cocoametalview.m
+++ b/src/video/cocoa/SDL_cocoametalview.m
@@ -131,8 +131,7 @@ SDL_MetalViewEventWatch(void *userdata, SDL_Event *event)
@end
-SDL_MetalView
-Cocoa_Metal_CreateView(_THIS, SDL_Window * window)
+SDL_MetalView Cocoa_Metal_CreateView(_THIS, SDL_Window * window)
{ @autoreleasepool {
SDL_WindowData* data = (__bridge SDL_WindowData *)window->driverdata;
NSView *view = data.nswindow.contentView;
@@ -159,22 +158,19 @@ Cocoa_Metal_CreateView(_THIS, SDL_Window * window)
return metalview;
}}
-void
-Cocoa_Metal_DestroyView(_THIS, SDL_MetalView view)
+void Cocoa_Metal_DestroyView(_THIS, SDL_MetalView view)
{ @autoreleasepool {
SDL_cocoametalview *metalview = CFBridgingRelease(view);
[metalview removeFromSuperview];
}}
-void *
-Cocoa_Metal_GetLayer(_THIS, SDL_MetalView view)
+void *Cocoa_Metal_GetLayer(_THIS, SDL_MetalView view)
{ @autoreleasepool {
SDL_cocoametalview *cocoaview = (__bridge SDL_cocoametalview *)view;
return (__bridge void *)cocoaview.layer;
}}
-void
-Cocoa_Metal_GetDrawableSize(_THIS, SDL_Window * window, int * w, int * h)
+void Cocoa_Metal_GetDrawableSize(_THIS, SDL_Window * window, int * w, int * h)
{ @autoreleasepool {
SDL_WindowData *data = (__bridge SDL_WindowData *)window->driverdata;
NSView *contentView = data.sdlContentView;
diff --git a/src/video/cocoa/SDL_cocoamodes.m b/src/video/cocoa/SDL_cocoamodes.m
index 7f36625..0517302 100644
--- a/src/video/cocoa/SDL_cocoamodes.m
+++ b/src/video/cocoa/SDL_cocoamodes.m
@@ -42,8 +42,7 @@
#endif
-static int
-CG_SetError(const char *prefix, CGDisplayErr result)
+static int CG_SetError(const char *prefix, CGDisplayErr result)
{
const char *error;
@@ -85,8 +84,7 @@ CG_SetError(const char *prefix, CGDisplayErr result)
return SDL_SetError("%s: %s", prefix, error);
}
-static int
-GetDisplayModeRefreshRate(CGDisplayModeRef vidmode, CVDisplayLinkRef link)
+static int GetDisplayModeRefreshRate(CGDisplayModeRef vidmode, CVDisplayLinkRef link)
{
int refreshRate = (int) (CGDisplayModeGetRefreshRate(vidmode) + 0.5);
@@ -101,8 +99,7 @@ GetDisplayModeRefreshRate(CGDisplayModeRef vidmode, CVDisplayLinkRef link)
return refreshRate;
}
-static SDL_bool
-HasValidDisplayModeFlags(CGDisplayModeRef vidmode)
+static SDL_bool HasValidDisplayModeFlags(CGDisplayModeRef vidmode)
{
uint32_t ioflags = CGDisplayModeGetIOFlags(vidmode);
@@ -119,8 +116,7 @@ HasValidDisplayModeFlags(CGDisplayModeRef vidmode)
return SDL_TRUE;
}
-static Uint32
-GetDisplayModePixelFormat(CGDisplayModeRef vidmode)
+static Uint32 GetDisplayModePixelFormat(CGDisplayModeRef vidmode)
{
/* This API is deprecated in 10.11 with no good replacement (as of 10.15). */
CFStringRef fmt = CGDisplayModeCopyPixelEncoding(vidmode);
@@ -144,8 +140,7 @@ GetDisplayModePixelFormat(CGDisplayModeRef vidmode)
return pixelformat;
}
-static SDL_bool
-GetDisplayMode(_THIS, CGDisplayModeRef vidmode, SDL_bool vidmodeCurrent, CFArrayRef modelist, CVDisplayLinkRef link, SDL_DisplayMode *mode)
+static SDL_bool GetDisplayMode(_THIS, CGDisplayModeRef vidmode, SDL_bool vidmodeCurrent, CFArrayRef modelist, CVDisplayLinkRef link, SDL_DisplayMode *mode)
{
SDL_DisplayModeData *data;
bool usableForGUI = CGDisplayModeIsUsableForDesktopGUI(vidmode);
@@ -283,8 +278,7 @@ GetDisplayMode(_THIS, CGDisplayModeRef vidmode, SDL_bool vidmodeCurrent, CFArray
return SDL_TRUE;
}
-static const char *
-Cocoa_GetDisplayName(CGDirectDisplayID displayID)
+static const char *Cocoa_GetDisplayName(CGDirectDisplayID displayID)
{
/* This API is deprecated in 10.9 with no good replacement (as of 10.15). */
io_service_t servicePort = CGDisplayIOServicePort(displayID);
@@ -299,8 +293,7 @@ Cocoa_GetDisplayName(CGDirectDisplayID displayID)
return displayName;
}
-void
-Cocoa_InitModes(_THIS)
+void Cocoa_InitModes(_THIS)
{ @autoreleasepool
{
CGDisplayErr result;
@@ -384,8 +377,7 @@ Cocoa_InitModes(_THIS)
SDL_small_free(displays, isstack);
}}
-int
-Cocoa_GetDisplayBounds(_THIS, SDL_VideoDisplay * display, SDL_Rect * rect)
+int Cocoa_GetDisplayBounds(_THIS, SDL_VideoDisplay * display, SDL_Rect * rect)
{
SDL_DisplayData *displaydata = (SDL_DisplayData *) display->driverdata;
CGRect cgrect;
@@ -398,8 +390,7 @@ Cocoa_GetDisplayBounds(_THIS, SDL_VideoDisplay * display, SDL_Rect * rect)
return 0;
}
-int
-Cocoa_GetDisplayUsableBounds(_THIS, SDL_VideoDisplay * display, SDL_Rect * rect)
+int Cocoa_GetDisplayUsableBounds(_THIS, SDL_VideoDisplay * display, SDL_Rect * rect)
{
SDL_DisplayData *displaydata = (SDL_DisplayData *) display->driverdata;
const CGDirectDisplayID cgdisplay = displaydata->display;
@@ -431,8 +422,7 @@ Cocoa_GetDisplayUsableBounds(_THIS, SDL_VideoDisplay * display, SDL_Rect * rect)
return 0;
}
-int
-Cocoa_GetDisplayDPI(_THIS, SDL_VideoDisplay * display, float * ddpi, float * hdpi, float * vdpi)
+int Cocoa_GetDisplayDPI(_THIS, SDL_VideoDisplay * display, float * ddpi, float * hdpi, float * vdpi)
{ @autoreleasepool
{
const float MM_IN_INCH = 25.4f;
@@ -445,7 +435,7 @@ Cocoa_GetDisplayDPI(_THIS, SDL_VideoDisplay * display, float * ddpi, float * hdp
NSSize displayNativeSize;
displayNativeSize.width = (int) CGDisplayPixelsWide(data->display);
displayNativeSize.height = (int) CGDisplayPixelsHigh(data->display);
-
+
for (NSScreen *screen in screens) {
const CGDirectDisplayID dpyid = (const CGDirectDisplayID ) [[[screen deviceDescription] objectForKey:@"NSScreenNumber"] unsignedIntValue];
if (dpyid == data->display) {
@@ -462,7 +452,7 @@ Cocoa_GetDisplayDPI(_THIS, SDL_VideoDisplay * display, float * ddpi, float * hdp
CGFloat width = CGDisplayModeGetPixelWidth(m);
CGFloat height = CGDisplayModeGetPixelHeight(m);
CGFloat HiDPIWidth = CGDisplayModeGetWidth(m);
-
+
//Only check 1x mode
if(width == HiDPIWidth) {
if (CGDisplayModeGetIOFlags(m) & kDisplayModeNativeFlag) {
@@ -470,7 +460,7 @@ Cocoa_GetDisplayDPI(_THIS, SDL_VideoDisplay * display, float * ddpi, float * hdp
displayNativeSize.height = height;
break;
}
-
+
//Get the largest size even if kDisplayModeNativeFlag is not present e.g. iMac 27-Inch with 5K Retina
if(width > displayNativeSize.width) {
displayNativeSize.width = width;
@@ -510,8 +500,7 @@ Cocoa_GetDisplayDPI(_THIS, SDL_VideoDisplay * display, float * ddpi, float * hdp
return 0;
}}
-void
-Cocoa_GetDisplayModes(_THIS, SDL_VideoDisplay * display)
+void Cocoa_GetDisplayModes(_THIS, SDL_VideoDisplay * display)
{
SDL_DisplayData *data = (SDL_DisplayData *) display->driverdata;
CVDisplayLinkRef link = NULL;
@@ -591,8 +580,7 @@ Cocoa_GetDisplayModes(_THIS, SDL_VideoDisplay * display)
CVDisplayLinkRelease(link);
}
-static CGError
-SetDisplayModeForDisplay(CGDirectDisplayID display, SDL_DisplayModeData *data)
+static CGError SetDisplayModeForDisplay(CGDirectDisplayID display, SDL_DisplayModeData *data)
{
/* SDL_DisplayModeData can contain multiple CGDisplayModes to try (with
* identical properties), some of which might not work. See GetDisplayMode.
@@ -610,8 +598,7 @@ SetDisplayModeForDisplay(CGDirectDisplayID display, SDL_DisplayModeData *data)
return result;
}
-int
-Cocoa_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode)
+int Cocoa_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode)
{
SDL_DisplayData *displaydata = (SDL_DisplayData *) display->driverdata;
SDL_DisplayModeData *data = (SDL_DisplayModeData *) mode->driverdata;
@@ -676,8 +663,7 @@ ERR_NO_CAPTURE:
return -1;
}
-void
-Cocoa_QuitModes(_THIS)
+void Cocoa_QuitModes(_THIS)
{
int i, j;
diff --git a/src/video/cocoa/SDL_cocoamouse.m b/src/video/cocoa/SDL_cocoamouse.m
index a7f59a0..0321c6c 100644
--- a/src/video/cocoa/SDL_cocoamouse.m
+++ b/src/video/cocoa/SDL_cocoamouse.m
@@ -63,8 +63,7 @@
@end
-static SDL_Cursor *
-Cocoa_CreateDefaultCursor()
+static SDL_Cursor *Cocoa_CreateDefaultCursor()
{ @autoreleasepool
{
NSCursor *nscursor;
@@ -82,8 +81,7 @@ Cocoa_CreateDefaultCursor()
return cursor;
}}
-static SDL_Cursor *
-Cocoa_CreateCursor(SDL_Surface * surface, int hot_x, int hot_y)
+static SDL_Cursor *Cocoa_CreateCursor(SDL_Surface * surface, int hot_x, int hot_y)
{ @autoreleasepool
{
NSImage *nsimage;
@@ -108,8 +106,7 @@ Cocoa_CreateCursor(SDL_Surface * surface, int hot_x, int hot_y)
/* there are .pdf files of some of the cursors we need, installed by default on macOS, but not available through NSCursor.
If we can load them ourselves, use them, otherwise fallback to something standard but not super-great.
Since these are under /System, they should be available even to sandboxed apps. */
-static NSCursor *
-LoadHiddenSystemCursor(NSString *cursorName, SEL fallback)
+static NSCursor *LoadHiddenSystemCursor(NSString *cursorName, SEL fallback)
{
NSString *cursorPath = [@"/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HIServices.framework/Versions/A/Resources/cursors" stringByAppendingPathComponent:cursorName];
NSDictionary *info = [NSDictionary dictionaryWithContentsOfFile:[cursorPath stringByAppendingPathComponent:@"info.plist"]];
@@ -146,8 +143,7 @@ LoadHiddenSystemCursor(NSString *cursorName, SEL fallback)
return cursor;
}
-static SDL_Cursor *
-Cocoa_CreateSystemCursor(SDL_SystemCursor id)
+static SDL_Cursor *Cocoa_CreateSystemCursor(SDL_SystemCursor id)
{ @autoreleasepool
{
NSCursor *nscursor = NULL;
@@ -206,16 +202,14 @@ Cocoa_CreateSystemCursor(SDL_SystemCursor id)
return cursor;
}}
-static void
-Cocoa_FreeCursor(SDL_Cursor * cursor)
+static void Cocoa_FreeCursor(SDL_Cursor * cursor)
{ @autoreleasepool
{
CFBridgingRelease(cursor->driverdata);
SDL_free(cursor);
}}
-static int
-Cocoa_ShowCursor(SDL_Cursor * cursor)
+static int Cocoa_ShowCursor(SDL_Cursor * cursor)
{ @autoreleasepool
{
SDL_VideoDevice *device = SDL_GetVideoDevice();
@@ -231,8 +225,7 @@ Cocoa_ShowCursor(SDL_Cursor * cursor)
return 0;
}}
-static SDL_Window *
-SDL_FindWindowAtPoint(const int x, const int y)
+static SDL_Window *SDL_FindWindowAtPoint(const int x, const int y)
{
const SDL_Point pt = { x, y };
SDL_Window *i;
@@ -246,8 +239,7 @@ SDL_FindWindowAtPoint(const int x, const int y)
return NULL;
}
-static int
-Cocoa_WarpMouseGlobal(int x, int y)
+static int Cocoa_WarpMouseGlobal(int x, int y)
{
CGPoint point;
SDL_Mouse *mouse = SDL_GetMouse();
@@ -288,14 +280,12 @@ Cocoa_WarpMouseGlobal(int x, int y)
return 0;
}
-static void
-Cocoa_WarpMouse(SDL_Window * window, int x, int y)
+static void Cocoa_WarpMouse(SDL_Window * window, int x, int y)
{
Cocoa_WarpMouseGlobal(window->x + x, window->y + y);
}
-static int
-Cocoa_SetRelativeMouseMode(SDL_bool enabled)
+static int Cocoa_SetRelativeMouseMode(SDL_bool enabled)
{
CGError result;
SDL_Window *window;
@@ -338,16 +328,14 @@ Cocoa_SetRelativeMouseMode(SDL_bool enabled)
return 0;
}
-static int
-Cocoa_CaptureMouse(SDL_Window *window)
+static int Cocoa_CaptureMouse(SDL_Window *window)
{
/* our Cocoa event code already tracks the mouse outside the window,
so all we have to do here is say "okay" and do what we always do. */
return 0;
}
-static Uint32
-Cocoa_GetGlobalMouseState(int *x, int *y)
+static Uint32 Cocoa_GetGlobalMouseState(int *x, int *y)
{
const NSUInteger cocoaButtons = [NSEvent pressedMouseButtons];
const NSPoint cocoaLocation = [NSEvent mouseLocation];
@@ -365,8 +353,7 @@ Cocoa_GetGlobalMouseState(int *x, int *y)
return retval;
}
-int
-Cocoa_InitMouse(_THIS)
+int Cocoa_InitMouse(_THIS)
{
NSPoint location;
SDL_Mouse *mouse = SDL_GetMouse();
@@ -394,8 +381,7 @@ Cocoa_InitMouse(_THIS)
return 0;
}
-static void
-Cocoa_HandleTitleButtonEvent(_THIS, NSEvent *event)
+static void Cocoa_HandleTitleButtonEvent(_THIS, NSEvent *event)
{
SDL_Window *window;
NSWindow *nswindow = [event window];
@@ -428,8 +414,7 @@ Cocoa_HandleTitleButtonEvent(_THIS, NSEvent *event)
}
}
-void
-Cocoa_HandleMouseEvent(_THIS, NSEvent *event)
+void Cocoa_HandleMouseEvent(_THIS, NSEvent *event)
{
SDL_Mouse *mouse;
SDL_MouseData *driverdata;
@@ -508,8 +493,7 @@ Cocoa_HandleMouseEvent(_THIS, NSEvent *event)
SDL_SendMouseMotion(mouse->focus, mouseID, 1, (int)deltaX, (int)deltaY);
}
-void
-Cocoa_HandleMouseWheel(SDL_Window *window, NSEvent *event)
+void Cocoa_HandleMouseWheel(SDL_Window *window, NSEvent *event)
{
SDL_MouseID mouseID;
SDL_MouseWheelDirection direction;
@@ -546,8 +530,7 @@ Cocoa_HandleMouseWheel(SDL_Window *window, NSEvent *event)
SDL_SendMouseWheel(window, mouseID, x, y, direction);
}
-void
-Cocoa_HandleMouseWarp(CGFloat x, CGFloat y)
+void Cocoa_HandleMouseWarp(CGFloat x, CGFloat y)
{
/* This makes Cocoa_HandleMouseEvent ignore the delta caused by the warp,
* since it gets included in the next movement event.
@@ -560,8 +543,7 @@ Cocoa_HandleMouseWarp(CGFloat x, CGFloat y)
DLog("(%g, %g)", x, y);
}
-void
-Cocoa_QuitMouse(_THIS)
+void Cocoa_QuitMouse(_THIS)
{
SDL_Mouse *mouse = SDL_GetMouse();
if (mouse) {
diff --git a/src/video/cocoa/SDL_cocoaopengl.m b/src/video/cocoa/SDL_cocoaopengl.m
index 46a973a..0ac8e3e 100644
--- a/src/video/cocoa/SDL_cocoaopengl.m
+++ b/src/video/cocoa/SDL_cocoaopengl.m
@@ -62,8 +62,7 @@ SDL_OpenGLAsyncDispatchChanged(void *userdata, const char *name, const char *old
SDL_opengl_async_dispatch = SDL_GetStringBoolean(hint, SDL_FALSE);
}
-static CVReturn
-DisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTimeStamp* now, const CVTimeStamp* outputTime, CVOptionFlags flagsIn, CVOptionFlags* flagsOut, void* displayLinkContext)
+static CVReturn DisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTimeStamp* now, const CVTimeStamp* outputTime, CVOptionFlags flagsIn, CVOptionFlags* flagsOut, void* displayLinkContext)
{
SDLOpenGLContext *nscontext = (__bridge SDLOpenGLContext *) displayLinkContext;
@@ -224,8 +223,7 @@ DisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTimeStamp* now, const
@end
-int
-Cocoa_GL_LoadLibrary(_THIS, const char *path)
+int Cocoa_GL_LoadLibrary(_THIS, const char *path)
{
/* Load the OpenGL library */
if (path == NULL) {
@@ -243,21 +241,18 @@ Cocoa_GL_LoadLibrary(_THIS, const char *path)
return 0;
}
-void *
-Cocoa_GL_GetProcAddress(_THIS, const char *proc)
+void *Cocoa_GL_GetProcAddress(_THIS, const char *proc)
{
return SDL_LoadFunction(_this->gl_config.dll_handle, proc);
}
-void
-Cocoa_GL_UnloadLibrary(_THIS)
+void Cocoa_GL_UnloadLibrary(_THIS)
{
SDL_UnloadObject(_this->gl_config.dll_handle);
_this->gl_config.dll_handle = NULL;
}
-SDL_GLContext
-Cocoa_GL_CreateContext(_THIS, SDL_Window * window)
+SDL_GLContext Cocoa_GL_CreateContext(_THIS, SDL_Window * window)
{ @autoreleasepool
{
SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window);
@@ -287,7 +282,7 @@ Cocoa_GL_CreateContext(_THIS, SDL_Window * window)
_this->GL_GetSwapInterval = Cocoa_GLES_GetSwapInterval;
_this->GL_SwapWindow = Cocoa_GLES_SwapWindow;
_this->GL_DeleteContext = Cocoa_GLES_DeleteContext;
-
+
if (Cocoa_GLES_LoadLibrary(_this, NULL) != 0) {
return NULL;
}
@@ -433,8 +428,7 @@ Cocoa_GL_CreateContext(_THIS, SDL_Window * window)
return sdlcontext;
}}
-int
-Cocoa_GL_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context)
+int Cocoa_GL_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context)
{ @autoreleasepool
{
if (context) {
@@ -451,8 +445,7 @@ Cocoa_GL_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context)
return 0;
}}
-int
-Cocoa_GL_SetSwapInterval(_THIS, int interval)
+int Cocoa_GL_SetSwapInterval(_THIS, int interval)
{ @autoreleasepool
{
SDLOpenGLContext *nscontext = (__bridge SDLOpenGLContext *) SDL_GL_GetCurrentContext();
@@ -471,16 +464,14 @@ Cocoa_GL_SetSwapInterval(_THIS, int interval)
return status;
}}
-int
-Cocoa_GL_GetSwapInterval(_THIS)
+int Cocoa_GL_GetSwapInterval(_THIS)
{ @autoreleasepool
{
SDLOpenGLContext* nscontext = (__bridge SDLOpenGLContext*)SDL_GL_GetCurrentContext();
return nscontext ? SDL_AtomicGet(&nscontext->swapIntervalSetting) : 0;
}}
-int
-Cocoa_GL_SwapWindow(_THIS, SDL_Window * window)
+int Cocoa_GL_SwapWindow(_THIS, SDL_Window * window)
{ @autoreleasepool
{
SDLOpenGLContext* nscontext = (__bridge SDLOpenGLContext*)SDL_GL_GetCurrentContext();
@@ -516,8 +507,7 @@ Cocoa_GL_SwapWindow(_THIS, SDL_Window * window)
return 0;
}}
-void
-Cocoa_GL_DeleteContext(_THIS, SDL_GLContext context)
+void Cocoa_GL_DeleteContext(_THIS, SDL_GLContext context)
{ @autoreleasepool
{
SDLOpenGLContext *nscontext = (__bridge SDLOpenGLContext *)context;
diff --git a/src/video/cocoa/SDL_cocoaopengles.m b/src/video/cocoa/SDL_cocoaopengles.m
index 27091c5..17f0b4c 100644
--- a/src/video/cocoa/SDL_cocoaopengles.m
+++ b/src/video/cocoa/SDL_cocoaopengles.m
@@ -28,8 +28,7 @@
/* EGL implementation of SDL OpenGL support */
-int
-Cocoa_GLES_LoadLibrary(_THIS, const char *path)
+int Cocoa_GLES_LoadLibrary(_THIS, const char *path)
{
/* If the profile requested is not GL ES, switch over to WIN_GL functions */
if (_this->gl_config.profile_mask != SDL_GL_CONTEXT_PROFILE_ES) {
@@ -57,8 +56,7 @@ Cocoa_GLES_LoadLibrary(_THIS, const char *path)
return 0;
}
-SDL_GLContext
-Cocoa_GLES_CreateContext(_THIS, SDL_Window * window)
+SDL_GLContext Cocoa_GLES_CreateContext(_THIS, SDL_Window * window)
{ @autoreleasepool
{
SDL_GLContext context;
@@ -90,29 +88,25 @@ Cocoa_GLES_CreateContext(_THIS, SDL_Window * window)
return context;
}}
-void
-Cocoa_GLES_DeleteContext(_THIS, SDL_GLContext context)
+void Cocoa_GLES_DeleteContext(_THIS, SDL_GLContext context)
{ @autoreleasepool
{
SDL_EGL_DeleteContext(_this, context);
}}
-int
-Cocoa_GLES_SwapWindow(_THIS, SDL_Window * window)
+int Cocoa_GLES_SwapWindow(_THIS, SDL_Window * window)
{ @autoreleasepool
{
return SDL_EGL_SwapBuffers(_this, ((__bridge SDL_WindowData *) window->driverdata).egl_surface);
}}
-int
-Cocoa_GLES_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context)
+int Cocoa_GLES_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context)
{ @autoreleasepool
{
return SDL_EGL_MakeCurrent(_this, window ? ((__bridge SDL_WindowData *) window->driverdata).egl_surface : EGL_NO_SURFACE, context);
}}
-int
-Cocoa_GLES_SetupWindow(_THIS, SDL_Window * window)
+int Cocoa_GLES_SetupWindow(_THIS, SDL_Window * window)
{
NSView* v;
/* The current context is lost in here; save it and reset it. */
diff --git a/src/video/cocoa/SDL_cocoashape.m b/src/video/cocoa/SDL_cocoashape.m
index 8dd78b0..2fd9f59 100644
--- a/src/video/cocoa/SDL_cocoashape.m
+++ b/src/video/cocoa/SDL_cocoashape.m
@@ -39,8 +39,7 @@
@implementation SDL_CocoaClosure
@end
-SDL_WindowShaper*
-Cocoa_CreateShaper(SDL_Window* window)
+SDL_WindowShaper *Cocoa_CreateShaper(SDL_Window* window)
{ @autoreleasepool
{
SDL_WindowShaper* result;
@@ -77,8 +76,7 @@ Cocoa_CreateShaper(SDL_Window* window)
return result;
}}
-void
-ConvertRects(SDL_ShapeTree* tree, void* closure)
+static void ConvertRects(SDL_ShapeTree* tree, void* closure)
{
SDL_CocoaClosure* data = (__bridge SDL_CocoaClosure*)closure;
if(tree->kind == OpaqueShape) {
@@ -87,8 +85,7 @@ ConvertRects(SDL_ShapeTree* tree, void* closure)
}
}
-int
-Cocoa_SetWindowShape(SDL_WindowShaper *shaper, SDL_Surface *shape, SDL_WindowShapeMode *shape_mode)
+int Cocoa_SetWindowShape(SDL_WindowShaper *shaper, SDL_Surface *shape, SDL_WindowShapeMode *shape_mode)
{ @autoreleasepool
{
SDL_ShapeData* data = (__bridge SDL_ShapeData*)shaper->driverdata;
@@ -118,8 +115,7 @@ Cocoa_SetWindowShape(SDL_WindowShaper *shaper, SDL_Surface *shape, SDL_WindowSha
return 0;
}}
-int
-Cocoa_ResizeWindowShape(SDL_Window *window)
+int Cocoa_ResizeWindowShape(SDL_Window *window)
{ @autoreleasepool {
SDL_ShapeData* data = (__bridge SDL_ShapeData*)window->shaper->driverdata;
SDL_assert(data != NULL);
diff --git a/src/video/cocoa/SDL_cocoavideo.m b/src/video/cocoa/SDL_cocoavideo.m
index db113e1..a626b1b 100644
--- a/src/video/cocoa/SDL_cocoavideo.m
+++ b/src/video/cocoa/SDL_cocoavideo.m
@@ -44,8 +44,7 @@ static void Cocoa_VideoQuit(_THIS);
/* Cocoa driver bootstrap functions */
-static void
-Cocoa_DeleteDevice(SDL_VideoDevice * device)
+static void Cocoa_DeleteDevice(SDL_VideoDevice * device)
{ @autoreleasepool
{
if (device->wakeup_lock) {
@@ -55,8 +54,7 @@ Cocoa_DeleteDevice(SDL_VideoDevice * device)
SDL_free(device);
}}
-static SDL_VideoDevice *
-Cocoa_CreateDevice(void)
+static SDL_VideoDevice *Cocoa_CreateDevice(void)
{ @autoreleasepool
{
SDL_VideoDevice *device;
@@ -185,8 +183,7 @@ VideoBootStrap COCOA_bootstrap = {
};
-int
-Cocoa_VideoInit(_THIS)
+int Cocoa_VideoInit(_THIS)
{ @autoreleasepool
{
SDL_VideoData *data = (__bridge SDL_VideoData *) _this->driverdata;
@@ -208,8 +205,7 @@ Cocoa_VideoInit(_THIS)
return 0;
}}
-void
-Cocoa_VideoQuit(_THIS)
+void Cocoa_VideoQuit(_THIS)
{ @autoreleasepool
{
SDL_VideoData *data = (__bridge SDL_VideoData *) _this->driverdata;
@@ -221,8 +217,7 @@ Cocoa_VideoQuit(_THIS)
}}
/* This function assumes that it's called from within an autorelease pool */
-NSImage *
-Cocoa_CreateImage(SDL_Surface * surface)
+NSImage *Cocoa_CreateImage(SDL_Surface * surface)
{
SDL_Surface *converted;
NSBitmapImageRep *imgrep;
diff --git a/src/video/cocoa/SDL_cocoawindow.m b/src/video/cocoa/SDL_cocoawindow.m
index 634f855..f586bdb 100644
--- a/src/video/cocoa/SDL_cocoawindow.m
+++ b/src/video/cocoa/SDL_cocoawindow.m
@@ -257,8 +257,7 @@ static void ConvertNSRect(NSScreen *screen, BOOL fullscreen, NSRect *r)
r->origin.y = CGDisplayPixelsHigh(kCGDirectMainDisplay) - r->origin.y - r->size.height;
}
-static void
-ScheduleContextUpdates(SDL_WindowData *data)
+static void ScheduleContextUpdates(SDL_WindowData *data)
{
/* We still support OpenGL as long as Apple offers it, deprecated or not, so disable deprecation warnings about it. */
#if SDL_VIDEO_OPENGL
@@ -294,14 +293,12 @@ ScheduleContextUpdates(SDL_WindowData *data)
}
/* !!! FIXME: this should use a hint callback. */
-static int
-GetHintCtrlClickEmulateRightClick()
+static int GetHintCtrlClickEmulateRightClick()
{
return SDL_GetHintBoolean(SDL_HINT_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK, SDL_FALSE);
}
-static NSUInteger
-GetWindowWindowedStyle(SDL_Window * window)
+static NSUInteger GetWindowWindowedStyle(SDL_Window * window)
{
/* IF YOU CHANGE ANY FLAGS IN HERE, PLEASE READ
the NSWindowStyleMaskBorderless comments in SetupWindowData()! */
@@ -321,8 +318,7 @@ GetWindowWindowedStyle(SDL_Window * window)
return style;
}
-static NSUInteger
-GetWindowStyle(SDL_Window * window)
+static NSUInteger GetWindowStyle(SDL_Window * window)
{
NSUInteger style = 0;
@@ -334,8 +330,7 @@ GetWindowStyle(SDL_Window * window)
return style;
}
-static SDL_bool
-SetWindowStyle(SDL_Window * window, NSUInteger style)
+static SDL_bool SetWindowStyle(SDL_Window * window, NSUInteger style)
{
SDL_WindowData *data = (__bridge SDL_WindowData *) window->driverdata;
NSWindow *nswindow = data.nswindow;
@@ -355,8 +350,7 @@ SetWindowStyle(SDL_Window * window, NSUInteger style)
return SDL_TRUE;
}
-static SDL_bool
-ShouldAdjustCoordinatesForGrab(SDL_Window * window)
+static SDL_bool ShouldAdjustCoordinatesForGrab(SDL_Window * window)
{
SDL_WindowData *data = (__bridge SDL_WindowData *) window->driverdata;
@@ -374,8 +368,7 @@ ShouldAdjustCoordinatesForGrab(SDL_Window * window)
return SDL_FALSE;
}
-static SDL_bool
-AdjustCoordinatesForGrab(SDL_Window * window, int x, int y, CGPoint *adjusted)
+static SDL_bool AdjustCoordinatesForGrab(SDL_Window * window, int x, int y, CGPoint *adjusted)
{
if (window->mouse_rect.w > 0 && window->mouse_rect.h > 0) {
SDL_Rect window_rect;
@@ -414,8 +407,7 @@ AdjustCoordinatesForGrab(SDL_Window * window, int x, int y, CGPoint *adjusted)
return SDL_FALSE;
}
-static void
-Cocoa_UpdateClipCursor(SDL_Window * window)
+static void Cocoa_UpdateClipCursor(SDL_Window * window)
{
SDL_WindowData *data = (__bridge SDL_WindowData *) window->driverdata;
@@ -959,7 +951,7 @@ Cocoa_UpdateClipCursor(SDL_Window * window)
isFullscreenSpace = NO;
inFullscreenTransition = NO;
-
+
[self windowDidExitFullScreen:nil];
}
@@ -1009,16 +1001,16 @@ Cocoa_UpdateClipCursor(SDL_Window * window)
- (void)windowDidFailToExitFullScreen:(NSNotification *)aNotification
{
SDL_Window *window = _data.window;
-
+
if (window->is_destroying) {
return;
}
SetWindowStyle(window, (NSWindowStyleMaskTitled|NSWindowStyleMaskClosable|NSWindowStyleMaskMiniaturizable|NSWindowStyleMaskResizable));
-
+
isFullscreenSpace = YES;
inFullscreenTransition = NO;
-
+
[self windowDidEnterFullScreen:nil];
}
@@ -1192,8 +1184,7 @@ Cocoa_UpdateClipCursor(SDL_Window * window)
return NO; /* not a special area, carry on. */
}
-static int
-Cocoa_SendMouseButtonClicks(SDL_Mouse * mouse, NSEvent *theEvent, SDL_Window * window, const Uint8 state, const Uint8 button)
+static int Cocoa_SendMouseButtonClicks(SDL_Mouse * mouse, NSEvent *theEvent, SDL_Window * window, const Uint8 state, const Uint8 button)
{
const SDL_MouseID mouseID = mouse->mouseID;
const int clicks = (int) [theEvent clickCount];
@@ -1622,8 +1613,7 @@ Cocoa_SendMouseButtonClicks(SDL_Mouse * mouse, NSEvent *theEvent, SDL_Window * w
}
@end
-static int
-SetupWindowData(_THIS, SDL_Window * window, NSWindow *nswindow, NSView *nsview, SDL_bool created)
+static int SetupWindowData(_THIS, SDL_Window * window, NSWindow *nswindow, NSView *nsview, SDL_bool created)
{ @autoreleasepool
{
SDL_VideoData *videodata = (__bridge SDL_VideoData *) _this->driverdata;
@@ -1716,8 +1706,7 @@ SetupWindowData(_THIS, SDL_Window * window, NSWindow *nswindow, NSView *nsview,
return 0;
}}
-int
-Cocoa_CreateWindow(_THIS, SDL_Window * window)
+int Cocoa_CreateWindow(_THIS, SDL_Window * window)
{ @autoreleasepool
{
SDL_VideoData *videodata = (__bridge SDL_VideoData *) _this->driverdata;
@@ -1816,7 +1805,7 @@ Cocoa_CreateWindow(_THIS, SDL_Window * window)
if (!(window->flags & SDL_WINDOW_OPENGL)) {
return 0;
}
-
+
/* The rest of this macro mess is for OpenGL or OpenGL ES windows */
#if SDL_VIDEO_OPENGL_ES2
if (_this->gl_config.profile_mask == SDL_GL_CONTEXT_PROFILE_ES) {
@@ -1834,8 +1823,7 @@ Cocoa_CreateWindow(_THIS, SDL_Window * window)
return 0;
}}
-int
-Cocoa_CreateWindowFrom(_THIS, SDL_Window * window, const void *data)
+int Cocoa_CreateWindowFrom(_THIS, SDL_Window * window, const void *data)
{ @autoreleasepool
{
NSView* nsview = nil;
@@ -1875,8 +1863,7 @@ Cocoa_CreateWindowFrom(_THIS, SDL_Window * window, const void *data)
return SetupWindowData(_this, window, nswindow, nsview, SDL_FALSE);
}}
-void
-Cocoa_SetWindowTitle(_THIS, SDL_Window * window)
+void Cocoa_SetWindowTitle(_THIS, SDL_Window * window)
{ @autoreleasepool
{
const char *title = window->title ? window->title : "";
@@ -1885,8 +1872,7 @@ Cocoa_SetWindowTitle(_THIS, SDL_Window * window)
[nswindow setTitle:string];
}}
-void
-Cocoa_SetWindowIcon(_THIS, SDL_Window * window, SDL_Surface * icon)
+void Cocoa_SetWindowIcon(_THIS, SDL_Window * window, SDL_Surface * icon)
{ @autoreleasepool
{
NSImage *nsimage = Cocoa_CreateImage(icon);
@@ -1896,8 +1882,7 @@ Cocoa_SetWindowIcon(_THIS, SDL_Window * window, SDL_Surface * icon)
}
}}
-void
-Cocoa_SetWindowPosition(_THIS, SDL_Window * window)
+void Cocoa_SetWindowPosition(_THIS, SDL_Window * window)
{ @autoreleasepool
{
SDL_WindowData *windata = (__bridge SDL_WindowData *) window->driverdata;
@@ -1919,8 +1904,7 @@ Cocoa_SetWindowPosition(_THIS, SDL_Window * window)
ScheduleContextUpdates(windata);
}}
-void
-Cocoa_SetWindowSize(_THIS, SDL_Window * window)
+void Cocoa_SetWindowSize(_THIS, SDL_Window * window)
{ @autoreleasepool
{
SDL_WindowData *windata = (__bridge SDL_WindowData *) window->driverdata;
@@ -1946,8 +1930,7 @@ Cocoa_SetWindowSize(_THIS, SDL_Window * window)
ScheduleContextUpdates(windata);
}}
-void
-Cocoa_SetWindowMinimumSize(_THIS, SDL_Window * window)
+void Cocoa_SetWindowMinimumSize(_THIS, SDL_Window * window)
{ @autoreleasepool
{
SDL_WindowData *windata = (__bridge SDL_WindowData *) window->driverdata;
@@ -1959,8 +1942,7 @@ Cocoa_SetWindowMinimumSize(_THIS, SDL_Window * window)
[windata.nswindow setContentMinSize:minSize];
}}
-void
-Cocoa_SetWindowMaximumSize(_THIS, SDL_Window * window)
+void Cocoa_SetWindowMaximumSize(_THIS, SDL_Window * window)
{ @autoreleasepool
{
SDL_WindowData *windata = (__bridge SDL_WindowData *) window->driverdata;
@@ -1972,8 +1954,7 @@ Cocoa_SetWindowMaximumSize(_THIS, SDL_Window * window)
[windata.nswindow setContentMaxSize:maxSize];
}}
-void
-Cocoa_GetWindowSizeInPixels(_THIS, SDL_Window * window, int *w, int *h)
+void Cocoa_GetWindowSizeInPixels(_THIS, SDL_Window * window, int *w, int *h)
{ @autoreleasepool
{
SDL_WindowData *windata = (__bridge SDL_WindowData *) window->driverdata;
@@ -1990,8 +1971,7 @@ Cocoa_GetWindowSizeInPixels(_THIS, SDL_Window * window, int *w, int *h)
}}
-void
-Cocoa_ShowWindow(_THIS, SDL_Window * window)
+void Cocoa_ShowWindow(_THIS, SDL_Window * window)
{ @autoreleasepool
{
SDL_WindowData *windowData = ((__bridge SDL_WindowData *) window->driverdata);
@@ -2004,8 +1984,7 @@ Cocoa_ShowWindow(_THIS, SDL_Window * window)
}
}}
-void
-Cocoa_HideWindow(_THIS, SDL_Window * window)
+void Cocoa_HideWindow(_THIS, SDL_Window * window)
{ @autoreleasepool
{
NSWindow *nswindow = ((__bridge SDL_WindowData *) window->driverdata).nswindow;
@@ -2013,8 +1992,7 @@ Cocoa_HideWindow(_THIS, SDL_Window * window)
[nswindow orderOut:nil];
}}
-void
-Cocoa_RaiseWindow(_THIS, SDL_Window * window)
+void Cocoa_RaiseWindow(_THIS, SDL_Window * window)
{ @autoreleasepool
{
SDL_WindowData *windowData = ((__bridge SDL_WindowData *) window->driverdata);
@@ -2031,8 +2009,7 @@ Cocoa_RaiseWindow(_THIS, SDL_Window * window)
[windowData.listener resumeVisibleObservation];
}}
-void
-Cocoa_MaximizeWindow(_THIS, SDL_Window * window)
+void Cocoa_MaximizeWindow(_THIS, SDL_Window * window)
{ @autoreleasepool
{
SDL_WindowData *windata = (__bridge SDL_WindowData *) window->driverdata;
@@ -2043,8 +2020,7 @@ Cocoa_MaximizeWindow(_THIS, SDL_Window * window)
ScheduleContextUpdates(windata);
}}
-void
-Cocoa_MinimizeWindow(_THIS, SDL_Window * window)
+void Cocoa_MinimizeWindow(_THIS, SDL_Window * window)
{ @autoreleasepool
{
SDL_WindowData *data = (__bridge SDL_WindowData *) window->driverdata;
@@ -2056,8 +2032,7 @@ Cocoa_MinimizeWindow(_THIS, SDL_Window * window)
}
}}
-void
-Cocoa_RestoreWindow(_THIS, SDL_Window * window)
+void Cocoa_RestoreWindow(_THIS, SDL_Window * window)
{ @autoreleasepool
{
NSWindow *nswindow = ((__bridge SDL_WindowData *) window->driverdata).nswindow;
@@ -2069,8 +2044,7 @@ Cocoa_RestoreWindow(_THIS, SDL_Window * window)
}
}}
-void
-Cocoa_SetWindowBordered(_THIS, SDL_Window * window, SDL_bool bordered)
+void Cocoa_SetWindowBordered(_THIS, SDL_Window * window, SDL_bool bordered)
{ @autoreleasepool
{
if (SetWindowStyle(window, GetWindowStyle(window))) {
@@ -2080,8 +2054,7 @@ Cocoa_SetWindowBordered(_THIS, SDL_Window * window, SDL_bool bordered)
}
}}
-void
-Cocoa_SetWindowResizable(_THIS, SDL_Window * window, SDL_bool resizable)
+void Cocoa_SetWindowResizable(_THIS, SDL_Window * window, SDL_bool resizable)
{ @autoreleasepool
{
/* Don't set this if we're in a space!
@@ -2105,8 +2078,7 @@ Cocoa_SetWindowResizable(_THIS, SDL_Window * window, SDL_bool resizable)
}
}}
-void
-Cocoa_SetWindowAlwaysOnTop(_THIS, SDL_Window * window, SDL_bool on_top)
+void Cocoa_SetWindowAlwaysOnTop(_THIS, SDL_Window * window, SDL_bool on_top)
{ @autoreleasepool
{
NSWindow *nswindow = ((__bridge SDL_WindowData *) window->driverdata).nswindow;
@@ -2117,8 +2089,7 @@ Cocoa_SetWindowAlwaysOnTop(_THIS, SDL_Window * window, SDL_bool on_top)
}
}}
-void
-Cocoa_SetWindowFullscreen(_THIS, SDL_Window * window, SDL_VideoDisplay * display, SDL_bool fullscreen)
+void Cocoa_SetWindowFullscreen(_THIS, SDL_Window * window, SDL_VideoDisplay * display, SDL_bool fullscreen)
{ @autoreleasepool
{
SDL_WindowData *data = (__bridge SDL_WindowData *) window->driverdata;
@@ -2206,8 +2177,7 @@ Cocoa_SetWindowFullscreen(_THIS, SDL_Window * window, SDL_VideoDisplay * display
ScheduleContextUpdates(data);
}}
-int
-Cocoa_SetWindowGammaRamp(_THIS, SDL_Window * window, const Uint16 * ramp)
+int Cocoa_SetWindowGammaRamp(_THIS, SDL_Window * window, const Uint16 * ramp)
{ @autoreleasepool
{
SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window);
@@ -2233,8 +2203,7 @@ Cocoa_SetWindowGammaRamp(_THIS, SDL_Window * window, const Uint16 * ramp)
return 0;
}}
-void*
-Cocoa_GetWindowICCProfile(_THIS, SDL_Window * window, size_t * size)
+void *Cocoa_GetWindowICCProfile(_THIS, SDL_Window * window, size_t * size)
{ @autoreleasepool
{
SDL_WindowData *data = (__bridge SDL_WindowData *) window->driverdata;
@@ -2270,8 +2239,7 @@ Cocoa_GetWindowICCProfile(_THIS, SDL_Window * window, size_t * size)
return retIccProfileData;
}}
-int
-Cocoa_GetWindowDisplayIndex(_THIS, SDL_Window * window)
+int Cocoa_GetWindowDisplayIndex(_THIS, SDL_Window * window)
{ @autoreleasepool
{
NSScreen *screen;
@@ -2309,8 +2277,7 @@ Cocoa_GetWindowDisplayIndex(_THIS, SDL_Window * window)
return SDL_SetError("Couldn't find the display where the window is located.");
}}
-int
-Cocoa_GetWindowGammaRamp(_THIS, SDL_Window * window, Uint16 * ramp)
+int Cocoa_GetWindowGammaRamp(_THIS, SDL_Window * window, Uint16 * ramp)
{
SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window);
CGDirectDisplayID display_id = ((SDL_DisplayData *)display->driverdata)->display;
@@ -2333,14 +2300,12 @@ Cocoa_GetWindowGammaRamp(_THIS, SDL_Window * window, Uint16 * ramp)
return 0;
}
-void
-Cocoa_SetWindowMouseRect(_THIS, SDL_Window * window)
+void Cocoa_SetWindowMouseRect(_THIS, SDL_Window * window)
{
Cocoa_UpdateClipCursor(window);
}
-void
-Cocoa_SetWindowMouseGrab(_THIS, SDL_Window * window, SDL_bool grabbed)
+void Cocoa_SetWindowMouseGrab(_THIS, SDL_Window * window, SDL_bool grabbed)
{ @autoreleasepool
{
SDL_WindowData *data = (__bridge SDL_WindowData *) window->driverdata;
@@ -2361,8 +2326,7 @@ Cocoa_SetWindowMouseGrab(_THIS, SDL_Window * window, SDL_bool grabbed)
}
}}
-void
-Cocoa_DestroyWindow(_THIS, SDL_Window * window)
+void Cocoa_DestroyWindow(_THIS, SDL_Window * window)
{ @autoreleasepool
{
SDL_WindowData *data = (SDL_WindowData *) CFBridgingRelease(window->driverdata);
@@ -2384,7 +2348,7 @@ Cocoa_DestroyWindow(_THIS, SDL_Window * window)
contexts = [data.nscontexts copy];
for (SDLOpenGLContext *context in contexts) {
- /* Calling setWindow:NULL causes the context to remove itself from the context list. */
+ /* Calling setWindow:NULL causes the context to remove itself from the context list. */
[context setWindow:NULL];
}
@@ -2399,8 +2363,7 @@ Cocoa_DestroyWindow(_THIS, SDL_Window * window)
window->driverdata = NULL;
}}
-SDL_bool
-Cocoa_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info)
+SDL_bool Cocoa_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info)
{ @autoreleasepool
{
NSWindow *nswindow = ((__bridge SDL_WindowData *) window->driverdata).nswindow;
@@ -2416,8 +2379,7 @@ Cocoa_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info)
}
}}
-SDL_bool
-Cocoa_IsWindowInFullscreenSpace(SDL_Window * window)
+SDL_bool Cocoa_IsWindowInFullscreenSpace(SDL_Window * window)
{ @autoreleasepool
{
SDL_WindowData *data = (__bridge SDL_WindowData *) window->driverdata;
@@ -2429,8 +2391,7 @@ Cocoa_IsWindowInFullscreenSpace(SDL_Window * window)
}
}}
-SDL_bool
-Cocoa_SetWindowFullscreenSpace(SDL_Window * window, SDL_bool state)
+SDL_bool Cocoa_SetWindowFullscreenSpace(SDL_Window * window, SDL_bool state)
{ @autoreleasepool
{
SDL_bool succeeded = SDL_FALSE;
@@ -2472,14 +2433,12 @@ Cocoa_SetWindowFullscreenSpace(SDL_Window * window, SDL_bool state)
return succeeded;
}}
-int
-Cocoa_SetWindowHitTest(SDL_Window * window, SDL_bool enabled)
+int Cocoa_SetWindowHitTest(SDL_Window * window, SDL_bool enabled)
{
return 0; /* just succeed, the real work is done elsewhere. */
}
-void
-Cocoa_AcceptDragAndDrop(SDL_Window * window, SDL_bool accept)
+void Cocoa_AcceptDragAndDrop(SDL_Window * window, SDL_bool accept)
{ @autoreleasepool
{
SDL_WindowData *data = (__bridge SDL_WindowData *) window->driverdata;
@@ -2490,8 +2449,7 @@ Cocoa_AcceptDragAndDrop(SDL_Window * window, SDL_bool accept)
}
}}
-int
-Cocoa_FlashWindow(_THIS, SDL_Window *window, SDL_FlashOperation operation)
+int Cocoa_FlashWindow(_THIS, SDL_Window *window, SDL_FlashOperation operation)
{ @autoreleasepool
{
/* Note that this is app-wide and not window-specific! */
@@ -2518,8 +2476,7 @@ Cocoa_FlashWindow(_THIS, SDL_Window *window, SDL_FlashOperation operation)
return 0;
}}
-int
-Cocoa_SetWindowOpacity(_THIS, SDL_Window * window, float opacity)
+int Cocoa_SetWindowOpacity(_THIS, SDL_Window * window, float opacity)
{ @autoreleasepool
{
SDL_WindowData *data = (__bridge SDL_WindowData *) window->driverdata;
diff --git a/src/video/directfb/SDL_DirectFB_WM.c b/src/video/directfb/SDL_DirectFB_WM.c
index cf9aa10..f185cac 100644
--- a/src/video/directfb/SDL_DirectFB_WM.c
+++ b/src/video/directfb/SDL_DirectFB_WM.c
@@ -51,8 +51,7 @@ static DFB_Theme theme_none = {
NULL
};
-static void
-DrawTriangle(IDirectFBSurface * s, int down, int x, int y, int w)
+static void DrawTriangle(IDirectFBSurface * s, int down, int x, int y, int w)
{
int x1, x2, x3;
int y1, y2, y3;
@@ -75,8 +74,7 @@ DrawTriangle(IDirectFBSurface * s, int down, int x, int y, int w)
s->FillTriangle(s, x1, y1, x2, y2, x3, y3);
}
-static void
-LoadFont(_THIS, SDL_Window * window)
+static void LoadFont(_THIS, SDL_Window * window)
{
SDL_DFB_DEVICEDATA(_this);
SDL_DFB_WINDOWDATA(window);
@@ -101,8 +99,7 @@ LoadFont(_THIS, SDL_Window * window)
}
}
-static void
-DrawCraption(_THIS, IDirectFBSurface * s, int x, int y, char *text)
+static void DrawCraption(_THIS, IDirectFBSurface * s, int x, int y, char *text)
{
DFBSurfaceTextFlags flags;
@@ -111,8 +108,7 @@ DrawCraption(_THIS, IDirectFBSurface * s, int x, int y, char *text)
s->DrawString(s, text, -1, x, y, flags);
}
-void
-DirectFB_WM_RedrawLayout(_THIS, SDL_Window * window)
+void DirectFB_WM_RedrawLayout(_THIS, SDL_Window * window)
{
SDL_DFB_WINDOWDATA(window);
IDirectFBSurface *s = windata->window_surface;
@@ -180,8 +176,7 @@ DirectFB_WM_RedrawLayout(_THIS, SDL_Window * window)
windata->wm_needs_redraw = 0;
}
-DFBResult
-DirectFB_WM_GetClientSize(_THIS, SDL_Window * window, int *cw, int *ch)
+DFBResult DirectFB_WM_GetClientSize(_THIS, SDL_Window * window, int *cw, int *ch)
{
SDL_DFB_WINDOWDATA(window);
IDirectFBWindow *dfbwin = windata->dfbwin;
@@ -195,8 +190,7 @@ DirectFB_WM_GetClientSize(_THIS, SDL_Window * window, int *cw, int *ch)
return DFB_OK;
}
-void
-DirectFB_WM_AdjustWindowLayout(SDL_Window * window, int flags, int w, int h)
+void DirectFB_WM_AdjustWindowLayout(SDL_Window * window, int flags, int w, int h)
{
SDL_DFB_WINDOWDATA(window);
@@ -241,8 +235,7 @@ enum
WM_POS_BOTTOM = 0x40,
};
-static int
-WMIsClient(DFB_WindowData * p, int x, int y)
+static int WMIsClient(DFB_WindowData * p, int x, int y)
{
x -= p->client.x;
y -= p->client.y;
@@ -253,8 +246,7 @@ WMIsClient(DFB_WindowData * p, int x, int y)
return 1;
}
-static int
-WMPos(DFB_WindowData * p, int x, int y)
+static int WMPos(DFB_WindowData * p, int x, int y)
{
int pos = WM_POS_NONE;
@@ -284,8 +276,7 @@ WMPos(DFB_WindowData * p, int x, int y)
return pos;
}
-int
-DirectFB_WM_ProcessEvent(_THIS, SDL_Window * window, DFBWindowEvent * evt)
+int DirectFB_WM_ProcessEvent(_THIS, SDL_Window * window, DFBWindowEvent * evt)
{
SDL_DFB_WINDOWDATA(window);
SDL_Window *grabbed_window = SDL_GetGrabbedWindow();
diff --git a/src/video/directfb/SDL_DirectFB_dyn.c b/src/video/directfb/SDL_DirectFB_dyn.c
index e148802..02ed371 100644
--- a/src/video/directfb/SDL_DirectFB_dyn.c
+++ b/src/video/directfb/SDL_DirectFB_dyn.c
@@ -45,8 +45,7 @@ DFB_SYMS
static void *handle = NULL;
-int
-SDL_DirectFB_LoadLibrary(void)
+int SDL_DirectFB_LoadLibrary(void)
{
int retval = 0;
@@ -92,8 +91,7 @@ SDL_DirectFB_LoadLibrary(void)
return retval;
}
-void
-SDL_DirectFB_UnLoadLibrary(void)
+void SDL_DirectFB_UnLoadLibrary(void)
{
if (handle != NULL) {
SDL_UnloadObject(handle);
@@ -102,16 +100,16 @@ SDL_DirectFB_UnLoadLibrary(void)
}
#else
-int
-SDL_DirectFB_LoadLibrary(void)
+
+int SDL_DirectFB_LoadLibrary(void)
{
return 1;
}
-void
-SDL_DirectFB_UnLoadLibrary(void)
+void SDL_DirectFB_UnLoadLibrary(void)
{
}
+
#endif
#endif /* SDL_VIDEO_DRIVER_DIRECTFB */
diff --git a/src/video/directfb/SDL_DirectFB_events.c b/src/video/directfb/SDL_DirectFB_events.c
index ca69017..47a8e62 100644
--- a/src/video/directfb/SDL_DirectFB_events.c
+++ b/src/video/directfb/SDL_DirectFB_events.c
@@ -91,8 +91,7 @@ static void UnicodeToUtf8( Uint16 w , char *utf8buf)
}
}
-static void
-FocusAllMice(_THIS, SDL_Window *window)
+static void FocusAllMice(_THIS, SDL_Window *window)
{
#if USE_MULTI_API
SDL_DFB_DEVICEDATA(_this);
@@ -106,8 +105,7 @@ FocusAllMice(_THIS, SDL_Window *window)
}
-static void
-FocusAllKeyboards(_THIS, SDL_Window *window)
+static void FocusAllKeyboards(_THIS, SDL_Window *window)
{
#if USE_MULTI_API
SDL_DFB_DEVICEDATA(_this);
@@ -120,8 +118,7 @@ FocusAllKeyboards(_THIS, SDL_Window *window)
#endif
}
-static void
-MotionAllMice(_THIS, int x, int y)
+static void MotionAllMice(_THIS, int x, int y)
{
#if USE_MULTI_API
SDL_DFB_DEVICEDATA(_this);
@@ -136,8 +133,7 @@ MotionAllMice(_THIS, int x, int y)
#endif
}
-static int
-KbdIndex(_THIS, int id)
+static int KbdIndex(_THIS, int id)
{
SDL_DFB_DEVICEDATA(_this);
int index;
@@ -149,8 +145,7 @@ KbdIndex(_THIS, int id)
return -1;
}
-static int
-ClientXY(DFB_WindowData * p, int *x, int *y)
+static int ClientXY(DFB_WindowData * p, int *x, int *y)
{
int cx, cy;
@@ -169,8 +164,7 @@ ClientXY(DFB_WindowData * p, int *x, int *y)
return 1;
}
-static void
-ProcessWindowEvent(_THIS, SDL_Window *sdlwin, DFBWindowEvent * evt)
+static void ProcessWindowEvent(_THIS, SDL_Window *sdlwin, DFBWindowEvent * evt)
{
SDL_DFB_DEVICEDATA(_this);
SDL_DFB_WINDOWDATA(sdlwin);
@@ -303,8 +297,7 @@ ProcessWindowEvent(_THIS, SDL_Window *sdlwin, DFBWindowEvent * evt)
printf("Event Clazz %d\n", evt->clazz);
}
-static void
-ProcessInputEvent(_THIS, DFBInputEvent * ievt)
+static void ProcessInputEvent(_THIS, DFBInputEvent * ievt)
{
SDL_DFB_DEVICEDATA(_this);
SDL_Keysym keysym;
@@ -406,8 +399,7 @@ ProcessInputEvent(_THIS, DFBInputEvent * ievt)
}
}
-void
-DirectFB_PumpEventsWindow(_THIS)
+void DirectFB_PumpEventsWindow(_THIS)
{
SDL_DFB_DEVICEDATA(_this);
DFBInputEvent ievt;
@@ -448,8 +440,7 @@ DirectFB_PumpEventsWindow(_THIS)
}
}
-void
-DirectFB_InitOSKeymap(_THIS, SDL_Scancode * keymap, int numkeys)
+void DirectFB_InitOSKeymap(_THIS, SDL_Scancode * keymap, int numkeys)
{
int i;
@@ -576,8 +567,7 @@ DirectFB_InitOSKeymap(_THIS, SDL_Scancode * keymap, int numkeys)
}
-static SDL_Keysym *
-DirectFB_TranslateKey(_THIS, DFBWindowEvent * evt, SDL_Keysym * keysym, Uint32 *unicode)
+static SDL_Keysym *DirectFB_TranslateKey(_THIS, DFBWindowEvent * evt, SDL_Keysym * keysym, Uint32 *unicode)
{
SDL_DFB_DEVICEDATA(_this);
int kbd_idx = 0; /* Window events lag the device source KbdIndex(_this, evt->device_id); */
@@ -606,8 +596,7 @@ DirectFB_TranslateKey(_THIS, DFBWindowEvent * evt, SDL_Keysym * keysym, Uint32 *
return keysym;
}
-static SDL_Keysym *
-DirectFB_TranslateKeyInputEvent(_THIS, DFBInputEvent * evt,
+static SDL_Keysym *DirectFB_TranslateKeyInputEvent(_THIS, DFBInputEvent * evt,
SDL_Keysym * keysym, Uint32 *unicode)
{
SDL_DFB_DEVICEDATA(_this);
@@ -636,8 +625,7 @@ DirectFB_TranslateKeyInputEvent(_THIS, DFBInputEvent * evt,
return keysym;
}
-static int
-DirectFB_TranslateButton(DFBInputDeviceButtonIdentifier button)
+static int DirectFB_TranslateButton(DFBInputDeviceButtonIdentifier button)
{
switch (button) {
case DIBI_LEFT:
@@ -651,9 +639,7 @@ DirectFB_TranslateButton(DFBInputDeviceButtonIdentifier button)
}
}
-static DFBEnumerationResult
-EnumKeyboards(DFBInputDeviceID device_id,
- DFBInputDeviceDescription desc, void *callbackdata)
+static DFBEnumerationResult EnumKeyboards(DFBInputDeviceID device_id, DFBInputDeviceDescription desc, void *callbackdata)
{
cb_data *cb = callbackdata;
DFB_DeviceData *devdata = cb->devdata;
@@ -700,8 +686,7 @@ EnumKeyboards(DFBInputDeviceID device_id,
return DFENUM_OK;
}
-void
-DirectFB_InitKeyboard(_THIS)
+void DirectFB_InitKeyboard(_THIS)
{
SDL_DFB_DEVICEDATA(_this);
cb_data cb;
@@ -730,8 +715,7 @@ DirectFB_InitKeyboard(_THIS)
}
}
-void
-DirectFB_QuitKeyboard(_THIS)
+void DirectFB_QuitKeyboard(_THIS)
{
/* SDL_DFB_DEVICEDATA(_this); */
}
diff --git a/src/video/directfb/SDL_DirectFB_modes.c b/src/video/directfb/SDL_DirectFB_modes.c
index 7d853b3..135b084 100644
--- a/src/video/directfb/SDL_DirectFB_modes.c
+++ b/src/video/directfb/SDL_DirectFB_modes.c
@@ -42,8 +42,7 @@ struct modes_callback_t
SDL_DisplayMode *modelist;
};
-static DFBEnumerationResult
-EnumModesCallback(int width, int height, int bpp, void *data)
+static DFBEnumerationResult EnumModesCallback(int width, int height, int bpp, void *data)
{
struct modes_callback_t *modedata = (struct modes_callback_t *) data;
SDL_DisplayMode mode;
@@ -61,9 +60,7 @@ EnumModesCallback(int width, int height, int bpp, void *data)
return DFENUM_OK;
}
-static DFBEnumerationResult
-EnumScreensCallback(DFBScreenID screen_id, DFBScreenDescription desc,
- void *callbackdata)
+static DFBEnumerationResult EnumScreensCallback(DFBScreenID screen_id, DFBScreenDescription desc, void *callbackdata)
{
struct screen_callback_t *devdata = (struct screen_callback_t *) callbackdata;
@@ -71,9 +68,7 @@ EnumScreensCallback(DFBScreenID screen_id, DFBScreenDescription desc,
return DFENUM_OK;
}
-static DFBEnumerationResult
-EnumLayersCallback(DFBDisplayLayerID layer_id, DFBDisplayLayerDescription desc,
- void *callbackdata)
+static DFBEnumerationResult EnumLayersCallback(DFBDisplayLayerID layer_id, DFBDisplayLayerDescription desc, void *callbackdata)
{
struct screen_callback_t *devdata = (struct screen_callback_t *) callbackdata;
@@ -89,8 +84,7 @@ EnumLayersCallback(DFBDisplayLayerID layer_id, DFBDisplayLayerDescription desc,
return DFENUM_OK;
}
-static void
-CheckSetDisplayMode(_THIS, SDL_VideoDisplay * display, DFB_DisplayData * data, SDL_DisplayMode * mode)
+static void CheckSetDisplayMode(_THIS, SDL_VideoDisplay * display, DFB_DisplayData * data, SDL_DisplayMode * mode)
{
SDL_DFB_DEVICEDATA(_this);
DFBDisplayLayerConfig config;
@@ -125,8 +119,7 @@ CheckSetDisplayMode(_THIS, SDL_VideoDisplay * display, DFB_DisplayData * data, S
}
-void
-DirectFB_SetContext(_THIS, SDL_Window *window)
+void DirectFB_SetContext(_THIS, SDL_Window *window)
{
#if (DFB_VERSION_ATLEAST(1,0,0))
/* FIXME: does not work on 1.0/1.2 with radeon driver
@@ -144,8 +137,7 @@ DirectFB_SetContext(_THIS, SDL_Window *window)
#endif
}
-void
-DirectFB_InitModes(_THIS)
+void DirectFB_InitModes(_THIS)
{
SDL_DFB_DEVICEDATA(_this);
IDirectFBDisplayLayer *layer = NULL;
@@ -269,8 +261,7 @@ DirectFB_InitModes(_THIS)
return;
}
-void
-DirectFB_GetDisplayModes(_THIS, SDL_VideoDisplay * display)
+void DirectFB_GetDisplayModes(_THIS, SDL_VideoDisplay * display)
{
SDL_DFB_DEVICEDATA(_this);
DFB_DisplayData *dispdata = (DFB_DisplayData *) display->driverdata;
@@ -304,8 +295,7 @@ error:
return;
}
-int
-DirectFB_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode)
+int DirectFB_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode)
{
/*
* FIXME: video mode switch is currently broken for 1.2.0
@@ -375,8 +365,7 @@ DirectFB_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mod
return -1;
}
-void
-DirectFB_QuitModes(_THIS)
+void DirectFB_QuitModes(_THIS)
{
SDL_DisplayMode tmode;
int i;
diff --git a/src/video/directfb/SDL_DirectFB_mouse.c b/src/video/directfb/SDL_DirectFB_mouse.c
index 4d59157..d0e1f29 100644
--- a/src/video/directfb/SDL_DirectFB_mouse.c
+++ b/src/video/directfb/SDL_DirectFB_mouse.c
@@ -74,8 +74,7 @@ static const char *arrow[] = {
" ",
};
-static SDL_Cursor *
-DirectFB_CreateDefaultCursor(void)
+static SDL_Cursor *DirectFB_CreateDefaultCursor(void)
{
SDL_VideoDevice *dev = SDL_GetVideoDevice();
@@ -127,8 +126,7 @@ DirectFB_CreateDefaultCursor(void)
}
/* Create a cursor from a surface */
-static SDL_Cursor *
-DirectFB_CreateCursor(SDL_Surface * surface, int hot_x, int hot_y)
+static SDL_Cursor *DirectFB_CreateCursor(SDL_Surface * surface, int hot_x, int hot_y)
{
SDL_VideoDevice *dev = SDL_GetVideoDevice();
@@ -174,8 +172,7 @@ DirectFB_CreateCursor(SDL_Surface * surface, int hot_x, int hot_y)
}
/* Show the specified cursor, or hide if cursor is NULL */
-static int
-DirectFB_ShowCursor(SDL_Cursor * cursor)
+static int DirectFB_ShowCursor(SDL_Cursor * cursor)
{
SDL_DFB_CURSORDATA(cursor);
SDL_Window *window;
@@ -215,8 +212,7 @@ DirectFB_ShowCursor(SDL_Cursor * cursor)
}
/* Free a window manager cursor */
-static void
-DirectFB_FreeCursor(SDL_Cursor * cursor)
+static void DirectFB_FreeCursor(SDL_Cursor * cursor)
{
SDL_DFB_CURSORDATA(cursor);
@@ -226,8 +222,7 @@ DirectFB_FreeCursor(SDL_Cursor * cursor)
}
/* Warp the mouse to (x,y) */
-static void
-DirectFB_WarpMouse(SDL_Window * window, int x, int y)
+static void DirectFB_WarpMouse(SDL_Window * window, int x, int y)
{
SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window);
DFB_DisplayData *dispdata = (DFB_DisplayData *) display->driverdata;
@@ -252,9 +247,7 @@ static void DirectFB_FreeMouse(SDL_Mouse * mouse);
static int id_mask;
-static DFBEnumerationResult
-EnumMice(DFBInputDeviceID device_id, DFBInputDeviceDescription desc,
- void *callbackdata)
+static DFBEnumerationResult EnumMice(DFBInputDeviceID device_id, DFBInputDeviceDescription desc, void *callbackdata)
{
DFB_DeviceData *devdata = callbackdata;
@@ -277,8 +270,7 @@ EnumMice(DFBInputDeviceID device_id, DFBInputDeviceDescription desc,
return DFENUM_OK;
}
-void
-DirectFB_InitMouse(_THIS)
+void DirectFB_InitMouse(_THIS)
{
SDL_DFB_DEVICEDATA(_this);
@@ -310,8 +302,7 @@ DirectFB_InitMouse(_THIS)
}
}
-void
-DirectFB_QuitMouse(_THIS)
+void DirectFB_QuitMouse(_THIS)
{
SDL_DFB_DEVICEDATA(_this);
@@ -324,15 +315,13 @@ DirectFB_QuitMouse(_THIS)
/* This is called when a mouse motion event occurs */
-static void
-DirectFB_MoveCursor(SDL_Cursor * cursor)
+static void DirectFB_MoveCursor(SDL_Cursor * cursor)
{
}
/* Warp the mouse to (x,y) */
-static void
-DirectFB_WarpMouse(SDL_Mouse * mouse, SDL_Window * window, int x, int y)
+static void DirectFB_WarpMouse(SDL_Mouse * mouse, SDL_Window * window, int x, int y)
{
SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window);
DFB_DisplayData *dispdata = (DFB_DisplayData *) display->driverdata;
@@ -350,16 +339,14 @@ DirectFB_WarpMouse(SDL_Mouse * mouse, SDL_Window * window, int x, int y)
}
/* Free the mouse when it's time */
-static void
-DirectFB_FreeMouse(SDL_Mouse * mouse)
+static void DirectFB_FreeMouse(SDL_Mouse * mouse)
{
/* nothing yet */
}
#else /* USE_MULTI_API */
-void
-DirectFB_InitMouse(_THIS)
+void DirectFB_InitMouse(_THIS)
{
SDL_DFB_DEVICEDATA(_this);
@@ -375,12 +362,10 @@ DirectFB_InitMouse(_THIS)
devdata->num_mice = 1;
}
-void
-DirectFB_QuitMouse(_THIS)
+void DirectFB_QuitMouse(_THIS)
{
}
-
#endif
#endif /* SDL_VIDEO_DRIVER_DIRECTFB */
diff --git a/src/video/directfb/SDL_DirectFB_opengl.c b/src/video/directfb/SDL_DirectFB_opengl.c
index 42a9d8b..1c146a0 100644
--- a/src/video/directfb/SDL_DirectFB_opengl.c
+++ b/src/video/directfb/SDL_DirectFB_opengl.c
@@ -60,8 +60,7 @@ struct SDL_GLDriverData
static void DirectFB_GL_UnloadLibrary(_THIS);
-int
-DirectFB_GL_Initialize(_THIS)
+int DirectFB_GL_Initialize(_THIS)
{
if (_this->gl_data) {
return 0;
@@ -91,8 +90,7 @@ DirectFB_GL_Initialize(_THIS)
return 0;
}
-void
-DirectFB_GL_Shutdown(_THIS)
+void DirectFB_GL_Shutdown(_THIS)
{
if (!_this->gl_data || (--_this->gl_data->initialized > 0)) {
return;
@@ -104,8 +102,7 @@ DirectFB_GL_Shutdown(_THIS)
_this->gl_data = NULL;
}
-int
-DirectFB_GL_LoadLibrary(_THIS, const char *path)
+int DirectFB_GL_LoadLibrary(_THIS, const char *path)
{
void *handle = NULL;
@@ -146,8 +143,7 @@ DirectFB_GL_LoadLibrary(_THIS, const char *path)
return 0;
}
-static void
-DirectFB_GL_UnloadLibrary(_THIS)
+static void DirectFB_GL_UnloadLibrary(_THIS)
{
#if 0
int ret = GL_UnloadObject(_this->gl_config.dll_handle);
@@ -160,8 +156,7 @@ DirectFB_GL_UnloadLibrary(_THIS)
_this->gl_data = NULL;
}
-void *
-DirectFB_GL_GetProcAddress(_THIS, const char *proc)
+void *DirectFB_GL_GetProcAddress(_THIS, const char *proc)
{
void *handle;
@@ -169,8 +164,7 @@ DirectFB_GL_GetProcAddress(_THIS, const char *proc)
return GL_LoadFunction(handle, proc);
}
-SDL_GLContext
-DirectFB_GL_CreateContext(_THIS, SDL_Window * window)
+SDL_GLContext DirectFB_GL_CreateContext(_THIS, SDL_Window * window)
{
SDL_DFB_WINDOWDATA(window);
DirectFB_GLContext *context;
@@ -202,8 +196,7 @@ DirectFB_GL_CreateContext(_THIS, SDL_Window * window)
return NULL;
}
-int
-DirectFB_GL_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context)
+int DirectFB_GL_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context)
{
DirectFB_GLContext *ctx = (DirectFB_GLContext *) context;
DirectFB_GLContext *p;
@@ -227,20 +220,17 @@ DirectFB_GL_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context)
return -1;
}
-int
-DirectFB_GL_SetSwapInterval(_THIS, int interval)
+int DirectFB_GL_SetSwapInterval(_THIS, int interval)
{
return SDL_Unsupported();
}
-int
-DirectFB_GL_GetSwapInterval(_THIS)
+int DirectFB_GL_GetSwapInterval(_THIS)
{
return 0;
}
-int
-DirectFB_GL_SwapWindow(_THIS, SDL_Window * window)
+int DirectFB_GL_SwapWindow(_THIS, SDL_Window * window)
{
SDL_DFB_WINDOWDATA(window);
DirectFB_GLContext *p;
@@ -265,8 +255,7 @@ DirectFB_GL_SwapWindow(_THIS, SDL_Window * window)
return -1;
}
-void
-DirectFB_GL_DeleteContext(_THIS, SDL_GLContext context)
+void DirectFB_GL_DeleteContext(_THIS, SDL_GLContext context)
{
DirectFB_GLContext *ctx = (DirectFB_GLContext *) context;
DirectFB_GLContext *p;
@@ -285,8 +274,7 @@ DirectFB_GL_DeleteContext(_THIS, SDL_GLContext context)
SDL_DFB_FREE(ctx);
}
-void
-DirectFB_GL_FreeWindowContexts(_THIS, SDL_Window * window)
+void DirectFB_GL_FreeWindowContexts(_THIS, SDL_Window * window)
{
DirectFB_GLContext *p;
@@ -299,8 +287,7 @@ DirectFB_GL_FreeWindowContexts(_THIS, SDL_Window * window)
}
}
-void
-DirectFB_GL_ReAllocWindowContexts(_THIS, SDL_Window * window)
+void DirectFB_GL_ReAllocWindowContexts(_THIS, SDL_Window * window)
{
DirectFB_GLContext *p;
@@ -315,8 +302,7 @@ DirectFB_GL_ReAllocWindowContexts(_THIS, SDL_Window * window)
}
}
-void
-DirectFB_GL_DestroyWindowContexts(_THIS, SDL_Window * window)
+void DirectFB_GL_DestroyWindowContexts(_THIS, SDL_Window * window)
{
DirectFB_GLContext *p;
diff --git a/src/video/directfb/SDL_DirectFB_render.c b/src/video/directfb/SDL_DirectFB_render.c
index 00460c5..40f0e1a 100644
--- a/src/video/directfb/SDL_DirectFB_render.c
+++ b/src/video/directfb/SDL_DirectFB_render.c
@@ -79,16 +79,14 @@ typedef struct
#endif
} DirectFB_TextureData;
-static SDL_INLINE void
-SDLtoDFBRect(const SDL_Rect * sr, DFBRectangle * dr)
+static void SDLtoDFBRect(const SDL_Rect * sr, DFBRectangle * dr)
{
dr->x = sr->x;
dr->y = sr->y;
dr->h = sr->h;
dr->w = sr->w;
}
-static SDL_INLINE void
-SDLtoDFBRect_Float(const SDL_FRect * sr, DFBRectangle * dr)
+static void SDLtoDFBRect_Float(const SDL_FRect * sr, DFBRectangle * dr)
{
dr->x = sr->x;
dr->y = sr->y;
@@ -97,8 +95,7 @@ SDLtoDFBRect_Float(const SDL_FRect * sr, DFBRectangle * dr)
}
-static int
-TextureHasAlpha(DirectFB_TextureData * data)
+static int TextureHasAlpha(DirectFB_TextureData * data)
{
/* Drawing primitive ? */
if (!data)
@@ -149,9 +146,7 @@ static SDL_INLINE IDirectFBWindow *get_dfb_window(SDL_Window *window)
return wm_info.info.dfb.window;
}
-static void
-SetBlendMode(DirectFB_RenderData * data, int blendMode,
- DirectFB_TextureData * source)
+static void SetBlendMode(DirectFB_RenderData * data, int blendMode, DirectFB_TextureData * source)
{
IDirectFBSurface *destsurf = data->target;
@@ -211,8 +206,7 @@ SetBlendMode(DirectFB_RenderData * data, int blendMode,
}
}
-static int
-PrepareDraw(SDL_Renderer * renderer, const SDL_RenderCommand *cmd)
+static int PrepareDraw(SDL_Renderer * renderer, const SDL_RenderCommand *cmd)
{
DirectFB_RenderData *data = (DirectFB_RenderData *) renderer->driverdata;
IDirectFBSurface *destsurf = data->target;
@@ -246,8 +240,7 @@ PrepareDraw(SDL_Renderer * renderer, const SDL_RenderCommand *cmd)
return -1;
}
-static void
-DirectFB_WindowEvent(SDL_Renderer * renderer, const SDL_WindowEvent *event)
+static void DirectFB_WindowEvent(SDL_Renderer * renderer, const SDL_WindowEvent *event)
{
SDL_DFB_RENDERERDATA(renderer);
@@ -259,8 +252,7 @@ DirectFB_WindowEvent(SDL_Renderer * renderer, const SDL_WindowEvent *event)
}
}
-static void
-DirectFB_ActivateRenderer(SDL_Renderer * renderer)
+static void DirectFB_ActivateRenderer(SDL_Renderer * renderer)
{
SDL_DFB_RENDERERDATA(renderer);
@@ -269,8 +261,7 @@ DirectFB_ActivateRenderer(SDL_Renderer * renderer)
}
}
-static int
-DirectFB_AcquireVidLayer(SDL_Renderer * renderer, SDL_Texture * texture)
+static int DirectFB_AcquireVidLayer(SDL_Renderer * renderer, SDL_Texture * texture)
{
SDL_Window *window = renderer->window;
SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window);
@@ -341,8 +332,7 @@ void DirectFB_SetTexturePalette(SDL_Renderer *renderer, SDL_Texture *texture, SD
data->palette->SetEntries(data->palette, dfbpal, pal->ncolors, 0);
}
-static int
-DirectFB_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture)
+static int DirectFB_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture)
{
SDL_Window *window = renderer->window;
SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window);
@@ -437,8 +427,7 @@ DirectFB_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture)
}
#if 0
-static int
-DirectFB_SetTextureScaleMode(SDL_Renderer * renderer, SDL_Texture * texture)
+static int DirectFB_SetTextureScaleMode(SDL_Renderer * renderer, SDL_Texture * texture)
{
#if (DFB_VERSION_ATLEAST(1,2,0))
@@ -466,8 +455,7 @@ DirectFB_SetTextureScaleMode(SDL_Renderer * renderer, SDL_Texture * texture)
}
#endif
-static int
-DirectFB_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture,
+static int DirectFB_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture,
const SDL_Rect * rect, const void *pixels, int pitch)
{
DirectFB_TextureData *data = (DirectFB_TextureData *) texture->driverdata;
@@ -523,8 +511,7 @@ DirectFB_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture,
}
-static int
-DirectFB_LockTexture(SDL_Renderer * renderer, SDL_Texture * texture,
+static int DirectFB_LockTexture(SDL_Renderer * renderer, SDL_Texture * texture,
const SDL_Rect * rect, void **pixels, int *pitch)
{
DirectFB_TextureData *texturedata =
@@ -561,8 +548,7 @@ DirectFB_LockTexture(SDL_Renderer * renderer, SDL_Texture * texture,
return -1;
}
-static void
-DirectFB_UnlockTexture(SDL_Renderer * renderer, SDL_Texture * texture)
+static void DirectFB_UnlockTexture(SDL_Renderer * renderer, SDL_Texture * texture)
{
DirectFB_TextureData *texturedata =
(DirectFB_TextureData *) texture->driverdata;
@@ -575,14 +561,12 @@ DirectFB_UnlockTexture(SDL_Renderer * renderer, SDL_Texture * texture)
}
}
-static void
-DirectFB_SetTextureScaleMode()
+static void DirectFB_SetTextureScaleMode()
{
}
#if 0
-static void
-DirectFB_DirtyTexture(SDL_Renderer * renderer, SDL_Texture * texture,
+static void DirectFB_DirtyTexture(SDL_Renderer * renderer, SDL_Texture * texture,
int numrects, const SDL_Rect * rects)
{
DirectFB_TextureData *data = (DirectFB_TextureData *) texture->driverdata;
@@ -611,14 +595,12 @@ static int DirectFB_SetRenderTarget(SDL_Renderer * renderer, SDL_Texture * textu
}
-static int
-DirectFB_QueueSetViewport(SDL_Renderer * renderer, SDL_RenderCommand *cmd)
+static int DirectFB_QueueSetViewport(SDL_Renderer * renderer, SDL_RenderCommand *cmd)
{
return 0; /* nothing to do in this backend. */
}
-static int
-DirectFB_QueueDrawPoints(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL_FPoint *points, int count)
+static int DirectFB_QueueDrawPoints(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL_FPoint *points, int count)
{
const size_t len = count * sizeof(SDL_FPoint);
SDL_FPoint *verts = (SDL_FPoint *) SDL_AllocateRenderVertices(renderer, len, 0, &cmd->data.draw.first);
@@ -632,8 +614,7 @@ DirectFB_QueueDrawPoints(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const
return 0;
}
-static int
-DirectFB_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *texture,
+static int DirectFB_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *texture,
const float *xy, int xy_stride, const SDL_Color *color, int color_stride, const float *uv, int uv_stride,
int num_vertices, const void *indices, int num_indices, int size_indices,
float scale_x, float scale_y)
@@ -685,8 +666,7 @@ DirectFB_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Textu
return 0;
}
-static int
-DirectFB_QueueFillRects(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL_FRect * rects, int count)
+static int DirectFB_QueueFillRects(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL_FRect * rects, int count)
{
const size_t len = count * sizeof(SDL_FRect);
SDL_FRect *verts = (SDL_FRect *) SDL_AllocateRenderVertices(renderer, len, 0, &cmd->data.draw.first);
@@ -700,8 +680,7 @@ DirectFB_QueueFillRects(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const S
return 0;
}
-static int
-DirectFB_QueueCopy(SDL_Renderer * renderer, SDL_RenderCommand *cmd, SDL_Texture * texture,
+static int DirectFB_QueueCopy(SDL_Renderer * renderer, SDL_RenderCommand *cmd, SDL_Texture * texture,
const SDL_Rect * srcrect, const SDL_FRect * dstrect)
{
DFBRectangle *verts = (DFBRectangle *) SDL_AllocateRenderVertices(renderer, 2 * sizeof(DFBRectangle), 0, &cmd->data.draw.first);
@@ -718,8 +697,7 @@ DirectFB_QueueCopy(SDL_Renderer * renderer, SDL_RenderCommand *cmd, SDL_Texture
return 0;
}
-static int
-DirectFB_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *vertices, size_t vertsize)
+static int DirectFB_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *vertices, size_t vertsize)
{
/* !!! FIXME: there are probably some good optimization wins in here if someone wants to look it over. */
DirectFB_RenderData *data = (DirectFB_RenderData *) renderer->driverdata;
@@ -1026,8 +1004,7 @@ DirectFB_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *
}
-static int
-DirectFB_RenderPresent(SDL_Renderer * renderer)
+static int DirectFB_RenderPresent(SDL_Renderer * renderer)
{
DirectFB_RenderData *data = (DirectFB_RenderData *) renderer->driverdata;
SDL_Window *window = renderer->window;
@@ -1060,8 +1037,7 @@ DirectFB_RenderPresent(SDL_Renderer * renderer)
return 0;
}
-static void
-DirectFB_DestroyTexture(SDL_Renderer * renderer, SDL_Texture * texture)
+static void DirectFB_DestroyTexture(SDL_Renderer * renderer, SDL_Texture * texture)
{
DirectFB_TextureData *data = (DirectFB_TextureData *) texture->driverdata;
@@ -1086,8 +1062,7 @@ DirectFB_DestroyTexture(SDL_Renderer * renderer, SDL_Texture * texture)
texture->driverdata = NULL;
}
-static void
-DirectFB_DestroyRenderer(SDL_Renderer * renderer)
+static void DirectFB_DestroyRenderer(SDL_Renderer * renderer)
{
DirectFB_RenderData *data = (DirectFB_RenderData *) renderer->driverdata;
#if 0
@@ -1101,8 +1076,7 @@ DirectFB_DestroyRenderer(SDL_Renderer * renderer)
SDL_free(renderer);
}
-static int
-DirectFB_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect,
+static int DirectFB_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect,
Uint32 format, void * pixels, int pitch)
{
Uint32 sdl_format;
@@ -1129,8 +1103,7 @@ DirectFB_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect,
}
#if 0
-static int
-DirectFB_RenderWritePixels(SDL_Renderer * renderer, const SDL_Rect * rect,
+static int DirectFB_RenderWritePixels(SDL_Renderer * renderer, const SDL_Rect * rect,
Uint32 format, const void * pixels, int pitch)
{
SDL_Window *window = renderer->window;
@@ -1157,8 +1130,7 @@ DirectFB_RenderWritePixels(SDL_Renderer * renderer, const SDL_Rect * rect,
#endif
-SDL_Renderer *
-DirectFB_CreateRenderer(SDL_Window * window, Uint32 flags)
+SDL_Renderer *DirectFB_CreateRenderer(SDL_Window * window, Uint32 flags)
{
IDirectFBSurface *winsurf = get_dfb_surface(window);
/*SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window);*/
diff --git a/src/video/directfb/SDL_DirectFB_shape.c b/src/video/directfb/SDL_DirectFB_shape.c
index aef6bfd..a6c9aa0 100644
--- a/src/video/directfb/SDL_DirectFB_shape.c
+++ b/src/video/directfb/SDL_DirectFB_shape.c
@@ -28,8 +28,8 @@
#include "../SDL_shape_internals.h"
-SDL_WindowShaper*
-DirectFB_CreateShaper(SDL_Window* window) {
+SDL_WindowShaper *DirectFB_CreateShaper(SDL_Window* window)
+{
SDL_WindowShaper* result = NULL;
SDL_ShapeData* data;
int resized_properly;
@@ -58,8 +58,8 @@ DirectFB_CreateShaper(SDL_Window* window) {
return result;
}
-int
-DirectFB_ResizeWindowShape(SDL_Window* window) {
+int DirectFB_ResizeWindowShape(SDL_Window* window)
+{
SDL_ShapeData* data = window->shaper->driverdata;
SDL_assert(data != NULL);
@@ -73,8 +73,8 @@ DirectFB_ResizeWindowShape(SDL_Window* window) {
return 0;
}
-int
-DirectFB_SetWindowShape(SDL_WindowShaper *shaper,SDL_Surface *shape,SDL_WindowShapeMode *shape_mode) {
+int DirectFB_SetWindowShape(SDL_WindowShaper *shaper,SDL_Surface *shape,SDL_WindowShapeMode *shape_mode)
+{
if(shaper == NULL || shape == NULL || shaper->driverdata == NULL)
return -1;
diff --git a/src/video/directfb/SDL_DirectFB_video.c b/src/video/directfb/SDL_DirectFB_video.c
index d50e316..5292732 100644
--- a/src/video/directfb/SDL_DirectFB_video.c
+++ b/src/video/directfb/SDL_DirectFB_video.c
@@ -74,16 +74,14 @@ static const DirectFBAccelerationMaskNames(acceleration_mask);
/* DirectFB driver bootstrap functions */
-static void
-DirectFB_DeleteDevice(SDL_VideoDevice * device)
+static void DirectFB_DeleteDevice(SDL_VideoDevice * device)
{
SDL_DirectFB_UnLoadLibrary();
SDL_DFB_FREE(device->driverdata);
SDL_DFB_FREE(device);
}
-static SDL_VideoDevice *
-DirectFB_CreateDevice(void)
+static SDL_VideoDevice *DirectFB_CreateDevice(void)
{
SDL_VideoDevice *device;
@@ -154,8 +152,7 @@ DirectFB_CreateDevice(void)
return (0);
}
-static void
-DirectFB_DeviceInformation(IDirectFB * dfb)
+static void DirectFB_DeviceInformation(IDirectFB * dfb)
{
DFBGraphicsDeviceDescription desc;
int n;
@@ -206,8 +203,7 @@ static int readBoolEnv(const char *env_name, int def_val)
return def_val;
}
-static int
-DirectFB_VideoInit(_THIS)
+static int DirectFB_VideoInit(_THIS)
{
IDirectFB *dfb = NULL;
DFB_DeviceData *devdata = NULL;
@@ -282,8 +278,7 @@ DirectFB_VideoInit(_THIS)
return -1;
}
-static void
-DirectFB_VideoQuit(_THIS)
+static void DirectFB_VideoQuit(_THIS)
{
DFB_DeviceData *devdata = (DFB_DeviceData *) _this->driverdata;
@@ -379,8 +374,7 @@ static const struct {
{ DSPF_UNKNOWN, SDL_PIXELFORMAT_YVYU }, /**< Packed mode: Y0+V0+Y1+U0 (1 pla */
};
-Uint32
-DirectFB_DFBToSDLPixelFormat(DFBSurfacePixelFormat pixelformat)
+Uint32 DirectFB_DFBToSDLPixelFormat(DFBSurfacePixelFormat pixelformat)
{
int i;
@@ -392,8 +386,7 @@ DirectFB_DFBToSDLPixelFormat(DFBSurfacePixelFormat pixelformat)
return SDL_PIXELFORMAT_UNKNOWN;
}
-DFBSurfacePixelFormat
-DirectFB_SDLToDFBPixelFormat(Uint32 format)
+DFBSurfacePixelFormat DirectFB_SDLToDFBPixelFormat(Uint32 format)
{
int i;
diff --git a/src/video/directfb/SDL_DirectFB_window.c b/src/video/directfb/SDL_DirectFB_window.c
index f88fb9d..91be03b 100644
--- a/src/video/directfb/SDL_DirectFB_window.c
+++ b/src/video/directfb/SDL_DirectFB_window.c
@@ -35,8 +35,7 @@
#include "../SDL_pixels_c.h"
-int
-DirectFB_CreateWindow(_THIS, SDL_Window * window)
+int DirectFB_CreateWindow(_THIS, SDL_Window * window)
{
SDL_DFB_DEVICEDATA(_this);
SDL_DFB_DISPLAYDATA(window);
@@ -173,14 +172,12 @@ DirectFB_CreateWindow(_THIS, SDL_Window * window)
return -1;
}
-int
-DirectFB_CreateWindowFrom(_THIS, SDL_Window * window, const void *data)
+int DirectFB_CreateWindowFrom(_THIS, SDL_Window * window, const void *data)
{
return SDL_Unsupported();
}
-void
-DirectFB_SetWindowTitle(_THIS, SDL_Window * window)
+void DirectFB_SetWindowTitle(_THIS, SDL_Window * window)
{
SDL_DFB_WINDOWDATA(window);
@@ -192,8 +189,7 @@ DirectFB_SetWindowTitle(_THIS, SDL_Window * window)
}
}
-void
-DirectFB_SetWindowIcon(_THIS, SDL_Window * window, SDL_Surface * icon)
+void DirectFB_SetWindowIcon(_THIS, SDL_Window * window, SDL_Surface * icon)
{
SDL_DFB_DEVICEDATA(_this);
SDL_DFB_WINDOWDATA(window);
@@ -242,8 +238,7 @@ DirectFB_SetWindowIcon(_THIS, SDL_Window * window, SDL_Surface * icon)
return;
}
-void
-DirectFB_SetWindowPosition(_THIS, SDL_Window * window)
+void DirectFB_SetWindowPosition(_THIS, SDL_Window * window)
{
SDL_DFB_WINDOWDATA(window);
int x, y;
@@ -255,8 +250,7 @@ DirectFB_SetWindowPosition(_THIS, SDL_Window * window)
SDL_DFB_CHECK(windata->dfbwin->MoveTo(windata->dfbwin, x, y));
}
-void
-DirectFB_SetWindowSize(_THIS, SDL_Window * window)
+void DirectFB_SetWindowSize(_THIS, SDL_Window * window)
{
SDL_DFB_WINDOWDATA(window);
@@ -294,8 +288,7 @@ DirectFB_SetWindowSize(_THIS, SDL_Window * window)
return;
}
-void
-DirectFB_ShowWindow(_THIS, SDL_Window * window)
+void DirectFB_ShowWindow(_THIS, SDL_Window * window)
{
SDL_DFB_WINDOWDATA(window);
@@ -303,8 +296,7 @@ DirectFB_ShowWindow(_THIS, SDL_Window * window)
}
-void
-DirectFB_HideWindow(_THIS, SDL_Window * window)
+void DirectFB_HideWindow(_THIS, SDL_Window * window)
{
SDL_DFB_WINDOWDATA(window);
@@ -312,8 +304,7 @@ DirectFB_HideWindow(_THIS, SDL_Window * window)
SDL_DFB_CHECK(windata->dfbwin->SetOpacity(windata->dfbwin, 0));
}
-void
-DirectFB_RaiseWindow(_THIS, SDL_Window * window)
+void DirectFB_RaiseWindow(_THIS, SDL_Window * window)
{
SDL_DFB_WINDOWDATA(window);
@@ -321,8 +312,7 @@ DirectFB_RaiseWindow(_THIS, SDL_Window * window)
SDL_DFB_CHECK(windata->dfbwin->RequestFocus(windata->dfbwin));
}
-void
-DirectFB_MaximizeWindow(_THIS, SDL_Window * window)
+void DirectFB_MaximizeWindow(_THIS, SDL_Window * window)
{
SDL_DFB_WINDOWDATA(window);
SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window);
@@ -345,16 +335,14 @@ DirectFB_MaximizeWindow(_THIS, SDL_Window * window)
SDL_DFB_CHECK(windata->dfbwin->SetOptions(windata->dfbwin, wopts));
}
-void
-DirectFB_MinimizeWindow(_THIS, SDL_Window * window)
+void DirectFB_MinimizeWindow(_THIS, SDL_Window * window)
{
/* FIXME: Size to 32x32 ? */
SDL_Unsupported();
}
-void
-DirectFB_RestoreWindow(_THIS, SDL_Window * window)
+void DirectFB_RestoreWindow(_THIS, SDL_Window * window)
{
SDL_DFB_WINDOWDATA(window);
DFBWindowOptions wopts;
@@ -382,8 +370,7 @@ DirectFB_RestoreWindow(_THIS, SDL_Window * window)
}
-void
-DirectFB_SetWindowMouseGrab(_THIS, SDL_Window * window, SDL_bool grabbed)
+void DirectFB_SetWindowMouseGrab(_THIS, SDL_Window * window, SDL_bool grabbed)
{
SDL_DFB_WINDOWDATA(window);
@@ -394,8 +381,7 @@ DirectFB_SetWindowMouseGrab(_THIS, SDL_Window * window, SDL_bool grabbed)
}
}
-void
-DirectFB_SetWindowKeyboardGrab(_THIS, SDL_Window * window, SDL_bool grabbed)
+void DirectFB_SetWindowKeyboardGrab(_THIS, SDL_Window * window, SDL_bool grabbed)
{
SDL_DFB_WINDOWDATA(window);
@@ -406,8 +392,7 @@ DirectFB_SetWindowKeyboardGrab(_THIS, SDL_Window * window, SDL_bool grabbed)
}
}
-void
-DirectFB_DestroyWindow(_THIS, SDL_Window * window)
+void DirectFB_DestroyWindow(_THIS, SDL_Window * window)
{
SDL_DFB_DEVICEDATA(_this);
SDL_DFB_WINDOWDATA(window);
@@ -455,8 +440,7 @@ DirectFB_DestroyWindow(_THIS, SDL_Window * window)
return;
}
-SDL_bool
-DirectFB_GetWindowWMInfo(_THIS, SDL_Window * window,
+SDL_bool DirectFB_GetWindowWMInfo(_THIS, SDL_Window * window,
struct SDL_SysWMinfo * info)
{
const Uint32 version = ((((Uint32) info->version.major) * 1000000) +
@@ -495,8 +479,7 @@ DirectFB_GetWindowWMInfo(_THIS, SDL_Window * window,
}
}
-void
-DirectFB_AdjustWindowSurface(SDL_Window * window)
+void DirectFB_AdjustWindowSurface(SDL_Window * window)
{
SDL_DFB_WINDOWDATA(window);
int adjust = windata->wm_needs_redraw;
@@ -549,8 +532,7 @@ DirectFB_AdjustWindowSurface(SDL_Window * window)
return;
}
-int
-DirectFB_SetWindowOpacity(_THIS, SDL_Window * window, float opacity)
+int DirectFB_SetWindowOpacity(_THIS, SDL_Window * window, float opacity)
{
const Uint8 alpha = (Uint8) ((unsigned int) (opacity * 255.0f));
SDL_DFB_WINDOWDATA(window);
diff --git a/src/video/emscripten/SDL_emscriptenopengles.c b/src/video/emscripten/SDL_emscriptenopengles.c
index e45f59b..aea127f 100644
--- a/src/video/emscripten/SDL_emscriptenopengles.c
+++ b/src/video/emscripten/SDL_emscriptenopengles.c
@@ -33,8 +33,8 @@
/* EGL implementation of SDL OpenGL support */
-int
-Emscripten_GLES_LoadLibrary(_THIS, const char *path) {
+int Emscripten_GLES_LoadLibrary(_THIS, const char *path)
+{
/*we can't load EGL dynamically*/
_this->egl_data = (struct SDL_EGL_VideoData *) SDL_calloc(1, sizeof(SDL_EGL_VideoData));
if (!_this->egl_data) {
@@ -68,7 +68,7 @@ Emscripten_GLES_LoadLibrary(_THIS, const char *path) {
if (!_this->egl_data->egl_display) {
return SDL_SetError("Could not get EGL display");
}
-
+
if (_this->egl_data->eglInitialize(_this->egl_data->egl_display, NULL, NULL) != EGL_TRUE) {
return SDL_SetError("Could not initialize EGL");
}
@@ -78,7 +78,7 @@ Emscripten_GLES_LoadLibrary(_THIS, const char *path) {
} else {
*_this->gl_config.driver_path = '\0';
}
-
+
return 0;
}
diff --git a/src/video/haiku/SDL_bmessagebox.cc b/src/video/haiku/SDL_bmessagebox.cc
index 2983ef3..60fce00 100644
--- a/src/video/haiku/SDL_bmessagebox.cc
+++ b/src/video/haiku/SDL_bmessagebox.cc
@@ -346,8 +346,7 @@ protected:
extern "C" {
#endif
-int
-HAIKU_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid)
+int HAIKU_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid)
{
// Initialize button by closed or error value first.
*buttonid = G_CLOSE_BUTTON_ID;
diff --git a/src/video/kmsdrm/SDL_kmsdrmvideo.c b/src/video/kmsdrm/SDL_kmsdrmvideo.c
index 042a014..ebe15fe 100644
--- a/src/video/kmsdrm/SDL_kmsdrmvideo.c
+++ b/src/video/kmsdrm/SDL_kmsdrmvideo.c
@@ -330,8 +330,7 @@ static void KMSDRM_FBDestroyCallback(struct gbm_bo *bo, void *data)
SDL_free(fb_info);
}
-KMSDRM_FBInfo *
-KMSDRM_FBFromBO(_THIS, struct gbm_bo *bo)
+KMSDRM_FBInfo *KMSDRM_FBFromBO(_THIS, struct gbm_bo *bo)
{
SDL_VideoData *viddata = ((SDL_VideoData *)_this->driverdata);
unsigned w, h;
@@ -382,8 +381,7 @@ static void KMSDRM_FlipHandler(int fd, unsigned int frame, unsigned int sec, uns
*((SDL_bool *)data) = SDL_FALSE;
}
-SDL_bool
-KMSDRM_WaitPageflip(_THIS, SDL_WindowData *windata)
+SDL_bool KMSDRM_WaitPageflip(_THIS, SDL_WindowData *windata)
{
SDL_VideoData *viddata = ((SDL_VideoData *)_this->driverdata);
@@ -1530,8 +1528,7 @@ int KMSDRM_CreateWindow(_THIS, SDL_Window *window)
return ret;
}
-int
-KMSDRM_GetWindowGammaRamp(_THIS, SDL_Window * window, Uint16 * ramp)
+int KMSDRM_GetWindowGammaRamp(_THIS, SDL_Window * window, Uint16 * ramp)
{
SDL_WindowData *windata = (SDL_WindowData*)window->driverdata;
SDL_VideoData *viddata = (SDL_VideoData*)windata->viddata;
@@ -1544,8 +1541,7 @@ KMSDRM_GetWindowGammaRamp(_THIS, SDL_Window * window, Uint16 * ramp)
return 0;
}
-int
-KMSDRM_SetWindowGammaRamp(_THIS, SDL_Window * window, const Uint16 * ramp)
+int KMSDRM_SetWindowGammaRamp(_THIS, SDL_Window * window, const Uint16 * ramp)
{
SDL_WindowData *windata = (SDL_WindowData*)window->driverdata;
SDL_VideoData *viddata = (SDL_VideoData*)windata->viddata;
@@ -1566,8 +1562,7 @@ KMSDRM_SetWindowGammaRamp(_THIS, SDL_Window * window, const Uint16 * ramp)
return 0;
}
-int
-KMSDRM_CreateWindowFrom(_THIS, SDL_Window * window, const void *data)
+int KMSDRM_CreateWindowFrom(_THIS, SDL_Window * window, const void *data)
{
return -1;
}
@@ -1618,8 +1613,7 @@ void KMSDRM_RestoreWindow(_THIS, SDL_Window *window)
/*****************************************************************************/
/* SDL Window Manager function */
/*****************************************************************************/
-SDL_bool
-KMSDRM_GetWindowWMInfo(_THIS, SDL_Window * window, struct SDL_SysWMinfo *info)
+SDL_bool KMSDRM_GetWindowWMInfo(_THIS, SDL_Window * window, struct SDL_SysWMinfo *info)
{
SDL_VideoData *viddata = ((SDL_VideoData *)_this->driverdata);
const Uint32 version = SDL_VERSIONNUM((Uint32)info->version.major,
diff --git a/src/video/n3ds/SDL_n3dsswkb.c b/src/video/n3ds/SDL_n3dsswkb.c
index b8ac6df..9170a2a 100644
--- a/src/video/n3ds/SDL_n3dsswkb.c
+++ b/src/video/n3ds/SDL_n3dsswkb.c
@@ -45,8 +45,7 @@ void N3DS_SwkbQuit()
return;
}
-SDL_bool
-N3DS_HasScreenKeyboardSupport(_THIS)
+SDL_bool N3DS_HasScreenKeyboardSupport(_THIS)
{
return SDL_TRUE;
}
diff --git a/src/video/nacl/SDL_naclevents.c b/src/video/nacl/SDL_naclevents.c
index 0fd9480..ce03e52 100644
--- a/src/video/nacl/SDL_naclevents.c
+++ b/src/video/nacl/SDL_naclevents.c
@@ -305,8 +305,7 @@ static Uint8 SDL_NACL_translate_mouse_button(int32_t button) {
}
}
-static SDL_Scancode
-SDL_NACL_translate_keycode(int keycode)
+static SDL_Scancode SDL_NACL_translate_keycode(int keycode)
{
SDL_Scancode scancode = SDL_SCANCODE_UNKNOWN;
diff --git a/src/video/nacl/SDL_naclopengles.c b/src/video/nacl/SDL_naclopengles.c
index 5089fa5..5889839 100644
--- a/src/video/nacl/SDL_naclopengles.c
+++ b/src/video/nacl/SDL_naclopengles.c
@@ -35,15 +35,13 @@
#include "ppapi_simple/ps.h"
/* GL functions */
-int
-NACL_GLES_LoadLibrary(_THIS, const char *path)
+int NACL_GLES_LoadLibrary(_THIS, const char *path)
{
/* FIXME: Support dynamic linking when PNACL supports it */
return glInitializePPAPI(PSGetInterface) == 0;
}
-void *
-NACL_GLES_GetProcAddress(_THIS, const char *proc)
+void *NACL_GLES_GetProcAddress(_THIS, const char *proc)
{
#ifdef HAVE_DLOPEN
return dlsym( 0 /* RTLD_DEFAULT */, proc);
@@ -52,15 +50,13 @@ NACL_GLES_GetProcAddress(_THIS, const char *proc)
#endif
}
-void
-NACL_GLES_UnloadLibrary(_THIS)
+void NACL_GLES_UnloadLibrary(_THIS)
{
/* FIXME: Support dynamic linking when PNACL supports it */
glTerminatePPAPI();
}
-int
-NACL_GLES_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext sdl_context)
+int NACL_GLES_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext sdl_context)
{
SDL_VideoData *driverdata = (SDL_VideoData *) _this->driverdata;
/* FIXME: Check threading issues...otherwise use a hardcoded _this->context across all threads */
@@ -69,21 +65,20 @@ NACL_GLES_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext sdl_context)
return 0;
}
-SDL_GLContext
-NACL_GLES_CreateContext(_THIS, SDL_Window * window)
+SDL_GLContext NACL_GLES_CreateContext(_THIS, SDL_Window * window)
{
SDL_VideoData *driverdata = (SDL_VideoData *) _this->driverdata;
PP_Resource context, share_context = 0;
/* 64 seems nice. */
Sint32 attribs[64];
int i = 0;
-
+
if (_this->gl_config.share_with_current_context) {
share_context = (PP_Resource) SDL_GL_GetCurrentContext();
}
/* FIXME: Some ATTRIBS from PP_Graphics3DAttrib are not set here */
-
+
attribs[i++] = PP_GRAPHICS3DATTRIB_WIDTH;
attribs[i++] = window->w;
attribs[i++] = PP_GRAPHICS3DATTRIB_HEIGHT;
@@ -94,65 +89,62 @@ NACL_GLES_CreateContext(_THIS, SDL_Window * window)
attribs[i++] = _this->gl_config.green_size;
attribs[i++] = PP_GRAPHICS3DATTRIB_BLUE_SIZE;
attribs[i++] = _this->gl_config.blue_size;
-
+
if (_this->gl_config.alpha_size) {
attribs[i++] = PP_GRAPHICS3DATTRIB_ALPHA_SIZE;
attribs[i++] = _this->gl_config.alpha_size;
}
-
+
/*if (_this->gl_config.buffer_size) {
attribs[i++] = EGL_BUFFER_SIZE;
attribs[i++] = _this->gl_config.buffer_size;
}*/
-
+
attribs[i++] = PP_GRAPHICS3DATTRIB_DEPTH_SIZE;
attribs[i++] = _this->gl_config.depth_size;
-
+
if (_this->gl_config.stencil_size) {
attribs[i++] = PP_GRAPHICS3DATTRIB_STENCIL_SIZE;
attribs[i++] = _this->gl_config.stencil_size;
}
-
+
if (_this->gl_config.multisamplebuffers) {
attribs[i++] = PP_GRAPHICS3DATTRIB_SAMPLE_BUFFERS;
attribs[i++] = _this->gl_config.multisamplebuffers;
}
-
+
if (_this->gl_config.multisamplesamples) {
attribs[i++] = PP_GRAPHICS3DATTRIB_SAMPLES;
attribs[i++] = _this->gl_config.multisamplesamples;
}
-
+
attribs[i++] = PP_GRAPHICS3DATTRIB_NONE;
-
+
context = driverdata->ppb_graphics->Create(driverdata->instance, share_context, attribs);
if (context) {
/* We need to make the context current, otherwise nothing works */
SDL_GL_MakeCurrent(window, (SDL_GLContext) context);
}
-
+
return (SDL_GLContext) context;
}
-int
-NACL_GLES_SetSwapInterval(_THIS, int interval)
+int NACL_GLES_SetSwapInterval(_THIS, int interval)
{
/* STUB */
return SDL_Unsupported();
}
-int
-NACL_GLES_GetSwapInterval(_THIS)
+int NACL_GLES_GetSwapInterval(_THIS)
{
/* STUB */
return 0;
}
-int
-NACL_GLES_SwapWindow(_THIS, SDL_Window * window)
+int NACL_GLES_SwapWindow(_THIS, SDL_Window * window)
{
SDL_VideoData *driverdata = (SDL_VideoData *) _this->driverdata;
struct PP_CompletionCallback callback = { NULL, 0, PP_COMPLETIONCALLBACK_FLAG_NONE };
@@ -162,8 +154,7 @@ NACL_GLES_SwapWindow(_THIS, SDL_Window * window)
return 0;
}
-void
-NACL_GLES_DeleteContext(_THIS, SDL_GLContext context)
+void NACL_GLES_DeleteContext(_THIS, SDL_GLContext context)
{
SDL_VideoData *driverdata = (SDL_VideoData *) _this->driverdata;
driverdata->ppb_core->ReleaseResource((PP_Resource) context);
diff --git a/src/video/nacl/SDL_naclvideo.c b/src/video/nacl/SDL_naclvideo.c
index aa7237e..ef89038 100644
--- a/src/video/nacl/SDL_naclvideo.c
+++ b/src/video/nacl/SDL_naclvideo.c
@@ -32,34 +32,33 @@
#include "SDL_naclvideo.h"
#include "SDL_naclwindow.h"
#include "SDL_naclevents_c.h"
-#include "SDL_naclopengles.h"
+#include "SDL_naclopengles.h"
#include "SDL_video.h"
#include "../SDL_sysvideo.h"
#include "../../events/SDL_events_c.h"
#define NACLVID_DRIVER_NAME "nacl"
-/* Static init required because NACL_SetScreenResolution
+/* Static init required because NACL_SetScreenResolution
* may appear even before SDL starts and we want to remember
* the window width and height
*/
static SDL_VideoData nacl = {0};
-void
-NACL_SetScreenResolution(int width, int height, Uint32 format)
+void NACL_SetScreenResolution(int width, int height, Uint32 format)
{
PP_Resource context;
-
+
nacl.w = width;
- nacl.h = height;
+ nacl.h = height;
nacl.format = format;
-
+
if (nacl.window) {
nacl.window->w = width;
nacl.window->h = height;
SDL_SendWindowEvent(nacl.window, SDL_WINDOWEVENT_RESIZED, width, height);
}
-
+
/* FIXME: Check threading issues...otherwise use a hardcoded _this->context across all threads */
context = (PP_Resource) SDL_GL_GetCurrentContext();
if (context) {
@@ -85,19 +84,18 @@ static void NACL_DeleteDevice(SDL_VideoDevice *device) {
SDL_free(device);
}
-static int
-NACL_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode)
+static int NACL_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode)
{
return 0;
}
static SDL_VideoDevice *NACL_CreateDevice(void) {
SDL_VideoDevice *device;
-
+
if (!NACL_Available()) {
return NULL;
}
-
+
/* Initialize all variables that we clean on shutdown */
device = (SDL_VideoDevice *) SDL_calloc(1, sizeof(SDL_VideoDevice));
if (!device) {
@@ -105,20 +103,20 @@ static SDL_VideoDevice *NACL_CreateDevice(void) {
return NULL;
}
device->driverdata = &nacl;
-
+
/* Set the function pointers */
device->VideoInit = NACL_VideoInit;
device->VideoQuit = NACL_VideoQuit;
device->PumpEvents = NACL_PumpEvents;
-
+
device->CreateSDLWindow = NACL_CreateWindow;
device->SetWindowTitle = NACL_SetWindowTitle;
device->DestroyWindow = NACL_DestroyWindow;
-
+
device->SetDisplayMode = NACL_SetDisplayMode;
-
+
device->free = NACL_DeleteDevice;
-
+
/* GL pointers */
device->GL_LoadLibrary = NACL_GLES_LoadLibrary;
device->GL_GetProcAddress = NACL_GLES_GetProcAddress;
@@ -129,8 +127,8 @@ static SDL_VideoDevice *NACL_CreateDevice(void) {
device->GL_GetSwapInterval = NACL_GLES_GetSwapInterval;
device->GL_SwapWindow = NACL_GLES_SwapWindow;
device->GL_DeleteContext = NACL_GLES_DeleteContext;
-
-
+
+
return device;
}
@@ -154,7 +152,7 @@ int NACL_VideoInit(_THIS) {
}
SDL_AddDisplayMode(&_this->displays[0], &mode);
-
+
PSInterfaceInit();
driverdata->instance = PSGetInstanceId();
driverdata->ppb_graphics = PSInterfaceGraphics3D();
@@ -170,12 +168,12 @@ int NACL_VideoInit(_THIS) {
driverdata->ppb_mouse_input_event = (PPB_MouseInputEvent*) PSGetInterface(PPB_MOUSE_INPUT_EVENT_INTERFACE);
driverdata->ppb_wheel_input_event = (PPB_WheelInputEvent*) PSGetInterface(PPB_WHEEL_INPUT_EVENT_INTERFACE);
driverdata->ppb_touch_input_event = (PPB_TouchInputEvent*) PSGetInterface(PPB_TOUCH_INPUT_EVENT_INTERFACE);
-
-
+
+
driverdata->message_loop = driverdata->ppb_message_loop->Create(driverdata->instance);
-
+
PSEventSetFilter(PSE_ALL);
-
+
/* We're done! */
return 0;
}
diff --git a/src/video/nacl/SDL_naclwindow.c b/src/video/nacl/SDL_naclwindow.c
index 303fc73..3c22220 100644
--- a/src/video/nacl/SDL_naclwindow.c
+++ b/src/video/nacl/SDL_naclwindow.c
@@ -29,11 +29,10 @@
#include "SDL_naclvideo.h"
#include "SDL_naclwindow.h"
-int
-NACL_CreateWindow(_THIS, SDL_Window * window)
+int NACL_CreateWindow(_THIS, SDL_Window * window)
{
SDL_VideoData *driverdata = (SDL_VideoData *) _this->driverdata;
-
+
if (driverdata->window) {
return SDL_SetError("NaCl only supports one window");
}
@@ -49,23 +48,21 @@ NACL_CreateWindow(_THIS, SDL_Window * window)
window->flags |= SDL_WINDOW_FULLSCREEN; /* window is always fullscreen */
window->flags &= ~SDL_WINDOW_HIDDEN;
window->flags |= SDL_WINDOW_SHOWN; /* only one window on NaCl */
- window->flags |= SDL_WINDOW_INPUT_FOCUS; /* always has input focus */
+ window->flags |= SDL_WINDOW_INPUT_FOCUS; /* always has input focus */
window->flags |= SDL_WINDOW_OPENGL;
-
+
SDL_SetMouseFocus(window);
SDL_SetKeyboardFocus(window);
-
+
return 0;
}
-void
-NACL_SetWindowTitle(_THIS, SDL_Window * window)
+void NACL_SetWindowTitle(_THIS, SDL_Window * window)
{
/* TODO */
}
-void
-NACL_DestroyWindow(_THIS, SDL_Window * window)
+void NACL_DestroyWindow(_THIS, SDL_Window * window)
{
SDL_VideoData *driverdata = (SDL_VideoData *) _this->driverdata;
if (window == driverdata->window) {
diff --git a/src/video/offscreen/SDL_offscreenopengles.c b/src/video/offscreen/SDL_offscreenopengles.c
index 6b23117..8185696 100644
--- a/src/video/offscreen/SDL_offscreenopengles.c
+++ b/src/video/offscreen/SDL_offscreenopengles.c
@@ -54,8 +54,7 @@ int OFFSCREEN_GLES_LoadLibrary(_THIS, const char *path)
return 0;
}
-SDL_GLContext
-OFFSCREEN_GLES_CreateContext(_THIS, SDL_Window *window)
+SDL_GLContext OFFSCREEN_GLES_CreateContext(_THIS, SDL_Window *window)
{
OFFSCREEN_Window *offscreen_window = window->driverdata;
diff --git a/src/video/pandora/SDL_pandora.c b/src/video/pandora/SDL_pandora.c
index 23844e8..16debcb 100644
--- a/src/video/pandora/SDL_pandora.c
+++ b/src/video/pandora/SDL_pandora.c
@@ -41,14 +41,12 @@
static NativeWindowType hNativeWnd = 0; /* A handle to the window we will create. */
#endif
-static int
-PND_available(void)
+static int PND_available(void)
{
return 1;
}
-static void
-PND_destroy(SDL_VideoDevice * device)
+static void PND_destroy(SDL_VideoDevice * device)
{
if (device->driverdata != NULL) {
SDL_free(device->driverdata);
@@ -57,8 +55,7 @@ PND_destroy(SDL_VideoDevice * device)
SDL_free(device);
}
-static SDL_VideoDevice *
-PND_create()
+static SDL_VideoDevice *PND_create()
{
SDL_VideoDevice *device;
SDL_VideoData *phdata;
@@ -149,8 +146,7 @@ VideoBootStrap PND_bootstrap = {
/*****************************************************************************/
/* SDL Video and Display initialization/handling functions */
/*****************************************************************************/
-int
-PND_videoinit(_THIS)
+int PND_videoinit(_THIS)
{
SDL_VideoDisplay display;
SDL_DisplayMode current_mode;
@@ -177,26 +173,22 @@ PND_videoinit(_THIS)
return 1;
}
-void
-PND_videoquit(_THIS)
+void PND_videoquit(_THIS)
{
}
-void
-PND_getdisplaymodes(_THIS, SDL_VideoDisplay * display)
+void PND_getdisplaymodes(_THIS, SDL_VideoDisplay * display)
{
}
-int
-PND_setdisplaymode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode)
+int PND_setdisplaymode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode)
{
return 0;
}
-int
-PND_createwindow(_THIS, SDL_Window * window)
+int PND_createwindow(_THIS, SDL_Window * window)
{
SDL_VideoData *phdata = (SDL_VideoData *) _this->driverdata;
@@ -239,54 +231,42 @@ PND_createwindow(_THIS, SDL_Window * window)
return 0;
}
-int
-PND_createwindowfrom(_THIS, SDL_Window * window, const void *data)
+int PND_createwindowfrom(_THIS, SDL_Window * window, const void *data)
{
return -1;
}
-void
-PND_setwindowtitle(_THIS, SDL_Window * window)
+void PND_setwindowtitle(_THIS, SDL_Window * window)
{
}
-void
-PND_setwindowicon(_THIS, SDL_Window * window, SDL_Surface * icon)
+void PND_setwindowicon(_THIS, SDL_Window * window, SDL_Surface * icon)
{
}
-void
-PND_setwindowposition(_THIS, SDL_Window * window)
+void PND_setwindowposition(_THIS, SDL_Window * window)
{
}
-void
-PND_setwindowsize(_THIS, SDL_Window * window)
+void PND_setwindowsize(_THIS, SDL_Window * window)
{
}
-void
-PND_showwindow(_THIS, SDL_Window * window)
+void PND_showwindow(_THIS, SDL_Window * window)
{
}
-void
-PND_hidewindow(_THIS, SDL_Window * window)
+void PND_hidewindow(_THIS, SDL_Window * window)
{
}
-void
-PND_raisewindow(_THIS, SDL_Window * window)
+void PND_raisewindow(_THIS, SDL_Window * window)
{
}
-void
-PND_maximizewindow(_THIS, SDL_Window * window)
+void PND_maximizewindow(_THIS, SDL_Window * window)
{
}
-void
-PND_minimizewindow(_THIS, SDL_Window * window)
+void PND_minimizewindow(_THIS, SDL_Window * window)
{
}
-void
-PND_restorewindow(_THIS, SDL_Window * window)
+void PND_restorewindow(_THIS, SDL_Window * window)
{
}
-void
-PND_destroywindow(_THIS, SDL_Window * window)
+void PND_destroywindow(_THIS, SDL_Window * window)
{
SDL_VideoData *phdata = (SDL_VideoData *) _this->driverdata;
eglTerminate(phdata->egl_display);
@@ -296,8 +276,7 @@ PND_destroywindow(_THIS, SDL_Window * window)
/* SDL Window Manager function */
/*****************************************************************************/
#if 0
-SDL_bool
-PND_getwindowwminfo(_THIS, SDL_Window * window, struct SDL_SysWMinfo *info)
+SDL_bool PND_getwindowwminfo(_THIS, SDL_Window * window, struct SDL_SysWMinfo *info)
{
if (info->version.major <= SDL_MAJOR_VERSION) {
return SDL_TRUE;
@@ -315,8 +294,7 @@ PND_getwindowwminfo(_THIS, SDL_Window * window, struct SDL_SysWMinfo *info)
/*****************************************************************************/
/* SDL OpenGL/OpenGL ES functions */
/*****************************************************************************/
-int
-PND_gl_loadlibrary(_THIS, const char *path)
+int PND_gl_loadlibrary(_THIS, const char *path)
{
/* Check if OpenGL ES library is specified for GF driver */
if (path == NULL) {
@@ -352,8 +330,7 @@ PND_gl_loadlibrary(_THIS, const char *path)
return 0;
}
-void *
-PND_gl_getprocaddres(_THIS, const char *proc)
+void *PND_gl_getprocaddres(_THIS, const char *proc)
{
void *function_address;
@@ -377,8 +354,7 @@ PND_gl_getprocaddres(_THIS, const char *proc)
return NULL;
}
-void
-PND_gl_unloadlibrary(_THIS)
+void PND_gl_unloadlibrary(_THIS)
{
SDL_VideoData *phdata = (SDL_VideoData *) _this->driverdata;
@@ -393,8 +369,7 @@ PND_gl_unloadlibrary(_THIS)
}
}
-SDL_GLContext
-PND_gl_createcontext(_THIS, SDL_Window * window)
+SDL_GLContext PND_gl_createcontext(_THIS, SDL_Window * window)
{
SDL_VideoData *phdata = (SDL_VideoData *) _this->driverdata;
SDL_WindowData *wdata = (SDL_WindowData *) window->driverdata;
@@ -698,8 +673,7 @@ PND_gl_createcontext(_THIS, SDL_Window * window)
return wdata->gles_context;
}
-int
-PND_gl_makecurrent(_THIS, SDL_Window * window, SDL_GLContext context)
+int PND_gl_makecurrent(_THIS, SDL_Window * window, SDL_GLContext context)
{
SDL_VideoData *phdata = (SDL_VideoData *) _this->driverdata;
SDL_WindowData *wdata;
@@ -742,8 +716,7 @@ PND_gl_makecurrent(_THIS, SDL_Window * window, SDL_GLContext context)
return 0;
}
-int
-PND_gl_setswapinterval(_THIS, int interval)
+int PND_gl_setswapinterval(_THIS, int interval)
{
SDL_VideoData *phdata = (SDL_VideoData *) _this->driverdata;
EGLBoolean status;
@@ -767,14 +740,12 @@ PND_gl_setswapinterval(_THIS, int interval)
return SDL_SetError("PND: Cannot set swap interval");
}
-int
-PND_gl_getswapinterval(_THIS)
+int PND_gl_getswapinterval(_THIS)
{
return ((SDL_VideoData *) _this->driverdata)->swapinterval;
}
-int
-PND_gl_swapwindow(_THIS, SDL_Window * window)
+int PND_gl_swapwindow(_THIS, SDL_Window * window)
{
SDL_VideoData *phdata = (SDL_VideoData *) _this->driverdata;
SDL_WindowData *wdata = (SDL_WindowData *) window->driverdata;
@@ -793,8 +764,7 @@ PND_gl_swapwindow(_THIS, SDL_Window * window)
return 0;
}
-void
-PND_gl_deletecontext(_THIS, SDL_GLContext context)
+void PND_gl_deletecontext(_THIS, SDL_GLContext context)
{
SDL_VideoData *phdata = (SDL_VideoData *) _this->driverdata;
EGLBoolean status;
diff --git a/src/video/pandora/SDL_pandora_events.c b/src/video/pandora/SDL_pandora_events.c
index 7e46b3f..906c758 100644
--- a/src/video/pandora/SDL_pandora_events.c
+++ b/src/video/pandora/SDL_pandora_events.c
@@ -27,8 +27,7 @@
#include "../../events/SDL_events_c.h"
-void
-PND_PumpEvents(_THIS)
+void PND_PumpEvents(_THIS)
{
/* Not implemented. */
}
diff --git a/src/video/psp/SDL_pspgl.c b/src/video/psp/SDL_pspgl.c
index aa21938..a00e638 100644
--- a/src/video/psp/SDL_pspgl.c
+++ b/src/video/psp/SDL_pspgl.c
@@ -55,8 +55,7 @@ int PSP_GL_LoadLibrary(_THIS, const char *path)
GLSTUB(glOrtho,(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top,
GLdouble zNear, GLdouble zFar))
*/
-void *
-PSP_GL_GetProcAddress(_THIS, const char *proc)
+void *PSP_GL_GetProcAddress(_THIS, const char *proc)
{
return eglGetProcAddress(proc);
}
@@ -69,8 +68,7 @@ void PSP_GL_UnloadLibrary(_THIS)
static EGLint width = 480;
static EGLint height = 272;
-SDL_GLContext
-PSP_GL_CreateContext(_THIS, SDL_Window *window)
+SDL_GLContext PSP_GL_CreateContext(_THIS, SDL_Window *window)
{
SDL_WindowData *wdata = (SDL_WindowData *)window->driverdata;
diff --git a/src/video/psp/SDL_pspvideo.c b/src/video/psp/SDL_pspvideo.c
index 9e1428e..676196c 100644
--- a/src/video/psp/SDL_pspvideo.c
+++ b/src/video/psp/SDL_pspvideo.c
@@ -258,8 +258,7 @@ void PSP_DestroyWindow(_THIS, SDL_Window *window)
/* SDL Window Manager function */
/*****************************************************************************/
#if 0
-SDL_bool
-PSP_GetWindowWMInfo(_THIS, SDL_Window * window, struct SDL_SysWMinfo *info)
+SDL_bool PSP_GetWindowWMInfo(_THIS, SDL_Window * window, struct SDL_SysWMinfo *info)
{
if (info->version.major <= SDL_MAJOR_VERSION) {
return SDL_TRUE;
diff --git a/src/video/qnx/gl.c b/src/video/qnx/gl.c
index 1862ab4..cf487ed 100644
--- a/src/video/qnx/gl.c
+++ b/src/video/qnx/gl.c
@@ -30,8 +30,7 @@ static EGLDisplay egl_disp;
* @param egl_conf EGL configuration to use
* @return A SCREEN_FORMAT* constant for the pixel format to use
*/
-static int
-chooseFormat(EGLConfig egl_conf)
+static int chooseFormat(EGLConfig egl_conf)
{
EGLint buffer_bit_depth;
EGLint alpha_bit_depth;
@@ -64,8 +63,7 @@ chooseFormat(EGLConfig egl_conf)
* @param[out] pformat The chosen pixel format
* @return 0 if successful, -1 on error
*/
-int
-glGetConfig(EGLConfig *pconf, int *pformat)
+int glGetConfig(EGLConfig *pconf, int *pformat)
{
EGLConfig egl_conf = (EGLConfig)0;
EGLConfig *egl_configs;
@@ -132,8 +130,7 @@ glGetConfig(EGLConfig *pconf, int *pformat)
* @param name unused
* @return 0 if successful, -1 on error
*/
-int
-glLoadLibrary(_THIS, const char *name)
+int glLoadLibrary(_THIS, const char *name)
{
EGLNativeDisplayType disp_id = EGL_DEFAULT_DISPLAY;
@@ -154,8 +151,7 @@ glLoadLibrary(_THIS, const char *name)
* @param proc Function name
* @return Function address
*/
-void *
-glGetProcAddress(_THIS, const char *proc)
+void *glGetProcAddress(_THIS, const char *proc)
{
return eglGetProcAddress(proc);
}
@@ -167,8 +163,7 @@ glGetProcAddress(_THIS, const char *proc)
* @param window The SDL window to create the context for
* @return A pointer to the created context, if successful, NULL on error
*/
-SDL_GLContext
-glCreateContext(_THIS, SDL_Window *window)
+SDL_GLContext glCreateContext(_THIS, SDL_Window *window)
{
window_impl_t *impl = (window_impl_t *)window->driverdata;
EGLContext context;
@@ -214,8 +209,7 @@ glCreateContext(_THIS, SDL_Window *window)
* @param interval New interval value
* @return 0 if successful, -1 on error
*/
-int
-glSetSwapInterval(_THIS, int interval)
+int glSetSwapInterval(_THIS, int interval)
{
if (eglSwapInterval(egl_disp, interval) != EGL_TRUE) {
return -1;
@@ -230,8 +224,7 @@ glSetSwapInterval(_THIS, int interval)
* @param window Window to swap buffers for
* @return 0 if successful, -1 on error
*/
-int
-glSwapWindow(_THIS, SDL_Window *window)
+int glSwapWindow(_THIS, SDL_Window *window)
{
/* !!! FIXME: should we migrate this all over to use SDL_egl.c? */
window_impl_t *impl = (window_impl_t *)window->driverdata;
@@ -245,8 +238,7 @@ glSwapWindow(_THIS, SDL_Window *window)
* @param context The context to activate
* @return 0 if successful, -1 on error
*/
-int
-glMakeCurrent(_THIS, SDL_Window *window, SDL_GLContext context)
+int glMakeCurrent(_THIS, SDL_Window *window, SDL_GLContext context)
{
window_impl_t *impl;
EGLSurface surface = NULL;
@@ -268,8 +260,7 @@ glMakeCurrent(_THIS, SDL_Window *window, SDL_GLContext context)
* @param _THIS
* @param context The context to destroy
*/
-void
-glDeleteContext(_THIS, SDL_GLContext context)
+void glDeleteContext(_THIS, SDL_GLContext context)
{
eglDestroyContext(egl_disp, context);
}
@@ -278,8 +269,7 @@ glDeleteContext(_THIS, SDL_GLContext context)
* Terminates access to the EGL library.
* @param _THIS
*/
-void
-glUnloadLibrary(_THIS)
+void glUnloadLibrary(_THIS)
{
eglTerminate(egl_disp);
}
diff --git a/src/video/qnx/keyboard.c b/src/video/qnx/keyboard.c
index 86c6395..9ec289d 100644
--- a/src/video/qnx/keyboard.c
+++ b/src/video/qnx/keyboard.c
@@ -95,8 +95,7 @@ static int key_to_sdl[] = {
* Translates the event such that it can be handled by SDL.
* @param event Screen keyboard event
*/
-void
-handleKeyboardEvent(screen_event_t event)
+void handleKeyboardEvent(screen_event_t event)
{
int val;
SDL_Scancode scancode;
diff --git a/src/video/qnx/video.c b/src/video/qnx/video.c
index 049d814..cecd717 100644
--- a/src/video/qnx/video.c
+++ b/src/video/qnx/video.c
@@ -32,8 +32,7 @@ static screen_event_t event;
* @param _THIS
* @return 0 if successful, -1 on error
*/
-static int
-videoInit(_THIS)
+static int videoInit(_THIS)
{
SDL_VideoDisplay display;
@@ -55,8 +54,7 @@ videoInit(_THIS)
return 0;
}
-static void
-videoQuit(_THIS)
+static void videoQuit(_THIS)
{
}
@@ -67,8 +65,7 @@ videoQuit(_THIS)
* @param window SDL window to initialize
* @return 0 if successful, -1 on error
*/
-static int
-createWindow(_THIS, SDL_Window *window)
+static int createWindow(_THIS, SDL_Window *window)
{
window_impl_t *impl;
int size[2];
@@ -150,8 +147,7 @@ fail:
* @param[out] pitch Holds the number of bytes per line
* @return 0 if successful, -1 on error
*/
-static int
-createWindowFramebuffer(_THIS, SDL_Window * window, Uint32 * format,
+static int createWindowFramebuffer(_THIS, SDL_Window * window, Uint32 * format,
void ** pixels, int *pitch)
{
window_impl_t *impl = (window_impl_t *)window->driverdata;
@@ -186,8 +182,7 @@ createWindowFramebuffer(_THIS, SDL_Window * window, Uint32 * format,
* @param numrects Rect array length
* @return 0 if successful, -1 on error
*/
-static int
-updateWindowFramebuffer(_THIS, SDL_Window *window, const SDL_Rect *rects,
+static int updateWindowFramebuffer(_THIS, SDL_Window *window, const SDL_Rect *rects,
int numrects)
{
window_impl_t *impl = (window_impl_t *)window->driverdata;
@@ -207,8 +202,7 @@ updateWindowFramebuffer(_THIS, SDL_Window *window, const SDL_Rect *rects,
* Runs the main event loop.
* @param _THIS
*/
-static void
-pumpEvents(_THIS)
+static void pumpEvents(_THIS)
{
int type;
@@ -242,8 +236,7 @@ pumpEvents(_THIS)
* @param _THIS
* @param window SDL window to update
*/
-static void
-setWindowSize(_THIS, SDL_Window *window)
+static void setWindowSize(_THIS, SDL_Window *window)
{
window_impl_t *impl = (window_impl_t *)window->driverdata;
int size[2];
@@ -261,8 +254,7 @@ setWindowSize(_THIS, SDL_Window *window)
* @param _THIS
* @param window SDL window to update
*/
-static void
-showWindow(_THIS, SDL_Window *window)
+static void showWindow(_THIS, SDL_Window *window)
{
window_impl_t *impl = (window_impl_t *)window->driverdata;
const int visible = 1;
@@ -276,8 +268,7 @@ showWindow(_THIS, SDL_Window *window)
* @param _THIS
* @param window SDL window to update
*/
-static void
-hideWindow(_THIS, SDL_Window *window)
+static void hideWindow(_THIS, SDL_Window *window)
{
window_impl_t *impl = (window_impl_t *)window->driverdata;
const int visible = 0;
@@ -291,8 +282,7 @@ hideWindow(_THIS, SDL_Window *window)
* @param _THIS
* @param window SDL window that is being destroyed
*/
-static void
-destroyWindow(_THIS, SDL_Window *window)
+static void destroyWindow(_THIS, SDL_Window *window)
{
window_impl_t *impl = (window_impl_t *)window->driverdata;
@@ -306,8 +296,7 @@ destroyWindow(_THIS, SDL_Window *window)
* Frees the plugin object created by createDevice().
* @param device Plugin object to free
*/
-static void
-deleteDevice(SDL_VideoDevice *device)
+static void deleteDevice(SDL_VideoDevice *device)
{
SDL_free(device);
}
@@ -317,8 +306,7 @@ deleteDevice(SDL_VideoDevice *device)
* @param devindex Unused
* @return Initialized device if successful, NULL otherwise
*/
-static SDL_VideoDevice *
-createDevice(int devindex)
+static SDL_VideoDevice *createDevice(int devindex)
{
SDL_VideoDevice *device;
diff --git a/src/video/raspberry/SDL_rpivideo.c b/src/video/raspberry/SDL_rpivideo.c
index daf5a64..f56e23d 100644
--- a/src/video/raspberry/SDL_rpivideo.c
+++ b/src/video/raspberry/SDL_rpivideo.c
@@ -400,8 +400,7 @@ void RPI_RestoreWindow(_THIS, SDL_Window *window)
/* SDL Window Manager function */
/*****************************************************************************/
#if 0
-SDL_bool
-RPI_GetWindowWMInfo(_THIS, SDL_Window * window, struct SDL_SysWMinfo *info)
+SDL_bool RPI_GetWindowWMInfo(_THIS, SDL_Window * window, struct SDL_SysWMinfo *info)
{
if (info->version.major <= SDL_MAJOR_VERSION) {
return SDL_TRUE;
diff --git a/src/video/riscos/SDL_riscosmodes.c b/src/video/riscos/SDL_riscosmodes.c
index 2d474cb..35a42e3 100644
--- a/src/video/riscos/SDL_riscosmodes.c
+++ b/src/video/riscos/SDL_riscosmodes.c
@@ -85,8 +85,7 @@ static SDL_PixelFormatEnum RISCOS_ModeToPixelFormat(int ncolour, int modeflags,
return SDL_PIXELFORMAT_UNKNOWN;
}
-static size_t
-measure_mode_block(const int *block)
+static size_t measure_mode_block(const int *block)
{
size_t blockSize = ((block[0] & 0xFF) == 3) ? 7 : 5;
while (block[blockSize] != -1) {
diff --git a/src/video/riscos/SDL_riscoswindow.c b/src/video/riscos/SDL_riscoswindow.c
index 0153dbb..cf8e71d 100644
--- a/src/video/riscos/SDL_riscoswindow.c
+++ b/src/video/riscos/SDL_riscoswindow.c
@@ -62,8 +62,7 @@ void RISCOS_DestroyWindow(_THIS, SDL_Window *window)
window->driverdata = NULL;
}
-SDL_bool
-RISCOS_GetWindowWMInfo(_THIS, SDL_Window * window, struct SDL_SysWMinfo *info)
+SDL_bool RISCOS_GetWindowWMInfo(_THIS, SDL_Window * window, struct SDL_SysWMinfo *info)
{
if (info->version.major == SDL_MAJOR_VERSION) {
info->subsystem = SDL_SYSWM_RISCOS;
diff --git a/src/video/uikit/SDL_uikitappdelegate.m b/src/video/uikit/SDL_uikitappdelegate.m
index fb42d22..1e27200 100644
--- a/src/video/uikit/SDL_uikitappdelegate.m
+++ b/src/video/uikit/SDL_uikitappdelegate.m
@@ -87,8 +87,7 @@ SDL_IdleTimerDisabledChanged(void *userdata, const char *name, const char *oldVa
#if !TARGET_OS_TV
/* Load a launch image using the old UILaunchImageFile-era naming rules. */
-static UIImage *
-SDL_LoadLaunchImageNamed(NSString *name, int screenh)
+static UIImage *SDL_LoadLaunchImageNamed(NSString *name, int screenh)
{
UIInterfaceOrientation curorient = [UIApplication sharedApplication].statusBarOrientation;
UIUserInterfaceIdiom idiom = [UIDevice currentDevice].userInterfaceIdiom;
diff --git a/src/video/uikit/SDL_uikitclipboard.m b/src/video/uikit/SDL_uikitclipboard.m
index 7d04f0f..da475f3 100644
--- a/src/video/uikit/SDL_uikitclipboard.m
+++ b/src/video/uikit/SDL_uikitclipboard.m
@@ -27,8 +27,7 @@
#import <UIKit/UIPasteboard.h>
-int
-UIKit_SetClipboardText(_THIS, const char *text)
+int UIKit_SetClipboardText(_THIS, const char *text)
{
#if TARGET_OS_TV
return SDL_SetError("The clipboard is not available on tvOS");
@@ -40,8 +39,7 @@ UIKit_SetClipboardText(_THIS, const char *text)
#endif
}
-char *
-UIKit_GetClipboardText(_THIS)
+char *UIKit_GetClipboardText(_THIS)
{
#if TARGET_OS_TV
return SDL_strdup(""); // Unsupported.
@@ -59,8 +57,7 @@ UIKit_GetClipboardText(_THIS)
#endif
}
-SDL_bool
-UIKit_HasClipboardText(_THIS)
+SDL_bool UIKit_HasClipboardText(_THIS)
{
@autoreleasepool {
#if !TARGET_OS_TV
@@ -72,8 +69,7 @@ UIKit_HasClipboardText(_THIS)
}
}
-void
-UIKit_InitClipboard(_THIS)
+void UIKit_InitClipboard(_THIS)
{
#if !TARGET_OS_TV
@autoreleasepool {
@@ -92,8 +88,7 @@ UIKit_InitClipboard(_THIS)
#endif
}
-void
-UIKit_QuitClipboard(_THIS)
+void UIKit_QuitClipboard(_THIS)
{
@autoreleasepool {
SDL_VideoData *data = (__bridge SDL_VideoData *) _this->driverdata;
diff --git a/src/video/uikit/SDL_uikitevents.m b/src/video/uikit/SDL_uikitevents.m
index d4e3d05..68d38bc 100644
--- a/src/video/uikit/SDL_uikitevents.m
+++ b/src/video/uikit/SDL_uikitevents.m
@@ -108,8 +108,7 @@ static BOOL UIKit_EventPumpEnabled = YES;
@end
-void
-SDL_iPhoneSetEventPump(SDL_bool enabled)
+void SDL_iPhoneSetEventPump(SDL_bool enabled)
{
UIKit_EventPumpEnabled = enabled;
@@ -121,8 +120,7 @@ SDL_iPhoneSetEventPump(SDL_bool enabled)
[lifecycleObserver eventPumpChanged];
}
-void
-UIKit_PumpEvents(_THIS)
+void UIKit_PumpEvents(_THIS)
{
if (!UIKit_EventPumpEnabled) {
return;
diff --git a/src/video/uikit/SDL_uikitmessagebox.m b/src/video/uikit/SDL_uikitmessagebox.m
index b7bbe56..03e3f38 100644
--- a/src/video/uikit/SDL_uikitmessagebox.m
+++ b/src/video/uikit/SDL_uikitmessagebox.m
@@ -30,14 +30,12 @@
static SDL_bool s_showingMessageBox = SDL_FALSE;
-SDL_bool
-UIKit_ShowingMessageBox(void)
+SDL_bool UIKit_ShowingMessageBox(void)
{
return s_showingMessageBox;
}
-static void
-UIKit_WaitUntilMessageBoxClosed(const SDL_MessageBoxData *messageboxdata, int *clickedindex)
+static void UIKit_WaitUntilMessageBoxClosed(const SDL_MessageBoxData *messageboxdata, int *clickedindex)
{
*clickedindex = messageboxdata->numbuttons;
@@ -52,8 +50,7 @@ UIKit_WaitUntilMessageBoxClosed(const SDL_MessageBoxData *messageboxdata, int *c
}
}
-static BOOL
-UIKit_ShowMessageBoxAlertController(const SDL_MessageBoxData *messageboxdata, int *buttonid)
+static BOOL UIKit_ShowMessageBoxAlertController(const SDL_MessageBoxData *messageboxdata, int *buttonid)
{
int i;
int __block clickedindex = messageboxdata->numbuttons;
@@ -124,8 +121,7 @@ UIKit_ShowMessageBoxAlertController(const SDL_MessageBoxData *messageboxdata, in
return YES;
}
-static void
-UIKit_ShowMessageBoxImpl(const SDL_MessageBoxData *messageboxdata, int *buttonid, int *returnValue)
+static void UIKit_ShowMessageBoxImpl(const SDL_MessageBoxData *messageboxdata, int *buttonid, int *returnValue)
{ @autoreleasepool
{
if (UIKit_ShowMessageBoxAlertController(messageboxdata, buttonid)) {
@@ -135,8 +131,7 @@ UIKit_ShowMessageBoxImpl(const SDL_MessageBoxData *messageboxdata, int *buttonid
}
}}
-int
-UIKit_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid)
+int UIKit_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid)
{ @autoreleasepool
{
__block int returnValue = 0;
diff --git a/src/video/uikit/SDL_uikitmetalview.m b/src/video/uikit/SDL_uikitmetalview.m
index c9decf5..6bb43ea 100644
--- a/src/video/uikit/SDL_uikitmetalview.m
+++ b/src/video/uikit/SDL_uikitmetalview.m
@@ -1,15 +1,15 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
-
+
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
-
+
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
-
+
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
@@ -74,8 +74,7 @@
@end
-SDL_MetalView
-UIKit_Metal_CreateView(_THIS, SDL_Window * window)
+SDL_MetalView UIKit_Metal_CreateView(_THIS, SDL_Window * window)
{ @autoreleasepool {
SDL_WindowData *data = (__bridge SDL_WindowData *)window->driverdata;
CGFloat scale = 1.0;
@@ -102,8 +101,7 @@ UIKit_Metal_CreateView(_THIS, SDL_Window * window)
return (void*)CFBridgingRetain(metalview);
}}
-void
-UIKit_Metal_DestroyView(_THIS, SDL_MetalView view)
+void UIKit_Metal_DestroyView(_THIS, SDL_MetalView view)
{ @autoreleasepool {
SDL_uikitmetalview *metalview = CFBridgingRelease(view);
@@ -112,15 +110,13 @@ UIKit_Metal_DestroyView(_THIS, SDL_MetalView view)
}
}}
-void *
-UIKit_Metal_GetLayer(_THIS, SDL_MetalView view)
+void *UIKit_Metal_GetLayer(_THIS, SDL_MetalView view)
{ @autoreleasepool {
SDL_uikitview *uiview = (__bridge SDL_uikitview *)view;
return (__bridge void *)uiview.layer;
}}
-void
-UIKit_Metal_GetDrawableSize(_THIS, SDL_Window * window, int * w, int * h)
+void UIKit_Metal_GetDrawableSize(_THIS, SDL_Window * window, int * w, int * h)
{
@autoreleasepool {
SDL_WindowData *data = (__bridge SDL_WindowData *)window->driverdata;
diff --git a/src/video/uikit/SDL_uikitmodes.m b/src/video/uikit/SDL_uikitmodes.m
index 323dd51..e60bada 100644
--- a/src/video/uikit/SDL_uikitmodes.m
+++ b/src/video/uikit/SDL_uikitmodes.m
@@ -215,9 +215,7 @@
@end
-static int
-UIKit_AllocateDisplayModeData(SDL_DisplayMode * mode,
- UIScreenMode * uiscreenmode)
+static int UIKit_AllocateDisplayModeData(SDL_DisplayMode * mode, UIScreenMode * uiscreenmode)
{
SDL_DisplayModeData *data = nil;
@@ -236,8 +234,7 @@ UIKit_AllocateDisplayModeData(SDL_DisplayMode * mode,
return 0;
}
-static void
-UIKit_FreeDisplayModeData(SDL_DisplayMode * mode)
+static void UIKit_FreeDisplayModeData(SDL_DisplayMode * mode)
{
if (mode->driverdata != NULL) {
CFRelease(mode->driverdata);
@@ -245,8 +242,7 @@ UIKit_FreeDisplayModeData(SDL_DisplayMode * mode)
}
}
-static NSUInteger
-UIKit_GetDisplayModeRefreshRate(UIScreen *uiscreen)
+static NSUInteger UIKit_GetDisplayModeRefreshRate(UIScreen *uiscreen)
{
#ifdef __IPHONE_10_3
if ([uiscreen respondsToSelector:@selector(maximumFramesPerSecond)]) {
@@ -256,9 +252,7 @@ UIKit_GetDisplayModeRefreshRate(UIScreen *uiscreen)
return 0;
}
-static int
-UIKit_AddSingleDisplayMode(SDL_VideoDisplay * display, int w, int h,
- UIScreen * uiscreen, UIScreenMode * uiscreenmode)
+static int UIKit_AddSingleDisplayMode(SDL_VideoDisplay * display, int w, int h, UIScreen * uiscreen, UIScreenMode * uiscreenmode)
{
SDL_DisplayMode mode;
SDL_zero(mode);
@@ -280,9 +274,7 @@ UIKit_AddSingleDisplayMode(SDL_VideoDisplay * display, int w, int h,
}
}
-static int
-UIKit_AddDisplayMode(SDL_VideoDisplay * display, int w, int h, UIScreen * uiscreen,
- UIScreenMode * uiscreenmode, SDL_bool addRotation)
+static int UIKit_AddDisplayMode(SDL_VideoDisplay * display, int w, int h, UIScreen * uiscreen, UIScreenMode * uiscreenmode, SDL_bool addRotation)
{
if (UIKit_AddSingleDisplayMode(display, w, h, uiscreen, uiscreenmode) < 0) {
return -1;
@@ -298,8 +290,7 @@ UIKit_AddDisplayMode(SDL_VideoDisplay * display, int w, int h, UIScreen * uiscre
return 0;
}
-int
-UIKit_AddDisplay(UIScreen *uiscreen, SDL_bool send_event)
+int UIKit_AddDisplay(UIScreen *uiscreen, SDL_bool send_event)
{
UIScreenMode *uiscreenmode = uiscreen.currentMode;
CGSize size = uiscreen.bounds.size;
@@ -340,8 +331,7 @@ UIKit_AddDisplay(UIScreen *uiscreen, SDL_bool send_event)
return 0;
}
-void
-UIKit_DelDisplay(UIScreen *uiscreen)
+void UIKit_DelDisplay(UIScreen *uiscreen)
{
int i;
@@ -356,8 +346,7 @@ UIKit_DelDisplay(UIScreen *uiscreen)
}
}
-SDL_bool
-UIKit_IsDisplayLandscape(UIScreen *uiscreen)
+SDL_bool UIKit_IsDisplayLandscape(UIScreen *uiscreen)
{
#if !TARGET_OS_TV
if (uiscreen == [UIScreen mainScreen]) {
@@ -370,8 +359,7 @@ UIKit_IsDisplayLandscape(UIScreen *uiscreen)
}
}
-int
-UIKit_InitModes(_THIS)
+int UIKit_InitModes(_THIS)
{
@autoreleasepool {
for (UIScreen *uiscreen in [UIScreen screens]) {
@@ -389,8 +377,7 @@ UIKit_InitModes(_THIS)
return 0;
}
-void
-UIKit_GetDisplayModes(_THIS, SDL_VideoDisplay * display)
+void UIKit_GetDisplayModes(_THIS, SDL_VideoDisplay * display)
{
@autoreleasepool {
SDL_DisplayData *data = (__bridge SDL_DisplayData *) display->driverdata;
@@ -434,8 +421,7 @@ UIKit_GetDisplayModes(_THIS, SDL_VideoDisplay * display)
}
}
-int
-UIKit_GetDisplayDPI(_THIS, SDL_VideoDisplay * display, float * ddpi, float * hdpi, float * vdpi)
+int UIKit_GetDisplayDPI(_THIS, SDL_VideoDisplay * display, float * ddpi, float * hdpi, float * vdpi)
{
@autoreleasepool {
SDL_DisplayData *data = (__bridge SDL_DisplayData *) display->driverdata;
@@ -455,8 +441,7 @@ UIKit_GetDisplayDPI(_THIS, SDL_VideoDisplay * display, float * ddpi, float * hdp
return 0;
}
-int
-UIKit_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode)
+int UIKit_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode)
{
@autoreleasepool {
SDL_DisplayData *data = (__bridge SDL_DisplayData *) display->driverdata;
@@ -485,8 +470,7 @@ UIKit_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode)
return 0;
}
-int
-UIKit_GetDisplayUsableBounds(_THIS, SDL_VideoDisplay * display, SDL_Rect * rect)
+int UIKit_GetDisplayUsableBounds(_THIS, SDL_VideoDisplay * display, SDL_Rect * rect)
{
@autoreleasepool {
int displayIndex = (int) (display - _this->displays);
@@ -508,8 +492,7 @@ UIKit_GetDisplayUsableBounds(_THIS, SDL_VideoDisplay * display, SDL_Rect * rect)
return 0;
}
-void
-UIKit_QuitModes(_THIS)
+void UIKit_QuitModes(_THIS)
{
[SDL_DisplayWatch stop];
diff --git a/src/video/uikit/SDL_uikitopengles.m b/src/video/uikit/SDL_uikitopengles.m
index 6bccaf4..e0e7b5b 100644
--- a/src/video/uikit/SDL_uikitopengles.m
+++ b/src/video/uikit/SDL_uikitopengles.m
@@ -52,8 +52,7 @@
@end
-void *
-UIKit_GL_GetProcAddress(_THIS, const char *proc)
+void *UIKit_GL_GetProcAddress(_THIS, const char *proc)
{
/* Look through all SO's for the proc symbol. Here's why:
* -Looking for the path to the OpenGL Library seems not to work in the iOS Simulator.
@@ -64,8 +63,7 @@ UIKit_GL_GetProcAddress(_THIS, const char *proc)
/*
note that SDL_GL_DeleteContext makes it current without passing the window
*/
-int
-UIKit_GL_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context)
+int UIKit_GL_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context)
{
@autoreleasepool {
SDLEAGLContext *eaglcontext = (__bridge SDLEAGLContext *) context;
@@ -82,8 +80,7 @@ UIKit_GL_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context)
return 0;
}
-void
-UIKit_GL_GetDrawableSize(_THIS, SDL_Window * window, int * w, int * h)
+void UIKit_GL_GetDrawableSize(_THIS, SDL_Window * window, int * w, int * h)
{
@autoreleasepool {
SDL_WindowData *data = (__bridge SDL_WindowData *)window->driverdata;
@@ -102,8 +99,7 @@ UIKit_GL_GetDrawableSize(_THIS, SDL_Window * window, int * w, int * h)
}
}
-int
-UIKit_GL_LoadLibrary(_THIS, const char *path)
+int UIKit_GL_LoadLibrary(_THIS, const char *path)
{
/* We shouldn't pass a path to this function, since we've already loaded the
* library. */
@@ -132,8 +128,7 @@ int UIKit_GL_SwapWindow(_THIS, SDL_Window * window)
return 0;
}
-SDL_GLContext
-UIKit_GL_CreateContext(_THIS, SDL_Window * window)
+SDL_GLContext UIKit_GL_CreateContext(_THIS, SDL_Window * window)
{
@autoreleasepool {
SDLEAGLContext *context = nil;
@@ -210,8 +205,7 @@ UIKit_GL_CreateContext(_THIS, SDL_Window * window)
}
}
-void
-UIKit_GL_DeleteContext(_THIS, SDL_GLContext context)
+void UIKit_GL_DeleteContext(_THIS, SDL_GLContext context)
{
@autoreleasepool {
/* The context was retained in SDL_GL_CreateContext, so we release it
@@ -221,8 +215,7 @@ UIKit_GL_DeleteContext(_THIS, SDL_GLContext context)
}
}
-void
-UIKit_GL_RestoreCurrentContext(void)
+void UIKit_GL_RestoreCurrentContext(void)
{
@autoreleasepool {
/* Some iOS system functionality (such as Dictation on the on-screen
diff --git a/src/video/uikit/SDL_uikitvideo.m b/src/video/uikit/SDL_uikitvideo.m
index b52d84e..8b16c23 100644
--- a/src/video/uikit/SDL_uikitvideo.m
+++ b/src/video/uikit/SDL_uikitvideo.m
@@ -60,8 +60,7 @@ static void UIKit_DeleteDevice(SDL_VideoDevice * device)
}
}
-static SDL_VideoDevice *
-UIKit_CreateDevice(void)
+static SDL_VideoDevice *UIKit_CreateDevice(void)
{
@autoreleasepool {
SDL_VideoDevice *device;
@@ -152,8 +151,7 @@ VideoBootStrap UIKIT_bootstrap = {
};
-int
-UIKit_VideoInit(_THIS)
+int UIKit_VideoInit(_THIS)
{
_this->gl_config.driver_loaded = 1;
@@ -167,8 +165,7 @@ UIKit_VideoInit(_THIS)
return 0;
}
-void
-UIKit_VideoQuit(_THIS)
+void UIKit_VideoQuit(_THIS)
{
SDL_QuitGCKeyboard();
SDL_QuitGCMouse();
@@ -176,8 +173,7 @@ UIKit_VideoQuit(_THIS)
UIKit_QuitModes(_this);
}
-void
-UIKit_SuspendScreenSaver(_THIS)
+void UIKit_SuspendScreenSaver(_THIS)
{
@autoreleasepool {
/* Ignore ScreenSaver API calls if the idle timer hint has been set. */
@@ -191,14 +187,12 @@ UIKit_SuspendScreenSaver(_THIS)
}
}
-SDL_bool
-UIKit_IsSystemVersionAtLeast(double version)
+SDL_bool UIKit_IsSystemVersionAtLeast(double version)
{
return [[UIDevice currentDevice].systemVersion doubleValue] >= version;
}
-CGRect
-UIKit_ComputeViewFrame(SDL_Window *window, UIScreen *screen)
+CGRect UIKit_ComputeViewFrame(SDL_Window *window, UIScreen *screen)
{
SDL_WindowData *data = (__bridge SDL_WindowData *) window->driverdata;
CGRect frame = screen.bounds;
@@ -236,8 +230,7 @@ UIKit_ComputeViewFrame(SDL_Window *window, UIScreen *screen)
return frame;
}
-void
-UIKit_ForceUpdateHomeIndicator()
+void UIKit_ForceUpdateHomeIndicator()
{
#if !TARGET_OS_TV
/* Force the main SDL window to re-evaluate home indicator state */
diff --git a/src/video/uikit/SDL_uikitviewcontroller.m b/src/video/uikit/SDL_uikitviewcontroller.m
index a6b157f..3baadd8 100644
--- a/src/video/uikit/SDL_uikitviewcontroller.m
+++ b/src/video/uikit/SDL_uikitviewcontroller.m
@@ -488,8 +488,7 @@ SDL_HideHomeIndicatorHintChanged(void *userdata, const char *name, const char *o
/* iPhone keyboard addition functions */
#if SDL_IPHONE_KEYBOARD
-static SDL_uikitviewcontroller *
-GetWindowViewController(SDL_Window * window)
+static SDL_uikitviewcontroller *GetWindowViewController(SDL_Window * window)
{
if (!window || !window->driverdata) {
SDL_SetError("Invalid window");
@@ -501,14 +500,12 @@ GetWindowViewController(SDL_Window * window)
return data.viewcontroller;
}
-SDL_bool
-UIKit_HasScreenKeyboardSupport(_THIS)
+SDL_bool UIKit_HasScreenKeyboardSupport(_THIS)
{
return SDL_TRUE;
}
-void
-UIKit_ShowScreenKeyboard(_THIS, SDL_Window *window)
+void UIKit_ShowScreenKeyboard(_THIS, SDL_Window *window)
{
@autoreleasepool {
SDL_uikitviewcontroller *vc = GetWindowViewController(window);
@@ -516,8 +513,7 @@ UIKit_ShowScreenKeyboard(_THIS, SDL_Window *window)
}
}
-void
-UIKit_HideScreenKeyboard(_THIS, SDL_Window *window)
+void UIKit_HideScreenKeyboard(_THIS, SDL_Window *window)
{
@autoreleasepool {
SDL_uikitviewcontroller *vc = GetWindowViewController(window);
@@ -525,8 +521,7 @@ UIKit_HideScreenKeyboard(_THIS, SDL_Window *window)
}
}
-SDL_bool
-UIKit_IsScreenKeyboardShown(_THIS, SDL_Window *window)
+SDL_bool UIKit_IsScreenKeyboardShown(_THIS, SDL_Window *window)
{
@autoreleasepool {
SDL_uikitviewcontroller *vc = GetWindowViewController(window);
@@ -537,8 +532,7 @@ UIKit_IsScreenKeyboardShown(_THIS, SDL_Window *window)
}
}
-void
-UIKit_SetTextInputRect(_THIS, const SDL_Rect *rect)
+void UIKit_SetTextInputRect(_THIS, const SDL_Rect *rect)
{
if (!rect) {
SDL_InvalidParamError("rect");
diff --git a/src/video/uikit/SDL_uikitwindow.m b/src/video/uikit/SDL_uikitwindow.m
index 0b9c511..d696179 100644
--- a/src/video/uikit/SDL_uikitwindow.m
+++ b/src/video/uikit/SDL_uikitwindow.m
@@ -84,8 +84,7 @@
@end
-static int
-SetupWindowData(_THIS, SDL_Window *window, UIWindow *uiwindow, SDL_bool created)
+static int SetupWindowData(_THIS, SDL_Window *window, UIWindow *uiwindow, SDL_bool created)
{
SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window);
SDL_DisplayData *displaydata = (__bridge SDL_DisplayData *) display->driverdata;
@@ -158,8 +157,7 @@ SetupWindowData(_THIS, SDL_Window *window, UIWindow *uiwindow, SDL_bool created)
return 0;
}
-int
-UIKit_CreateWindow(_THIS, SDL_Window *window)
+int UIKit_CreateWindow(_THIS, SDL_Window *window)
{
@autoreleasepool {
SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window);
@@ -229,8 +227,7 @@ UIKit_CreateWindow(_THIS, SDL_Window *window)
return 1;
}
-void
-UIKit_SetWindowTitle(_THIS, SDL_Window * window)
+void UIKit_SetWindowTitle(_THIS, SDL_Window * window)
{
@autoreleasepool {
SDL_WindowData *data = (__bridge SDL_WindowData *) window->driverdata;
@@ -238,8 +235,7 @@ UIKit_SetWindowTitle(_THIS, SDL_Window * window)
}
}
-void
-UIKit_ShowWindow(_THIS, SDL_Window * window)
+void UIKit_ShowWindow(_THIS, SDL_Window * window)
{
@autoreleasepool {
SDL_WindowData *data = (__bridge SDL_WindowData *) window->driverdata;
@@ -255,8 +251,7 @@ UIKit_ShowWindow(_THIS, SDL_Window * window)
}
}
-void
-UIKit_HideWindow(_THIS, SDL_Window * window)
+void UIKit_HideWindow(_THIS, SDL_Window * window)
{
@autoreleasepool {
SDL_WindowData *data = (__bridge SDL_WindowData *) window->driverdata;
@@ -264,8 +259,7 @@ UIKit_HideWindow(_THIS, SDL_Window * window)
}
}
-void
-UIKit_RaiseWindow(_THIS, SDL_Window * window)
+void UIKit_RaiseWindow(_THIS, SDL_Window * window)
{
/* We don't currently offer a concept of "raising" the SDL window, since
* we only allow one per display, in the iOS fashion.
@@ -274,8 +268,7 @@ UIKit_RaiseWindow(_THIS, SDL_Window * window)
_this->GL_MakeCurrent(_this, _this->current_glwin, _this->current_glctx);
}
-static void
-UIKit_UpdateWindowBorder(_THIS, SDL_Window * window)
+static void UIKit_UpdateWindowBorder(_THIS, SDL_Window * window)
{
SDL_WindowData *data = (__bridge SDL_WindowData *) window->driverdata;
SDL_uikitviewcontroller *viewcontroller = data.viewcontroller;
@@ -304,30 +297,26 @@ UIKit_UpdateWindowBorder(_THIS, SDL_Window * window)
[viewcontroller.view layoutIfNeeded];
}
-void
-UIKit_SetWindowBordered(_THIS, SDL_Window * window, SDL_bool bordered)
+void UIKit_SetWindowBordered(_THIS, SDL_Window * window, SDL_bool bordered)
{
@autoreleasepool {
UIKit_UpdateWindowBorder(_this, window);
}
}
-void
-UIKit_SetWindowFullscreen(_THIS, SDL_Window * window, SDL_VideoDisplay * display, SDL_bool fullscreen)
+void UIKit_SetWindowFullscreen(_THIS, SDL_Window * window, SDL_VideoDisplay * display, SDL_bool fullscreen)
{
@autoreleasepool {
UIKit_UpdateWindowBorder(_this, window);
}
}
-void
-UIKit_SetWindowMouseGrab(_THIS, SDL_Window * window, SDL_bool grabbed)
+void UIKit_SetWindowMouseGrab(_THIS, SDL_Window * window, SDL_bool grabbed)
{
/* There really isn't a concept of window grab or cursor confinement on iOS */
}
-void
-UIKit_UpdatePointerLock(_THIS, SDL_Window * window)
+void UIKit_UpdatePointerLock(_THIS, SDL_Window * window)
{
#if !TARGET_OS_TV
#if defined(__IPHONE_14_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_14_0
@@ -342,8 +331,7 @@ UIKit_UpdatePointerLock(_THIS, SDL_Window * window)
#endif /* !TARGET_OS_TV */
}
-void
-UIKit_DestroyWindow(_THIS, SDL_Window * window)
+void UIKit_DestroyWindow(_THIS, SDL_Window * window)
{
@autoreleasepool {
if (window->driverdata != NULL) {
@@ -373,8 +361,7 @@ UIKit_DestroyWindow(_THIS, SDL_Window * window)
}
}
-void
-UIKit_GetWindowSizeInPixels(_THIS, SDL_Window * window, int *w, int *h)
+void UIKit_GetWindowSizeInPixels(_THIS, SDL_Window * window, int *w, int *h)
{ @autoreleasepool
{
SDL_WindowData *windata = (__bridge SDL_WindowData *) window->driverdata;
@@ -392,8 +379,7 @@ UIKit_GetWindowSizeInPixels(_THIS, SDL_Window * window, int *w, int *h)
*h = size.height * scale;
}}
-SDL_bool
-UIKit_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info)
+SDL_bool UIKit_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info)
{
@autoreleasepool {
SDL_WindowData *data = (__bridge SDL_WindowData *) window->driverdata;
@@ -432,8 +418,7 @@ UIKit_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info)
}
#if !TARGET_OS_TV
-NSUInteger
-UIKit_GetSupportedOrientations(SDL_Window * window)
+NSUInteger UIKit_GetSupportedOrientations(SDL_Window * window)
{
const char *hint = SDL_GetHint(SDL_HINT_ORIENTATIONS);
NSUInteger validOrientations = UIInterfaceOrientationMaskAll;
@@ -499,8 +484,7 @@ UIKit_GetSupportedOrientations(SDL_Window * window)
}
#endif /* !TARGET_OS_TV */
-int
-SDL_iPhoneSetAnimationCallback(SDL_Window * window, int interval, void (*callback)(void*), void *callbackParam)
+int SDL_iPhoneSetAnimationCallback(SDL_Window * window, int interval, void (*callback)(void*), void *callbackParam)
{
if (!window || !window->driverdata) {
return SDL_SetError("Invalid window");
diff --git a/src/video/vita/SDL_vitagl_pvr.c b/src/video/vita/SDL_vitagl_pvr.c
index b4dd351..ea920ad 100644
--- a/src/video/vita/SDL_vitagl_pvr.c
+++ b/src/video/vita/SDL_vitagl_pvr.c
@@ -82,8 +82,7 @@ int VITA_GL_LoadLibrary(_THIS, const char *path)
return SDL_EGL_LoadLibrary(_this, path, (NativeDisplayType)0, 0);
}
-SDL_GLContext
-VITA_GL_CreateContext(_THIS, SDL_Window *window)
+SDL_GLContext VITA_GL_CreateContext(_THIS, SDL_Window *window)
{
char gl_version[3];
SDL_GLContext context = NULL;
@@ -117,8 +116,7 @@ VITA_GL_CreateContext(_THIS, SDL_Window *window)
return context;
}
-void *
-VITA_GL_GetProcAddress(_THIS, const char *proc)
+void *VITA_GL_GetProcAddress(_THIS, const char *proc)
{
return gl4es_GetProcAddress(proc);
}
diff --git a/src/video/vita/SDL_vitagles.c b/src/video/vita/SDL_vitagles.c
index 3f1e846..89f29d3 100644
--- a/src/video/vita/SDL_vitagles.c
+++ b/src/video/vita/SDL_vitagles.c
@@ -66,8 +66,7 @@ int VITA_GLES_LoadLibrary(_THIS, const char *path)
return 0;
}
-void *
-VITA_GLES_GetProcAddress(_THIS, const char *proc)
+void *VITA_GLES_GetProcAddress(_THIS, const char *proc)
{
return eglGetProcAddress(proc);
}
@@ -80,8 +79,7 @@ void VITA_GLES_UnloadLibrary(_THIS)
static EGLint width = 960;
static EGLint height = 544;
-SDL_GLContext
-VITA_GLES_CreateContext(_THIS, SDL_Window *window)
+SDL_GLContext VITA_GLES_CreateContext(_THIS, SDL_Window *window)
{
SDL_WindowData *wdata = (SDL_WindowData *)window->driverdata;
diff --git a/src/video/vita/SDL_vitagles_pvr.c b/src/video/vita/SDL_vitagles_pvr.c
index c76f9c0..711d1dd 100644
--- a/src/video/vita/SDL_vitagles_pvr.c
+++ b/src/video/vita/SDL_vitagles_pvr.c
@@ -42,8 +42,8 @@ int VITA_GLES_LoadLibrary(_THIS, const char *path)
char *default_path = "app0:module";
char target_path[MAX_PATH];
- if (skip_init == NULL) { // we don't care about actual value
-
+ if (skip_init == NULL) { // we don't care about actual value
+
if (override != NULL) {
default_path = override;
}
@@ -69,8 +69,7 @@ int VITA_GLES_LoadLibrary(_THIS, const char *path)
return SDL_EGL_LoadLibrary(_this, path, (NativeDisplayType)0, 0);
}
-SDL_GLContext
-VITA_GLES_CreateContext(_THIS, SDL_Window *window)
+SDL_GLContext VITA_GLES_CreateContext(_THIS, SDL_Window *window)
{
return SDL_EGL_CreateContext(_this, ((SDL_WindowData *)window->driverdata)->egl_surface);
}
diff --git a/src/video/vita/SDL_vitavideo.c b/src/video/vita/SDL_vitavideo.c
index 3a80520..9e82399 100644
--- a/src/video/vita/SDL_vitavideo.c
+++ b/src/video/vita/SDL_vitavideo.c
@@ -377,8 +377,7 @@ void VITA_DestroyWindow(_THIS, SDL_Window *window)
/*****************************************************************************/
/* SDL Window Manager function */
/*****************************************************************************/
-SDL_bool
-VITA_GetWindowWMInfo(_THIS, SDL_Window * window, struct SDL_SysWMinfo *info)
+SDL_bool VITA_GetWindowWMInfo(_THIS, SDL_Window * window, struct SDL_SysWMinfo *info)
{
if (info->version.major <= SDL_MAJOR_VERSION) {
return SDL_TRUE;
diff --git a/src/video/vivante/SDL_vivantevideo.c b/src/video/vivante/SDL_vivantevideo.c
index 969cff6..aaf645c 100644
--- a/src/video/vivante/SDL_vivantevideo.c
+++ b/src/video/vivante/SDL_vivantevideo.c
@@ -361,8 +361,7 @@ void VIVANTE_HideWindow(_THIS, SDL_Window *window)
/*****************************************************************************/
/* SDL Window Manager function */
/*****************************************************************************/
-SDL_bool
-VIVANTE_GetWindowWMInfo(_THIS, SDL_Window *window, struct SDL_SysWMinfo *info)
+SDL_bool VIVANTE_GetWindowWMInfo(_THIS, SDL_Window *window, struct SDL_SysWMinfo *info)
{
SDL_WindowData *data = (SDL_WindowData *)window->driverdata;
SDL_DisplayData *displaydata = SDL_GetDisplayDriverData(0);
diff --git a/src/video/wayland/SDL_waylanddatamanager.c b/src/video/wayland/SDL_waylanddatamanager.c
index 224a5ce..3d580ce 100644
--- a/src/video/wayland/SDL_waylanddatamanager.c
+++ b/src/video/wayland/SDL_waylanddatamanager.c
@@ -243,8 +243,7 @@ static void mime_data_list_free(struct wl_list *list)
}
}
-static ssize_t
-Wayland_source_send(SDL_MimeDataList *mime_data, const char *mime_type, int fd)
+static ssize_t Wayland_source_send(SDL_MimeDataList *mime_data, const char *mime_type, int fd)
{
size_t written_bytes = 0;
ssize_t status = 0;
@@ -264,9 +263,7 @@ Wayland_source_send(SDL_MimeDataList *mime_data, const char *mime_type, int fd)
return status;
}
-ssize_t
-Wayland_data_source_send(SDL_WaylandDataSource *source,
- const char *mime_type, int fd)
+ssize_t Wayland_data_source_send(SDL_WaylandDataSource *source, const char *mime_type, int fd)
{
SDL_MimeDataList *mime_data = NULL;
@@ -277,9 +274,7 @@ Wayland_data_source_send(SDL_WaylandDataSource *source,
return Wayland_source_send(mime_data, mime_type, fd);
}
-ssize_t
-Wayland_primary_selection_source_send(SDL_WaylandPrimarySelectionSource *source,
- const char *mime_type, int fd)
+ssize_t Wayland_primary_selection_source_send(SDL_WaylandPrimarySelectionSource *source, const char *mime_type, int fd)
{
SDL_MimeDataList *mime_data = NULL;
diff --git a/src/video/wayland/SDL_waylandmouse.c b/src/video/wayland/SDL_waylandmouse.c
index 99d93fb..adc9127 100644
--- a/src/video/wayland/SDL_waylandmouse.c
+++ b/src/video/wayland/SDL_waylandmouse.c
@@ -612,8 +612,7 @@ static void Wayland_RecreateCursor(SDL_Cursor *cursor, SDL_VideoData *vdata)
wl_surface_set_user_data(cdata->surface, NULL);
}
-void
-Wayland_RecreateCursors(void)
+void Wayland_RecreateCursors(void)
{
SDL_Cursor *cursor;
SDL_Mouse *mouse = SDL_GetMouse();
diff --git a/src/video/wayland/SDL_waylandwindow.c b/src/video/wayland/SDL_waylandwindow.c
index 49d591b..c11ffcd 100644
--- a/src/video/wayland/SDL_waylandwindow.c
+++ b/src/video/wayland/SDL_waylandwindow.c
@@ -1174,8 +1174,7 @@ static const struct wl_surface_listener surface_listener = {
handle_surface_leave
};
-static void
-Wayland_FillEmptyShellInfo(SDL_SysWMinfo * info, const Uint32 version)
+static void Wayland_FillEmptyShellInfo(SDL_SysWMinfo * info, const Uint32 version)
{
info->info.wl.xdg_surface = NULL;
if (version >= SDL_VERSIONNUM(2, 0, 17)) {
@@ -1187,8 +1186,7 @@ Wayland_FillEmptyShellInfo(SDL_SysWMinfo * info, const Uint32 version)
}
}
-SDL_bool
-Wayland_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info)
+SDL_bool Wayland_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info)
{
SDL_VideoData *viddata = (SDL_VideoData *) _this->driverdata;
SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
diff --git a/src/video/windows/SDL_windowsclipboard.c b/src/video/windows/SDL_windowsclipboard.c
index e2542d8..bd43fc5 100644
--- a/src/video/windows/SDL_windowsclipboard.c
+++ b/src/video/windows/SDL_windowsclipboard.c
@@ -100,8 +100,7 @@ int WIN_SetClipboardText(_THIS, const char *text)
return result;
}
-char *
-WIN_GetClipboardText(_THIS)
+char *WIN_GetClipboardText(_THIS)
{
char *text;
@@ -127,8 +126,7 @@ WIN_GetClipboardText(_THIS)
return text;
}
-SDL_bool
-WIN_HasClipboardText(_THIS)
+SDL_bool WIN_HasClipboardText(_THIS)
{
SDL_bool result = SDL_FALSE;
char *text = WIN_GetClipboardText(_this);
diff --git a/src/video/windows/SDL_windowskeyboard.c b/src/video/windows/SDL_windowskeyboard.c
index 215ca6d..d4d2238 100644
--- a/src/video/windows/SDL_windowskeyboard.c
+++ b/src/video/windows/SDL_windowskeyboard.c
@@ -287,8 +287,7 @@ SDL_bool WIN_IsTextInputShown(_THIS)
return SDL_FALSE;
}
-SDL_bool
-IME_HandleMessage(HWND hwnd, UINT msg, WPARAM wParam, LPARAM *lParam, SDL_VideoData *videodata)
+SDL_bool IME_HandleMessage(HWND hwnd, UINT msg, WPARAM wParam, LPARAM *lParam, SDL_VideoData *videodata)
{
return SDL_FALSE;
}
@@ -999,8 +998,7 @@ static void IME_HideCandidateList(SDL_VideoData *videodata)
IME_SendEditingEvent(videodata);
}
-SDL_bool
-IME_HandleMessage(HWND hwnd, UINT msg, WPARAM wParam, LPARAM *lParam, SDL_VideoData *videodata)
+SDL_bool IME_HandleMessage(HWND hwnd, UINT msg, WPARAM wParam, LPARAM *lParam, SDL_VideoData *videodata)
{
SDL_bool trap = SDL_FALSE;
HIMC himc = 0;
diff --git a/src/video/windows/SDL_windowsopengl.c b/src/video/windows/SDL_windowsopengl.c
index 02caf47..70dac8e 100644
--- a/src/video/windows/SDL_windowsopengl.c
+++ b/src/video/windows/SDL_windowsopengl.c
@@ -214,8 +214,7 @@ int WIN_GL_LoadLibrary(_THIS, const char *path)
return 0;
}
-void *
-WIN_GL_GetProcAddress(_THIS, const char *proc)
+void *WIN_GL_GetProcAddress(_THIS, const char *proc)
{
void *func;
@@ -689,8 +688,7 @@ int WIN_GL_SetupWindow(_THIS, SDL_Window *window)
return retval;
}
-SDL_bool
-WIN_GL_UseEGL(_THIS)
+SDL_bool WIN_GL_UseEGL(_THIS)
{
SDL_assert(_this->gl_data != NULL);
SDL_assert(_this->gl_config.profile_mask == SDL_GL_CONTEXT_PROFILE_ES);
@@ -698,8 +696,7 @@ WIN_GL_UseEGL(_THIS)
return SDL_GetHintBoolean(SDL_HINT_OPENGL_ES_DRIVER, SDL_FALSE) || _this->gl_config.major_version == 1 || _this->gl_config.major_version > _this->gl_data->es_profile_max_supported_version.major || (_this->gl_config.major_version == _this->gl_data->es_profile_max_supported_version.major && _this->gl_config.minor_version > _this->gl_data->es_profile_max_supported_version.minor); /* No WGL extension for OpenGL ES 1.x profiles. */
}
-SDL_GLContext
-WIN_GL_CreateContext(_THIS, SDL_Window *window)
+SDL_GLContext WIN_GL_CreateContext(_THIS, SDL_Window *window)
{
HDC hdc = ((SDL_WindowData *)window->driverdata)->hdc;
HGLRC context, share_context;
@@ -717,7 +714,7 @@ WIN_GL_CreateContext(_THIS, SDL_Window *window)
_this->GL_GetSwapInterval = WIN_GLES_GetSwapInterval;
_this->GL_SwapWindow = WIN_GLES_SwapWindow;
_this->GL_DeleteContext = WIN_GLES_DeleteContext;
-
+
if (WIN_GLES_LoadLibrary(_this, NULL) != 0) {
return NULL;
}
@@ -894,8 +891,7 @@ void WIN_GL_DeleteContext(_THIS, SDL_GLContext context)
_this->gl_data->wglDeleteContext((HGLRC)context);
}
-SDL_bool
-WIN_GL_SetPixelFormatFrom(_THIS, SDL_Window *fromWindow, SDL_Window *toWindow)
+SDL_bool WIN_GL_SetPixelFormatFrom(_THIS, SDL_Window *fromWindow, SDL_Window *toWindow)
{
HDC hfromdc = ((SDL_WindowData *)fromWindow->driverdata)->hdc;
HDC htodc = ((SDL_WindowData *)toWindow->driverdata)->hdc;
diff --git a/src/video/windows/SDL_windowsopengles.c b/src/video/windows/SDL_windowsopengles.c
index 2c0748c..d410141 100644
--- a/src/video/windows/SDL_windowsopengles.c
+++ b/src/video/windows/SDL_windowsopengles.c
@@ -58,8 +58,7 @@ int WIN_GLES_LoadLibrary(_THIS, const char *path)
return 0;
}
-SDL_GLContext
-WIN_GLES_CreateContext(_THIS, SDL_Window *window)
+SDL_GLContext WIN_GLES_CreateContext(_THIS, SDL_Window *window)
{
SDL_GLContext context;
SDL_WindowData *data = (SDL_WindowData *)window->driverdata;
diff --git a/src/video/windows/SDL_windowsshape.c b/src/video/windows/SDL_windowsshape.c
index 034aa0a..9aa75d2 100644
--- a/src/video/windows/SDL_windowsshape.c
+++ b/src/video/windows/SDL_windowsshape.c
@@ -25,8 +25,7 @@
#include "SDL_windowsshape.h"
#include "SDL_windowsvideo.h"
-SDL_WindowShaper *
-Win32_CreateShaper(SDL_Window *window)
+SDL_WindowShaper *Win32_CreateShaper(SDL_Window *window)
{
int resized_properly;
SDL_WindowShaper *result = (SDL_WindowShaper *)SDL_malloc(sizeof(SDL_WindowShaper));
diff --git a/src/video/windows/SDL_windowsvideo.c b/src/video/windows/SDL_windowsvideo.c
index e7bcfe9..5621293 100644
--- a/src/video/windows/SDL_windowsvideo.c
+++ b/src/video/windows/SDL_windowsvideo.c
@@ -486,8 +486,7 @@ void WIN_VideoQuit(_THIS)
#endif
#endif
-SDL_bool
-D3D_LoadDLL(void **pD3DDLL, IDirect3D9 **pDirect3D9Interface)
+SDL_bool D3D_LoadDLL(void **pD3DDLL, IDirect3D9 **pDirect3D9Interface)
{
*pD3DDLL = SDL_LoadObject("D3D9.DLL");
if (*pD3DDLL) {
@@ -604,8 +603,7 @@ static SDL_bool DXGI_LoadDLL(void **pDXGIDLL, IDXGIFactory **pDXGIFactory)
}
#endif
-SDL_bool
-SDL_DXGIGetOutputInfo(int displayIndex, int *adapterIndex, int *outputIndex)
+SDL_bool SDL_DXGIGetOutputInfo(int displayIndex, int *adapterIndex, int *outputIndex)
{
#if !HAVE_DXGI_H
if (adapterIndex) {
@@ -682,8 +680,7 @@ SDL_DXGIGetOutputInfo(int displayIndex, int *adapterIndex, int *outputIndex)
#endif
}
-SDL_bool
-WIN_IsPerMonitorV2DPIAware(_THIS)
+SDL_bool WIN_IsPerMonitorV2DPIAware(_THIS)
{
#if !defined(__XBOXONE__) && !defined(__XBOXSERIES__)
SDL_VideoData *data = (SDL_VideoData *)_this->driverdata;
diff --git a/src/video/windows/SDL_windowswindow.c b/src/video/windows/SDL_windowswindow.c
index 796b2a5..874418b 100644
--- a/src/video/windows/SDL_windowswindow.c
+++ b/src/video/windows/SDL_windowswindow.c
@@ -997,8 +997,7 @@ void WIN_SetWindowFullscreen(_THIS, SDL_Window *window, SDL_VideoDisplay *displa
}
#if !defined(__XBOXONE__) && !defined(__XBOXSERIES__)
-int
-WIN_SetWindowGammaRamp(_THIS, SDL_Window * window, const Uint16 * ramp)
+int WIN_SetWindowGammaRamp(_THIS, SDL_Window * window, const Uint16 * ramp)
{
SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window);
SDL_DisplayData *data = (SDL_DisplayData *) display->driverdata;
@@ -1016,8 +1015,7 @@ WIN_SetWindowGammaRamp(_THIS, SDL_Window * window, const Uint16 * ramp)
return succeeded ? 0 : -1;
}
-void
-WIN_UpdateWindowICCProfile(SDL_Window * window, SDL_bool send_event)
+void WIN_UpdateWindowICCProfile(SDL_Window * window, SDL_bool send_event)
{
SDL_WindowData *data = (SDL_WindowData *)window->driverdata;
SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window);
@@ -1046,8 +1044,7 @@ WIN_UpdateWindowICCProfile(SDL_Window * window, SDL_bool send_event)
}
}
-void *
-WIN_GetWindowICCProfile(_THIS, SDL_Window *window, size_t *size)
+void *WIN_GetWindowICCProfile(_THIS, SDL_Window *window, size_t *size)
{
SDL_WindowData *data = (SDL_WindowData *)window->driverdata;
char *filename_utf8;
@@ -1066,8 +1063,7 @@ WIN_GetWindowICCProfile(_THIS, SDL_Window *window, size_t *size)
return iccProfileData;
}
-int
-WIN_GetWindowGammaRamp(_THIS, SDL_Window * window, Uint16 * ramp)
+int WIN_GetWindowGammaRamp(_THIS, SDL_Window * window, Uint16 * ramp)
{
SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window);
SDL_DisplayData *data = (SDL_DisplayData *) display->driverdata;
@@ -1166,8 +1162,7 @@ void WIN_DestroyWindow(_THIS, SDL_Window *window)
CleanupWindowData(_this, window);
}
-SDL_bool
-WIN_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info)
+SDL_bool WIN_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info)
{
const SDL_WindowData *data = (const SDL_WindowData *) window->driverdata;
if (info->version.major <= SDL_MAJOR_VERSION) {
diff --git a/src/video/winrt/SDL_winrtpointerinput.cpp b/src/video/winrt/SDL_winrtpointerinput.cpp
index e62dcaf..e80d99d 100644
--- a/src/video/winrt/SDL_winrtpointerinput.cpp
+++ b/src/video/winrt/SDL_winrtpointerinput.cpp
@@ -112,8 +112,7 @@ WINRT_TransformCursorPosition(SDL_Window *window,
return outputPosition;
}
-SDL_bool
-WINRT_GetSDLButtonForPointerPoint(Windows::UI::Input::PointerPoint ^ pt, Uint8 *button, Uint8 *pressed)
+SDL_bool WINRT_GetSDLButtonForPointerPoint(Windows::UI::Input::PointerPoint ^ pt, Uint8 *button, Uint8 *pressed)
{
using namespace Windows::UI::Input;
diff --git a/src/video/winrt/SDL_winrtvideo.cpp b/src/video/winrt/SDL_winrtvideo.cpp
index 4618826..9a38e6c 100644
--- a/src/video/winrt/SDL_winrtvideo.cpp
+++ b/src/video/winrt/SDL_winrtvideo.cpp
@@ -795,8 +795,7 @@ void WINRT_DestroyWindow(_THIS, SDL_Window *window)
}
}
-SDL_bool
-WINRT_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info)
+SDL_bool WINRT_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info)
{
SDL_WindowData * data = (SDL_WindowData *) window->driverdata;
diff --git a/src/video/x11/SDL_x11clipboard.c b/src/video/x11/SDL_x11clipboard.c
index 387307a..6c84278 100644
--- a/src/video/x11/SDL_x11clipboard.c
+++ b/src/video/x11/SDL_x11clipboard.c
@@ -231,8 +231,7 @@ int X11_SetPrimarySelectionText(_THIS, const char *text)
return SetSelectionText(_this, text, XA_PRIMARY);
}
-char *
-X11_GetClipboardText(_THIS)
+char *X11_GetClipboardText(_THIS)
{
SDL_VideoData *videodata = (SDL_VideoData *)_this->driverdata;
Atom XA_CLIPBOARD = X11_XInternAtom(videodata->display, "CLIPBOARD", 0);
@@ -243,14 +242,12 @@ X11_GetClipboardText(_THIS)
return GetSlectionText(_this, XA_CLIPBOARD);
}
-char *
-X11_GetPrimarySelectionText(_THIS)
+char *X11_GetPrimarySelectionText(_THIS)
{
return GetSlectionText(_this, XA_PRIMARY);
}
-SDL_bool
-X11_HasClipboardText(_THIS)
+SDL_bool X11_HasClipboardText(_THIS)
{
SDL_bool result = SDL_FALSE;
char *text = X11_GetClipboardText(_this);
@@ -261,8 +258,7 @@ X11_HasClipboardText(_THIS)
return result;
}
-SDL_bool
-X11_HasPrimarySelectionText(_THIS)
+SDL_bool X11_HasPrimarySelectionText(_THIS)
{
SDL_bool result = SDL_FALSE;
char *text = X11_GetPrimarySelectionText(_this);
diff --git a/src/video/x11/SDL_x11framebuffer.c b/src/video/x11/SDL_x11framebuffer.c
index 161c8e6..f9ce74a 100644
--- a/src/video/x11/SDL_x11framebuffer.c
+++ b/src/video/x11/SDL_x11framebuffer.c
@@ -30,8 +30,7 @@
/* Shared memory error handler routine */
static int shm_error;
static int (*X_handler)(Display *, XErrorEvent *) = NULL;
-static int
-shm_errhandler(Display *d, XErrorEvent *e)
+static int shm_errhandler(Display *d, XErrorEvent *e)
{
if (e->error_code == BadAccess) {
shm_error = True;
diff --git a/src/video/x11/SDL_x11keyboard.c b/src/video/x11/SDL_x11keyboard.c
index 5f7c2bb..12818ed 100644
--- a/src/video/x11/SDL_x11keyboard.c
+++ b/src/video/x11/SDL_x11keyboard.c
@@ -461,8 +461,7 @@ void X11_SetTextInputRect(_THIS, const SDL_Rect *rect)
#endif
}
-SDL_bool
-X11_HasScreenKeyboardSupport(_THIS)
+SDL_bool X11_HasScreenKeyboardSupport(_THIS)
{
SDL_VideoData *videodata = (SDL_VideoData *)_this->driverdata;
return videodata->is_steam_deck;
@@ -495,8 +494,7 @@ void X11_HideScreenKeyboard(_THIS, SDL_Window *window)
}
}
-SDL_bool
-X11_IsScreenKeyboardShown(_THIS, SDL_Window *window)
+SDL_bool X11_IsScreenKeyboardShown(_THIS, SDL_Window *window)
{
SDL_VideoData *videodata = (SDL_VideoData *)_this->driverdata;
diff --git a/src/video/x11/SDL_x11modes.c b/src/video/x11/SDL_x11modes.c
index e60017e..c952a0a 100644
--- a/src/video/x11/SDL_x11modes.c
+++ b/src/video/x11/SDL_x11modes.c
@@ -87,8 +87,7 @@ int X11_GetVisualInfoFromVisual(Display *display, Visual *visual, XVisualInfo *v
return -1;
}
-Uint32
-X11_GetPixelFormatFromVisualInfo(Display *display, XVisualInfo *vinfo)
+Uint32 X11_GetPixelFormatFromVisualInfo(Display *display, XVisualInfo *vinfo)
{
if (vinfo->class == DirectColor || vinfo->class == TrueColor) {
int bpp;
diff --git a/src/video/x11/SDL_x11opengl.c b/src/video/x11/SDL_x11opengl.c
index c76b734..d715277 100644
--- a/src/video/x11/SDL_x11opengl.c
+++ b/src/video/x11/SDL_x11opengl.c
@@ -274,8 +274,7 @@ int X11_GL_LoadLibrary(_THIS, const char *path)
return 0;
}
-void *
-X11_GL_GetProcAddress(_THIS, const char *proc)
+void *X11_GL_GetProcAddress(_THIS, const char *proc)
{
if (_this->gl_data->glXGetProcAddress) {
return _this->gl_data->glXGetProcAddress((const GLubyte *)proc);
@@ -608,8 +607,7 @@ static int X11_GL_GetAttributes(_THIS, Display *display, int screen, int *attrib
return i;
}
-XVisualInfo *
-X11_GL_GetVisual(_THIS, Display *display, int screen)
+XVisualInfo *X11_GL_GetVisual(_THIS, Display *display, int screen)
{
/* 64 seems nice. */
int attribs[64];
@@ -680,8 +678,7 @@ static int X11_GL_ErrorHandler(Display *d, XErrorEvent *e)
return (0);
}
-SDL_bool
-X11_GL_UseEGL(_THIS)
+SDL_bool X11_GL_UseEGL(_THIS)
{
SDL_assert(_this->gl_data != NULL);
if (SDL_GetHintBoolean(SDL_HINT_VIDEO_X11_FORCE_EGL, SDL_FALSE))
@@ -695,8 +692,7 @@ X11_GL_UseEGL(_THIS)
|| _this->gl_config.major_version > _this->gl_data->es_profile_max_supported_version.major || (_this->gl_config.major_version == _this->gl_data->es_profile_max_supported_version.major && _this->gl_config.minor_version > _this->gl_data->es_profile_max_supported_version.minor));
}
-SDL_GLContext
-X11_GL_CreateContext(_THIS, SDL_Window *window)
+SDL_GLContext X11_GL_CreateContext(_THIS, SDL_Window *window)
{
SDL_WindowData *data = (SDL_WindowData *)window->driverdata;
Display *display = data->videodata->display;
diff --git a/src/video/x11/SDL_x11opengles.c b/src/video/x11/SDL_x11opengles.c
index 925f52f..4d38a71 100644
--- a/src/video/x11/SDL_x11opengles.c
+++ b/src/video/x11/SDL_x11opengles.c
@@ -52,12 +52,11 @@ int X11_GLES_LoadLibrary(_THIS, const char *path)
return SDL_SetError("SDL not configured with OpenGL/GLX support");
#endif
}
-
+
return SDL_EGL_LoadLibrary(_this, path, (NativeDisplayType) data->display, 0);
}
-XVisualInfo *
-X11_GLES_GetVisual(_THIS, Display *display, int screen)
+XVisualInfo *X11_GLES_GetVisual(_THIS, Display *display, int screen)
{
XVisualInfo *egl_visualinfo = NULL;
@@ -89,8 +88,7 @@ X11_GLES_GetVisual(_THIS, Display *display, int screen)
return egl_visualinfo;
}
-SDL_GLContext
-X11_GLES_CreateContext(_THIS, SDL_Window *window)
+SDL_GLContext X11_GLES_CreateContext(_THIS, SDL_Window *window)
{
SDL_GLContext context;
SDL_WindowData *data = (SDL_WindowData *)window->driverdata;
diff --git a/src/video/x11/SDL_x11shape.c b/src/video/x11/SDL_x11shape.c
index 1123ae0..4a8d946 100644
--- a/src/video/x11/SDL_x11shape.c
+++ b/src/video/x11/SDL_x11shape.c
@@ -27,8 +27,7 @@
#include "SDL_x11window.h"
#include "../SDL_shape_internals.h"
-SDL_WindowShaper *
-X11_CreateShaper(SDL_Window *window)
+SDL_WindowShaper *X11_CreateShaper(SDL_Window *window)
{
SDL_WindowShaper *result = NULL;
SDL_ShapeData *data = NULL;
diff --git a/src/video/x11/SDL_x11video.c b/src/video/x11/SDL_x11video.c
index 16e8cb2..e2b36a8 100644
--- a/src/video/x11/SDL_x11video.c
+++ b/src/video/x11/SDL_x11video.c
@@ -498,8 +498,7 @@ void X11_VideoQuit(_THIS)
X11_QuitTouch(_this);
}
-SDL_bool
-X11_UseDirectColorVisuals(void)
+SDL_bool X11_UseDirectColorVisuals(void)
{
return SDL_getenv("SDL_VIDEO_X11_NODIRECTCOLOR") ? SDL_FALSE : SDL_TRUE;
}
diff --git a/src/video/x11/SDL_x11window.c b/src/video/x11/SDL_x11window.c
index 4d36f00..5b575f2 100644
--- a/src/video/x11/SDL_x11window.c
+++ b/src/video/x11/SDL_x11window.c
@@ -45,13 +45,11 @@
#define _NET_WM_STATE_REMOVE 0l
#define _NET_WM_STATE_ADD 1l
-static Bool
-isMapNotify(Display *dpy, XEvent *ev, XPointer win) /* NOLINT(readability-non-const-parameter): cannot make XPointer a const pointer due to typedef */
+static Bool isMapNotify(Display *dpy, XEvent *ev, XPointer win) /* NOLINT(readability-non-const-parameter): cannot make XPointer a const pointer due to typedef */
{
return ev->type == MapNotify && ev->xmap.window == *((Window *)win);
}
-static Bool
-isUnmapNotify(Display *dpy, XEvent *ev, XPointer win) /* NOLINT(readability-non-const-parameter): cannot make XPointer a const pointer due to typedef */
+static Bool isUnmapNotify(Display *dpy, XEvent *ev, XPointer win) /* NOLINT(readability-non-const-parameter): cannot make XPointer a const pointer due to typedef */
{
return ev->type == UnmapNotify && ev->xunmap.window == *((Window *)win);
}
@@ -168,8 +166,7 @@ void X11_SetNetWMState(_THIS, Window xwindow, Uint32 flags)
}
}
-Uint32
-X11_GetNetWMState(_THIS, SDL_Window *window, Window xwindow)
+Uint32 X11_GetNetWMState(_THIS, SDL_Window *window, Window xwindow)
{
SDL_VideoData *videodata = (SDL_VideoData *)_this->driverdata;
Display *display = videodata->display;
@@ -697,8 +694,7 @@ int X11_CreateWindowFrom(_THIS, SDL_Window *window, const void *data)
return 0;
}
-char *
-X11_GetWindowTitle(_THIS, Window xwindow)
+char *X11_GetWindowTitle(_THIS, Window xwindow)
{
SDL_VideoData *data = (SDL_VideoData *)_this->driverdata;
Display *display = data->display;
@@ -1480,8 +1476,7 @@ void X11_SetWindowFullscreen(_THIS, SDL_Window *window, SDL_VideoDisplay *_displ
X11_SetWindowFullscreenViaWM(_this, window, _display, fullscreen);
}
-int
-X11_SetWindowGammaRamp(_THIS, SDL_Window * window, const Uint16 * ramp)
+int X11_SetWindowGammaRamp(_THIS, SDL_Window * window, const Uint16 * ramp)
{
SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
Display *display = data->videodata->display;
@@ -1579,8 +1574,7 @@ static void X11_ReadProperty(SDL_x11Prop *p, Display *disp, Window w, Atom prop)
p->type = type;
}
-void *
-X11_GetWindowICCProfile(_THIS, SDL_Window *window, size_t *size)
+void *X11_GetWindowICCProfile(_THIS, SDL_Window *window, size_t *size)
{
SDL_WindowData *data = (SDL_WindowData *)window->driverdata;
Display *display = data->videodata->display;
@@ -1763,8 +1757,7 @@ void X11_DestroyWindow(_THIS, SDL_Window *window)
window->driverdata = NULL;
}
-SDL_bool
-X11_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info)
+SDL_bool X11_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info)
{
SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
Display *display;