Compare commits
1006 Commits
8.0.3.22090809
...
blit
| Author | SHA1 | Date | |
|---|---|---|---|
| 76ed4fefe1 | |||
| f73799f4fc | |||
| da9691a195 | |||
| 2b829dbc07 | |||
| 2147242d91 | |||
| 3a06f5e7c6 | |||
| 7d000076ed | |||
| e0df6d9b0b | |||
| 2a860ca1c4 | |||
| d8326fdb36 | |||
| 8ebeebe7ea | |||
| 328b056410 | |||
| eb89a9bafb | |||
| a8351b86c2 | |||
| c78484dfb3 | |||
| 255fd01f1b | |||
| ea706a8071 | |||
| ee4d982bd0 | |||
| 0e3630e602 | |||
| a4a8fa95ee | |||
| 759b17f195 | |||
| db123458a3 | |||
| 063092875b | |||
| 7591092518 | |||
| 87d598604e | |||
| 4f4516f3fc | |||
| 1f91895624 | |||
| f019785797 | |||
| d2b25deec4 | |||
| 0a04eadc55 | |||
| 91300cdc0e | |||
| 151acc6959 | |||
| d598d39520 | |||
| bb2b1bc23a | |||
| 6f76c83421 | |||
| bbdff96b49 | |||
| c621ec4865 | |||
| d75a4950cb | |||
| 49bdc8819f | |||
| 68e9e02bf8 | |||
| d702a4f62e | |||
| 236d836274 | |||
| ecf89db683 | |||
| 18e54353fe | |||
| bd8ffe068d | |||
| 2ec1e32681 | |||
| 77c342b6ab | |||
| 69a7b58756 | |||
| 1c9b12c69e | |||
| 60bac24065 | |||
| 73a5efcb7c | |||
| 19cf6b57f6 | |||
| 65ee166afb | |||
| 3fe4f6ac8f | |||
| 9be196163c | |||
| 4574a50590 | |||
| a57ac97e10 | |||
| 4fb8316903 | |||
| 0b424a8221 | |||
| 367f32bd06 | |||
| 214833b1ec | |||
| 4326981a4d | |||
| 9f96f132e7 | |||
| 51e89cb7bd | |||
| 8a7fc84f96 | |||
| 0165b94e0e | |||
| f1190f7187 | |||
| 7cc434691a | |||
| d54c29e2b7 | |||
| 17c9c6f62c | |||
| 2e8c59b94a | |||
| f968c5016b | |||
| b3406bc9ae | |||
| 5a0ca315bf | |||
| 57a1a9ece6 | |||
| 85a21e93e3 | |||
| a559f10792 | |||
| 4e4dc33843 | |||
| 51985b8633 | |||
| a0f4ed2ca6 | |||
| fd3f9102dc | |||
| 0c03ca25b5 | |||
| 1c49408810 | |||
| b1cace6a24 | |||
| f4fd9156c0 | |||
| 85f9d77c9d | |||
| 6d92653229 | |||
| e69967fc94 | |||
| 4fc96ee3ba | |||
| 646bc8b398 | |||
| a1302ecb3b | |||
| ff2302f542 | |||
| 2bd1c71fd8 | |||
| 9c3957a567 | |||
| 9df7c047e4 | |||
| 4a53152c96 | |||
| e9be0244ca | |||
| ff5bb28fe6 | |||
| 89618e957f | |||
| aa9432948f | |||
| 34c12fd310 | |||
| b4ce3ccf9b | |||
| a433009de8 | |||
| b87b673e0f | |||
| eff081741a | |||
| 6667c50ce4 | |||
| 3ff388c5ed | |||
| b0ded80c22 | |||
| c97c4871a6 | |||
| 8c179a88a4 | |||
| 384b70a301 | |||
| ba903152a0 | |||
| 8668e3c986 | |||
| 7039ec5d34 | |||
| 02c1e46cbb | |||
| d1a91a85e4 | |||
| 5781e3b4f4 | |||
| d6a72cfef3 | |||
| bb791f4a9e | |||
| 2c2d08e5f1 | |||
| 8a55b45cc9 | |||
| 26689f992b | |||
| 80b3e8236e | |||
| a1f631285f | |||
| 3a9db89382 | |||
| deae896fec | |||
| 70892cdf1d | |||
| b6d51b7b0b | |||
| b3611b04cd | |||
| beebbf86af | |||
| 9ac23face8 | |||
| 4e416ffebb | |||
| 3e6afe04bb | |||
| c96aac25c4 | |||
| 4d6bd0e14e | |||
| f7b6001771 | |||
| 06aff37241 | |||
| d14bb49be1 | |||
| 738e4b30ec | |||
| 7fd8f66145 | |||
| 3ef37f8adf | |||
| a168f4be32 | |||
| 242431b0b0 | |||
| 9a06311d97 | |||
| d89abb44f1 | |||
| f5dd816d1f | |||
| 89f17d3aeb | |||
| 5cb1b0de72 | |||
| 9a1d7f57d3 | |||
| 1e98a7046b | |||
| f2d55f9657 | |||
| e0b051cf56 | |||
| 0419548455 | |||
| 03d37d24dc | |||
| a2fdb61f70 | |||
| 8d6345e04a | |||
| 93f8cb30b7 | |||
| 94522d104b | |||
| 9f1dbf208c | |||
| fd86992a0e | |||
| d2cb7c82b8 | |||
| 6052b3ec2c | |||
| 2a6fa817de | |||
| 28e8203527 | |||
| 6ec246eaee | |||
| 0e39a75e10 | |||
| 1a69e9af1b | |||
| 513099ef0f | |||
| d8d5c2889a | |||
| 0c076bf365 | |||
| a12f7e96f7 | |||
| 8eff33f250 | |||
| 12d337252e | |||
| 5951976050 | |||
| cda2f03dc1 | |||
| 5f05df1721 | |||
| 62eadebbee | |||
| 6dd9afb0ab | |||
| 9e0e85bc86 | |||
| 36f41e3d22 | |||
| 6d9b593555 | |||
| 28cea14a7f | |||
| a45f7c71e3 | |||
| eff49c8e43 | |||
| 053428b945 | |||
| 22a1e0525b | |||
| 79aedc830c | |||
| 1c84857191 | |||
| ebc1ed7ab6 | |||
| 8a3b69347a | |||
| 9b82eaf228 | |||
| 33c86d3b93 | |||
| c7c7733be3 | |||
| 3d7b15c521 | |||
| 3918cd3e93 | |||
| f42b11ce6b | |||
| e8c11080a5 | |||
| 194cacf7f2 | |||
| a0dba5ca1d | |||
| 6c89fcb29d | |||
| ad2e80f900 | |||
| be95fa7412 | |||
| 7094d87843 | |||
| 9e02cf20f4 | |||
| d284791ffb | |||
| 8637d74c3a | |||
| 69701070b6 | |||
| 76b8962bc5 | |||
| 2f19f4d3e9 | |||
| 17e1cf0a67 | |||
| 49e531fabb | |||
| 1bd7bc6d53 | |||
| ed19b3c333 | |||
| fb251c362d | |||
| 3e0a84ee8c | |||
| db419875b0 | |||
| a474006d40 | |||
| d764a100a6 | |||
| bc2f9c866b | |||
| a49bd0133c | |||
| 97f67f3cb8 | |||
| bec8d214d3 | |||
| 7cd3ed824f | |||
| 7fd6fda193 | |||
| 0c0b824be6 | |||
| 261e4f9926 | |||
| 221815a3ad | |||
| 33e740e4ad | |||
| b64c4c0904 | |||
| e00dd6a491 | |||
| 2a6bfb8878 | |||
| 90b29854a9 | |||
| 9358dbc613 | |||
| ea4e9bc144 | |||
| 280ea1e0e4 | |||
| d5a7b257dc | |||
| 84238fcca5 | |||
| f4990b9f98 | |||
| e0d6230f2f | |||
| c0385ce188 | |||
| e624691fc3 | |||
| a173928fe6 | |||
| 4e06513d07 | |||
| a66a521660 | |||
| 7c08938fb9 | |||
| c51c5e0e7d | |||
| ca649f95ec | |||
| 247b5d33cd | |||
| c9bdd74a5c | |||
| 86be00ff75 | |||
| eadff6ee94 | |||
| 687e1f190d | |||
| d0f293d799 | |||
| 32ee3ed517 | |||
| 84d12e2a93 | |||
| e52ba082bb | |||
| b3dd01d50a | |||
| 23122310ae | |||
| 74027bef5d | |||
| aa6cedcc87 | |||
| 2a1ecfd497 | |||
| fc561141d4 | |||
| e4c7faf8de | |||
| c06da680ed | |||
| 70ef636572 | |||
| 3029937cf6 | |||
| bba9e06d31 | |||
| 417dd54e49 | |||
| 87fd6ea4f3 | |||
| 35cdc01c27 | |||
| a4b1172883 | |||
| 3c8a31cff2 | |||
| 780fe50050 | |||
| 094bf6edb5 | |||
| ae9d6d2ea3 | |||
| 78d423b9e9 | |||
| 926f9190be | |||
| cecc13498a | |||
| 1051e3f2dc | |||
| b5bb26fa52 | |||
| 58efd993dd | |||
| ddff0df466 | |||
| fbbe9b138b | |||
| 2ade8e0449 | |||
| 929aedd082 | |||
| f06cac8537 | |||
| 3b08646baa | |||
| b3558d0725 | |||
| 6387e44694 | |||
| 498b0966be | |||
| 6fb620c12a | |||
| da7d90ea41 | |||
| 5893414f21 | |||
| 3e571d04d2 | |||
| d2c385a713 | |||
| 9a821eca85 | |||
| 40472632a9 | |||
| 89c07909ef | |||
| a55ca53310 | |||
| fb44010b7f | |||
| 6ea0a43e47 | |||
| 5161728f5e | |||
| e7bb3967f2 | |||
| 637af5a21e | |||
| 82dd8ffe95 | |||
| 9f24f22206 | |||
| 5d069f1589 | |||
| 77692f7a7f | |||
| 0bfa9a022b | |||
| f98221a54f | |||
| b830143788 | |||
| c404490bd2 | |||
| 591c440647 | |||
| a95e59bd7c | |||
| 458bbe3ba4 | |||
| a40856fdad | |||
| adfe4fc712 | |||
| 1ba031b1c5 | |||
| 77236946d0 | |||
| f49a7d293a | |||
| 268de01790 | |||
| beeed03b54 | |||
| 8784250be9 | |||
| 4f972a5c39 | |||
| 561dcdbe74 | |||
| 8906015895 | |||
| 5d6d660e0b | |||
| 758b5e2f38 | |||
| 198fc93532 | |||
| f82f7d82d5 | |||
| 0558efe5d9 | |||
| 7b1ea17a91 | |||
| 99514a9341 | |||
| 457ba21aba | |||
| 570cbb8b5b | |||
| 665e5760d8 | |||
| 1cb7d09b97 | |||
| 8cb0fd0670 | |||
| 922798185c | |||
| 2bd84d93b8 | |||
| b2ce4fa349 | |||
| 978126612f | |||
| 1e4298ed61 | |||
| 6b227619e9 | |||
| 2a6bda3a3d | |||
| 0628b3c1ae | |||
| 801cee5db1 | |||
| ca1c0f94f5 | |||
| c356f177d4 | |||
| 0a434367b3 | |||
| 250bb26b16 | |||
| 3a1b3e75d3 | |||
| 6f6e40e066 | |||
| eb7ca2d684 | |||
| d376f8cc30 | |||
| 9b051a0918 | |||
| fadff3ae4c | |||
| 4f6951e911 | |||
| 8cd3d4553d | |||
| 0d558d2670 | |||
| 7350cd81fd | |||
| c540df7fd1 | |||
| 7d17c94251 | |||
| 2a18f54179 | |||
| 3b910c8227 | |||
| 7b2a55e0a4 | |||
| 51fcf958e8 | |||
| 053d0bc158 | |||
| 73300ccc27 | |||
| 37b000f36c | |||
| 93d3163b01 | |||
| 260913703b | |||
| 879c32e538 | |||
| c4ff37826a | |||
| 3e14e1f25e | |||
| 68e2cfb420 | |||
| e531f7561a | |||
| 96ff02dff8 | |||
| aa7a197771 | |||
| c8e22d8c7f | |||
| 5de6385165 | |||
| 9b6df453bc | |||
| b23ecf3603 | |||
| d7d53a06b9 | |||
| bae6672f36 | |||
| 0e0e91495f | |||
| 329e0f49de | |||
| 97d1fd059d | |||
| 55858f9f6d | |||
| 1b8269d746 | |||
| f02ca4c042 | |||
| f3e19bd772 | |||
| 76be237d8b | |||
| 64dd878b6b | |||
| b1b8b03f12 | |||
| d5a816c4fe | |||
| bef4a6f99e | |||
| 72f3513022 | |||
| 47b82bb2d4 | |||
| 362b22bd4d | |||
| 6226a8a78b | |||
| e3d443acc3 | |||
| 034ebf7d54 | |||
| c54034c7e0 | |||
| 09eb77b56e | |||
| be5ad751cf | |||
| 2b85a7f1eb | |||
| 708c7a52a1 | |||
| b42b24be75 | |||
| 5a124d6d45 | |||
| 98328bd6b9 | |||
| a494d160c4 | |||
| 91e3fc15c7 | |||
| 2b719a5b86 | |||
| 9ce786d578 | |||
| 994f358ca8 | |||
| cfd17c616c | |||
| 4826741846 | |||
| 258beb1b38 | |||
| c0de244fd9 | |||
| a39cb7c8f6 | |||
| f1462bd1e1 | |||
| c7c713c6de | |||
| b9d1660377 | |||
| 9366678fef | |||
| c105989111 | |||
| a4d0b79de4 | |||
| 6e910343e1 | |||
| d33317fdb8 | |||
| e020f225f8 | |||
| a727c0edec | |||
| 546b903660 | |||
| 39193405ed | |||
| 351c97bf09 | |||
| b903fc7fb1 | |||
| 067a8b4831 | |||
| f766375dd6 | |||
| 4b56f275f4 | |||
| 6067437ea2 | |||
| 6517d35727 | |||
| 7a6f0d6082 | |||
| d38c505ec8 | |||
| b74c14d93a | |||
| 3cb327ff8d | |||
| a8f4d149da | |||
| 3753cfa417 | |||
| 1b6ef60a37 | |||
| 58ed0461f9 | |||
| 93ffeb8c32 | |||
| 1feed24f14 | |||
| 72a2b88af9 | |||
| ed21a6b21c | |||
| 27dbdab522 | |||
| ecd1fc2803 | |||
| a59b0442f9 | |||
| 3c2b35576e | |||
| 40f24c0196 | |||
| 6bd9819f7f | |||
| 477ec726b2 | |||
| 5c56d9c374 | |||
| 717fdd96c8 | |||
| d004dfe2bf | |||
| 0e4ff5622e | |||
| 2249c10d37 | |||
| ac08209e36 | |||
| c8b4cf9433 | |||
| 3da93f7abd | |||
| 4a8d9b6b54 | |||
| d0382be839 | |||
| e2c1758667 | |||
| e2f3a6bb2b | |||
| 30a3174c88 | |||
| 43a08784f7 | |||
| 7d31bed4f6 | |||
| e510cb1ccc | |||
| c7503f13ac | |||
| aec68a96a4 | |||
| 53d293fe12 | |||
| e5558f0527 | |||
| 047937a57d | |||
| 452e9ead75 | |||
| ae74819174 | |||
| cf0d2c28ec | |||
| abeebfa81c | |||
| 62e9a7c50c | |||
| a7c029cd1e | |||
| 7d11c06cbe | |||
| 115f249b75 | |||
| c40bae3a5e | |||
| 197af9d3e4 | |||
| 5e758a3b09 | |||
| 1edeae716a | |||
| 461c5e823c | |||
| 79ef560c06 | |||
| 2de0ec9bee | |||
| bd5f682196 | |||
| 8ec6bb15fe | |||
| acdd4ff468 | |||
| 305dd3636b | |||
| fdd46102f4 | |||
| 80b0b2a792 | |||
| 73f824ab1c | |||
| 556e014e3a | |||
| 91e27ff475 | |||
| 7cafef382b | |||
| 4b16eebe57 | |||
| 3158cc8fba | |||
| 39dfe02350 | |||
| 385060334e | |||
| 59a4e6cb0b | |||
| d3bc7650fe | |||
| 7a7c4ec7e4 | |||
| 9a68ea37f1 | |||
| 58052bdb46 | |||
| f4da18de2d | |||
| 89fcde4dc3 | |||
| f3d43f110c | |||
| 8cdf2b45ee | |||
| 25ab46acd3 | |||
| 53df5499ea | |||
| df48f4d525 | |||
| 495d3bd66c | |||
| 2ce437871a | |||
| 216ed01bee | |||
| 6f12af24d9 | |||
| bcac0ed1a8 | |||
| 9dc576fd30 | |||
| 0534264d1b | |||
| 9fc04f1fa4 | |||
| 41bba0cb14 | |||
| 3746367531 | |||
| e1a844a8af | |||
| adf22f984e | |||
| 0527380c7b | |||
| f793cec5d8 | |||
| ab818456b0 | |||
| ca2e59e0a9 | |||
| 923ff6442f | |||
| 57e3331d81 | |||
| cc69d17254 | |||
| 7326afc126 | |||
| a4876166e4 | |||
| 6df0957a4a | |||
| 74da96c073 | |||
| b670f13108 | |||
| c1999ebace | |||
| 061b57c9ce | |||
| 5dfcada8ac | |||
| 64b0b0bb84 | |||
| b5928b26ed | |||
| 9b1a20e049 | |||
| 099f0ffa6f | |||
| 8b59103258 | |||
| 95f048272f | |||
| 24ed86da48 | |||
| fafb45bbce | |||
| ad90228ce1 | |||
| f90a9b56cc | |||
| a9a6bc8cf4 | |||
| d87e8a3b9b | |||
| f1a6fec980 | |||
| 2319e889c6 | |||
| 63caa1d436 | |||
| 09b562836a | |||
| 1979fd0b61 | |||
| 4b1e1fba88 | |||
| bf125a8795 | |||
| 444c885785 | |||
| 8af6ec55f1 | |||
| 9f5df79973 | |||
| b870c5b0dd | |||
| 21b507dc71 | |||
| 4afce1d144 | |||
| 185171c5f5 | |||
| 94218416d2 | |||
| 5ab5ae6e68 | |||
| ac663e2f1c | |||
| f7ee13724e | |||
| d7e6438f8f | |||
| 0a6e9fb1f0 | |||
| bb53cdb68a | |||
| 8fc417b5e9 | |||
| 679184ce79 | |||
| 4403a0c63c | |||
| e902707960 | |||
| 681cad1a44 | |||
| cf6d2559ec | |||
| d0067052a8 | |||
| c7ce911edc | |||
| ef7c7f1b35 | |||
| b839a1e080 | |||
| 3280d36230 | |||
| 68a36dae39 | |||
| bbb6587495 | |||
| 511288f86d | |||
| 89342fc956 | |||
| f98476e8cf | |||
| b0cee97f26 | |||
| 78d839b94a | |||
| 75aea66d16 | |||
| fa63ace6a7 | |||
| 5520142001 | |||
| ccb075ea53 | |||
| 6a2d2632ce | |||
| 57d67b78c8 | |||
| 2aa3e9b6e1 | |||
| ce206baa88 | |||
| fb63d447f0 | |||
| 19d4a18315 | |||
| 31ab083352 | |||
| 8bee5d2a77 | |||
| 4385af9f75 | |||
| c01dfa32c3 | |||
| cf7df895a1 | |||
| fb00ffadc4 | |||
| a61f28b0de | |||
| f5ae0db8bd | |||
| 12ba529632 | |||
| bcee7753e6 | |||
| 2b913ae540 | |||
| a1e4a44069 | |||
| b36a574f3c | |||
| 15910d0954 | |||
| 5894a59d5c | |||
| 1d9b6414aa | |||
| f476b87a5d | |||
| 8f18cde853 | |||
| 6cf589429d | |||
| 743bae43c3 | |||
| 509f16865a | |||
| 72815a4915 | |||
| b4a76f1e61 | |||
| d02b5c5fdb | |||
| 9bffa67c7f | |||
| ec8093f8dc | |||
| a71df01691 | |||
| 77460ec62f | |||
| 7467eb8934 | |||
| e5cb5868a7 | |||
| e908bed1e2 | |||
| 8da53babbf | |||
| a0208228bd | |||
| 9516d35b0c | |||
| e06925e208 | |||
| 0e2dce0976 | |||
| 2729df6eca | |||
| 630f673d28 | |||
| 03bf21141d | |||
| 59898271d0 | |||
| 788ebab40c | |||
| 5dbc2c1da3 | |||
| 257c95e2b2 | |||
| 402d04d054 | |||
| ab6023371c | |||
| e64242c9a2 | |||
| a8bf2e0246 | |||
| 82fb38560e | |||
| 25edfa0542 | |||
| f8864d8b90 | |||
| 001ce8acd0 | |||
| 13cf71b2ea | |||
| ea95338e69 | |||
| 57721bacb2 | |||
| 4269d45411 | |||
| 65e03993dc | |||
| cb35c75d9c | |||
| 01cef5d7df | |||
| 0f8576f18b | |||
| fbb80afbeb | |||
| 92c7691789 | |||
| 6116646094 | |||
| 8edaa7cf50 | |||
| eccf8a560d | |||
| 8157c5d8c5 | |||
| 7675251049 | |||
| 7a3322740d | |||
| 61393dbb0e | |||
| a8896e3d1b | |||
| 7ae59e8ad2 | |||
| 7d20837ee6 | |||
| d4326ee4a7 | |||
| 4e69fcb3ec | |||
| 10b057285c | |||
| b7c2f240a1 | |||
| 0832600b45 | |||
| 2ed24851ad | |||
| 48a54c7c2a | |||
| 21072e5722 | |||
| dfeb401352 | |||
| c4626cbde6 | |||
| e53f40ab07 | |||
| bfc28665c1 | |||
| 2a8a9fc3a2 | |||
| ee18060e25 | |||
| 11e72ba9f4 | |||
| 5c3f39b1ff | |||
| 778ae30bcd | |||
| 7cc7de4199 | |||
| 99ea82e20c | |||
| 1f7c5184af | |||
| 784d978a0d | |||
| 174f784c28 | |||
| 2df014314a | |||
| 4e5739abe1 | |||
| 59c2e84aac | |||
| cb2d32ec4e | |||
| c73bbff581 | |||
| 3a764acea5 | |||
| d2fbf45f71 | |||
| 02531cb4da | |||
| 0d403f6f9a | |||
| 791cfdcd5f | |||
| 6ef863793e | |||
| 7f9ac2494e | |||
| 8f241763c1 | |||
| d1aef49c5d | |||
| ac9821b439 | |||
| d6c7f73dba | |||
| f3bfc91311 | |||
| 097da86793 | |||
| ce8f33d671 | |||
| d38bc47030 | |||
| 0d876b0367 | |||
| 1883815cc5 | |||
| 2518998099 | |||
| ebe79d1c92 | |||
| 78a122a24b | |||
| ec6f83731e | |||
| 6338a144f7 | |||
| 0b056f1615 | |||
| 1e908ee265 | |||
| e78f5655ef | |||
| aa6c2acdff | |||
| 4750d5cb15 | |||
| f1fa93e068 | |||
| ea474c9705 | |||
| 021fd6ca32 | |||
| 131491e8ac | |||
| 91ecbb8719 | |||
| 1dd0af0aca | |||
| c72865e791 | |||
| 4570ab6023 | |||
| 31e2d8b49b | |||
| fccda46404 | |||
| 677d3493d4 | |||
| 9572d20bcb | |||
| 53a28e0cba | |||
| 5400aa5db3 | |||
| f55c9f792d | |||
| 24dadde724 | |||
| 9ee5d24d4b | |||
| d8a56af3da | |||
| f5c7f79db7 | |||
| ed831f5e6c | |||
| b7d2220198 | |||
| 3b1a612502 | |||
| 1c2865b1f5 | |||
| da1d3c47b6 | |||
| c1b6d2de4d | |||
| b9b34c9bae | |||
| 5bd61be8a6 | |||
| e24ac8c25f | |||
| cbb204cf37 | |||
| 5c3998f7ac | |||
| e8e20936e0 | |||
| 8a369831dc | |||
| bdc3f51807 | |||
| 00cf228d4e | |||
| 588dac2776 | |||
| e732cf1db3 | |||
| 27475ae7f8 | |||
| 5775310ea8 | |||
| b27deb794f | |||
| c57f3ae4cd | |||
| ca98796799 | |||
| 8c6903b552 | |||
| 12f0318b5c | |||
| 86b8b208ef | |||
| f3535a6456 | |||
| 49e42c56b3 | |||
| 6994aa94d0 | |||
| 3036fbd107 | |||
| 711979985e | |||
| 9b2e6eee39 | |||
| f4d184eb41 | |||
| 889394c7f3 | |||
| 8d3cd5bb85 | |||
| 3b0b01f5f0 | |||
| f0aba80b81 | |||
| 3b7bd5c4b8 | |||
| 54934084cb | |||
| 4174161a66 | |||
| bb9bd717c4 | |||
| 814b4abddd | |||
| 9b1f65b824 | |||
| 15f7626ed2 | |||
| 8ff3aa697c | |||
| f9d1070da7 | |||
| ea963c581c | |||
| 2867d4b347 | |||
| 8c95ed33a5 | |||
| 1daceab8ee | |||
| 89a569da5a | |||
| ae823ccb10 | |||
| c8a25fb409 | |||
| 44f50623e7 | |||
| 01dba2a574 | |||
| 5524796509 | |||
| 280555ea44 | |||
| b64ba23863 | |||
| a465b313bc | |||
| 8eeb921ef3 | |||
| 466ba3741c | |||
| fa6f3d523e | |||
| 9069749c44 | |||
| e9d0574f88 | |||
| 7f45cf4ee8 | |||
| 1d330d222c | |||
| 75669c545a | |||
| c29e7a0e85 | |||
| 22e58c9a4e | |||
| 4640b135a1 | |||
| 0d04423ca9 | |||
| af0d90d23c | |||
| 6d820a5e74 | |||
| 1df764065e | |||
| 8836b924d7 | |||
| f2fd54744b | |||
| e2909848ec | |||
| a2e2f8ba55 | |||
| 841e736cf9 | |||
| 832560d8dc | |||
| c23466d98d | |||
| 511cdc1227 | |||
| fbcb9a102e | |||
| 2214c67706 | |||
| 207e0b791d | |||
| 090c3d246c | |||
| d111e24a7b | |||
| 2ffe5007c1 | |||
| 3fb99d39b3 | |||
| a09c879f8d | |||
| 3028fe28a3 | |||
| 6b81f958fd | |||
| 14f535cea8 | |||
| e7f186e12a | |||
| 2a90f82f3a | |||
| c54780e088 | |||
| 97eb86d6d9 | |||
| 60ad4487ac | |||
| 9f6e618ee4 | |||
| fb5db21898 | |||
| c91b8f1031 | |||
| 6b390c0191 | |||
| 087fb97c0b | |||
| 5322748f51 | |||
| 156166b3dc | |||
| ae9c90a25e | |||
| 649c4bc725 | |||
| 402d6779e8 | |||
| 29b191ff05 | |||
| 932bf79fbe | |||
| 703d775e99 | |||
| 588b447ab2 | |||
| 4f8cca62fe | |||
| d5546516fd | |||
| 98b44c7a76 | |||
| 22d1af00ef | |||
| 81e21925b2 | |||
| 0efbf3484b | |||
| 1fdd09aa4f | |||
| b29df78420 | |||
| 53f5d4aa89 | |||
| 72df151885 | |||
| e48c9045e7 | |||
| 077a368386 | |||
| 96be374566 | |||
| eac73269de | |||
| 12e6c4b7e1 | |||
| 90dee6d775 | |||
| 425feb7909 | |||
| 45cdda60c3 | |||
| 464b5d8c53 | |||
| 4629de77f9 | |||
| 48b6f77901 | |||
| 54f1cae1aa | |||
| d07d61d050 | |||
| 30db52f617 | |||
| 6891ad6174 | |||
| 609e502a4d | |||
| bb576eec63 | |||
| 037880acf0 | |||
| b1fdb7be39 | |||
| c25e5d31f0 | |||
| 257b49ff3a | |||
| f285009182 | |||
| 5cc4fd64a1 | |||
| ef1ae9a562 | |||
| 20dc7e5eb3 | |||
| 2a97b50917 | |||
| bc696a05c4 | |||
| e302c2ad62 | |||
| c98f1d2b83 | |||
| 77cb7334bc | |||
| 60d25f62aa | |||
| 24215c9383 | |||
| 7a3c77d119 | |||
| 1c86b51175 | |||
| 3a1fbb2859 | |||
| 50fe062e72 | |||
| e6e98c6f41 | |||
| 69dc800a89 | |||
| 766820a881 | |||
| 08f3fce3d2 | |||
| ad04219074 | |||
| 3fdb9236ae | |||
| 1f1573c0db | |||
| 3498c5e24c | |||
| a05f3050d4 | |||
| 8f297ce5f1 | |||
| 728e5e0b88 | |||
| 16b6fe8a62 | |||
| 79706e3489 | |||
| 05516c5eff | |||
| f55091310d | |||
| bfad014ce4 | |||
| 1ca3201ddd | |||
| 5429223c34 | |||
| ad140a9ae8 | |||
| 7c8e4475c5 | |||
| c5fb0cddb4 | |||
| 3c741ac051 | |||
| 7e75d7f61c | |||
| d605c8f1af | |||
| c1d41e3a78 | |||
| b8ab9a002e | |||
| 87dee63bf6 | |||
| a16b4a54d5 | |||
| e5497b423e | |||
| 71385f87d9 | |||
| bb90368eef | |||
| d4c784bd1a | |||
| d88cefbdef | |||
| 775d291fec | |||
| b9313ff1d9 | |||
| a3ae45e3f2 | |||
| 9d5951b9ae | |||
| 8d435710df | |||
| 84a3aa0b49 | |||
| 1191c64e0e | |||
| 35b6014ea4 | |||
| 8435f57a83 | |||
| 79fcc13a3a | |||
| edad2f4de7 | |||
| a27d9183d0 | |||
| c1a7591040 | |||
| 6e08fd91e9 | |||
| 8a32c2fb24 | |||
| 4d19b114f8 | |||
| 075c48324f | |||
| fbf39a76ee | |||
| 11ef81ef89 | |||
| 10600fd307 | |||
| d26bc4f048 | |||
| df7be71e9a | |||
| 90a827bcd5 | |||
| 953375d0aa | |||
| 53e8d5c28a | |||
| 5ffbbc5531 | |||
| 1b363a7793 | |||
| 5dd655eb4a | |||
| a618d3db32 | |||
| c97a29aa02 | |||
| 331932ecc1 | |||
| c6f59b8144 | |||
| 52ee233378 | |||
| fab154eace | |||
| e532e9f9c3 | |||
| 0b6112fadb | |||
| ce07604bd6 | |||
| f9f24b6a36 | |||
| fc73078f54 | |||
| e17f4f3598 | |||
| c6e360caf6 | |||
| 5abb96d8fc | |||
| a7ec32c81d | |||
| 26d7a4ab9b | |||
| f4dda8db33 | |||
| 2dfa05fbcb | |||
| 9063ad413a | |||
| 966cce804e | |||
| 6ff68089bd | |||
| a1004924ce | |||
| 0a923be2de | |||
| 8f4d70a836 | |||
| 0b78b48d8d | |||
| 83268109c6 | |||
| 055dd39982 | |||
| 850fa94c3d | |||
| 133a5a8c76 | |||
| aa08660ca6 | |||
| 93cce0fcf8 | |||
| 2fa378ca42 | |||
| 0092484cdd | |||
| 07c9e23c23 | |||
| f9fe673c42 |
+8
-1
@@ -14,10 +14,12 @@ ehthumbs_vista.db
|
||||
*.pyc
|
||||
*.pyo
|
||||
*.pyi
|
||||
*.egg-info
|
||||
|
||||
# Editor files.
|
||||
# Editor/tool files.
|
||||
*~
|
||||
*.bak
|
||||
.gdb_history
|
||||
|
||||
# Compiled Ren'Py files.
|
||||
*.rpyc
|
||||
@@ -64,6 +66,8 @@ cache/
|
||||
/renios3
|
||||
|
||||
/web
|
||||
/web2
|
||||
/web3
|
||||
|
||||
# Docs.
|
||||
/sphinx/source/inc
|
||||
@@ -103,6 +107,9 @@ cache/
|
||||
steam_appid.txt
|
||||
/steamapi.py
|
||||
|
||||
# Android.
|
||||
*.keystore
|
||||
|
||||
# Type analysis.
|
||||
/typings
|
||||
|
||||
|
||||
Vendored
-8
@@ -44,11 +44,6 @@
|
||||
|
||||
"python.languageServer": "Pylance",
|
||||
"python.analysis.typeCheckingMode": "basic",
|
||||
"python.analysis.extraPaths": [
|
||||
"",
|
||||
"/home/tom/.vscode/extensions/joedevivo.vscode-circuitpython-0.1.17-linux-x64/stubs",
|
||||
"/home/tom/.config/Code/User/globalStorage/joedevivo.vscode-circuitpython/bundle/20220710/adafruit-circuitpython-bundle-py-20220710/lib"
|
||||
],
|
||||
"python.analysis.diagnosticMode": "workspace",
|
||||
"python.linting.pylintEnabled": false,
|
||||
"python.analysis.diagnosticSeverityOverrides": {
|
||||
@@ -56,12 +51,9 @@
|
||||
},
|
||||
"esbonio.server.enabled": true,
|
||||
"esbonio.sphinx.confDir": "",
|
||||
"circuitpython.board.version": null,
|
||||
|
||||
"renpy.excludeCompiledFilesFromWorkspace": true,
|
||||
"renpy.watchFoldersForChanges": false,
|
||||
"renpy.warnOnInvalidVariableNames": "Disabled",
|
||||
"renpy.warnOnInvalidFilenameIssues": "Disabled",
|
||||
"renpy.warnOnIndentationAndSpacingIssues": "Disabled",
|
||||
|
||||
}
|
||||
|
||||
+13
-8
@@ -49,29 +49,34 @@ Building the modules requires you have the many dependencies installed on
|
||||
your system. On Ubuntu and Debian, these dependencies can be installed with
|
||||
the command::
|
||||
|
||||
apt-get install virtualenvwrapper python-dev libavcodec-dev libavformat-dev \
|
||||
libavresample-dev libswresample-dev libswscale-dev libfreetype6-dev libglew1.6-dev \
|
||||
libfribidi-dev libsdl2-dev libsdl2-image-dev libsdl2-gfx-dev \
|
||||
libsdl2-mixer-dev libsdl2-ttf-dev libjpeg-dev
|
||||
sudo apt install virtualenvwrapper python3-dev libavcodec-dev libavformat-dev \
|
||||
libswresample-dev libswscale-dev libfreetype6-dev libfribidi-dev libsdl2-dev \
|
||||
libsdl2-image-dev libsdl2-gfx-dev libsdl2-mixer-dev libsdl2-ttf-dev libjpeg-dev
|
||||
|
||||
Ren'Py requires SDL_image 2.6 or greater. If your distribution doesn't include
|
||||
that version, you'll need to download it from:
|
||||
|
||||
https://github.com/libsdl-org/SDL_image/tree/SDL2
|
||||
|
||||
We strongly suggest installing the Ren'Py modules into a Python
|
||||
virtualenv. To create a new virtualenv, open a new terminal and run::
|
||||
|
||||
. /usr/share/virtualenvwrapper/virtualenvwrapper.sh
|
||||
mkvirtualenv renpy
|
||||
|
||||
To return to this virtualenv later, run::
|
||||
|
||||
. /usr/share/virtualenvwrapper/virtualenvwrapper.sh
|
||||
workon renpy
|
||||
|
||||
After activating the virtualenv, install additional dependencies::
|
||||
|
||||
pip install -U cython future six typing pefile requests
|
||||
pip install -U cython future six typing pefile requests ecdsa
|
||||
|
||||
Then, install pygame_sdl2 by running the following commands::
|
||||
|
||||
git clone https://www.github.com/renpy/pygame_sdl2
|
||||
pushd pygame_sdl2
|
||||
python fix_virtualenv.py $VIRTUAL_ENV
|
||||
python setup.py install
|
||||
python setup.py install_headers
|
||||
popd
|
||||
@@ -80,7 +85,7 @@ Next, set RENPY_DEPS_INSTALL To a \:-separated (\;-separated on Windows)
|
||||
list of paths containing the dependencies, and RENPY_CYTHON to the name
|
||||
of the cython command::
|
||||
|
||||
export RENPY_DEPS_INSTALL="/usr:/usr/lib/$(uname -m)-linux-gnu/"
|
||||
export RENPY_DEPS_INSTALL="/usr:/usr/lib/$(gcc -dumpmachine)/"
|
||||
export RENPY_CYTHON=cython
|
||||
|
||||
Finally, use setup.py in the Ren'Py ``module`` directory to compile and
|
||||
@@ -93,7 +98,7 @@ install the modules that support Ren'Py::
|
||||
Ren'Py will be installed into the activated virtualenv. It can then be run
|
||||
using the command::
|
||||
|
||||
python -O renpy.py
|
||||
python renpy.py
|
||||
|
||||
|
||||
Documentation
|
||||
|
||||
+27
-9
@@ -17,13 +17,34 @@ import time
|
||||
import collections
|
||||
|
||||
try:
|
||||
# reload is built-in in Python 2, in importlib in Python 3
|
||||
reload # type: ignore
|
||||
except NameError:
|
||||
from importlib import reload
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
|
||||
ROOT = os.path.dirname(os.path.abspath(__file__))
|
||||
|
||||
|
||||
def zip_rapt_symbols(destination):
|
||||
"""
|
||||
Zips up the rapt symbols.
|
||||
"""
|
||||
|
||||
import zipfile
|
||||
|
||||
if PY2:
|
||||
zf = zipfile.ZipFile(destination + "/android-native-symbols.zip", "w", zipfile.ZIP_DEFLATED)
|
||||
else:
|
||||
zf = zipfile.ZipFile(destination + "/android-native-symbols.zip", "w", zipfile.ZIP_DEFLATED, compresslevel=3)
|
||||
|
||||
for dn, dirs, files in os.walk("rapt/symbols"):
|
||||
for fn in dirs + files:
|
||||
fn = os.path.join(dn, fn)
|
||||
arcname = os.path.relpath(fn, "rapt/symbols")
|
||||
zf.write(fn, arcname)
|
||||
|
||||
zf.close()
|
||||
|
||||
def copy_tutorial_file(src, dest):
|
||||
"""
|
||||
Copies a file from src to dst. Lines between "# tutorial-only" and
|
||||
@@ -78,6 +99,7 @@ def main():
|
||||
|
||||
link_directory("rapt")
|
||||
link_directory("renios")
|
||||
link_directory("web")
|
||||
|
||||
if args.link_directories:
|
||||
return
|
||||
@@ -108,7 +130,7 @@ def main():
|
||||
|
||||
commits_per_day = collections.defaultdict(int)
|
||||
|
||||
for i in subprocess.check_output([ "git", "log", "-99", "--pretty=%cd", "--date=format:%Y%m%d", "--follow", "HEAD", "--", "." ]).decode("utf-8").split():
|
||||
for i in subprocess.check_output([ "git", "log", "-99", "--pretty=%cd", "--date=format:%Y%m%d" ]).decode("utf-8").split():
|
||||
commits_per_day[i[2:]] += 1
|
||||
|
||||
if dirty:
|
||||
@@ -166,11 +188,6 @@ def main():
|
||||
else:
|
||||
renpy_sh = "./renpy2.sh"
|
||||
|
||||
# Perhaps autobuild.
|
||||
if "RENPY_BUILD_ALL" in os.environ:
|
||||
print("Autobuild...")
|
||||
subprocess.check_call(["scripts/autobuild.sh"])
|
||||
|
||||
# Compile all the python files.
|
||||
compileall.compile_dir("renpy/", ddir="renpy/", force=True, quiet=1)
|
||||
|
||||
@@ -201,6 +218,7 @@ def main():
|
||||
if not os.path.exists(destination):
|
||||
os.makedirs(destination)
|
||||
|
||||
zip_rapt_symbols(destination)
|
||||
|
||||
if args.fast:
|
||||
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"start_a170b500": {
|
||||
"area": [
|
||||
53,
|
||||
120,
|
||||
426,
|
||||
120
|
||||
]
|
||||
},
|
||||
"start_f41f55d7": {
|
||||
"area": [
|
||||
106,
|
||||
60,
|
||||
426,
|
||||
120
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -11,6 +11,8 @@ init offset = -2
|
||||
init python:
|
||||
gui.init(1280, 720)
|
||||
|
||||
## Enable checks for invalid or unstable properties in screens or transforms
|
||||
define config.check_conflicting_properties = True
|
||||
|
||||
|
||||
################################################################################
|
||||
@@ -399,6 +401,7 @@ define gui.nvl_thought_xalign = 0.0
|
||||
define gui.nvl_button_xpos = gui.scale(450)
|
||||
define gui.nvl_button_xalign = 0.0
|
||||
|
||||
|
||||
## Localization ################################################################
|
||||
|
||||
## This controls where a line break is permitted. The default is suitable for
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.7 KiB |
@@ -200,9 +200,9 @@ init python:
|
||||
build.documentation('*.txt')
|
||||
|
||||
|
||||
## A Google Play license key is required to download expansion files and
|
||||
## perform in-app purchases. It can be found on the "Services & APIs" page
|
||||
## of the Google Play developer console.
|
||||
## A Google Play license key is required to perform in-app purchases.
|
||||
## It can be found in the Google Play developer console,
|
||||
## under "Monetize" > "Monetization Setup" > "Licensing".
|
||||
|
||||
# define build.google_play_key = "..."
|
||||
|
||||
|
||||
+88
-19
@@ -646,27 +646,40 @@ screen file_slots(title):
|
||||
key "save_delete" action FileDelete(slot)
|
||||
|
||||
## Buttons to access other pages.
|
||||
hbox:
|
||||
vbox:
|
||||
style_prefix "page"
|
||||
|
||||
xalign 0.5
|
||||
yalign 1.0
|
||||
|
||||
spacing gui.page_spacing
|
||||
hbox:
|
||||
xalign 0.5
|
||||
|
||||
textbutton _("<") action FilePagePrevious()
|
||||
spacing gui.page_spacing
|
||||
|
||||
if config.has_autosave:
|
||||
textbutton _("{#auto_page}A") action FilePage("auto")
|
||||
textbutton _("<") action FilePagePrevious()
|
||||
|
||||
if config.has_quicksave:
|
||||
textbutton _("{#quick_page}Q") action FilePage("quick")
|
||||
if config.has_autosave:
|
||||
textbutton _("{#auto_page}A") action FilePage("auto")
|
||||
|
||||
## range(1, 10) gives the numbers from 1 to 9.
|
||||
for page in range(1, 10):
|
||||
textbutton "[page]" action FilePage(page)
|
||||
if config.has_quicksave:
|
||||
textbutton _("{#quick_page}Q") action FilePage("quick")
|
||||
|
||||
textbutton _(">") action FilePageNext()
|
||||
## range(1, 10) gives the numbers from 1 to 9.
|
||||
for page in range(1, 10):
|
||||
textbutton "[page]" action FilePage(page)
|
||||
|
||||
textbutton _(">") action FilePageNext()
|
||||
|
||||
if config.has_sync:
|
||||
if CurrentScreenName() == "save":
|
||||
textbutton _("Upload Sync"):
|
||||
action UploadSync()
|
||||
xalign 0.5
|
||||
else:
|
||||
textbutton _("Download Sync"):
|
||||
action DownloadSync()
|
||||
xalign 0.5
|
||||
|
||||
|
||||
style page_label is gui_label
|
||||
@@ -684,7 +697,7 @@ style page_label:
|
||||
ypadding gui.scale(3)
|
||||
|
||||
style page_label_text:
|
||||
text_align 0.5
|
||||
textalign 0.5
|
||||
layout "subtitle"
|
||||
hover_color gui.hover_color
|
||||
|
||||
@@ -932,7 +945,7 @@ style history_name:
|
||||
|
||||
style history_name_text:
|
||||
min_width gui.history_name_width
|
||||
text_align gui.history_name_xalign
|
||||
textalign gui.history_name_xalign
|
||||
|
||||
style history_text:
|
||||
xpos gui.history_text_xpos
|
||||
@@ -940,7 +953,7 @@ style history_text:
|
||||
xanchor gui.history_text_xalign
|
||||
xsize gui.history_text_width
|
||||
min_width gui.history_text_width
|
||||
text_align gui.history_text_xalign
|
||||
textalign gui.history_text_xalign
|
||||
layout ("subtitle" if gui.history_text_xalign else "tex")
|
||||
|
||||
style history_label:
|
||||
@@ -1109,7 +1122,7 @@ style help_label:
|
||||
style help_label_text:
|
||||
size gui.text_size
|
||||
xalign 1.0
|
||||
text_align 1.0
|
||||
textalign 1.0
|
||||
|
||||
|
||||
|
||||
@@ -1171,7 +1184,7 @@ style confirm_frame:
|
||||
yalign .5
|
||||
|
||||
style confirm_prompt_text:
|
||||
text_align 0.5
|
||||
textalign 0.5
|
||||
layout "subtitle"
|
||||
|
||||
style confirm_button:
|
||||
@@ -1365,7 +1378,7 @@ style nvl_label:
|
||||
yanchor 0.0
|
||||
xsize gui.nvl_name_width
|
||||
min_width gui.nvl_name_width
|
||||
text_align gui.nvl_name_xalign
|
||||
textalign gui.nvl_name_xalign
|
||||
|
||||
style nvl_dialogue:
|
||||
xpos gui.nvl_text_xpos
|
||||
@@ -1373,7 +1386,7 @@ style nvl_dialogue:
|
||||
ypos gui.nvl_text_ypos
|
||||
xsize gui.nvl_text_width
|
||||
min_width gui.nvl_text_width
|
||||
text_align gui.nvl_text_xalign
|
||||
textalign gui.nvl_text_xalign
|
||||
layout ("subtitle" if gui.nvl_text_xalign else "tex")
|
||||
|
||||
style nvl_thought:
|
||||
@@ -1382,7 +1395,7 @@ style nvl_thought:
|
||||
ypos gui.nvl_thought_ypos
|
||||
xsize gui.nvl_thought_width
|
||||
min_width gui.nvl_thought_width
|
||||
text_align gui.nvl_thought_xalign
|
||||
textalign gui.nvl_thought_xalign
|
||||
layout ("subtitle" if gui.nvl_text_xalign else "tex")
|
||||
|
||||
style nvl_button:
|
||||
@@ -1394,6 +1407,62 @@ style nvl_button_text:
|
||||
properties gui.button_text_properties("nvl_button")
|
||||
|
||||
|
||||
## Bubble screen ###############################################################
|
||||
##
|
||||
## The Bubble screen is used to display dialogue to the player when using
|
||||
## speech bubbles. The Bubble screen takes the same parameters as the say
|
||||
## screen, must create a displayable with the id of "what", and can create
|
||||
## displayables with the "namebox", "who", and "window" ids.
|
||||
##
|
||||
## https://www.renpy.org/doc/html/screen_special.html#bubble
|
||||
|
||||
screen bubble(who, what):
|
||||
style_prefix "bubble"
|
||||
|
||||
window:
|
||||
id "window"
|
||||
|
||||
if who is not None:
|
||||
|
||||
window:
|
||||
id "namebox"
|
||||
style "bubble_namebox"
|
||||
|
||||
text who:
|
||||
id "who"
|
||||
|
||||
text what:
|
||||
id "what"
|
||||
|
||||
|
||||
style bubble_window is empty
|
||||
style bubble_namebox is empty
|
||||
style bubble_who is default
|
||||
style bubble_what is default
|
||||
|
||||
|
||||
style bubble_window:
|
||||
background Frame("gui/bubble.png", 15, 15, 15, 15)
|
||||
padding (15, 10)
|
||||
|
||||
style bubble_namebox:
|
||||
background Frame("gui/bubble.png", 15, 15, 15, 15)
|
||||
pos (-15, -5)
|
||||
anchor (0.0, 1.0)
|
||||
padding (15, 10)
|
||||
|
||||
style bubble_who:
|
||||
xalign 0.5
|
||||
textalign 0.5
|
||||
color "#000"
|
||||
|
||||
style bubble_what:
|
||||
align (0.5, 0.5)
|
||||
textalign 0.5
|
||||
layout "subtitle"
|
||||
color "#000"
|
||||
|
||||
|
||||
|
||||
################################################################################
|
||||
## Mobile Variants
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
+32
-30
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
@@ -34,19 +34,18 @@ init python:
|
||||
NO_RAPT_TEXT = _("To build Android packages, please download RAPT, unzip it, and place it into the Ren'Py directory. Then restart the Ren'Py launcher.")
|
||||
NO_JDK_TEXT = _("A 64-bit/x64 Java 8 Development Kit is required to build Android packages on Windows. The JDK is different from the JRE, so it's possible you have Java without having the JDK.\n\nPlease {a=https://adoptopenjdk.net/?variant=openjdk8&jvmVariant=hotspot}download and install the JDK{/a}, then restart the Ren'Py launcher.")
|
||||
NO_SDK_TEXT = _("RAPT has been installed, but you'll need to install the Android SDK before you can build Android packages. Choose Install SDK to do this.")
|
||||
NO_KEY_TEXT = _("RAPT has been installed, but a key hasn't been configured. Please create a new key, or restore android.keystore.")
|
||||
NO_BUNDLE_KEY_TEXT = _("RAPT has been installed, but a bundle key hasn't been configured. Please create a new key, or restore bundle.keystore.")
|
||||
NO_KEY_TEXT = _("RAPT has been installed, but a key hasn't been configured. Please generate new keys, or copy android.keystore and bundle.keystore to the base directory.")
|
||||
NO_CONFIG_TEXT = _("The current project has not been configured. Use \"Configure\" to configure it before building.")
|
||||
NO_BUNDLE_TEXT = _("Please select if you want a Play Bundle (for Google Play), or a Universal APK (for sideloading and other app stores).")
|
||||
OK_TEXT = _("Choose \"Build\" to build the current project, or attach an Android device and choose \"Build & Install\" to build and install it on the device.")
|
||||
|
||||
PHONE_TEXT = _("Attempts to emulate an Android phone.\n\nTouch input is emulated through the mouse, but only when the button is held down. Escape is mapped to the menu button, and PageUp is mapped to the back button.")
|
||||
TABLET_TEXT = _("Attempts to emulate an Android tablet.\n\nTouch input is emulated through the mouse, but only when the button is held down. Escape is mapped to the menu button, and PageUp is mapped to the back button.")
|
||||
OUYA_TEXT = _("Attempts to emulate a televison-based Android console, like the OUYA or Fire TV.\n\nController input is mapped to the arrow keys, Enter is mapped to the select button, Escape is mapped to the menu button, and PageUp is mapped to the back button.")
|
||||
OUYA_TEXT = _("Attempts to emulate a televison-based Android console.\n\nController input is mapped to the arrow keys, Enter is mapped to the select button, Escape is mapped to the menu button, and PageUp is mapped to the back button.")
|
||||
|
||||
INSTALL_SDK_TEXT = _("Downloads and installs the Android SDK and supporting packages. Optionally, generates the keys required to sign the package.")
|
||||
INSTALL_SDK_TEXT = _("Downloads and installs the Android SDK and supporting packages.")
|
||||
GENERATE_KEYS_TEXT = _("Generates the keys required to sign the package.")
|
||||
CONFIGURE_TEXT = _("Configures the package name, version, and other information about this project.")
|
||||
PLAY_KEYS_TEXT = _("Opens the file containing the Google Play keys in the editor.\n\nThis is only needed if the application is using an expansion APK. Read the documentation for more details.")
|
||||
BUILD_TEXT = _("Builds the Android package.")
|
||||
BUILD_AND_INSTALL_TEXT = _("Builds the Android package, and installs it on an Android device connected to your computer.")
|
||||
BUILD_INSTALL_AND_LAUNCH_TEXT = _("Builds the Android package, installs it on an Android device connected to your computer, then launches the app on your device.")
|
||||
@@ -62,7 +61,6 @@ init python:
|
||||
PLAY_BUNDLE_TEXT = _("Builds an Android App Bundle (ABB), intended to be uploaded to Google Play. This can include up to 2GB of data.")
|
||||
UNIVERSAL_APK_TEXT = _("Builds a Universal APK package, intended for sideloading and stores other than Google Play. This can include up to 2GB of data.")
|
||||
|
||||
|
||||
import subprocess
|
||||
import re
|
||||
import os
|
||||
@@ -94,6 +92,7 @@ init python:
|
||||
import rapt.install_sdk
|
||||
import rapt.plat
|
||||
import rapt.interface
|
||||
import rapt.keys
|
||||
|
||||
rapt.plat.renpy = True
|
||||
rapt.plat.translate = __
|
||||
@@ -112,11 +111,12 @@ init python:
|
||||
return ANDROID_NO_JDK
|
||||
if not os.path.exists(rapt.plat.adb):
|
||||
return ANDROID_NO_SDK
|
||||
if not os.path.exists(rapt.plat.path("project/local.properties")):
|
||||
if not rapt.keys.keys_exist(project.current.path):
|
||||
return ANDROID_NO_KEY
|
||||
if not os.path.exists(rapt.plat.path("project/bundle.properties")):
|
||||
return ANDROID_NO_BUNDLE_KEY
|
||||
if not os.path.exists(os.path.join(project.current.path, ".android.json")):
|
||||
if not any([
|
||||
os.path.exists(os.path.join(project.current.path, "android.json")),
|
||||
os.path.exists(os.path.join(project.current.path, ".android.json"))
|
||||
]):
|
||||
return ANDROID_NO_CONFIG
|
||||
if persistent.android_bundle is None:
|
||||
return ANDROID_NO_BUNDLE
|
||||
@@ -137,8 +137,6 @@ init python:
|
||||
return NO_SDK_TEXT
|
||||
if state == ANDROID_NO_KEY:
|
||||
return NO_KEY_TEXT
|
||||
if state == ANDROID_NO_BUNDLE_KEY:
|
||||
return NO_BUNDLE_KEY_TEXT
|
||||
if state == ANDROID_NO_CONFIG:
|
||||
return NO_CONFIG_TEXT
|
||||
if state == ANDROID_NO_BUNDLE:
|
||||
@@ -181,31 +179,23 @@ init python:
|
||||
|
||||
build = p.dump["build"]
|
||||
|
||||
filename = os.path.join(p.path, ".android.json")
|
||||
|
||||
with open(filename, "r") as f:
|
||||
android_json = json.load(f)
|
||||
|
||||
old_android_json = dict(android_json)
|
||||
c = rapt.configure.Configuration(p.path)
|
||||
|
||||
if "google_play_key" in build:
|
||||
android_json["google_play_key"] = build["google_play_key"]
|
||||
c.google_play_key = build["google_play_key"]
|
||||
else:
|
||||
android_json.pop("google_play_key", None)
|
||||
c.google_play_key = None
|
||||
|
||||
if "google_play_salt" in build:
|
||||
|
||||
if len(build["google_play_salt"]) != 20:
|
||||
raise Exception("build.google_play_salt must be exactly 20 bytes long.")
|
||||
|
||||
android_json["google_play_salt"] = ", ".join(str(i) for i in build["google_play_salt"])
|
||||
c.google_play_salt = ", ".join(str(i) for i in build["google_play_salt"])
|
||||
else:
|
||||
android_json.pop("google_play_salt", None)
|
||||
c.google_play_salt = None
|
||||
|
||||
if android_json != old_android_json:
|
||||
|
||||
with open(filename, "w") as f:
|
||||
json.dump(android_json, f)
|
||||
c.save(p.path)
|
||||
|
||||
|
||||
def android_build(p=None, gui=True, bundle=False, install=False, launch=False, destination=None, opendir=False):
|
||||
@@ -288,7 +278,7 @@ init python:
|
||||
|
||||
|
||||
with interface.nolinks():
|
||||
rapt.build.build(rapt_interface, dist, bundle=bundle, install=install, launch=launch, finished=finished, permissions=p.dump['build']['android_permissions'])
|
||||
rapt.build.build(rapt_interface, dist, p.path, bundle=bundle, install=install, launch=launch, finished=finished, permissions=p.dump['build']['android_permissions'])
|
||||
|
||||
|
||||
def android_build_argument(cmd):
|
||||
@@ -388,12 +378,16 @@ screen android:
|
||||
frame style "l_indent":
|
||||
|
||||
has vbox
|
||||
textbutton _("Install SDK & Create Keys"):
|
||||
textbutton _("Install SDK"):
|
||||
action AndroidIfState(state, ANDROID_NO_SDK, Jump("android_installsdk"))
|
||||
hovered tt.Action(INSTALL_SDK_TEXT)
|
||||
|
||||
textbutton _("Generate Keys"):
|
||||
action AndroidIfState(state, ANDROID_NO_KEY, Jump("android_keys"))
|
||||
hovered tt.Action(GENERATE_KEYS_TEXT)
|
||||
|
||||
textbutton _("Configure"):
|
||||
action AndroidIfState(state, ANDROID_NO_CONFIG, Jump("android_configure"))
|
||||
action AndroidIfState(state, ANDROID_NO_KEY, Jump("android_configure"))
|
||||
hovered tt.Action(CONFIGURE_TEXT)
|
||||
|
||||
add SPACER
|
||||
@@ -509,6 +503,14 @@ label android_installsdk:
|
||||
jump android
|
||||
|
||||
|
||||
label android_keys:
|
||||
|
||||
python:
|
||||
rapt.keys.generate_keys(MobileInterface("android"), project.current.path)
|
||||
|
||||
jump android
|
||||
|
||||
|
||||
label android_configure:
|
||||
|
||||
python:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
|
||||
|
||||
# This file contains strings used by RAPT, so the Ren'Py translation framework
|
||||
# can find them. It's automatically generated by rapt/update_translations.py, and
|
||||
# hence should not be changed by hand.
|
||||
@@ -29,12 +29,17 @@ init python hide:
|
||||
__("{} is a Java keyword, and can't be used as part of a package name.")
|
||||
__("What is the application's version?\n\nThis should be the human-readable version that you would present to a person. It must contain only numbers and dots.")
|
||||
__("The version number must contain only numbers and dots.")
|
||||
__("How much RAM do you want to allocate to Gradle?\n\nThis must be a positive integer number.")
|
||||
__("The RAM size must contain only numbers.")
|
||||
__("How much RAM (in GB) do you want to allocate to Gradle?\nThis must be a positive integer number.")
|
||||
__("The RAM size must contain only numbers and be positive.")
|
||||
__("How would you like your application to be displayed?")
|
||||
__("In landscape orientation.")
|
||||
__("In portrait orientation.")
|
||||
__("In the user's preferred orientation.")
|
||||
__("Which app store would you like to support in-app purchasing through?")
|
||||
__("Google Play.")
|
||||
__("Amazon App Store.")
|
||||
__("Both, in one app.")
|
||||
__("Neither.")
|
||||
__("Do you want to automatically update the Java source code?")
|
||||
__("Yes. This is the best choice for most projects.")
|
||||
__("No. This may require manual updates when Ren'Py or the project configuration changes.")
|
||||
@@ -53,11 +58,14 @@ init python hide:
|
||||
__("I was unable to accept the Android licenses.")
|
||||
__("I was unable to install the required Android packages.")
|
||||
__("I've finished installing the required Android packages.")
|
||||
__("It looks like you're ready to start packaging games.")
|
||||
__("Please enter your name or the name of your organization.")
|
||||
__("I found an android.keystore file in the rapt directory. Do you want to use this file?")
|
||||
__("I can create an application signing key for you. This key is required to create Universal APK for sideloading and stores other than Google Play.\n\nDo you want to create a key?")
|
||||
__("I will create the key in the android.keystore file.\n\nYou need to back this file up. If you lose it, you will not be able to upgrade your application.\n\nYou also need to keep the key safe. If evil people get this file, they could make fake versions of your application, and potentially steal your users' data.\n\nWill you make a backup of android.keystore, and keep it in a safe place?")
|
||||
__("Could not create android.keystore. Is keytool in your path?")
|
||||
__("I've finished creating android.keystore. Please back it up, and keep it in a safe place.")
|
||||
__("I found a bundle.keystore file in the rapt directory. Do you want to use this file?")
|
||||
__("I can create a bundle signing key for you. This key is required to build an Android App Bundle (AAB) for upload to Google Play.\n\nDo you want to create a key?")
|
||||
__("I will create the key in the bundle.keystore file.\n\nYou need to back this file up. If you lose it, you will not be able to upgrade your application.\n\nYou also need to keep the key safe. If evil people get this file, they could make fake versions of your application, and potentially steal your users' data.\n\nWill you make a backup of bundle.keystore, and keep it in a safe place?")
|
||||
__("Could not create bundle.keystore. Is keytool in your path?")
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
@@ -368,13 +368,15 @@ change_renpy_executable()
|
||||
duplicate is set.
|
||||
"""
|
||||
|
||||
prefix = py("lib/py{major}-mac-universal")
|
||||
|
||||
for f in list(self):
|
||||
|
||||
if f.name.startswith("lib/python") and (not duplicate):
|
||||
name = app + "/Contents/Resources/" + f.name
|
||||
|
||||
elif f.name.startswith(py("lib/py{major}-mac-x86_64")):
|
||||
name = app + "/Contents/MacOS/" + f.name[19:]
|
||||
elif f.name.startswith(prefix):
|
||||
name = app + "/Contents/MacOS/" + f.name[len(prefix)+1:]
|
||||
|
||||
else:
|
||||
continue
|
||||
@@ -399,7 +401,10 @@ change_renpy_executable()
|
||||
for f in sorted(self, key=lambda a : a.name):
|
||||
f.hash(sha, distributor)
|
||||
|
||||
return sha.hexdigest()
|
||||
if PY2:
|
||||
return sha.hexdigest().decode("utf-8")
|
||||
else:
|
||||
return sha.hexdigest()
|
||||
|
||||
def split_by_prefix(self, prefix):
|
||||
"""
|
||||
@@ -436,7 +441,7 @@ change_renpy_executable()
|
||||
This manages the process of building distributions.
|
||||
"""
|
||||
|
||||
def __init__(self, project, destination=None, reporter=None, packages=None, build_update=True, open_directory=False, noarchive=False, packagedest=None, report_success=True, scan=True, macapp=None, force_format=None):
|
||||
def __init__(self, project, destination=None, reporter=None, packages=None, build_update=True, open_directory=False, noarchive=False, packagedest=None, report_success=True, scan=True, macapp=None, force_format=None, files_filter=None):
|
||||
"""
|
||||
Distributes `project`.
|
||||
|
||||
@@ -474,6 +479,11 @@ change_renpy_executable()
|
||||
|
||||
`force_format`
|
||||
If given, forces the format of the distribution to be this.
|
||||
|
||||
`files_filter`
|
||||
If given, use this object to decide which files must be included.
|
||||
The object must contains the `filter(file, variant, format)`
|
||||
method which must return True is the file must be included.
|
||||
"""
|
||||
|
||||
# A map from a package to a unique update version hash.
|
||||
@@ -646,6 +656,8 @@ change_renpy_executable()
|
||||
# The time of the update version.
|
||||
self.update_version = int(time.time())
|
||||
|
||||
self.files_filter = files_filter
|
||||
|
||||
for p in build_packages:
|
||||
|
||||
formats = p["formats"]
|
||||
@@ -960,6 +972,7 @@ change_renpy_executable()
|
||||
CFBundleDisplayName=display_name,
|
||||
CFBundleExecutable=executable_name,
|
||||
CFBundleIconFile="icon",
|
||||
CFBundleIdentifier="com.domain.game",
|
||||
CFBundleInfoDictionaryVersion="6.0",
|
||||
CFBundleName=display_name,
|
||||
CFBundlePackageType="APPL",
|
||||
@@ -1051,8 +1064,8 @@ change_renpy_executable()
|
||||
|
||||
self.add_file(
|
||||
mac,
|
||||
prefix + "mac-x86_64/" + self.executable_name,
|
||||
os.path.join(config.renpy_base, prefix + "mac-x86_64/renpy"),
|
||||
prefix + "mac-universal/" + self.executable_name,
|
||||
os.path.join(config.renpy_base, prefix + "mac-universal/renpy"),
|
||||
True)
|
||||
|
||||
def add_mac_files(self):
|
||||
@@ -1076,7 +1089,7 @@ change_renpy_executable()
|
||||
|
||||
self.add_file(filelist,
|
||||
contents + "/MacOS/" + self.executable_name,
|
||||
os.path.join(config.renpy_base, py("lib/py{major}-mac-x86_64/renpy")))
|
||||
os.path.join(config.renpy_base, py("lib/py{major}-mac-universal/renpy")))
|
||||
|
||||
|
||||
custom_fn = os.path.join(self.project.path, "icon.icns")
|
||||
@@ -1094,7 +1107,7 @@ change_renpy_executable()
|
||||
|
||||
if not self.build['renpy']:
|
||||
self.add_directory(filelist, contents + "/MacOS/lib")
|
||||
self.add_directory(filelist, contents + py("/MacOS/lib/py{major}-mac-x86_64"))
|
||||
self.add_directory(filelist, contents + py("/MacOS/lib/py{major}-mac-universal"))
|
||||
self.add_directory(filelist, contents + py("/Resources/lib/python{major}.{minor}"))
|
||||
|
||||
self.file_lists[filelist].mac_lib_transform(self.app, self.build['renpy'])
|
||||
@@ -1308,13 +1321,13 @@ change_renpy_executable()
|
||||
def workaround_mac_notarization(self, fl):
|
||||
"""
|
||||
This works around mac notarization by compressing the unsigned,
|
||||
un-notarized, binaries in lib/py3-mac-x86_64.
|
||||
un-notarized, binaries in lib/py3-mac-universal.
|
||||
"""
|
||||
|
||||
fl = fl.copy()
|
||||
|
||||
for f in fl:
|
||||
if py("/lib/py{major}-mac-x86_64/") in f.name:
|
||||
if py("/lib/py{major}-mac-universal/") in f.name:
|
||||
with open(f.path, "rb") as inf:
|
||||
data = inf.read()
|
||||
|
||||
@@ -1447,7 +1460,7 @@ change_renpy_executable()
|
||||
|
||||
if self.include_update and (variant not in [ 'ios', 'android', 'source']) and (not format.startswith("app-")):
|
||||
|
||||
with open(update_fn, "w") as f:
|
||||
with open(update_fn, "wb" if PY2 else "w") as f:
|
||||
json.dump(update, f, indent=2)
|
||||
|
||||
if (not dlc) or (format == "update"):
|
||||
@@ -1529,6 +1542,9 @@ change_renpy_executable()
|
||||
if f.directory:
|
||||
pkg.add_directory(f.name, f.path)
|
||||
else:
|
||||
if self.files_filter is not None and not self.files_filter.filter(f, variant, format):
|
||||
# Ignore file
|
||||
continue
|
||||
pkg.add_file(f.name, f.path, f.executable)
|
||||
|
||||
self.reporter.progress_done()
|
||||
@@ -1584,7 +1600,7 @@ change_renpy_executable()
|
||||
add_variant(p["name"])
|
||||
|
||||
fn = renpy.fsencode(os.path.join(self.destination, "updates.json"))
|
||||
with open(fn, "w") as f:
|
||||
with open(fn, "wb" if PY2 else "w") as f:
|
||||
json.dump(index, f, indent=2)
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
@@ -222,7 +222,13 @@ screen build_distributions:
|
||||
for pkg in packages:
|
||||
if not pkg["hidden"]:
|
||||
$ description = pkg["description"]
|
||||
textbutton "[description!q]" action PackageToggle(pkg["name"]) style "l_checkbox"
|
||||
button:
|
||||
action PackageToggle(pkg["name"]) style "l_checkbox"
|
||||
hbox:
|
||||
spacing 3
|
||||
text "[description!q]"
|
||||
if pkg["dlc"]:
|
||||
text _("(DLC)")
|
||||
|
||||
add SPACER
|
||||
add HALF_SPACER
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
@@ -197,7 +197,7 @@ init 1 python in editor:
|
||||
1,
|
||||
_("Atom"),
|
||||
AD,
|
||||
dlc,
|
||||
"extension:atom",
|
||||
_("Up to 150 MB download required."),
|
||||
None)
|
||||
|
||||
@@ -205,7 +205,7 @@ init 1 python in editor:
|
||||
|
||||
fei.append(e)
|
||||
|
||||
# jEdit
|
||||
# jEdit - Only present if it exists on system.
|
||||
if os.path.exists(os.path.join(config.renpy_base, "jedit")):
|
||||
|
||||
fei.append(FancyEditorInfo(
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
@@ -216,10 +216,7 @@ screen front_page_project:
|
||||
|
||||
textbutton _("Android") action Jump("android")
|
||||
textbutton _("iOS") action Jump("ios")
|
||||
textbutton _("Web") + " " + _("(Beta)") action Jump("web"):
|
||||
if not PY2:
|
||||
text_color DISABLED
|
||||
|
||||
textbutton _("Web") + " " + _("(Beta)") action Jump("web")
|
||||
textbutton _("Generate Translations") action Jump("translate")
|
||||
textbutton _("Extract Dialogue") action Jump("extract_dialogue")
|
||||
|
||||
@@ -240,7 +237,7 @@ label front_page:
|
||||
|
||||
if (not persistent.has_chosen_language) or ("RENPY_CHOOSE_LANGUAGE" in os.environ):
|
||||
|
||||
if _preferences.language is None:
|
||||
if (_preferences.language is None) or ("RENPY_CHOOSE_LANGUAGE" in os.environ):
|
||||
hide screen bottom_info
|
||||
call choose_language
|
||||
show screen bottom_info
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
@@ -404,6 +404,19 @@ class ImageGenerator(object):
|
||||
self.save(s, "main_menu", overwrite=False)
|
||||
self.save(s, "game_menu", overwrite=False)
|
||||
|
||||
def generate_bubble(self):
|
||||
|
||||
import shutil
|
||||
|
||||
source = os.path.join(config.renpy_base, "gui", "game", "gui", "bubble.png")
|
||||
dest = os.path.join(self.prefix, "bubble.png")
|
||||
|
||||
if source == dest:
|
||||
return
|
||||
|
||||
shutil.copyfile(source, dest)
|
||||
|
||||
|
||||
def generate_all(self):
|
||||
self.generate_textbox()
|
||||
self.generate_choice_button()
|
||||
@@ -415,6 +428,7 @@ class ImageGenerator(object):
|
||||
self.generate_notify()
|
||||
self.generate_menus()
|
||||
self.generate_icon()
|
||||
self.generate_bubble()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
@@ -90,8 +90,7 @@ label install_live2d:
|
||||
patterns = [
|
||||
(r".*/Core/dll/linux/x86_64/(libLive2DCubismCore.so)", _prefix + r"linux-x86_64/\1"),
|
||||
(r".*/Core/dll/windows/x86_64/(Live2DCubismCore.dll)", _prefix + r"windows-x86_64/\1"),
|
||||
(r".*/Core/dll/windows/x86/(Live2DCubismCore.dll)", _prefix + r"windows-i686/\1"),
|
||||
(r".*/Core/dll/macos/(libLive2DCubismCore.dylib)", _prefix + r"mac-x86_64/\1"),
|
||||
(r".*/Core/dll/macos/(libLive2DCubismCore.dylib)", _prefix + r"mac-universal/\1"),
|
||||
(r".*/Core/dll/experimental/rpi/(libLive2DCubismCore.so)", _prefix + r"linux-armv7l/\1"),
|
||||
|
||||
(r".*/Core/dll/android/(armeabi-v7a/libLive2DCubismCore.so)", r"rapt/prototype/renpyandroid/src/main/jniLibs/\1"),
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
|
||||
|
||||
# This file imports the extensions API into the default store, and makes it
|
||||
# also contains the strings used by the extensions API, so the Ren'Py translation
|
||||
# framework can find them.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
@@ -170,7 +170,7 @@ screen common:
|
||||
has vbox
|
||||
|
||||
text message:
|
||||
text_align 0.5
|
||||
textalign 0.5
|
||||
xalign 0.5
|
||||
layout "subtitle"
|
||||
|
||||
@@ -211,7 +211,7 @@ screen common:
|
||||
add SPACER
|
||||
|
||||
text submessage:
|
||||
text_align 0.5
|
||||
textalign 0.5
|
||||
xalign 0.5
|
||||
layout "subtitle"
|
||||
|
||||
@@ -250,7 +250,7 @@ screen launcher_input:
|
||||
has vbox
|
||||
|
||||
text message:
|
||||
text_align 0.5
|
||||
textalign 0.5
|
||||
xalign 0.5
|
||||
layout "subtitle"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
@@ -23,7 +23,7 @@ init python hide:
|
||||
import os
|
||||
|
||||
macapp = os.path.join(config.renpy_base, "renpy.app/Contents/MacOS")
|
||||
maclib = os.path.join(config.renpy_base, distribute.py("lib/py{major}-mac-x86_64"))
|
||||
maclib = os.path.join(config.renpy_base, distribute.py("lib/py{major}-mac-universal"))
|
||||
|
||||
if os.path.exists(maclib):
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
@@ -249,7 +249,7 @@ screen navigation:
|
||||
if persistent.navigation == "todo":
|
||||
|
||||
text _("No TODO comments found.\n\nTo create one, include \"# TODO\" in your script."):
|
||||
text_align 0.5
|
||||
textalign 0.5
|
||||
xalign 0.5
|
||||
yalign 0.5
|
||||
|
||||
@@ -279,4 +279,3 @@ label navigation_loop:
|
||||
label navigation_refresh:
|
||||
$ project.current.update_dump(True)
|
||||
jump navigation_loop
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
+14
-28
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
@@ -270,22 +270,8 @@ init python:
|
||||
build.classify_renpy("**/thumbs.db", None)
|
||||
build.classify_renpy("**/.*", None)
|
||||
|
||||
# Atom rules. These have to be very early, since Atom uses names like
|
||||
# tmp for packages.
|
||||
build.classify_renpy("atom/", "atom-all")
|
||||
build.classify_renpy("atom/default-dot-atom/**", "atom-all")
|
||||
build.classify_renpy("atom/atom-windows/**", "atom-windows")
|
||||
build.classify_renpy("atom/Atom.app/**", "atom-mac")
|
||||
build.classify_renpy("atom/atom-linux**", "atom-linux")
|
||||
|
||||
try:
|
||||
with open(os.path.join(config.renpy_base, "atom", "executable.txt")) as f:
|
||||
for l in f:
|
||||
build.executable(l.strip())
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
build.classify_renpy("rapt/**/libLive2DCubismCore.so", None)
|
||||
build.classify_renpy("rapt/symbols/", None)
|
||||
build.classify_renpy("rapt/**", "rapt")
|
||||
build.executable("rapt/prototype/gradlew")
|
||||
|
||||
@@ -351,16 +337,25 @@ init python:
|
||||
|
||||
build.classify_renpy(pattern + "/**.rpyc", binary)
|
||||
build.classify_renpy(pattern + "/**.rpymc", binary)
|
||||
|
||||
build.classify_renpy(pattern + "/**/" + renpy.script.BYTECODE_FILE, binary)
|
||||
build.classify_renpy(pattern + "/**/cache/bytecode-311.rpyb", "web")
|
||||
build.classify_renpy(pattern + "/**/cache/bytecode-*.rpyb", None)
|
||||
|
||||
build.classify_renpy(pattern + "/**/cache/*", binary)
|
||||
|
||||
build.classify_renpy(pattern + "/**", source)
|
||||
|
||||
|
||||
build.classify_renpy("renpy.py", "binary")
|
||||
source_and_binary("renpy")
|
||||
|
||||
# games.
|
||||
build.classify_renpy("launcher/game/theme/", None)
|
||||
build.classify_renpy("gui/game/gui/", None)
|
||||
|
||||
build.classify_renpy("gui/game/gui/", "source")
|
||||
build.classify_renpy("gui/game/gui/bubble.png", "source")
|
||||
build.classify_renpy("gui/game/gui/*", None)
|
||||
|
||||
source_and_binary("launcher", py=False)
|
||||
source_and_binary("gui", binary=None, py=False)
|
||||
@@ -420,11 +415,6 @@ init python:
|
||||
|
||||
build.classify_renpy("lib/", "binary")
|
||||
|
||||
# renpy.app is now built from scratch from distribute.rpy.
|
||||
|
||||
# jedit rules.
|
||||
build.classify_renpy("jedit/**", "jedit")
|
||||
|
||||
# Packages.
|
||||
build.packages = [ ]
|
||||
|
||||
@@ -433,16 +423,12 @@ init python:
|
||||
build.package("source", "tar.bz2", "source source_only", update=False)
|
||||
build.package("steam", "zip", "steam", dlc=True)
|
||||
|
||||
build.package("jedit", "zip", "jedit", dlc=True)
|
||||
|
||||
build.package("atom-linux", "tar.bz2", "atom-all atom-linux", dlc=True)
|
||||
build.package("atom-mac", "zip", "atom-all atom-mac", dlc=True)
|
||||
build.package("atom-windows", "zip", "atom-all atom-windows", dlc=True)
|
||||
|
||||
build.package("rapt", "zip", "rapt", dlc=True)
|
||||
build.package("renios", "zip", "renios", dlc=True)
|
||||
build.package("web", "zip", "web", dlc=True)
|
||||
|
||||
# The identifier for the SDK.
|
||||
define build.mac_info_plist["CFBundleIdentifier"] = "org.renpy.sdk"
|
||||
|
||||
# Enable the special launcher translation mode.
|
||||
define config.translate_launcher = True
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
@@ -31,12 +31,11 @@ init python in distribute:
|
||||
import sys
|
||||
import threading
|
||||
|
||||
from renpy import six
|
||||
from zipfile import crc32
|
||||
|
||||
|
||||
# Since the long type doesn't exist on py3, define it here
|
||||
if six.PY3:
|
||||
if not PY2:
|
||||
long = int
|
||||
|
||||
zlib.Z_DEFAULT_COMPRESSION = 5
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
@@ -343,7 +343,7 @@ screen choose_language():
|
||||
style "l_label_text"
|
||||
|
||||
size 36
|
||||
text_align .5
|
||||
textalign .5
|
||||
layout "subtitle"
|
||||
|
||||
add SPACER
|
||||
@@ -356,7 +356,7 @@ screen choose_language():
|
||||
for tlid, tlname in tran:
|
||||
textbutton tlname:
|
||||
xmaximum (TWOTHIRDS//3)
|
||||
action SetScreenVariable("chosen_lang", tlid)
|
||||
action [ SetScreenVariable("chosen_lang", tlid), Language(tlid), project.SelectTutorial(True), Return() ]
|
||||
hovered SetScreenVariable("local_lang", tlid)
|
||||
unhovered SetScreenVariable("local_lang", chosen_lang)
|
||||
style "l_list"
|
||||
@@ -377,7 +377,7 @@ screen choose_language():
|
||||
text_style "l_default"
|
||||
|
||||
text_size 30
|
||||
text_text_align .5
|
||||
text_textalign .5
|
||||
text_layout "subtitle"
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
@@ -48,6 +48,7 @@ init python in project:
|
||||
_("Press shift+O (the letter) to access the console."),
|
||||
_("Press shift+D to access the developer menu."),
|
||||
_("Have you backed up your projects recently?"),
|
||||
_("Lint checks your game for potential mistakes, and gives you statistics."),
|
||||
]
|
||||
|
||||
class Project(object):
|
||||
@@ -276,6 +277,8 @@ init python in project:
|
||||
if wait:
|
||||
if p.wait():
|
||||
|
||||
print("Launch failed. command={!r}, returncode={!r}".format(cmd, p.returncode))
|
||||
|
||||
if args and not self.is_writeable():
|
||||
interface.error(_("Launching the project failed."), _("This may be because the project is not writeable."))
|
||||
else:
|
||||
@@ -387,9 +390,18 @@ init python in project:
|
||||
can be included in the project.
|
||||
"""
|
||||
|
||||
def is_script(fn):
|
||||
fn = fn.lower()
|
||||
|
||||
for i in [ ".rpy", ".rpym", "_ren.py" ]:
|
||||
if fn.endswith(i):
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
rv = [ ]
|
||||
rv.extend(i for i, isdir in util.walk(self.path)
|
||||
if (not isdir) and (i.endswith(".rpy") or i.endswith(".rpym")) and (not i.startswith("tmp/")) )
|
||||
if (not isdir) and is_script(i) and (not i.startswith("tmp/")) )
|
||||
|
||||
return rv
|
||||
|
||||
@@ -833,3 +845,24 @@ init python:
|
||||
return False
|
||||
|
||||
renpy.arguments.register_command("get_projects_directory", get_projects_directory_command)
|
||||
|
||||
def set_project_command():
|
||||
ap = renpy.arguments.ArgumentParser()
|
||||
ap.add_argument("project", help="The full path to the project to select.")
|
||||
|
||||
args = ap.parse_args()
|
||||
|
||||
projects = os.path.dirname(os.path.abspath(args.project))
|
||||
name = os.path.basename(args.project)
|
||||
|
||||
persistent.projects_directory = renpy.fsdecode(projects)
|
||||
project.multipersistent.projects_directory = persistent.projects_directory
|
||||
|
||||
persistent.active_project = name
|
||||
|
||||
project.multipersistent.save()
|
||||
renpy.save_persistent()
|
||||
|
||||
return False
|
||||
|
||||
renpy.arguments.register_command("set_project", set_project_command)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
@@ -402,7 +402,7 @@ style l_alternate is l_default:
|
||||
style l_alternate_text is l_default:
|
||||
size size(14)
|
||||
font light_font()
|
||||
text_align 1.0
|
||||
textalign 1.0
|
||||
|
||||
style l_small_button is l_button
|
||||
|
||||
@@ -488,7 +488,7 @@ style l_info_button is l_button:
|
||||
xmargin 50
|
||||
|
||||
style l_info_button_text is l_button_text:
|
||||
text_align 0.5
|
||||
textalign 0.5
|
||||
layout "subtitle"
|
||||
|
||||
# Progress bar.
|
||||
|
||||
+10
-1
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
@@ -22,6 +22,7 @@
|
||||
|
||||
init python:
|
||||
|
||||
|
||||
class FileTail(object):
|
||||
|
||||
def __init__(self, filename, lines=8):
|
||||
@@ -31,6 +32,11 @@ init python:
|
||||
|
||||
def update(self):
|
||||
|
||||
def filter_text(s):
|
||||
if "Unknown chunk type '200'" in s:
|
||||
return False
|
||||
return True
|
||||
|
||||
try:
|
||||
with open(self.filename) as f:
|
||||
text = f.read()
|
||||
@@ -49,6 +55,9 @@ init python:
|
||||
if "\r" in l:
|
||||
_head, _sep, l = l.rpartition("\r")
|
||||
|
||||
if not filter_text(l):
|
||||
continue
|
||||
|
||||
while l:
|
||||
newtext.append(l[:100])
|
||||
l = l[100:]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
@@ -797,3 +797,103 @@ translate french strings:
|
||||
# renpy/common/00preferences.rpy:535
|
||||
old "mute main"
|
||||
new "sourdine générale"
|
||||
|
||||
# renpy/common/00speechbubble.rpy:299
|
||||
old "Speech Bubble Editor"
|
||||
new "Éditeur de bulles de dialogue"
|
||||
|
||||
# renpy/common/00speechbubble.rpy:304
|
||||
old "(hide)"
|
||||
new "(masquer)"
|
||||
|
||||
# renpy/common/00director.rpy:1748
|
||||
old "Click to toggle attribute, right click to toggle negative attribute."
|
||||
new "Clic pour (dés)activer des attributs, clic droit pour (dés)activer les suppressions d'attributs."
|
||||
|
||||
# renpy/common/00director.rpy:1771
|
||||
old "Click to set transform, right click to add to transform list."
|
||||
new "Clic pour ajouter un transform, clic droit pour ajouter une liste de transforms."
|
||||
|
||||
# renpy/common/00preferences.rpy:528
|
||||
old "audio when unfocused"
|
||||
new "audio lors de la perte de focus"
|
||||
|
||||
# renpy/common/00preferences.rpy:537
|
||||
old "web cache preload"
|
||||
new "préchargement du cache web cache"
|
||||
|
||||
# renpy/common/00preferences.rpy:552
|
||||
old "voice after game menu"
|
||||
new "voix dans le menu de jeu"
|
||||
|
||||
# renpy/common/00sync.rpy:58
|
||||
old "Sync downloaded."
|
||||
new "Sync téléchargé."
|
||||
|
||||
# renpy/common/00sync.rpy:178
|
||||
old "Could not connect to the Ren'Py Sync server."
|
||||
new "Échec de la connexion au serveur Ren'Py Sync."
|
||||
|
||||
# renpy/common/00sync.rpy:180
|
||||
old "The Ren'Py Sync server timed out."
|
||||
new "Le serveur Ren'Py Sync a mis trop de temps à répondre."
|
||||
|
||||
# renpy/common/00sync.rpy:182
|
||||
old "An unknown error occurred while connecting to the Ren'Py Sync server."
|
||||
new "Une erreur inconnue est arrivée lors de la connexion au serveur Ren'Py Sync."
|
||||
|
||||
# renpy/common/00sync.rpy:255
|
||||
old "The Ren'Py Sync server does not have a copy of this sync. The sync ID may be invalid, or it may have timed out."
|
||||
new "Le serveur Ren'Py Sync ne reconnaît pas ce code sync. l'ID est peut-être invalide, ou il peut avoir expiré."
|
||||
|
||||
# renpy/common/00sync.rpy:397
|
||||
old "Please enter the sync ID you generated.\nNever enter a sync ID you didn't create yourself."
|
||||
new "Entrez l'ID sync que vous avez généré.\nN'entrez jamais un ID sync que vous n'avez pas généré vous-même."
|
||||
|
||||
# renpy/common/00sync.rpy:416
|
||||
old "The sync ID is not in the correct format."
|
||||
new "L'ID sync n'est pas dans un format correct."
|
||||
|
||||
# renpy/common/00sync.rpy:436
|
||||
old "The sync could not be decrypted."
|
||||
new "Le sync n'a pas pu être déchiffré."
|
||||
|
||||
# renpy/common/00sync.rpy:459
|
||||
old "The sync belongs to a different game."
|
||||
new "Le sync correspond à un autre jeu."
|
||||
|
||||
# renpy/common/00sync.rpy:464
|
||||
old "The sync contains a file with an invalid name."
|
||||
new "Le sync contient un fichier ayant un nom invalide."
|
||||
|
||||
# renpy/common/00sync.rpy:517
|
||||
old "This will upload your saves to the {a=https://sync.renpy.org}Ren'Py Sync Server{/a}.\nDo you want to continue?"
|
||||
new "Vos sauvegardes vont être téléchargées sur le {a=https://sync.renpy.org}serveur Ren'Py Sync{/a}.\nVoulez-vous continuer ?"
|
||||
|
||||
# renpy/common/00sync.rpy:546
|
||||
old "Enter Sync ID"
|
||||
new "Entrez l'ID Sync"
|
||||
|
||||
# renpy/common/00sync.rpy:557
|
||||
old "This will contact the {a=https://sync.renpy.org}Ren'Py Sync Server{/a}."
|
||||
new "Ceci va contacter le {a=https://sync.renpy.org}serveur Ren'Py Sync{/a}."
|
||||
|
||||
# renpy/common/00sync.rpy:584
|
||||
old "Sync Success"
|
||||
new "Sync réussi"
|
||||
|
||||
# renpy/common/00sync.rpy:587
|
||||
old "The Sync ID is:"
|
||||
new "L'ID Sync est :"
|
||||
|
||||
# renpy/common/00sync.rpy:593
|
||||
old "You can use this ID to download your save on another device.\nThis sync will expire in an hour.\nRen'Py Sync is supported by {a=https://www.renpy.org/sponsors.html}Ren'Py's Sponsors{/a}."
|
||||
new "Vous pouvez utiliser cet ID pour transférer votre sauvegarde sur un autre appareil.\nCe sync expirera dans une heure.\nRen'Py Sync is soutenu par les {a=https://www.renpy.org/sponsors.html}Sponsors de Ren'Py's{/a}."
|
||||
|
||||
# renpy/common/00sync.rpy:619
|
||||
old "Sync Error"
|
||||
new "Erreur de Sync"
|
||||
|
||||
# renpy/common/00webvideo.rpy:5
|
||||
old "Touch to play the video."
|
||||
new "Touchez pour jouer la vidéo."
|
||||
|
||||
@@ -14,7 +14,11 @@
|
||||
|
||||
# _developer/developer.rpym:47
|
||||
old "Variable Viewer"
|
||||
new "Visualisateur de variable"
|
||||
new "Inspecteur de variables"
|
||||
|
||||
# renpy/common/_developer/developer.rpym:51
|
||||
old "Persistent Viewer"
|
||||
new "Inspecteur de données persistentes"
|
||||
|
||||
# _developer/developer.rpym:49
|
||||
old "Theme Test"
|
||||
@@ -124,9 +128,13 @@
|
||||
old "Ren'Py script disabled."
|
||||
new "Script Ren'Py désactivé."
|
||||
|
||||
# 00console.rpy:398
|
||||
old "help: show this help"
|
||||
new "aide : afficher cette aide"
|
||||
# renpy/common/00console.rpy:781
|
||||
old "help: show this help\n help <expr>: show signature and documentation of <expr>"
|
||||
new "help : afficher cette aide\n help <expr>: afficher la signature et la documentation de <expr>"
|
||||
|
||||
# renpy/common/00console.rpy:805
|
||||
old "Help may display undocumented functions. Please check that the function or\nclass you want to use is documented.\n\n"
|
||||
new "Help peut afficher des fonctions non documentées. Veuillez vérifier que la\nfonction ou classe que vous voulez utiliser est bien documentée.\n\n"
|
||||
|
||||
# 00console.rpy:403
|
||||
old "commands:\n"
|
||||
|
||||
@@ -925,7 +925,7 @@
|
||||
|
||||
# preferences.rpy:174
|
||||
old "Show edit file section"
|
||||
new "Afficher la section d’édition de fichier"
|
||||
new "Afficher la section d’édition de fichiers"
|
||||
|
||||
# preferences.rpy:175
|
||||
old "Large fonts"
|
||||
@@ -933,11 +933,11 @@
|
||||
|
||||
# preferences.rpy:178
|
||||
old "Console output"
|
||||
new "Sortie console"
|
||||
new "Console de sortie"
|
||||
|
||||
# preferences.rpy:199
|
||||
old "Open launcher project"
|
||||
new "Ouvrir le projet lanceur"
|
||||
new "Ouvrir le projet du lanceur"
|
||||
|
||||
# preferences.rpy:213
|
||||
old "Language:"
|
||||
@@ -997,7 +997,7 @@
|
||||
|
||||
# translations.rpy:104
|
||||
old "The language to work with. This should only contain lower-case ASCII characters and underscores."
|
||||
new "Le langage avec lequel travailler. Cette valeur ne doit contenir que des caractères ASCII en minuscules et des underscores (tiret bas)."
|
||||
new "Le langage avec lequel travailler. Cette valeur ne doit contenir que des caractères ASCII en minuscules et des underscores."
|
||||
|
||||
# translations.rpy:130
|
||||
old "Generate empty strings for translations"
|
||||
@@ -1025,7 +1025,7 @@
|
||||
|
||||
# translations.rpy:180
|
||||
old "Update Default Interface Translations"
|
||||
new "Met à jour la traduction de l'interface par défaut"
|
||||
new "Mise à jour de la traduction par défaut de l'interface"
|
||||
|
||||
# translations.rpy:200
|
||||
old "The extract command allows you to extract string translations from an existing project into a temporary file.\n\nThe merge command merges extracted translations into another project."
|
||||
@@ -1057,7 +1057,7 @@
|
||||
|
||||
# translations.rpy:282
|
||||
old "Updating default interface translations..."
|
||||
new "Mise à jour en cours de la traduction de l’interface par défaut..."
|
||||
new "Mise à jour de la traduction par défaut de l’interface en cours..."
|
||||
|
||||
# translations.rpy:306
|
||||
old "Extract Dialogue: [project.current.name!q]"
|
||||
@@ -1069,7 +1069,7 @@
|
||||
|
||||
# translations.rpy:330
|
||||
old "Tab-delimited Spreadsheet (dialogue.tab)"
|
||||
new "Feuille de calcul avec pour séparateur des tabulations (dialogue.tab)"
|
||||
new "Feuille de calcul avec des tabulations comme séparateur (dialogue.tab)"
|
||||
|
||||
# translations.rpy:331
|
||||
old "Dialogue Text Only (dialogue.txt)"
|
||||
@@ -2074,3 +2074,15 @@
|
||||
# game/preferences.rpy:327
|
||||
old "{#in language font}Start using Ren'Py in [lang_name]"
|
||||
new "{font=fonts/Roboto-Light.ttf}Commencez à utiliser Ren'Py en [lang_name]{/font}"
|
||||
|
||||
# game/distribute_gui.rpy:231
|
||||
old "(DLC)"
|
||||
new "(DLC)"
|
||||
|
||||
# game/project.rpy:46
|
||||
old "Lint checks your game for potential mistakes, and gives you statistics."
|
||||
new "Lint vérifie votre jeu pour des erreurs communes, et génère des statistiques."
|
||||
|
||||
# game/web.rpy:484
|
||||
old "Creating package..."
|
||||
new "Création du package..."
|
||||
|
||||
@@ -185,8 +185,8 @@
|
||||
new "## Les fichiers correspondant au format de documentation sont dupliqués pour les compilation sur Mac, c'est pourquoi ils apparaissent deux fois dans l’archive zip."
|
||||
|
||||
# options.rpy:196
|
||||
old "## A Google Play license key is required to download expansion files and perform in-app purchases. It can be found on the \"Services & APIs\" page of the Google Play developer console."
|
||||
new "## Une clé de licence A Google Play est requise pour télécharger les fichiers et permettre les achats dans l'application. Vous pourrez la trouver sur la page « Services & APIs » de la console de développement Google Play."
|
||||
old "## A Google Play license key is required to perform in-app purchases. It can be found in the Google Play developer console, under \"Monetize\" > \"Monetization Setup\" > \"Licensing\"."
|
||||
new "## Une clé de licence Google Play est requise pour permettre les achats depuis l'application. Vous pourrez la trouver dans la console de développement Google Play, sous \"Monétiser\" > \"Configuration de la monétisation\" > \"Licences\"."
|
||||
|
||||
# options.rpy:203
|
||||
old "## The username and project name associated with an itch.io project, separated by a slash."
|
||||
|
||||
@@ -450,7 +450,7 @@
|
||||
|
||||
# screens.rpy:1024
|
||||
old "Toggles dialogue skipping."
|
||||
new "Active ou désactives les «sauts des dialogues»."
|
||||
new "Active ou désactive les «sauts des dialogues»."
|
||||
|
||||
# screens.rpy:1027
|
||||
old "Page Up"
|
||||
@@ -621,8 +621,8 @@
|
||||
new "## Les dialogues sont affichés soit dans une vpgrid soit dans une vbox."
|
||||
|
||||
# screens.rpy:1314
|
||||
old "## Displays the menu, if given. The menu may be displayed incorrectly if config.narrator_menu is set to True, as it is above."
|
||||
new "## Si fourni, affiche le menu. Le menu peut s’afficher de manière incorrecte si config.narrator_menu est initialisé à True, comme c’est le cas au-dessus."
|
||||
old "## Displays the menu, if given. The menu may be displayed incorrectly if config.narrator_menu is set to True."
|
||||
new "## Si fourni, affiche le menu. Le menu peut s’afficher de manière incorrecte si config.narrator_menu est initialisé à True."
|
||||
|
||||
# screens.rpy:1344
|
||||
old "## This controls the maximum number of NVL-mode entries that can be displayed at once."
|
||||
@@ -719,3 +719,15 @@
|
||||
# gui/game/screens.rpy:1049
|
||||
old "Opens the accessibility menu."
|
||||
new "Ouvre le menu d'accessibilité."
|
||||
|
||||
# gui/game/screens.rpy:1397
|
||||
old "## Bubble screen"
|
||||
new "## Screen des bulles"
|
||||
|
||||
# gui/game/screens.rpy:1399
|
||||
old "## The Bubble screen is used to display dialogue to the player when using speech bubbles. The Bubble screen takes the same parameters as the say screen, must create a displayable with the id of \"what\", and can create displayables with the \"namebox\", \"who\", and \"window\" ids."
|
||||
new "## Le screen des bulles est utilisé pour afficher des dialogues en utilisant des bulles. Ce screen prend les mêmes paramètres que le screen say, doit prévoir un displayable avec l'id \"what\", et peut créer des displayables avec les ids \"namebox\", \"who\", et \"window\"."
|
||||
|
||||
# gui/game/screens.rpy:1404
|
||||
old "## https://www.renpy.org/doc/html/screen_special.html#bubble"
|
||||
new "## https://www.renpy.org/doc/html/screen_special.html#bubble"
|
||||
|
||||
@@ -622,8 +622,8 @@ translate italian strings:
|
||||
new "## Mostra il dialogo in una vpgrid o in una vbox."
|
||||
|
||||
# screens.rpy:1314
|
||||
old "## Displays the menu, if given. The menu may be displayed incorrectly if config.narrator_menu is set to True, as it is above."
|
||||
new "## Mostra il menu, se fornito. Il menu può apparire distorto se config.narrator_menu è impostato a True, come lo è sopra."
|
||||
old "## Displays the menu, if given. The menu may be displayed incorrectly if config.narrator_menu is set to True."
|
||||
new "## Mostra il menu, se fornito. Il menu può apparire distorto se config.narrator_menu è impostato a True."
|
||||
|
||||
# screens.rpy:1344
|
||||
old "## This controls the maximum number of NVL-mode entries that can be displayed at once."
|
||||
@@ -676,4 +676,3 @@ translate italian strings:
|
||||
# screens.rpy:1079
|
||||
old "Left Trigger\nLeft Shoulder"
|
||||
new "Grilletto Sinistro\nLaterale Sinistro"
|
||||
|
||||
|
||||
@@ -669,7 +669,7 @@
|
||||
|
||||
# ios.rpy:37
|
||||
old "Creates an Xcode project corresponding to the current Ren'Py project."
|
||||
new "現在の Ren'PY プロジェクトに対応する Xcode プロジェクトを作成します。"
|
||||
new "現在の Ren'Py プロジェクトに対応する Xcode プロジェクトを作成します。"
|
||||
|
||||
# ios.rpy:38
|
||||
old "Updates the Xcode project with the latest game files. This must be done each time the Ren'Py project changes."
|
||||
|
||||
@@ -634,8 +634,8 @@ translate piglatin strings:
|
||||
new "## Isplaysday ialogueday inay eitheray aay pgridvay oray hetay boxvay."
|
||||
|
||||
# gui/game/screens.rpy:1307
|
||||
old "## Displays the menu, if given. The menu may be displayed incorrectly if config.narrator_menu is set to True, as it is above."
|
||||
new "## Isplaysday hetay enumay, ifay ivengay. Hetay enumay aymay ebay isplayedday incorrectlyay ifay onfigcay.arrator_menunay isay etsay otay Ruetay, asay itay isay aboveay."
|
||||
old "## Displays the menu, if given. The menu may be displayed incorrectly if config.narrator_menu is set to True."
|
||||
new "## Isplaysday hetay enumay, ifay ivengay. Hetay enumay aymay ebay isplayedday incorrectlyay ifay onfigcay.arrator_menunay isay etsay otay Ruetay."
|
||||
|
||||
# gui/game/screens.rpy:1337
|
||||
old "## This controls the maximum number of NVL-mode entries that can be displayed at once."
|
||||
@@ -652,4 +652,3 @@ translate piglatin strings:
|
||||
# gui/game/screens.rpy:1424
|
||||
old "Menu"
|
||||
new "Enumay"
|
||||
|
||||
|
||||
@@ -654,7 +654,7 @@ translate russian strings:
|
||||
new "## Показывает диалог или в vpgrid, или в vbox."
|
||||
|
||||
# screens.rpy:1316
|
||||
old "## Displays the menu, if given. The menu may be displayed incorrectly if config.narrator_menu is set to True, as it is above."
|
||||
old "## Displays the menu, if given. The menu may be displayed incorrectly if config.narrator_menu is set to True."
|
||||
new "## Показывает меню, если есть. Меню может показываться некорректно, если config.narrator_menu установлено на True."
|
||||
|
||||
# screens.rpy:1346
|
||||
|
||||
@@ -777,3 +777,115 @@ translate spanish strings:
|
||||
# renpy/common/00preferences.rpy:535
|
||||
old "mute main"
|
||||
new "silenciar volumen principal"
|
||||
|
||||
# renpy/common/00speechbubble.rpy:299
|
||||
old "Speech Bubble Editor"
|
||||
new "Editor de globos de diálogo"
|
||||
|
||||
# renpy/common/00speechbubble.rpy:304
|
||||
old "(hide)"
|
||||
new "(ocultar)"
|
||||
|
||||
# renpy/common/00gui.rpy:455
|
||||
old "This save was created on a different device. Maliciously constructed save files can harm your computer. Do you trust this save's creator and everyone who could have changed the file?"
|
||||
new "Este archivo se creó en otro dispositivo. Los archivos de guardado maliciosamente creados pueden dañar tu computadora. Confías en el creador de este archivo y en todos los que podrían haberlo modificado?"
|
||||
|
||||
# renpy/common/00gui.rpy:456
|
||||
old "Do you trust the device the save was created on? You should only choose yes if you are the device's sole user."
|
||||
new "¿Confías en el dispositivo en el que se creó el archivo de guardado? Sólo debes elegir sí si eres el único usuario del dispositivo."
|
||||
|
||||
# renpy/common/00preferences.rpy:520
|
||||
old "web cache preload"
|
||||
new "precarga de la caché web"
|
||||
|
||||
# renpy/common/00webvideo.rpy:5
|
||||
old "Touch to play the video."
|
||||
new "Toca aquí para reproducir el video."
|
||||
|
||||
# renpy/common/00director.rpy:1748
|
||||
old "Click to toggle attribute, right click to toggle negative attribute."
|
||||
new "Clic para cambiar el atributo, Clic derecho para cambiar el atributo a negativo."
|
||||
|
||||
# renpy/common/00director.rpy:1771
|
||||
old "Click to set transform, right click to add to transform list."
|
||||
new "Clic para establecer la transformación, clic derecho para añadir a la lista de transformaciones."
|
||||
|
||||
# renpy/common/00director.rpy:1792
|
||||
old "Click to set, right click to add to behind list."
|
||||
new "Clic para fijar, clic derecho para añadir a detrás de la lista."
|
||||
|
||||
# renpy/common/00preferences.rpy:528
|
||||
old "audio when unfocused"
|
||||
new "audio cuando no está enfocado"
|
||||
|
||||
# renpy/common/00preferences.rpy:552
|
||||
old "voice after game menu"
|
||||
new "voz después de un menú del juego"
|
||||
|
||||
# renpy/common/00sync.rpy:58
|
||||
old "Sync downloaded."
|
||||
new "Sincronización descargada"
|
||||
|
||||
# renpy/common/00sync.rpy:178
|
||||
old "Could not connect to the Ren'Py Sync server."
|
||||
new "No se pudo conectar al servidor Ren'Py Sync."
|
||||
|
||||
# renpy/common/00sync.rpy:180
|
||||
old "The Ren'Py Sync server timed out."
|
||||
new "Se agotó el tiempo de espera del servidor Ren'Py Sync."
|
||||
|
||||
# renpy/common/00sync.rpy:182
|
||||
old "An unknown error occurred while connecting to the Ren'Py Sync server."
|
||||
new "Se produjo un error desconocido al conectarse al servidor Ren'Py Sync."
|
||||
|
||||
# renpy/common/00sync.rpy:255
|
||||
old "The Ren'Py Sync server does not have a copy of this sync. The sync ID may be invalid, or it may have timed out."
|
||||
new "El servidor Ren'Py Sync no tiene una copia de esta sincronización. Es posible que el ID de sincronización no sea válido o que se haya agotado el tiempo de espera."
|
||||
|
||||
# renpy/common/00sync.rpy:397
|
||||
old "Please enter the sync ID you generated.\nNever enter a sync ID you didn't create yourself."
|
||||
new "Ingresa la ID de sincronización SI que generaste.\nNunca ingreses una ID de sincronización que no creaste."
|
||||
|
||||
# renpy/common/00sync.rpy:416
|
||||
old "The sync ID is not in the correct format."
|
||||
new "El ID de sincronización no tiene el formato correcto."
|
||||
|
||||
# renpy/common/00sync.rpy:436
|
||||
old "The sync could not be decrypted."
|
||||
new "No se pudo descifrar la ID de sincronización."
|
||||
|
||||
# renpy/common/00sync.rpy:459
|
||||
old "The sync belongs to a different game."
|
||||
new "La sincronización pertenece a un juego diferente."
|
||||
|
||||
# renpy/common/00sync.rpy:464
|
||||
old "The sync contains a file with an invalid name."
|
||||
new "La sincronización contiene un archivo con un nombre no válido."
|
||||
|
||||
# renpy/common/00sync.rpy:517
|
||||
old "This will upload your saves to the {a=https://sync.renpy.org}Ren'Py Sync Server{/a}.\nDo you want to continue?"
|
||||
new "Esto cargará tus archivos guardados en el {a=https://sync.renpy.org}Servidor Ren'Py Sync{/a}..\n¿Quieres continuar?"
|
||||
|
||||
# renpy/common/00sync.rpy:546
|
||||
old "Enter Sync ID"
|
||||
new "Ingrese ID de Sync"
|
||||
|
||||
# renpy/common/00sync.rpy:557
|
||||
old "This will contact the {a=https://sync.renpy.org}Ren'Py Sync Server{/a}."
|
||||
new "Esto contactará con el {a=https://sync.renpy.org}Servidor Ren'Py Sync{/a}."
|
||||
|
||||
# renpy/common/00sync.rpy:584
|
||||
old "Sync Success"
|
||||
new "Sincronización exitosa"
|
||||
|
||||
# renpy/common/00sync.rpy:587
|
||||
old "The Sync ID is:"
|
||||
new "El ID de Sync es:"
|
||||
|
||||
# renpy/common/00sync.rpy:593
|
||||
old "You can use this ID to download your save on another device.\nThis sync will expire in an hour.\nRen'Py Sync is supported by {a=https://www.renpy.org/sponsors.html}Ren'Py's Sponsors{/a}."
|
||||
new "Puede usar esta ID para descargar su guardado en otro dispositivo.\nEsta sincronización caducará en una hora.\RenPy Sync está para {a=https://www.renpy.org/sponsors.html}los patrocinadores de Ren'Py{/a}."
|
||||
|
||||
# renpy/common/00sync.rpy:619
|
||||
old "Sync Error"
|
||||
new "Error de sincronización"
|
||||
|
||||
@@ -211,3 +211,15 @@
|
||||
# renpy/common/00console.rpy:784
|
||||
old "stack: print the return stack"
|
||||
new "stack: imprime la pila de retorno"
|
||||
|
||||
# renpy/common/00console.rpy:781
|
||||
old "help: show this help\n help <expr>: show signature and documentation of <expr>"
|
||||
new "help: muestra esta ayuda\n help <expr>: muestra la firma y la documentación de <expr>"
|
||||
|
||||
# renpy/common/00console.rpy:805
|
||||
old "Help may display undocumented functions. Please check that the function or\nclass you want to use is documented.\n\n"
|
||||
new "La ayuda puede mostrar funciones no documentadas. Por favor, compruebe que la función o\nclase que desea utilizar está documentada.\n\n"
|
||||
|
||||
# renpy/common/_developer/developer.rpym:51
|
||||
old "Persistent Viewer"
|
||||
new "Visor de datos persistentes"
|
||||
|
||||
@@ -2060,3 +2060,15 @@ translate spanish strings:
|
||||
# game/preferences.rpy:327
|
||||
old "{#in language font}Start using Ren'Py in [lang_name]"
|
||||
new "{font=fonts/Roboto-Light.ttf}Empieza a usar Ren'Py en [lang_name]{/font}"
|
||||
|
||||
# game/distribute_gui.rpy:231
|
||||
old "(DLC)"
|
||||
new "(DLC)"
|
||||
|
||||
# game/project.rpy:46
|
||||
old "Lint checks your game for potential mistakes, and gives you statistics."
|
||||
new "Lint comprueba tu juego en busca de posibles errores y te ofrece estadísticas."
|
||||
|
||||
# game/web.rpy:484
|
||||
old "Creating package..."
|
||||
new "Creando paquete..."
|
||||
|
||||
@@ -204,3 +204,7 @@
|
||||
old "## These three variables control, among other things, which mixers are shown to the player by default. Setting one of these to False will hide the appropriate mixer."
|
||||
new "## Estas tres variables controlan, entre otras cosas, qué mezcladores se muestran al reproductor de forma predeterminada. Establecer uno de estos en False ocultará el mezclador apropiado. "
|
||||
|
||||
# gui/game/options.rpy:203
|
||||
old "## A Google Play license key is required to perform in-app purchases. It can be found in the Google Play developer console, under \"Monetize\" > \"Monetization Setup\" > \"Licensing\"."
|
||||
new "## Se necesita una clave de licencia de Google Play para realizar compras dentro de la aplicación. Se puede encontrar en la consola de desarrollador de Google Play, en \"Monetizar\" > \"Configuración de la monetización\" > \"Licencias\"."
|
||||
|
||||
|
||||
@@ -654,8 +654,8 @@ translate spanish strings:
|
||||
new "## Presenta el diálogo en una 'vpgrid' o una 'vbox'."
|
||||
|
||||
# screens.rpy:1316
|
||||
old "## Displays the menu, if given. The menu may be displayed incorrectly if config.narrator_menu is set to True, as it is above."
|
||||
new "## Presenta el menú, si lo hay. El menú puede ser presentado incorrectamente si 'config.narrator_menu' está ajustado a 'True', como lo es más arriba."
|
||||
old "## Displays the menu, if given. The menu may be displayed incorrectly if config.narrator_menu is set to True."
|
||||
new "## Presenta el menú, si lo hay. El menú puede ser presentado incorrectamente si 'config.narrator_menu' está ajustado a 'True'."
|
||||
|
||||
# screens.rpy:1346
|
||||
old "## This controls the maximum number of NVL-mode entries that can be displayed at once."
|
||||
@@ -680,4 +680,15 @@ translate spanish strings:
|
||||
# gui/game/screens.rpy:1049
|
||||
old "Opens the accessibility menu."
|
||||
new "Abre el menú de accesibilidad."
|
||||
|
||||
# gui/game/screens.rpy:1397
|
||||
old "## Bubble screen"
|
||||
new "## Pantalla de globos"
|
||||
|
||||
# gui/game/screens.rpy:1399
|
||||
old "## The Bubble screen is used to display dialogue to the player when using speech bubbles. The Bubble screen takes the same parameters as the say screen, must create a displayable with the id of \"what\", and can create displayables with the \"namebox\", \"who\", and \"window\" ids."
|
||||
new "## La pantalla globos se utiliza para mostrar el diálogo al jugador cuando se utilizan globos de dialogo. La pantalla de globos toma los mismos parámetros que la pantalla say, debe crear un displayable con el id de \"what\", y puede crear displayables con los ids de \"namebox\", \"who\", y \"window\"."
|
||||
|
||||
# gui/game/screens.rpy:1404
|
||||
old "## https://www.renpy.org/doc/html/screen_special.html#bubble"
|
||||
new "## https://www.renpy.org/doc/html/screen_special.html#bubble"
|
||||
|
||||
@@ -311,7 +311,7 @@ translate ukrainian strings:
|
||||
|
||||
# game/androidstrings.rpy:21
|
||||
old "What is the full name of your application? This name will appear in the list of installed applications."
|
||||
new "Як повна назва вашої програми? Ця назва з’явиться в списку встановлених програм."
|
||||
new "Яка повна назва вашої програми? Ця назва з’явиться в списку встановлених програм."
|
||||
|
||||
# game/androidstrings.rpy:22
|
||||
old "What is the short name of your application? This name will be used in the launcher, and for application shortcuts."
|
||||
@@ -319,7 +319,7 @@ translate ukrainian strings:
|
||||
|
||||
# game/androidstrings.rpy:23
|
||||
old "What is the name of the package?\n\nThis is usually of the form com.domain.program or com.domain.email.program. It may only contain ASCII letters and dots. It must contain at least one dot."
|
||||
new "Як називається пакет?\n\nЦе зазвичай має форму com.domain.program або com.domain.email.program. Він може містити лише літери ASCII і крапки. Він повинен містити хоча б одну крапку."
|
||||
new "Як називається пакет?\n\Він зазвичай має форму com.domain.program або com.domain.email.program. Він може містити лише літери ASCII і крапки. Він повинен містити хоча б одну крапку."
|
||||
|
||||
# game/androidstrings.rpy:24
|
||||
old "The package name may not be empty."
|
||||
@@ -347,7 +347,7 @@ translate ukrainian strings:
|
||||
|
||||
# game/androidstrings.rpy:30
|
||||
old "What is the application's version?\n\nThis should be the human-readable version that you would present to a person. It must contain only numbers and dots."
|
||||
new "Яка версія програми?\n\nЦе має бути зрозуміла для людини версія, яку ви б показали персоні. Вона повинна містити лише цифри та крапки."
|
||||
new "Яка версія програми?\n\nЦе має бути зрозуміла для людини версія, яку ви б показали людині. Вона повинна містити лише цифри та крапки."
|
||||
|
||||
# game/androidstrings.rpy:31
|
||||
old "The version number must contain only numbers and dots."
|
||||
@@ -443,7 +443,7 @@ translate ukrainian strings:
|
||||
|
||||
# game/androidstrings.rpy:55
|
||||
old "I've finished installing the required Android packages."
|
||||
new "Мною було завершено встановлення необхідних пакетів Android."
|
||||
new "Я завершив встановлення необхідних пакетів Android."
|
||||
|
||||
# game/androidstrings.rpy:56
|
||||
old "Please enter your name or the name of your organization."
|
||||
@@ -463,7 +463,7 @@ translate ukrainian strings:
|
||||
|
||||
# game/androidstrings.rpy:60
|
||||
old "I've finished creating android.keystore. Please back it up, and keep it in a safe place."
|
||||
new "Мною закінчиено створення android.keystore. Зробіть резервну копію та зберігайте її в безпечному місці."
|
||||
new "Я завершив створення android.keystore. Зробіть резервну копію та зберігайте її в безпечному місці."
|
||||
|
||||
# game/androidstrings.rpy:61
|
||||
old "I can create a bundle signing key for you. This key is required to build an Android App Bundle (AAB) for upload to Google Play.\n\nDo you want to create a key?"
|
||||
@@ -479,7 +479,7 @@ translate ukrainian strings:
|
||||
|
||||
# game/androidstrings.rpy:64
|
||||
old "I've opened the directory containing android.keystore and bundle.keystore. Please back them up, and keep them in a safe place."
|
||||
new "В мене відкритий каталог, що містить android.keystore і bundle.keystore. Створіть їх резервні копії та зберігайте в безпечному місці."
|
||||
new "Я відкрив каталог, що містить android.keystore і bundle.keystore. Створіть їх резервні копії та зберігайте в безпечному місці."
|
||||
|
||||
# game/androidstrings.rpy:65
|
||||
old "It looks like you're ready to start packaging games."
|
||||
@@ -671,7 +671,7 @@ translate ukrainian strings:
|
||||
|
||||
# game/editor.rpy:153
|
||||
old "A modern editor with many extensions including advanced Ren'Py integration.\n{a=jump:reinstall_vscode}Upgrade Visual Studio Code to the latest version.{/a}"
|
||||
new "Сучасний редактор із багатьма розширеннями, зокрема розширеною інтеграцією Ren'Py.\n{a=jump:reinstall_vscode}Оновіть код Visual Studio до останньої версії.{/a}"
|
||||
new "Сучасний редактор із багатьма розширеннями, зокрема розширеною інтеграцією Ren'Py.\n{a=jump:reinstall_vscode}Оновіть Visual Studio Code до останньої версії.{/a}"
|
||||
|
||||
# game/editor.rpy:169
|
||||
old "Visual Studio Code"
|
||||
@@ -887,7 +887,7 @@ translate ukrainian strings:
|
||||
|
||||
# game/gui7.rpy:257
|
||||
old "Please click on the color scheme you wish to use, then click Continue. These colors can be changed and customized later."
|
||||
new "Клацніть колірну схему, яку ви бажаєте використати, а потім натисніть Продовжити. Ці кольори можна змінити та налаштувати пізніше."
|
||||
new "Натисніть на колірну схему, яку ви бажаєте використати, а потім натисніть Продовжити. Ці кольори можна змінити та налаштувати пізніше."
|
||||
|
||||
# game/gui7.rpy:302
|
||||
old "{b}Warning{/b}\nContinuing will overwrite customized bar, button, save slot, scrollbar, and slider images.\n\nWhat would you like to do?"
|
||||
@@ -963,7 +963,7 @@ translate ukrainian strings:
|
||||
|
||||
# game/install.rpy:114
|
||||
old "This screen allows you to install libraries that can't be distributed with Ren'Py. Some of these libraries may require you to agree to a third-party license before being used or distributed."
|
||||
new "Цей екран дозволяє встановлювати бібліотеки, що неможлоиво поширити за допомогою Ren'Py. Деякі з цих бібліотек можуть вимагати від вас підтвердити ліцензію третьої сторони перед використанням або розповсюдженням."
|
||||
new "Цей екран дозволяє встановлювати бібліотеки, які неможлоиво поширювати разом з Ren'Py. Деякі з цих бібліотек можуть вимагати від вас підтвердити ліцензію третьої сторони перед використанням або розповсюдженням."
|
||||
|
||||
# game/install.rpy:120
|
||||
old "Install Steam Support"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
+295
-75
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
@@ -32,9 +32,97 @@ init python:
|
||||
import time
|
||||
import pygame_sdl2
|
||||
import zipfile
|
||||
import re
|
||||
import hashlib
|
||||
|
||||
WEB_PATH = None
|
||||
|
||||
class ProgressiveFilter(object):
|
||||
def __init__(self, project):
|
||||
self.project = project
|
||||
self.destination = get_web_destination(project)
|
||||
self.remote_files = {}
|
||||
self.images = []
|
||||
self.path_filters = []
|
||||
load_filters(project, self.path_filters)
|
||||
|
||||
def filter(self, file, variant, format):
|
||||
"""
|
||||
Detect and copy the files to be downloaded progressively,
|
||||
and prevent them to be put in the ZIP archive.
|
||||
Returns True if the file must be included in the ZIP archive.
|
||||
"""
|
||||
if variant != 'web' or format != 'zip': # useless?
|
||||
return True
|
||||
|
||||
base, ext = os.path.splitext(file.name)
|
||||
|
||||
copy_file = False
|
||||
# Images
|
||||
if (ext.lower() in ('.jpg', '.jpeg', '.png', '.webp', '.avif', '.svg')
|
||||
and filters_match(self.path_filters, file.name, 'image')):
|
||||
# Add image to list and generate placeholder later
|
||||
self.images.append((file.path, file.name))
|
||||
copy_file = True
|
||||
|
||||
# Musics (but not SFX - no placeholders for short, non-looping sounds)
|
||||
elif (ext.lower() in ('.wav', '.mp2', '.mp3', '.ogg', '.opus')
|
||||
and filters_match(self.path_filters, file.name, 'music')):
|
||||
self.remote_files[file.name[len('game/'):]] = 'music -'
|
||||
copy_file = True
|
||||
|
||||
# Voices
|
||||
elif (ext.lower() in ('.wav', '.mp2', '.mp3', '.ogg', '.opus')
|
||||
and filters_match(self.path_filters, file.name, 'voice')):
|
||||
self.remote_files[file.name[len('game/'):]] = 'voice -'
|
||||
copy_file = True
|
||||
|
||||
# Videos are never included.
|
||||
elif (ext.lower() in ('.ogv', '.webm', '.mp4', '.mkv', '.avi')):
|
||||
self.remote_files[file.name[len('game/'):]] = 'video -'
|
||||
copy_file = True
|
||||
|
||||
if not copy_file:
|
||||
return True
|
||||
|
||||
# Copy the file to the destination folder, keeping metadata
|
||||
dst_path = os.path.join(self.destination, file.name)
|
||||
dst_dir = os.path.dirname(dst_path)
|
||||
if not os.path.isdir(dst_dir):
|
||||
os.makedirs(dst_dir, 0o755)
|
||||
shutil.copy2(file.path, dst_path)
|
||||
|
||||
return False
|
||||
|
||||
def finalize(self):
|
||||
"""
|
||||
Append some generated files to the ZIP archive.
|
||||
"""
|
||||
zout = zipfile.ZipFile(os.path.join(self.destination, 'game.zip'), 'a')
|
||||
tmpdir = tempfile.mkdtemp()
|
||||
|
||||
# Generate and append placeholder image files to archive
|
||||
for (src, dst) in self.images:
|
||||
surface = pygame_sdl2.image.load(src)
|
||||
(w, h) = (surface.get_width(), surface.get_height())
|
||||
self.remote_files[dst[len('game/'):]] = 'image {},{}'.format(w,h)
|
||||
tmpfile = generate_image_placeholder(surface, tmpdir)
|
||||
placeholder_relpath = os.path.join('_placeholders', dst[len('game/'):])
|
||||
zout.write(tmpfile, placeholder_relpath)
|
||||
|
||||
# Prepare a list of remote files for renpy.loader
|
||||
remote_files_str = ''
|
||||
for f in sorted(self.remote_files):
|
||||
remote_files_str += f + "\n"
|
||||
remote_files_str += self.remote_files[f] + "\n"
|
||||
zout.writestr('game/renpyweb_remote_files.txt',
|
||||
remote_files_str,
|
||||
zipfile.ZIP_DEFLATED)
|
||||
|
||||
# Clean-up
|
||||
shutil.rmtree(tmpdir)
|
||||
zout.close()
|
||||
|
||||
def find_web():
|
||||
|
||||
global WEB_PATH
|
||||
@@ -140,80 +228,175 @@ init python:
|
||||
return f_rule
|
||||
return False
|
||||
|
||||
def repack_for_progressive_download(p):
|
||||
def generate_pwa_icons(p, destination):
|
||||
"""
|
||||
Filter out downloadable resources and generate placeholders
|
||||
Checks if the pwa_icon.png file exists in the game folder and generates
|
||||
required icons for PWA in subdirectory icons/ in the destination folder.
|
||||
If no pwa_icon.png is found, the default Ren'Py icon is used instead in
|
||||
the web folder, if exists.
|
||||
"""
|
||||
# Check if there's a custom icon in the game directory
|
||||
icon_path = os.path.join(p.path, 'web-icon.png')
|
||||
# Generate a default icon if there isn't
|
||||
if not os.path.exists(icon_path):
|
||||
icon_path = os.path.join(WEB_PATH, 'web-icon.png')
|
||||
|
||||
# Check if path is a valid image
|
||||
if not os.path.exists(icon_path):
|
||||
# Skip pwa support if no icon is found
|
||||
return
|
||||
# Create icons directory
|
||||
icons_dir = os.path.join(destination, 'icons')
|
||||
if not os.path.isdir(icons_dir):
|
||||
os.makedirs(icons_dir, 0o777)
|
||||
# Check the height and width of the icon
|
||||
icon = pygame_sdl2.image.load(icon_path)
|
||||
icon_width = icon.get_width()
|
||||
icon_height = icon.get_height()
|
||||
if icon_width != icon_height:
|
||||
raise RuntimeError("The icon must be square")
|
||||
if icon_width < 512:
|
||||
raise RuntimeError("The icon must be at least 512x512 pixels")
|
||||
|
||||
scale = renpy.display.scale.smoothscale
|
||||
|
||||
best_compression = 9
|
||||
# Generate 512x512 icon, if needed
|
||||
if icon_width != 512:
|
||||
icon512 = scale(icon, (512, 512))
|
||||
pygame_sdl2.image.save(icon512, os.path.join(icons_dir, 'icon-512x512.png'), best_compression)
|
||||
else:
|
||||
pygame_sdl2.image.save(icon, os.path.join(icons_dir, 'icon-512x512.png'), best_compression)
|
||||
|
||||
# Generate 384x384 icon
|
||||
icon384 = scale(icon, (384, 384))
|
||||
pygame_sdl2.image.save(icon384, os.path.join(icons_dir, 'icon-384x384.png'), best_compression)
|
||||
|
||||
# Generate 192x192 icon
|
||||
icon192 = scale(icon, (192, 192))
|
||||
pygame_sdl2.image.save(icon192, os.path.join(icons_dir, 'icon-192x192.png'), best_compression)
|
||||
|
||||
# Generate 152x152 icon
|
||||
icon152 = scale(icon, (152, 152))
|
||||
pygame_sdl2.image.save(icon152, os.path.join(icons_dir, 'icon-152x152.png'), best_compression)
|
||||
|
||||
# Generate 144x144 icon
|
||||
icon144 = scale(icon, (144, 144))
|
||||
pygame_sdl2.image.save(icon144, os.path.join(icons_dir, 'icon-144x144.png'), best_compression)
|
||||
|
||||
# Generate 128x128 icon
|
||||
icon128 = scale(icon, (128, 128))
|
||||
pygame_sdl2.image.save(icon128, os.path.join(icons_dir, 'icon-128x128.png'), best_compression)
|
||||
|
||||
# Generate 96x96 icon
|
||||
icon96 = scale(icon, (96, 96))
|
||||
pygame_sdl2.image.save(icon96, os.path.join(icons_dir, 'icon-96x96.png'), best_compression)
|
||||
|
||||
# Generate 72x72 icon
|
||||
icon72 = scale(icon, (72, 72))
|
||||
pygame_sdl2.image.save(icon72, os.path.join(icons_dir, 'icon-72x72.png'), best_compression)
|
||||
|
||||
# Add 128 pixels to the 384x384 icon to generate 512x512 icon maskable
|
||||
icon512_maskable = pygame_sdl2.Surface((512, 512), pygame_sdl2.SRCALPHA)
|
||||
icon512_maskable.blit(icon384, (64, 64))
|
||||
pygame_sdl2.image.save(icon512_maskable, os.path.join(icons_dir, 'icon-512x512-maskable.png'), best_compression)
|
||||
|
||||
# Resize icon512_maskable to 384x384 to generate 384x384 icon maskable
|
||||
icon384_maskable = scale(icon512_maskable, (384, 384))
|
||||
pygame_sdl2.image.save(icon384_maskable, os.path.join(icons_dir, 'icon-384x384-maskable.png'), best_compression)
|
||||
|
||||
# Resize icon512_maskable to 192x192 to generate 192x192 icon maskable
|
||||
icon192_maskable = scale(icon512_maskable, (192, 192))
|
||||
pygame_sdl2.image.save(icon192_maskable, os.path.join(icons_dir, 'icon-192x192-maskable.png'), best_compression)
|
||||
|
||||
# Resize icon512_maskable to 152x152 to generate 152x152 icon maskable
|
||||
icon152_maskable = scale(icon512_maskable, (152, 152))
|
||||
pygame_sdl2.image.save(icon152_maskable, os.path.join(icons_dir, 'icon-152x152-maskable.png'), best_compression)
|
||||
|
||||
# Resize icon512_maskable to 144x144 to generate 144x144 icon maskable
|
||||
icon144_maskable = scale(icon512_maskable, (144, 144))
|
||||
pygame_sdl2.image.save(icon144_maskable, os.path.join(icons_dir, 'icon-144x144-maskable.png'), best_compression)
|
||||
|
||||
# Resize icon512_maskable to 128x128 to generate 128x128 icon maskable
|
||||
icon128_maskable = scale(icon512_maskable, (128, 128))
|
||||
pygame_sdl2.image.save(icon128_maskable, os.path.join(icons_dir, 'icon-128x128-maskable.png'), best_compression)
|
||||
|
||||
# Resize icon512_maskable to 96x96 to generate 96x96 icon maskable
|
||||
icon96_maskable = scale(icon512_maskable, (96, 96))
|
||||
pygame_sdl2.image.save(icon96_maskable, os.path.join(icons_dir, 'icon-96x96-maskable.png'), best_compression)
|
||||
|
||||
# Resize icon512_maskable to 72x72 to generate 72x72 icon maskable
|
||||
icon72_maskable = scale(icon512_maskable, (72, 72))
|
||||
pygame_sdl2.image.save(icon72_maskable, os.path.join(icons_dir, 'icon-72x72-maskable.png'), best_compression)
|
||||
|
||||
def generate_files_catalog(destination):
|
||||
"""
|
||||
Generates a JSON file with information about the game files.
|
||||
This file is used by the service worker to cache the game files.
|
||||
|
||||
:param destination: string, The destination path where the files will be copied to and where
|
||||
game folder is located.
|
||||
:param version: string, the version of the game. Should be the same as the version in the
|
||||
manifest.json file.
|
||||
|
||||
:return: None
|
||||
"""
|
||||
catalog = {
|
||||
"files": [ ],
|
||||
"version": int(time.time())
|
||||
}
|
||||
# Walk through the game folder
|
||||
for root, dirs, files in os.walk(destination):
|
||||
for file in files:
|
||||
# Get the absolute path of the file
|
||||
file_path = os.path.join(root, file)
|
||||
# Convert it to relative path of the file
|
||||
file_name = os.path.relpath(file_path, destination)
|
||||
# Replace backslashes with forward slashes
|
||||
file_name = file_name.replace("\\", "/")
|
||||
# Add the file to the catalog
|
||||
catalog["files"].append(file_name)
|
||||
|
||||
with io.open(os.path.join(destination, "pwa_catalog.json"), 'w', encoding='utf-8') as f:
|
||||
f.write(json.dumps(catalog))
|
||||
|
||||
def prepare_pwa_files(p, destination):
|
||||
"""
|
||||
Replaces in service-worker.js the cache name with the game name and current timestamp.
|
||||
Replace in manifest.json the project name with the ones in the game.
|
||||
"""
|
||||
|
||||
destination = get_web_destination(p)
|
||||
# Open the service-worker.js file
|
||||
with io.open(os.path.join(destination, "service-worker.js"), encoding='utf-8') as f:
|
||||
service_worker = f.read()
|
||||
|
||||
path_filters = []
|
||||
load_filters(p, path_filters)
|
||||
# Use re to slugify the game name, avoiding use of 3rd party libraries
|
||||
slugified_name = re.sub(r'\W+', '-', p.dump['build']['display_name']).lower()
|
||||
service_worker = service_worker.replace('renpy-web-game', slugified_name)
|
||||
|
||||
shutil.move(
|
||||
os.path.join(destination, 'game.zip'),
|
||||
os.path.join(destination, 'game-old.zip'))
|
||||
zin = zipfile.ZipFile(os.path.join(destination, 'game-old.zip'))
|
||||
zout = zipfile.ZipFile(os.path.join(destination, 'game.zip'), 'w')
|
||||
remote_files = {}
|
||||
tmpdir = tempfile.mkdtemp()
|
||||
# Write the file
|
||||
with io.open(os.path.join(destination, "service-worker.js"), 'w', encoding='utf-8') as f:
|
||||
f.write(service_worker)
|
||||
|
||||
for m in zin.infolist():
|
||||
# Open the manifest.json file
|
||||
with io.open(os.path.join(destination, "manifest.json"), encoding='utf-8') as f:
|
||||
manifest = json.load(f)
|
||||
|
||||
base, ext = os.path.splitext(m.filename)
|
||||
|
||||
# Images
|
||||
if (ext.lower() in ('.jpg', '.jpeg', '.png', '.webp')
|
||||
and filters_match(path_filters, m.filename, 'image')):
|
||||
|
||||
zin.extract(m, path=destination)
|
||||
surface = pygame_sdl2.image.load(os.path.join(destination,m.filename))
|
||||
(w,h) = (surface.get_width(),surface.get_height())
|
||||
# Replace the project name with the ones in the game
|
||||
manifest["name"] = p.dump['build']['display_name']
|
||||
|
||||
remote_files[m.filename[len('game/'):]] = 'image {},{}'.format(w,h)
|
||||
screen_size = p.dump.get("size")
|
||||
# If width are smaller than height, set the orientation to portrait. If not, leave it as is.
|
||||
if screen_size[0] < screen_size[1]:
|
||||
manifest["orientation"] = "portrait-primary"
|
||||
|
||||
tmpfile = generate_image_placeholder(surface, tmpdir)
|
||||
placeholder_relpath = os.path.join('_placeholders', m.filename[len('game/'):])
|
||||
zout.write(tmpfile, placeholder_relpath)
|
||||
# Write the file
|
||||
with io.open(os.path.join(destination, "manifest.json"), 'w', encoding='utf-8') as f:
|
||||
f.write(json.dumps(manifest))
|
||||
|
||||
# Musics (but not SFX - no placeholders for short, non-looping sounds)
|
||||
elif (ext.lower() in ('.wav', '.mp2', '.mp3', '.ogg', '.opus')
|
||||
and filters_match(path_filters, m.filename, 'music')):
|
||||
zin.extract(m, path=destination)
|
||||
remote_files[m.filename[len('game/'):]] = 'music -'
|
||||
|
||||
# Voices
|
||||
elif (ext.lower() in ('.wav', '.mp2', '.mp3', '.ogg', '.opus')
|
||||
and filters_match(path_filters, m.filename, 'voice')):
|
||||
zin.extract(m, path=destination)
|
||||
remote_files[m.filename[len('game/'):]] = 'voice -'
|
||||
|
||||
# Videos are currently not supported, strip them if not already
|
||||
elif (ext.lower() in ('.ogv', '.webm', '.mp4', '.mkv', '.avi')):
|
||||
pass
|
||||
|
||||
# Default: keep (extract & recompress to new .zip)
|
||||
else:
|
||||
# Not using zout.writestr(m, zin.read(m)) to avoid MemoryError
|
||||
tmpfile = zin.extract(m, tmpdir)
|
||||
date_time = time.mktime(m.date_time+(0,0,0))
|
||||
os.utime(tmpfile, (date_time,date_time))
|
||||
zout.write(tmpfile, m.filename, m.compress_type)
|
||||
|
||||
# Prepare a list of remote files for renpy.loader
|
||||
remote_files_str = ''
|
||||
for f in sorted(remote_files):
|
||||
remote_files_str += f + "\n"
|
||||
remote_files_str += remote_files[f] + "\n"
|
||||
zout.writestr('game/renpyweb_remote_files.txt',
|
||||
remote_files_str,
|
||||
zipfile.ZIP_DEFLATED)
|
||||
|
||||
# Clean-up
|
||||
shutil.rmtree(tmpdir)
|
||||
zout.close()
|
||||
zin.close()
|
||||
os.unlink(os.path.join(destination, 'game-old.zip'))
|
||||
generate_files_catalog(destination)
|
||||
|
||||
|
||||
def build_web(p, gui=True):
|
||||
@@ -236,28 +419,73 @@ init python:
|
||||
|
||||
os.makedirs(destination, 0o777)
|
||||
|
||||
files_filter = ProgressiveFilter(p)
|
||||
|
||||
# Use the distributor to make game.zip.
|
||||
distribute.Distributor(p, packages=[ "web" ], packagedest=os.path.join(destination, "game"), reporter=reporter, noarchive=True, scan=False)
|
||||
distribute.Distributor(p, packages=[ "web" ], packagedest=os.path.join(destination, "game"),
|
||||
reporter=reporter, noarchive=True, scan=False, files_filter=files_filter)
|
||||
|
||||
reporter.info(_("Preparing progressive download"))
|
||||
repack_for_progressive_download(p)
|
||||
files_filter.finalize()
|
||||
|
||||
# Copy the files from WEB_PATH to destination.
|
||||
for fn in os.listdir(WEB_PATH):
|
||||
if fn in { "game.zip", "hash.txt", "index.html" }:
|
||||
if fn in { "game.zip", "hash.txt", "index.html", "pwa_icon.png" }:
|
||||
continue
|
||||
|
||||
shutil.copy(os.path.join(WEB_PATH, fn), os.path.join(destination, fn))
|
||||
|
||||
# Find the presplash and copy it over.
|
||||
presplash = None
|
||||
|
||||
if not PY2:
|
||||
for fn in [ "web-presplash.png", "web-presplash.jpg", "web-presplash.webp" ]:
|
||||
fullfn = os.path.join(project.current.path, fn)
|
||||
|
||||
if os.path.exists(fullfn):
|
||||
presplash = fn
|
||||
break
|
||||
|
||||
if presplash:
|
||||
os.unlink(os.path.join(destination, "web-presplash.jpg"))
|
||||
shutil.copy(os.path.join(project.current.path, presplash), os.path.join(destination, presplash))
|
||||
|
||||
# Copy over index.html.
|
||||
with io.open(os.path.join(WEB_PATH, "index.html"), encoding='utf-8') as f:
|
||||
html = f.read()
|
||||
|
||||
html = html.replace("%%TITLE%%", display_name)
|
||||
if PY2:
|
||||
html = html.replace("%%TITLE%%", display_name)
|
||||
else:
|
||||
html = html.replace("Ren'Py Web Game", display_name)
|
||||
|
||||
if presplash:
|
||||
html = html.replace("web-presplash.jpg", presplash)
|
||||
|
||||
with io.open(os.path.join(destination, "index.html"), "w", encoding='utf-8') as f:
|
||||
f.write(html)
|
||||
|
||||
if not PY2:
|
||||
generate_pwa_icons(p, destination)
|
||||
prepare_pwa_files(p, destination)
|
||||
|
||||
# Zip up the game.
|
||||
|
||||
zip_targets = [ ]
|
||||
|
||||
for dn, dirs, files in os.walk(destination):
|
||||
for directory in dirs:
|
||||
zip_targets.append(os.path.join(dn, directory))
|
||||
for file in files:
|
||||
zip_targets.append(os.path.join(dn, file))
|
||||
|
||||
with zipfile.ZipFile(destination + ".zip", 'w') as zf:
|
||||
for i, target in enumerate(zip_targets):
|
||||
zf.write(target, os.path.relpath(target, destination))
|
||||
reporter.progress(_("Creating package..."), i + 1, len(zip_targets))
|
||||
|
||||
# Start the web server.
|
||||
|
||||
webserver.start(destination)
|
||||
|
||||
|
||||
@@ -331,19 +559,11 @@ screen web():
|
||||
|
||||
text _("Images and music can be downloaded while playing. A 'progressive_download.txt' file will be created so you can configure this behavior.")
|
||||
|
||||
add SPACER
|
||||
|
||||
text _("Current limitations in the web platform mean that loading large images may cause audio or framerate glitches, and lower performance in general. Movies aren't supported.")
|
||||
|
||||
|
||||
textbutton _("Return") action Jump("front_page") style "l_left_button"
|
||||
|
||||
label web:
|
||||
|
||||
if not PY2:
|
||||
$ interface.info(_("This feature is not supported in Ren'Py 8."), _("We will restore support in a future release of Ren'Py 8. Until then, please use Ren'Py 7 for web support."))
|
||||
return
|
||||
|
||||
if WEB_PATH is None:
|
||||
$ interface.yesno(_("Before packaging web apps, you'll need to download RenPyWeb, Ren'Py's web support. Would you like to download RenPyWeb now?"), no=Jump("front_page"))
|
||||
$ add_dlc("web", restart=True)
|
||||
|
||||
@@ -10,6 +10,7 @@ import sys
|
||||
import shutil
|
||||
import mimetypes
|
||||
import io
|
||||
import hashlib
|
||||
|
||||
# The path to the root of the web server.
|
||||
root = ""
|
||||
@@ -84,19 +85,44 @@ class WebHandler(http.server.BaseHTTPRequestHandler):
|
||||
# newline translations, making the actual size of the content
|
||||
# transmitted *less* than the content-length!
|
||||
f = open(path, 'rb')
|
||||
fs = os.fstat(f.fileno())
|
||||
except IOError:
|
||||
self.send_error(404, "File not found")
|
||||
return None
|
||||
try:
|
||||
|
||||
last_modified = self.date_time_string(fs.st_mtime)
|
||||
|
||||
ims = self.headers.get("If-Modified-Since", None)
|
||||
if (ims is not None) and (ims == last_modified):
|
||||
self.send_response(304)
|
||||
self.end_headers()
|
||||
return None
|
||||
|
||||
hash = hashlib.md5()
|
||||
|
||||
while True:
|
||||
data = f.read(1024 * 1024)
|
||||
if not data:
|
||||
break
|
||||
hash.update(data)
|
||||
|
||||
f.seek(0)
|
||||
|
||||
etag = '"{}"'.format(hash.hexdigest())
|
||||
|
||||
if self.headers.get("If-None-Match", None) == etag:
|
||||
self.send_response(304)
|
||||
self.end_headers()
|
||||
return None
|
||||
|
||||
self.send_response(200)
|
||||
self.send_header("Content-type", ctype)
|
||||
fs = os.fstat(f.fileno())
|
||||
|
||||
# Ren'Py - bust cache.
|
||||
self.send_header("Pragma", "no-cache")
|
||||
|
||||
self.send_header("Cache-Control", "max-age=0, must-revalidate")
|
||||
self.send_header("Content-Length", str(fs[6]))
|
||||
self.send_header("Last-Modified", self.date_time_string(fs.st_mtime))
|
||||
self.send_header("ETag", etag)
|
||||
self.end_headers()
|
||||
return f
|
||||
except Exception:
|
||||
@@ -220,7 +246,22 @@ class WebHandler(http.server.BaseHTTPRequestHandler):
|
||||
'.htm': 'text/html',
|
||||
'.html': 'text/html',
|
||||
'.js': 'application/javascript',
|
||||
}
|
||||
'.wasm': 'application/wasm',
|
||||
'.avi': 'video/x-msvideo',
|
||||
'.m1v': 'video/mpeg',
|
||||
'.m2v': 'video/mpeg',
|
||||
'.m4v': 'video/mp4',
|
||||
'.mkv': 'video/x-matroska',
|
||||
'.mp4': 'video/mp4',
|
||||
'.mpe': 'video/mpeg',
|
||||
'.mpeg': 'video/mpeg',
|
||||
'.mpg': 'video/mpeg',
|
||||
'.mpg4': 'video/mp4',
|
||||
'.mpv': 'video/x-matroska',
|
||||
'.ogv': 'video/ogg',
|
||||
'.webm': 'video/webm',
|
||||
'.wmv': 'video/x-ms-wmv',
|
||||
}
|
||||
|
||||
|
||||
def run():
|
||||
|
||||
@@ -60,7 +60,6 @@ int renpy_IMG_SavePNG_RW(SDL_RWops *src, SDL_Surface *surf,int compression){
|
||||
SDL_PixelFormat *fmt=NULL;
|
||||
SDL_Surface *tempsurf=NULL;
|
||||
int ret;
|
||||
unsigned int i;
|
||||
png_colorp palette;
|
||||
Uint8 *palette_alpha=NULL;
|
||||
png_byte **row_pointers=NULL;
|
||||
@@ -149,7 +148,7 @@ int renpy_IMG_SavePNG_RW(SDL_RWops *src, SDL_Surface *surf,int compression){
|
||||
}
|
||||
}
|
||||
|
||||
for(i=0;i < surf->h;i++){
|
||||
for(int i=0;i < surf->h;i++){
|
||||
row_pointers[i]= ((png_byte*) surf->pixels) + i * surf->pitch;
|
||||
}
|
||||
|
||||
|
||||
+2
-1
@@ -1,9 +1,10 @@
|
||||
_renpy gen/_renpy.c IMG_savepng.c core.c
|
||||
_renpybidi gen/_renpybidi.c renpybidicore.c
|
||||
renpy.audio.renpysound gen/renpy.audio.renpysound.c renpysound_core.c ffmedia.c
|
||||
renpy.parsersupport gen/renpy.parsersupport.c
|
||||
renpy.lexersupport gen/renpy.lexersupport.c
|
||||
renpy.pydict gen/renpy.pydict.c
|
||||
renpy.style gen/renpy.style.c
|
||||
renpy.encryption gen/renpy.encryption.c
|
||||
renpy.compat.dictviews gen/renpy.compat.dictviews.c
|
||||
renpy.styledata.styleclass gen/renpy.styledata.styleclass.c
|
||||
renpy.styledata.stylesets gen/renpy.styledata.stylesets.c
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
# -*- python -*-
|
||||
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
|
||||
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
cdef extern from "fribidi.h":
|
||||
cdef extern from "fribidi/fribidi.h":
|
||||
int FRIBIDI_TYPE_LTR
|
||||
int FRIBIDI_TYPE_ON
|
||||
int FRIBIDI_TYPE_RTL
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
+24
-50
@@ -51,9 +51,9 @@ void pixellate32_core(PyObject *pysrc,
|
||||
SDL_Surface *dst;
|
||||
|
||||
int x, y, i, j;
|
||||
Uint32 srcpitch, dstpitch;
|
||||
Uint32 srcw, srch;
|
||||
Uint32 dstw, dsth;
|
||||
int srcpitch, dstpitch;
|
||||
int srcw, srch;
|
||||
int dstw, dsth;
|
||||
int vw, vh;
|
||||
|
||||
unsigned char *srcpixels;
|
||||
@@ -193,9 +193,9 @@ void pixellate24_core(PyObject *pysrc,
|
||||
SDL_Surface *dst;
|
||||
|
||||
int x, y, i, j;
|
||||
Uint32 srcpitch, dstpitch;
|
||||
Uint32 srcw, srch;
|
||||
Uint32 dstw, dsth;
|
||||
int srcpitch, dstpitch;
|
||||
int srcw, srch;
|
||||
int dstw, dsth;
|
||||
int vw, vh;
|
||||
|
||||
unsigned char *srcpixels;
|
||||
@@ -322,9 +322,8 @@ void map32_core(PyObject *pysrc,
|
||||
SDL_Surface *dst;
|
||||
|
||||
int x, y;
|
||||
Uint32 srcpitch, dstpitch;
|
||||
Uint32 srcw, srch;
|
||||
Uint32 dstw, dsth;
|
||||
int srcpitch, dstpitch;
|
||||
int srcw, srch;
|
||||
|
||||
char *srcpixels;
|
||||
char *dstpixels;
|
||||
@@ -344,9 +343,7 @@ void map32_core(PyObject *pysrc,
|
||||
srcpitch = src->pitch;
|
||||
dstpitch = dst->pitch;
|
||||
srcw = src->w;
|
||||
dstw = dst->w;
|
||||
srch = src->h;
|
||||
dsth = dst->h;
|
||||
|
||||
srcrow = srcpixels;
|
||||
dstrow = dstpixels;
|
||||
@@ -381,9 +378,8 @@ void map24_core(PyObject *pysrc,
|
||||
SDL_Surface *dst;
|
||||
|
||||
int x, y;
|
||||
Uint32 srcpitch, dstpitch;
|
||||
Uint32 srcw, srch;
|
||||
Uint32 dstw, dsth;
|
||||
int srcpitch, dstpitch;
|
||||
int srcw, srch;
|
||||
|
||||
char *srcpixels;
|
||||
char *dstpixels;
|
||||
@@ -403,9 +399,7 @@ void map24_core(PyObject *pysrc,
|
||||
srcpitch = src->pitch;
|
||||
dstpitch = dst->pitch;
|
||||
srcw = src->w;
|
||||
dstw = dst->w;
|
||||
srch = src->h;
|
||||
dsth = dst->h;
|
||||
|
||||
srcrow = srcpixels;
|
||||
dstrow = dstpixels;
|
||||
@@ -446,9 +440,8 @@ void linmap32_core(PyObject *pysrc,
|
||||
SDL_Surface *dst;
|
||||
|
||||
int x, y;
|
||||
Uint32 srcpitch, dstpitch;
|
||||
Uint32 srcw, srch;
|
||||
Uint32 dstw, dsth;
|
||||
int srcpitch, dstpitch;
|
||||
int srcw, srch;
|
||||
|
||||
char *srcpixels;
|
||||
char *dstpixels;
|
||||
@@ -468,9 +461,7 @@ void linmap32_core(PyObject *pysrc,
|
||||
srcpitch = src->pitch;
|
||||
dstpitch = dst->pitch;
|
||||
srcw = src->w;
|
||||
dstw = dst->w;
|
||||
srch = src->h;
|
||||
dsth = dst->h;
|
||||
|
||||
srcrow = srcpixels;
|
||||
dstrow = dstpixels;
|
||||
@@ -505,9 +496,8 @@ void linmap24_core(PyObject *pysrc,
|
||||
SDL_Surface *dst;
|
||||
|
||||
int x, y;
|
||||
Uint32 srcpitch, dstpitch;
|
||||
Uint32 srcw, srch;
|
||||
Uint32 dstw, dsth;
|
||||
int srcpitch, dstpitch;
|
||||
int srcw, srch;
|
||||
|
||||
char *srcpixels;
|
||||
char *dstpixels;
|
||||
@@ -527,9 +517,7 @@ void linmap24_core(PyObject *pysrc,
|
||||
srcpitch = src->pitch;
|
||||
dstpitch = dst->pitch;
|
||||
srcw = src->w;
|
||||
dstw = dst->w;
|
||||
srch = src->h;
|
||||
dsth = dst->h;
|
||||
|
||||
srcrow = srcpixels;
|
||||
dstrow = dstpixels;
|
||||
@@ -653,8 +641,8 @@ void linblur32_core(PyObject *pysrc,
|
||||
SDL_Surface *src;
|
||||
SDL_Surface *dst;
|
||||
|
||||
Uint32 rows, cols;
|
||||
Uint32 incr, skip;
|
||||
int rows, cols;
|
||||
int incr, skip;
|
||||
|
||||
unsigned char *srcpixels;
|
||||
unsigned char *dstpixels;
|
||||
@@ -793,8 +781,8 @@ void linblur24_core(PyObject *pysrc,
|
||||
SDL_Surface *src;
|
||||
SDL_Surface *dst;
|
||||
|
||||
Uint32 rows, cols;
|
||||
Uint32 incr, skip;
|
||||
int rows, cols;
|
||||
int incr, skip;
|
||||
|
||||
unsigned char *srcpixels;
|
||||
unsigned char *dstpixels;
|
||||
@@ -928,9 +916,8 @@ void alphamunge_core(PyObject *pysrc,
|
||||
SDL_Surface *src;
|
||||
SDL_Surface *dst;
|
||||
|
||||
Uint32 srcpitch, dstpitch;
|
||||
Uint32 srcw, srch;
|
||||
Uint32 dstw, dsth;
|
||||
int srcpitch, dstpitch;
|
||||
int dstw, dsth;
|
||||
|
||||
unsigned char *srcpixels;
|
||||
unsigned char *dstpixels;
|
||||
@@ -951,9 +938,7 @@ void alphamunge_core(PyObject *pysrc,
|
||||
dstpixels = (unsigned char *) dst->pixels;
|
||||
srcpitch = src->pitch;
|
||||
dstpitch = dst->pitch;
|
||||
srcw = src->w;
|
||||
dstw = dst->w;
|
||||
srch = src->h;
|
||||
dsth = dst->h;
|
||||
|
||||
|
||||
@@ -996,9 +981,8 @@ void scale32_core(PyObject *pysrc, PyObject *pydst,
|
||||
SDL_Surface *dst;
|
||||
|
||||
int y;
|
||||
Uint32 srcpitch, dstpitch;
|
||||
Uint32 srcw, srch;
|
||||
Uint32 dstw, dsth;
|
||||
int srcpitch, dstpitch;
|
||||
int dstw, dsth;
|
||||
float xdelta, ydelta;
|
||||
|
||||
unsigned char *srcpixels;
|
||||
@@ -1014,9 +998,7 @@ void scale32_core(PyObject *pysrc, PyObject *pydst,
|
||||
dstpixels = (unsigned char *) dst->pixels;
|
||||
srcpitch = src->pitch;
|
||||
dstpitch = dst->pitch;
|
||||
srcw = src->w;
|
||||
dstw = dst->w;
|
||||
srch = src->h;
|
||||
dsth = dst->h;
|
||||
|
||||
if (precise) {
|
||||
@@ -1041,7 +1023,6 @@ void scale32_core(PyObject *pysrc, PyObject *pydst,
|
||||
for (y = 0; y < dsth; y++) {
|
||||
|
||||
unsigned char *s0;
|
||||
unsigned char *s1;
|
||||
unsigned char *d;
|
||||
unsigned char *dend;
|
||||
|
||||
@@ -1058,7 +1039,6 @@ void scale32_core(PyObject *pysrc, PyObject *pydst,
|
||||
s0frac = 256 - s1frac;
|
||||
|
||||
s0 = srcpixels + (sline >> 8) * srcpitch;
|
||||
s1 = s0 + srcpitch;
|
||||
|
||||
scol = source_xoff * 256 + dest_xoff * xdelta;
|
||||
|
||||
@@ -1109,15 +1089,13 @@ void scale24_core(PyObject *pysrc, PyObject *pydst,
|
||||
SDL_Surface *dst;
|
||||
|
||||
int y;
|
||||
Uint32 srcpitch, dstpitch;
|
||||
Uint32 srcw, srch;
|
||||
Uint32 dstw, dsth;
|
||||
int srcpitch, dstpitch;
|
||||
int dstw, dsth;
|
||||
float xdelta, ydelta;
|
||||
|
||||
unsigned char *srcpixels;
|
||||
unsigned char *dstpixels;
|
||||
|
||||
|
||||
src = PySurface_AsSurface(pysrc);
|
||||
dst = PySurface_AsSurface(pydst);
|
||||
|
||||
@@ -1127,9 +1105,7 @@ void scale24_core(PyObject *pysrc, PyObject *pydst,
|
||||
dstpixels = (unsigned char *) dst->pixels;
|
||||
srcpitch = src->pitch;
|
||||
dstpitch = dst->pitch;
|
||||
srcw = src->w;
|
||||
dstw = dst->w;
|
||||
srch = src->h;
|
||||
dsth = dst->h;
|
||||
|
||||
xdelta = 255.0 * (source_width - 1) / dest_width;
|
||||
@@ -1138,7 +1114,6 @@ void scale24_core(PyObject *pysrc, PyObject *pydst,
|
||||
for (y = 0; y < dsth; y++) {
|
||||
|
||||
unsigned char *s0;
|
||||
unsigned char *s1;
|
||||
unsigned char *d;
|
||||
unsigned char *dend;
|
||||
|
||||
@@ -1155,7 +1130,6 @@ void scale24_core(PyObject *pysrc, PyObject *pydst,
|
||||
s0frac = 256 - s1frac;
|
||||
|
||||
s0 = srcpixels + (sline >> 8) * srcpitch;
|
||||
s1 = s0 + srcpitch;
|
||||
|
||||
scol = source_xoff * 255 + dest_xoff * xdelta;
|
||||
|
||||
|
||||
+131
-182
@@ -56,7 +56,7 @@ static SDL_Surface *rgba_surface = NULL;
|
||||
|
||||
/*******************************************************************************
|
||||
* SDL_RWops <-> AVIOContext
|
||||
* */
|
||||
*/
|
||||
|
||||
static int rwops_read(void *opaque, uint8_t *buf, int buf_size) {
|
||||
SDL_RWops *rw = (SDL_RWops *) opaque;
|
||||
@@ -116,9 +116,14 @@ static void rwops_close(SDL_RWops *rw) {
|
||||
|
||||
static double current_time = 0;
|
||||
|
||||
typedef struct PacketQueueEntry {
|
||||
AVPacket *pkt;
|
||||
struct PacketQueueEntry *next;
|
||||
} PacketQueueEntry;
|
||||
|
||||
typedef struct PacketQueue {
|
||||
AVPacketList *first;
|
||||
AVPacketList *last;
|
||||
PacketQueueEntry *first;
|
||||
PacketQueueEntry *last;
|
||||
} PacketQueue;
|
||||
|
||||
typedef struct FrameQueue {
|
||||
@@ -200,13 +205,10 @@ typedef struct MediaState {
|
||||
AVCodecContext *video_context;
|
||||
AVCodecContext *audio_context;
|
||||
|
||||
/* Queues of packets going to the audio and video
|
||||
* streams.
|
||||
*/
|
||||
/* Queues of packets going to the audio and video streams. */
|
||||
PacketQueue video_packet_queue;
|
||||
PacketQueue audio_packet_queue;
|
||||
|
||||
|
||||
/* The total duration of the video. Only used for information purposes. */
|
||||
double total_duration;
|
||||
|
||||
@@ -239,11 +241,6 @@ typedef struct MediaState {
|
||||
/* A frame that video is decoded into. */
|
||||
AVFrame *video_decode_frame;
|
||||
|
||||
/* The video packet we're decoding, and the partial packet. */
|
||||
AVPacket video_pkt;
|
||||
AVPacket video_pkt_tmp;
|
||||
|
||||
|
||||
/* Video Stuff ***********************************************************/
|
||||
|
||||
/* Software rescaling context. */
|
||||
@@ -268,7 +265,6 @@ typedef struct MediaState {
|
||||
/* The offset between now and the time of the current frame, at least for video. */
|
||||
double time_offset;
|
||||
|
||||
|
||||
} MediaState;
|
||||
|
||||
static AVFrame *dequeue_frame(FrameQueue *fq);
|
||||
@@ -310,8 +306,6 @@ static void deallocate(MediaState *ms) {
|
||||
av_frame_free(&ms->video_decode_frame);
|
||||
}
|
||||
|
||||
av_packet_unref(&ms->video_pkt);
|
||||
|
||||
/* Destroy audio stuff. */
|
||||
if (ms->swr) {
|
||||
swr_free(&ms->swr);
|
||||
@@ -404,6 +398,8 @@ static void deallocate_deferred() {
|
||||
SDL_UnlockMutex(deallocate_mutex);
|
||||
}
|
||||
|
||||
/* Frame queue ***************************************************************/
|
||||
|
||||
static void enqueue_frame(FrameQueue *fq, AVFrame *frame) {
|
||||
frame->opaque = NULL;
|
||||
|
||||
@@ -431,68 +427,109 @@ static AVFrame *dequeue_frame(FrameQueue *fq) {
|
||||
}
|
||||
|
||||
|
||||
/* Packet queue **************************************************************/
|
||||
|
||||
static void enqueue_packet(PacketQueue *pq, AVPacket *pkt) {
|
||||
AVPacketList *pl = av_malloc(sizeof(AVPacketList));
|
||||
if (pl == NULL)
|
||||
{
|
||||
PacketQueueEntry *pqe = av_malloc(sizeof(PacketQueueEntry));
|
||||
if (pqe == NULL) {
|
||||
av_packet_free(&pkt);
|
||||
return;
|
||||
}
|
||||
|
||||
av_init_packet(&pl->pkt);
|
||||
av_packet_ref(&pl->pkt, pkt);
|
||||
|
||||
pl->next = NULL;
|
||||
pqe->pkt = pkt;
|
||||
pqe->next = NULL;
|
||||
|
||||
if (!pq->first) {
|
||||
pq->first = pq->last = pl;
|
||||
pq->first = pq->last = pqe;
|
||||
} else {
|
||||
pq->last->next = pl;
|
||||
pq->last = pl;
|
||||
pq->last->next = pqe;
|
||||
pq->last = pqe;
|
||||
}
|
||||
}
|
||||
|
||||
static int dequeue_packet(PacketQueue *pq, AVPacket *pkt) {
|
||||
if (! pq->first ) {
|
||||
return 0;
|
||||
static AVPacket *first_packet(PacketQueue *pq) {
|
||||
if (pq->first) {
|
||||
return pq->first->pkt;
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
static void dequeue_packet(PacketQueue *pq) {
|
||||
if (! pq->first) {
|
||||
return;
|
||||
}
|
||||
|
||||
AVPacketList *pl = pq->first;
|
||||
|
||||
av_packet_move_ref(pkt, &pl->pkt);
|
||||
|
||||
pq->first = pl->next;
|
||||
PacketQueueEntry *pqe = pq->first;
|
||||
pq->first = pqe->next;
|
||||
|
||||
if (!pq->first) {
|
||||
pq->last = NULL;
|
||||
}
|
||||
|
||||
av_free(pl);
|
||||
|
||||
return 1;
|
||||
av_packet_free(&pqe->pkt);
|
||||
av_free(pqe);
|
||||
}
|
||||
|
||||
static int count_packet_queue(PacketQueue *pq) {
|
||||
AVPacketList *pl = pq->first;
|
||||
PacketQueueEntry *pqe = pq->first;
|
||||
|
||||
int rv = 0;
|
||||
int rv = 0;
|
||||
|
||||
while (pl) {
|
||||
rv += 1;
|
||||
pl = pl->next;
|
||||
}
|
||||
while (pqe) {
|
||||
rv += 1;
|
||||
pqe = pqe->next;
|
||||
}
|
||||
|
||||
return rv;
|
||||
return rv;
|
||||
}
|
||||
|
||||
static void free_packet_queue(PacketQueue *pq) {
|
||||
AVPacket scratch;
|
||||
|
||||
av_init_packet(&scratch);
|
||||
|
||||
while (dequeue_packet(pq, &scratch)) {
|
||||
av_packet_unref(&scratch);
|
||||
while(first_packet(pq)) {
|
||||
dequeue_packet(pq);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reads a packet from one of the queues, filling the other queue if
|
||||
* necessary. Returns the packet, or NULL if end of file has been reached.
|
||||
*/
|
||||
static AVPacket *read_packet(MediaState *ms, PacketQueue *pq) {
|
||||
|
||||
AVPacket *pkt;
|
||||
AVPacket *rv;
|
||||
|
||||
while (1) {
|
||||
|
||||
rv = first_packet(pq);
|
||||
if (rv) {
|
||||
return rv;
|
||||
}
|
||||
|
||||
pkt = av_packet_alloc();
|
||||
|
||||
if (!pkt) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (av_read_frame(ms->ctx, pkt)) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (pkt->stream_index == ms->video_stream && ! ms->video_finished) {
|
||||
enqueue_packet(&ms->video_packet_queue, pkt);
|
||||
} else if (pkt->stream_index == ms->audio_stream && ! ms->audio_finished) {
|
||||
enqueue_packet(&ms->audio_packet_queue, pkt);
|
||||
} else {
|
||||
av_packet_free(&pkt);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Surface queue *************************************************************/
|
||||
|
||||
static void enqueue_surface(SurfaceQueueEntry **queue, SurfaceQueueEntry *sqe) {
|
||||
while (*queue) {
|
||||
queue = &(*queue)->next;
|
||||
@@ -532,36 +569,7 @@ static void check_surface_queue(MediaState *ms) {
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* Reads a packet from one of the queues, filling the other queue if
|
||||
* necessary.
|
||||
*/
|
||||
static int read_packet(MediaState *ms, PacketQueue *pq, AVPacket *pkt) {
|
||||
AVPacket scratch;
|
||||
|
||||
av_init_packet(&scratch);
|
||||
|
||||
while (1) {
|
||||
if (dequeue_packet(pq, pkt)) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (av_read_frame(ms->ctx, &scratch)) {
|
||||
pkt->data = NULL;
|
||||
pkt->size = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (scratch.stream_index == ms->video_stream && ! ms->video_finished) {
|
||||
enqueue_packet(&ms->video_packet_queue, &scratch);
|
||||
} else if (scratch.stream_index == ms->audio_stream && ! ms->audio_finished) {
|
||||
enqueue_packet(&ms->audio_packet_queue, &scratch);
|
||||
}
|
||||
|
||||
av_packet_unref(&scratch);
|
||||
}
|
||||
}
|
||||
/* Find decoder context ******************************************************/
|
||||
|
||||
|
||||
static AVCodecContext *find_context(AVFormatContext *ctx, int index) {
|
||||
@@ -613,62 +621,11 @@ fail:
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Given a packet, decodes a frame if possible. This is intended to be a drop-in replacement
|
||||
* for the now deprecated avcodec_decode_audio4/video2 APIs.
|
||||
*
|
||||
* \param[in] context The context the decoding is done in.
|
||||
* \param[out] frame A frame that is updated with the decoded data.
|
||||
* \param[out] got_frame Set to 1 if a frame was decoded, 0 if not.
|
||||
* \param[in] pkt The packet data to present.
|
||||
*
|
||||
* Returns pkt->size if the packet was consumed, 0 if not, or < 0 on error (including
|
||||
* end of file.)
|
||||
*/
|
||||
static int decode_common(AVCodecContext *context, AVFrame *frame, int *got_frame, AVPacket *pkt) {
|
||||
/* Audio decoding *************************************************************/
|
||||
|
||||
int ret;
|
||||
int rv = 0;
|
||||
|
||||
if (pkt) {
|
||||
ret = avcodec_send_packet(context, pkt);
|
||||
|
||||
if (ret >= 0) {
|
||||
rv = pkt->size;
|
||||
} else if (ret == AVERROR(EAGAIN) || ret == AVERROR_EOF) {
|
||||
rv = 0;
|
||||
} else {
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
ret = avcodec_receive_frame(context, frame);
|
||||
|
||||
if (ret >= 0) {
|
||||
*got_frame = 1;
|
||||
} else if (ret == AVERROR(EAGAIN)) {
|
||||
*got_frame = 0;
|
||||
} else if (ret == AVERROR_EOF) {
|
||||
*got_frame = 0;
|
||||
if (!pkt || pkt->size == 0) {
|
||||
return ret;
|
||||
}
|
||||
} else {
|
||||
*got_frame = 0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Decodes audio. Returns 0 if no audio was decoded, or 1 if some audio was
|
||||
* decoded.
|
||||
*/
|
||||
static void decode_audio(MediaState *ms) {
|
||||
AVPacket pkt;
|
||||
AVPacket pkt_temp;
|
||||
int ret;
|
||||
AVPacket *pkt;
|
||||
AVFrame *converted_frame;
|
||||
|
||||
if (!ms->audio_context) {
|
||||
@@ -685,8 +642,6 @@ static void decode_audio(MediaState *ms) {
|
||||
return;
|
||||
}
|
||||
|
||||
av_init_packet(&pkt);
|
||||
|
||||
double timebase = av_q2d(ms->ctx->streams[ms->audio_stream]->time_base);
|
||||
|
||||
if (ms->audio_queue_target_samples < audio_target_samples) {
|
||||
@@ -695,35 +650,31 @@ static void decode_audio(MediaState *ms) {
|
||||
|
||||
while (ms->audio_queue_samples < ms->audio_queue_target_samples) {
|
||||
|
||||
read_packet(ms, &ms->audio_packet_queue, &pkt);
|
||||
/** Read a packet, and send it to the decoder. */
|
||||
pkt = read_packet(ms, &ms->audio_packet_queue);
|
||||
ret = avcodec_send_packet(ms->audio_context, pkt);
|
||||
|
||||
pkt_temp = pkt;
|
||||
if (ret == 0) {
|
||||
dequeue_packet(&ms->audio_packet_queue);
|
||||
} else if (ret == AVERROR(EAGAIN) || ret == AVERROR_EOF) {
|
||||
// pass
|
||||
} else {
|
||||
ms->audio_finished = 1;
|
||||
return;
|
||||
}
|
||||
|
||||
do {
|
||||
int got_frame;
|
||||
int read_size = decode_common(ms->audio_context, ms->audio_decode_frame, &got_frame, &pkt_temp);
|
||||
while (1) {
|
||||
|
||||
if (read_size < 0) {
|
||||
ret = avcodec_receive_frame(ms->audio_context, ms->audio_decode_frame);
|
||||
|
||||
if (pkt.data) {
|
||||
av_packet_unref(&pkt);
|
||||
}
|
||||
|
||||
ms->audio_finished = 1;
|
||||
return;
|
||||
// More input is needed.
|
||||
if (ret == AVERROR(EAGAIN)) {
|
||||
break;
|
||||
}
|
||||
|
||||
pkt_temp.data += read_size;
|
||||
pkt_temp.size -= read_size;
|
||||
|
||||
if (!got_frame) {
|
||||
if (pkt.data == NULL) {
|
||||
ms->audio_finished = 1;
|
||||
av_packet_unref(&pkt);
|
||||
return;
|
||||
}
|
||||
|
||||
break;
|
||||
if (ret < 0) {
|
||||
ms->audio_finished = 1;
|
||||
return;
|
||||
}
|
||||
|
||||
converted_frame = av_frame_alloc();
|
||||
@@ -785,18 +736,17 @@ static void decode_audio(MediaState *ms) {
|
||||
}
|
||||
|
||||
SDL_UnlockMutex(ms->lock);
|
||||
|
||||
} while (pkt_temp.size);
|
||||
|
||||
if (pkt.data) {
|
||||
av_packet_unref(&pkt);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* Video decoding *************************************************************/
|
||||
|
||||
static enum AVPixelFormat get_pixel_format(SDL_Surface *surf) {
|
||||
uint32_t pixel;
|
||||
uint8_t *bytes = (uint8_t *) &pixel;
|
||||
@@ -819,37 +769,37 @@ static enum AVPixelFormat get_pixel_format(SDL_Surface *surf) {
|
||||
}
|
||||
|
||||
|
||||
|
||||
static SurfaceQueueEntry *decode_video_frame(MediaState *ms) {
|
||||
int ret;
|
||||
|
||||
while (1) {
|
||||
|
||||
if (! ms->video_pkt_tmp.size) {
|
||||
av_packet_unref(&ms->video_pkt);
|
||||
read_packet(ms, &ms->video_packet_queue, &ms->video_pkt);
|
||||
ms->video_pkt_tmp = ms->video_pkt;
|
||||
}
|
||||
AVPacket *pkt = read_packet(ms, &ms->video_packet_queue);
|
||||
ret = avcodec_send_packet(ms->video_context, pkt);
|
||||
|
||||
int got_frame = 0;
|
||||
int read_size = decode_common(ms->video_context, ms->video_decode_frame, &got_frame, &ms->video_pkt_tmp);
|
||||
|
||||
if (read_size < 0) {
|
||||
if (ret == 0) {
|
||||
dequeue_packet(&ms->video_packet_queue);
|
||||
} else if (ret == AVERROR(EAGAIN) || ret == AVERROR_EOF) {
|
||||
// pass
|
||||
} else {
|
||||
ms->video_finished = 1;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ms->video_pkt_tmp.data += read_size;
|
||||
ms->video_pkt_tmp.size -= read_size;
|
||||
ret = avcodec_receive_frame(ms->video_context, ms->video_decode_frame);
|
||||
|
||||
if (got_frame) {
|
||||
break;
|
||||
// More input is needed.
|
||||
if (ret == AVERROR(EAGAIN)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!got_frame && !ms->video_pkt.size) {
|
||||
if (ret < 0) {
|
||||
ms->video_finished = 1;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
double pts = ms->video_decode_frame->best_effort_timestamp * av_q2d(ms->ctx->streams[ms->video_stream]->time_base);
|
||||
@@ -914,7 +864,10 @@ static SurfaceQueueEntry *decode_video_frame(MediaState *ms) {
|
||||
#ifndef USE_POSIX_MEMALIGN
|
||||
rv->pixels = SDL_calloc(rv->pitch * rv->h, 1);
|
||||
#else
|
||||
posix_memalign(&rv->pixels, ROW_ALIGNMENT, rv->pitch * rv->h);
|
||||
if (posix_memalign(&rv->pixels, ROW_ALIGNMENT, rv->pitch * rv->h)) {
|
||||
av_free(rv);
|
||||
return NULL;
|
||||
}
|
||||
memset(rv->pixels, 0, rv->pitch * rv->h);
|
||||
#endif
|
||||
|
||||
@@ -1193,8 +1146,6 @@ static int decode_thread(void *arg) {
|
||||
goto finish;
|
||||
}
|
||||
|
||||
av_init_packet(&ms->video_pkt);
|
||||
|
||||
// Compute the number of samples we need to play back.
|
||||
if (ms->audio_duration < 0) {
|
||||
if (av_fmt_ctx_get_duration_estimation_method(ctx) != AVFMT_DURATION_FROM_BITRATE) {
|
||||
@@ -1355,8 +1306,6 @@ static int decode_sync_start(void *arg) {
|
||||
media_read_sync_finish(ms);
|
||||
}
|
||||
|
||||
av_init_packet(&ms->video_pkt);
|
||||
|
||||
// Compute the number of samples we need to play back.
|
||||
if (ms->audio_duration < 0) {
|
||||
if (av_fmt_ctx_get_duration_estimation_method(ctx) != AVFMT_DURATION_FROM_BITRATE) {
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
behdad: Behdad Esfahbod <behdad@gnu.org>
|
||||
#
|
||||
# Behdad Esfahbod is the only author that actually codes these days. He
|
||||
# maintains the package too. He has revised all of the code written by
|
||||
# others, and has written much of the code himself. He's listed (or should
|
||||
# be listed) on every file in the package as one of the authors. Behdad
|
||||
# designs, implements, documents, maintains, ...
|
||||
#
|
||||
|
||||
dov-g: Dov Grobgeld <dov@imagic.weizmann.ac.il>
|
||||
#
|
||||
# Dov Grobgeld originally wrote FriBidi. The 0.1.* releases were all done
|
||||
# by him. After that, Dov rarely touched the code, but contributed ideas.
|
||||
# All files that he has originally authored have him listed as an author in
|
||||
# the header of the file.
|
||||
#
|
||||
|
||||
roozbeh: Roozbeh Pournader <roozbeh@gnu.org>
|
||||
#
|
||||
# Roozbeh Pournader hasn't contributed much code to FriBidi personally; but
|
||||
# has maintained, promoted, and supported the project for a while. He has
|
||||
# helped with making GNU FriBidi standards compliant, and has sometimes
|
||||
# lobbied with the Unicode Consortium when needed. Roozbeh was supposed to
|
||||
# be a co-maintainer of GNU FriBidi, but he's not doing that yet.
|
||||
#
|
||||
|
||||
|
||||
#
|
||||
# Note: Other people have contributed significant amounts of code, but
|
||||
# usually the code has faded out because of restructuring and redesigning
|
||||
# things around GNU FriBidi. As an example, the FriBidiEnv patch by Omer
|
||||
# Zak, made itself into FriBidi CVS for a couple of years, but was finally
|
||||
# implemented in a better way by Behdad.
|
||||
#
|
||||
# Note: GNU getopt is distributed with and used in GNU FriBidi under bin/, but
|
||||
# is not part of GNU FriBidi.
|
||||
#
|
||||
# Note: Parts of the Unicode Character Database are distributed with and used
|
||||
# in GNU FriBidi under gen.tab/unidata/, but are not part of GNU FriBidi.
|
||||
#
|
||||
@@ -1,340 +0,0 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||
51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Library General
|
||||
Public License instead of this License.
|
||||
@@ -1,30 +0,0 @@
|
||||
Thanks to:
|
||||
|
||||
Behnam Esfahbod <behnam@esfahbod.info>
|
||||
* Testing and auditing code.
|
||||
|
||||
|
||||
And for the previous versions of FriBidi (pre 2002), thanks to:
|
||||
|
||||
|
||||
Tomas Frydrych <tomas@frydrych.uklinux.net>
|
||||
* Contirbuted patches for compiling GNU FriBidi under other OSes.
|
||||
|
||||
Dov Grobgeld <dov@imagic.weizmann.ac.il>
|
||||
* Initial author, and maintainer before the 0.9 releases.
|
||||
|
||||
Franck Portaneri
|
||||
* For the Mozilla BiDi languges support document;
|
||||
|
||||
Roozbeh Pournader <roozbeh@sharif.edu>
|
||||
* Fixed things here and there.
|
||||
|
||||
Pablo Saratxaga <pablo@mandrakesoft.com>
|
||||
* Contributed several Arabic charset converters.
|
||||
|
||||
Owen Tayler <otaylor@redhat.com>
|
||||
* Contributed very important memory leak and speed patches.
|
||||
|
||||
Omer Zak <omerz@actcom.co.il>
|
||||
* Contributed several bug fixes, and several considerations for
|
||||
embedded systems.
|
||||
@@ -1,105 +0,0 @@
|
||||
/* config.h. Generated from config.h.in by configure. */
|
||||
/* config.h.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
/* Define to 1 if you want to include debug code in the library */
|
||||
#define DEBUG 1
|
||||
|
||||
/* Define to 1 if you have the <asm/page.h> header file. */
|
||||
/* #undef HAVE_ASM_PAGE_H */
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#define HAVE_DLFCN_H 1
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#define HAVE_INTTYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the `memmove' function. */
|
||||
#define HAVE_MEMMOVE 1
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#define HAVE_MEMORY_H 1
|
||||
|
||||
/* Define to 1 if you have the `memset' function. */
|
||||
#define HAVE_MEMSET 1
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#define HAVE_STDINT_H 1
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#define HAVE_STDLIB_H 1
|
||||
|
||||
/* Define to 1 if you have the `strdup' function. */
|
||||
#define HAVE_STRDUP 1
|
||||
|
||||
/* Define to 1 if cpp supports the ANSI # stringizing operator. */
|
||||
#define HAVE_STRINGIZE 1
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#define HAVE_STRINGS_H 1
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#define HAVE_STRING_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#define HAVE_SYS_STAT_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/times.h> header file. */
|
||||
#define HAVE_SYS_TIMES_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#define HAVE_UNISTD_H 1
|
||||
|
||||
/* Define to 1 if you have the <wchar.h> header file. */
|
||||
#define HAVE_WCHAR_H 1
|
||||
|
||||
/* Define to the sub-directory in which libtool stores uninstalled libraries.
|
||||
*/
|
||||
#define LT_OBJDIR ".libs/"
|
||||
|
||||
/* Name of package */
|
||||
#define PACKAGE "fribidi"
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#define PACKAGE_BUGREPORT "http://fribidi.org/bug"
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#define PACKAGE_NAME "GNU FriBidi"
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#define PACKAGE_STRING "GNU FriBidi 0.19.2"
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#define PACKAGE_TARNAME "fribidi"
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#define PACKAGE_VERSION "0.19.2"
|
||||
|
||||
/* Define as the return type of signal handlers (`int' or `void'). */
|
||||
#define RETSIGTYPE void
|
||||
|
||||
/* The size of `int', as computed by sizeof. */
|
||||
#define SIZEOF_INT 4
|
||||
|
||||
/* The size of `short', as computed by sizeof. */
|
||||
#define SIZEOF_SHORT 2
|
||||
|
||||
/* The size of `void *', as computed by sizeof. */
|
||||
#define SIZEOF_VOID_P 8
|
||||
|
||||
/* The size of `wchar_t', as computed by sizeof. */
|
||||
#define SIZEOF_WCHAR_T 4
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#define STDC_HEADERS 1
|
||||
|
||||
/* Define to 1 if you want to use simple mallocs instead of memory chunks */
|
||||
/* #undef USE_SIMPLE_MALLOC */
|
||||
|
||||
/* Version number of package */
|
||||
#define VERSION "0.19.2"
|
||||
|
||||
/* Define to empty if `const' does not conform to ANSI C. */
|
||||
/* #undef const */
|
||||
@@ -1,94 +0,0 @@
|
||||
/* The tables in this file should all be sorted on their first item. */
|
||||
|
||||
/* *INDENT-OFF* */
|
||||
|
||||
const PairMap mandatory_liga_table[] = {
|
||||
{{0xFEDF, 0xFE82}, 0xFEF5},
|
||||
{{0xFEDF, 0xFE84}, 0xFEF7},
|
||||
{{0xFEDF, 0xFE88}, 0xFEF9},
|
||||
{{0xFEDF, 0xFE8E}, 0xFEFB},
|
||||
{{0xFEE0, 0xFE82}, 0xFEF6},
|
||||
{{0xFEE0, 0xFE84}, 0xFEF8},
|
||||
{{0xFEE0, 0xFE88}, 0xFEFA},
|
||||
{{0xFEE0, 0xFE8E}, 0xFEFC},
|
||||
};
|
||||
|
||||
|
||||
const PairMap console_liga_table[] = {
|
||||
{{0x0640, 0xFC60}, 0xFCF2},
|
||||
{{0x0640, 0xFC61}, 0xFCF3},
|
||||
{{0x0640, 0xFC62}, 0xFCF4},
|
||||
{{0x0640, 0xFE70}, 0xFE71},
|
||||
{{0x0640, 0xFE76}, 0xFE77},
|
||||
{{0x0640, 0xFE78}, 0xFE79},
|
||||
{{0x0640, 0xFE7A}, 0xFE7B},
|
||||
{{0x0640, 0xFE7C}, 0xFE7D},
|
||||
{{0x0640, 0xFE7E}, 0xFE7F},
|
||||
{{0xFBE8, 0x0654}, 0xFE8B},
|
||||
{{0xFBE9, 0x0654}, 0xFE8C},
|
||||
{{0xFBFC, 0x0654}, 0xFE89},
|
||||
{{0xFBFC, 0x0670}, 0xFC5D},
|
||||
{{0xFBFD, 0x0654}, 0xFE8A},
|
||||
{{0xFBFD, 0x0670}, 0xFC90},
|
||||
{{0xFE7C, 0x0670}, 0xFC63},
|
||||
{{0xFE7C, 0xFE72}, 0xFC5E},
|
||||
{{0xFE7C, 0xFE74}, 0xFC5F},
|
||||
{{0xFE7C, 0xFE76}, 0xFC60},
|
||||
{{0xFE7C, 0xFE78}, 0xFC61},
|
||||
{{0xFE7C, 0xFE7A}, 0xFC62},
|
||||
{{0xFE7D, 0xFE76}, 0xFCF2},
|
||||
{{0xFE7D, 0xFE77}, 0xFCF2},
|
||||
{{0xFE7D, 0xFE78}, 0xFCF3},
|
||||
{{0xFE7D, 0xFE79}, 0xFCF3},
|
||||
{{0xFE7D, 0xFE7A}, 0xFCF4},
|
||||
{{0xFE7D, 0xFE7B}, 0xFCF4},
|
||||
{{0xFE8D, 0x0653}, 0xFE81},
|
||||
{{0xFE8D, 0x0654}, 0xFE83},
|
||||
{{0xFE8D, 0x0655}, 0xFE87},
|
||||
{{0xFE8D, 0xFE70}, 0xFD3D},
|
||||
{{0xFE8E, 0x0653}, 0xFE82},
|
||||
{{0xFE8E, 0x0654}, 0xFE84},
|
||||
{{0xFE8E, 0x0655}, 0xFE88},
|
||||
{{0xFE8E, 0xFE70}, 0xFD3C},
|
||||
{{0xFEE9, 0x0654}, 0xFBA4},
|
||||
{{0xFEEA, 0x0654}, 0xFBA5},
|
||||
{{0xFEED, 0x0654}, 0xFE85},
|
||||
{{0xFEEE, 0x0654}, 0xFE86},
|
||||
{{0xFEEF, 0x0654}, 0xFE89},
|
||||
{{0xFEEF, 0x0670}, 0xFC5D},
|
||||
{{0xFEF0, 0x0654}, 0xFE8A},
|
||||
{{0xFEF0, 0x0670}, 0xFC90},
|
||||
{{0xFEF1, 0x0654}, 0xFE89},
|
||||
{{0xFEF1, 0x0670}, 0xFC5D},
|
||||
{{0xFEF2, 0x0654}, 0xFE8A},
|
||||
{{0xFEF2, 0x0670}, 0xFC90},
|
||||
{{0xFEF3, 0x0654}, 0xFE8B},
|
||||
{{0xFEF4, 0x0654}, 0xFE8C},
|
||||
{{0xFEFB, 0x0653}, 0xFEF5},
|
||||
{{0xFEFB, 0x0654}, 0xFEF7},
|
||||
{{0xFEFB, 0x0655}, 0xFEF9},
|
||||
{{0xFEFC, 0x0653}, 0xFEF6},
|
||||
{{0xFEFC, 0x0654}, 0xFEF8},
|
||||
{{0xFEFC, 0x0655}, 0xFEFA},
|
||||
};
|
||||
|
||||
|
||||
static const FriBidiChar NSMShap[][4] = {
|
||||
{0xFE70, 0xFE71, 0xFE70, 0xFE71,},
|
||||
{0xFE72, 0xFE72, 0xFE72, 0xFE72,},
|
||||
{0xFE74, 0xFE74, 0xFE74, 0xFE74,},
|
||||
{0xFE76, 0xFE77, 0xFE76, 0xFE77,},
|
||||
{0xFE78, 0xFE79, 0xFE78, 0xFE79,},
|
||||
{0xFE7A, 0xFE7B, 0xFE7A, 0xFE7B,},
|
||||
{0xFE7C, 0xFE7D, 0xFE7C, 0xFE7D,},
|
||||
{0xFE7E, 0xFE7F, 0xFE7E, 0xFE7F,},
|
||||
};
|
||||
|
||||
/* *INDENT-ON* */
|
||||
|
||||
#ifndef FRIBIDI_ACCESS_SHAPE_TABLE
|
||||
# define FRIBIDI_ACCESS_SHAPE_TABLE(table,min,max,x,shape) \
|
||||
(((x)<(min)||(x)>(max))?(x):(table)[(x)-(min)][(shape)])
|
||||
#endif
|
||||
|
||||
#define FRIBIDI_GET_ARABIC_SHAPE_NSM(x,shape) FRIBIDI_ACCESS_SHAPE_TABLE(NSMShap, 0x064B, 0x0652, (x), (shape))
|
||||
@@ -1,205 +0,0 @@
|
||||
/* arabic-shaping.tab.i
|
||||
* generated by gen-arabic-shaping-tab (GNU FriBidi 0.19.1)
|
||||
* from the files UnicodeData.txt, (null) of Unicode version 5.1.0. */
|
||||
|
||||
/*
|
||||
use FRIBIDI_GET_ARABIC_SHAPE_PRES(key,shape) to access your table
|
||||
|
||||
required memory: 2864
|
||||
*/
|
||||
|
||||
|
||||
/* *INDENT-OFF* */
|
||||
|
||||
static const FriBidiChar ArShap[179][4] = {
|
||||
{0xfe80,0x0621,0x0621,0x0621,},
|
||||
{0xfe81,0xfe82,0x0622,0x0622,},
|
||||
{0xfe83,0xfe84,0x0623,0x0623,},
|
||||
{0xfe85,0xfe86,0x0624,0x0624,},
|
||||
{0xfe87,0xfe88,0x0625,0x0625,},
|
||||
{0xfe89,0xfe8a,0xfe8b,0xfe8c,},
|
||||
{0xfe8d,0xfe8e,0x0627,0x0627,},
|
||||
{0xfe8f,0xfe90,0xfe91,0xfe92,},
|
||||
{0xfe93,0xfe94,0x0629,0x0629,},
|
||||
{0xfe95,0xfe96,0xfe97,0xfe98,},
|
||||
{0xfe99,0xfe9a,0xfe9b,0xfe9c,},
|
||||
{0xfe9d,0xfe9e,0xfe9f,0xfea0,},
|
||||
{0xfea1,0xfea2,0xfea3,0xfea4,},
|
||||
{0xfea5,0xfea6,0xfea7,0xfea8,},
|
||||
{0xfea9,0xfeaa,0x062f,0x062f,},
|
||||
{0xfeab,0xfeac,0x0630,0x0630,},
|
||||
{0xfead,0xfeae,0x0631,0x0631,},
|
||||
{0xfeaf,0xfeb0,0x0632,0x0632,},
|
||||
{0xfeb1,0xfeb2,0xfeb3,0xfeb4,},
|
||||
{0xfeb5,0xfeb6,0xfeb7,0xfeb8,},
|
||||
{0xfeb9,0xfeba,0xfebb,0xfebc,},
|
||||
{0xfebd,0xfebe,0xfebf,0xfec0,},
|
||||
{0xfec1,0xfec2,0xfec3,0xfec4,},
|
||||
{0xfec5,0xfec6,0xfec7,0xfec8,},
|
||||
{0xfec9,0xfeca,0xfecb,0xfecc,},
|
||||
{0xfecd,0xfece,0xfecf,0xfed0,},
|
||||
{0x063b,0x063b,0x063b,0x063b,},
|
||||
{0x063c,0x063c,0x063c,0x063c,},
|
||||
{0x063d,0x063d,0x063d,0x063d,},
|
||||
{0x063e,0x063e,0x063e,0x063e,},
|
||||
{0x063f,0x063f,0x063f,0x063f,},
|
||||
{0x0640,0x0640,0x0640,0x0640,},
|
||||
{0xfed1,0xfed2,0xfed3,0xfed4,},
|
||||
{0xfed5,0xfed6,0xfed7,0xfed8,},
|
||||
{0xfed9,0xfeda,0xfedb,0xfedc,},
|
||||
{0xfedd,0xfede,0xfedf,0xfee0,},
|
||||
{0xfee1,0xfee2,0xfee3,0xfee4,},
|
||||
{0xfee5,0xfee6,0xfee7,0xfee8,},
|
||||
{0xfee9,0xfeea,0xfeeb,0xfeec,},
|
||||
{0xfeed,0xfeee,0x0648,0x0648,},
|
||||
{0xfeef,0xfef0,0xfbe8,0xfbe9,},
|
||||
{0xfef1,0xfef2,0xfef3,0xfef4,},
|
||||
{0x064b,0x064b,0x064b,0x064b,},
|
||||
{0x064c,0x064c,0x064c,0x064c,},
|
||||
{0x064d,0x064d,0x064d,0x064d,},
|
||||
{0x064e,0x064e,0x064e,0x064e,},
|
||||
{0x064f,0x064f,0x064f,0x064f,},
|
||||
{0x0650,0x0650,0x0650,0x0650,},
|
||||
{0x0651,0x0651,0x0651,0x0651,},
|
||||
{0x0652,0x0652,0x0652,0x0652,},
|
||||
{0x0653,0x0653,0x0653,0x0653,},
|
||||
{0x0654,0x0654,0x0654,0x0654,},
|
||||
{0x0655,0x0655,0x0655,0x0655,},
|
||||
{0x0656,0x0656,0x0656,0x0656,},
|
||||
{0x0657,0x0657,0x0657,0x0657,},
|
||||
{0x0658,0x0658,0x0658,0x0658,},
|
||||
{0x0659,0x0659,0x0659,0x0659,},
|
||||
{0x065a,0x065a,0x065a,0x065a,},
|
||||
{0x065b,0x065b,0x065b,0x065b,},
|
||||
{0x065c,0x065c,0x065c,0x065c,},
|
||||
{0x065d,0x065d,0x065d,0x065d,},
|
||||
{0x065e,0x065e,0x065e,0x065e,},
|
||||
{0x065f,0x065f,0x065f,0x065f,},
|
||||
{0x0660,0x0660,0x0660,0x0660,},
|
||||
{0x0661,0x0661,0x0661,0x0661,},
|
||||
{0x0662,0x0662,0x0662,0x0662,},
|
||||
{0x0663,0x0663,0x0663,0x0663,},
|
||||
{0x0664,0x0664,0x0664,0x0664,},
|
||||
{0x0665,0x0665,0x0665,0x0665,},
|
||||
{0x0666,0x0666,0x0666,0x0666,},
|
||||
{0x0667,0x0667,0x0667,0x0667,},
|
||||
{0x0668,0x0668,0x0668,0x0668,},
|
||||
{0x0669,0x0669,0x0669,0x0669,},
|
||||
{0x066a,0x066a,0x066a,0x066a,},
|
||||
{0x066b,0x066b,0x066b,0x066b,},
|
||||
{0x066c,0x066c,0x066c,0x066c,},
|
||||
{0x066d,0x066d,0x066d,0x066d,},
|
||||
{0x066e,0x066e,0x066e,0x066e,},
|
||||
{0x066f,0x066f,0x066f,0x066f,},
|
||||
{0x0670,0x0670,0x0670,0x0670,},
|
||||
{0xfb50,0xfb51,0x0671,0x0671,},
|
||||
{0x0672,0x0672,0x0672,0x0672,},
|
||||
{0x0673,0x0673,0x0673,0x0673,},
|
||||
{0x0674,0x0674,0x0674,0x0674,},
|
||||
{0x0675,0x0675,0x0675,0x0675,},
|
||||
{0x0676,0x0676,0x0676,0x0676,},
|
||||
{0xfbdd,0x0677,0x0677,0x0677,},
|
||||
{0x0678,0x0678,0x0678,0x0678,},
|
||||
{0xfb66,0xfb67,0xfb68,0xfb69,},
|
||||
{0xfb5e,0xfb5f,0xfb60,0xfb61,},
|
||||
{0xfb52,0xfb53,0xfb54,0xfb55,},
|
||||
{0x067c,0x067c,0x067c,0x067c,},
|
||||
{0x067d,0x067d,0x067d,0x067d,},
|
||||
{0xfb56,0xfb57,0xfb58,0xfb59,},
|
||||
{0xfb62,0xfb63,0xfb64,0xfb65,},
|
||||
{0xfb5a,0xfb5b,0xfb5c,0xfb5d,},
|
||||
{0x0681,0x0681,0x0681,0x0681,},
|
||||
{0x0682,0x0682,0x0682,0x0682,},
|
||||
{0xfb76,0xfb77,0xfb78,0xfb79,},
|
||||
{0xfb72,0xfb73,0xfb74,0xfb75,},
|
||||
{0x0685,0x0685,0x0685,0x0685,},
|
||||
{0xfb7a,0xfb7b,0xfb7c,0xfb7d,},
|
||||
{0xfb7e,0xfb7f,0xfb80,0xfb81,},
|
||||
{0xfb88,0xfb89,0x0688,0x0688,},
|
||||
{0x0689,0x0689,0x0689,0x0689,},
|
||||
{0x068a,0x068a,0x068a,0x068a,},
|
||||
{0x068b,0x068b,0x068b,0x068b,},
|
||||
{0xfb84,0xfb85,0x068c,0x068c,},
|
||||
{0xfb82,0xfb83,0x068d,0x068d,},
|
||||
{0xfb86,0xfb87,0x068e,0x068e,},
|
||||
{0x068f,0x068f,0x068f,0x068f,},
|
||||
{0x0690,0x0690,0x0690,0x0690,},
|
||||
{0xfb8c,0xfb8d,0x0691,0x0691,},
|
||||
{0x0692,0x0692,0x0692,0x0692,},
|
||||
{0x0693,0x0693,0x0693,0x0693,},
|
||||
{0x0694,0x0694,0x0694,0x0694,},
|
||||
{0x0695,0x0695,0x0695,0x0695,},
|
||||
{0x0696,0x0696,0x0696,0x0696,},
|
||||
{0x0697,0x0697,0x0697,0x0697,},
|
||||
{0xfb8a,0xfb8b,0x0698,0x0698,},
|
||||
{0x0699,0x0699,0x0699,0x0699,},
|
||||
{0x069a,0x069a,0x069a,0x069a,},
|
||||
{0x069b,0x069b,0x069b,0x069b,},
|
||||
{0x069c,0x069c,0x069c,0x069c,},
|
||||
{0x069d,0x069d,0x069d,0x069d,},
|
||||
{0x069e,0x069e,0x069e,0x069e,},
|
||||
{0x069f,0x069f,0x069f,0x069f,},
|
||||
{0x06a0,0x06a0,0x06a0,0x06a0,},
|
||||
{0x06a1,0x06a1,0x06a1,0x06a1,},
|
||||
{0x06a2,0x06a2,0x06a2,0x06a2,},
|
||||
{0x06a3,0x06a3,0x06a3,0x06a3,},
|
||||
{0xfb6a,0xfb6b,0xfb6c,0xfb6d,},
|
||||
{0x06a5,0x06a5,0x06a5,0x06a5,},
|
||||
{0xfb6e,0xfb6f,0xfb70,0xfb71,},
|
||||
{0x06a7,0x06a7,0x06a7,0x06a7,},
|
||||
{0x06a8,0x06a8,0x06a8,0x06a8,},
|
||||
{0xfb8e,0xfb8f,0xfb90,0xfb91,},
|
||||
{0x06aa,0x06aa,0x06aa,0x06aa,},
|
||||
{0x06ab,0x06ab,0x06ab,0x06ab,},
|
||||
{0x06ac,0x06ac,0x06ac,0x06ac,},
|
||||
{0xfbd3,0xfbd4,0xfbd5,0xfbd6,},
|
||||
{0x06ae,0x06ae,0x06ae,0x06ae,},
|
||||
{0xfb92,0xfb93,0xfb94,0xfb95,},
|
||||
{0x06b0,0x06b0,0x06b0,0x06b0,},
|
||||
{0xfb9a,0xfb9b,0xfb9c,0xfb9d,},
|
||||
{0x06b2,0x06b2,0x06b2,0x06b2,},
|
||||
{0xfb96,0xfb97,0xfb98,0xfb99,},
|
||||
{0x06b4,0x06b4,0x06b4,0x06b4,},
|
||||
{0x06b5,0x06b5,0x06b5,0x06b5,},
|
||||
{0x06b6,0x06b6,0x06b6,0x06b6,},
|
||||
{0x06b7,0x06b7,0x06b7,0x06b7,},
|
||||
{0x06b8,0x06b8,0x06b8,0x06b8,},
|
||||
{0x06b9,0x06b9,0x06b9,0x06b9,},
|
||||
{0xfb9e,0xfb9f,0x06ba,0x06ba,},
|
||||
{0xfba0,0xfba1,0xfba2,0xfba3,},
|
||||
{0x06bc,0x06bc,0x06bc,0x06bc,},
|
||||
{0x06bd,0x06bd,0x06bd,0x06bd,},
|
||||
{0xfbaa,0xfbab,0xfbac,0xfbad,},
|
||||
{0x06bf,0x06bf,0x06bf,0x06bf,},
|
||||
{0xfba4,0xfba5,0x06c0,0x06c0,},
|
||||
{0xfba6,0xfba7,0xfba8,0xfba9,},
|
||||
{0x06c2,0x06c2,0x06c2,0x06c2,},
|
||||
{0x06c3,0x06c3,0x06c3,0x06c3,},
|
||||
{0x06c4,0x06c4,0x06c4,0x06c4,},
|
||||
{0xfbe0,0xfbe1,0x06c5,0x06c5,},
|
||||
{0xfbd9,0xfbda,0x06c6,0x06c6,},
|
||||
{0xfbd7,0xfbd8,0x06c7,0x06c7,},
|
||||
{0xfbdb,0xfbdc,0x06c8,0x06c8,},
|
||||
{0xfbe2,0xfbe3,0x06c9,0x06c9,},
|
||||
{0x06ca,0x06ca,0x06ca,0x06ca,},
|
||||
{0xfbde,0xfbdf,0x06cb,0x06cb,},
|
||||
{0xfbfc,0xfbfd,0xfbfe,0xfbff,},
|
||||
{0x06cd,0x06cd,0x06cd,0x06cd,},
|
||||
{0x06ce,0x06ce,0x06ce,0x06ce,},
|
||||
{0x06cf,0x06cf,0x06cf,0x06cf,},
|
||||
{0xfbe4,0xfbe5,0xfbe6,0xfbe7,},
|
||||
{0x06d1,0x06d1,0x06d1,0x06d1,},
|
||||
{0xfbae,0xfbaf,0x06d2,0x06d2,},
|
||||
{0xfbb0,0xfbb1,0x06d3,0x06d3,},
|
||||
};
|
||||
|
||||
/* *INDENT-ON* */
|
||||
|
||||
#ifndef FRIBIDI_ACCESS_SHAPE_TABLE
|
||||
# define FRIBIDI_ACCESS_SHAPE_TABLE(table,min,max,x,shape) \
|
||||
(((x)<(min)||(x)>(max))?(x):(table)[(x)-(min)][(shape)])
|
||||
#endif
|
||||
|
||||
#define FRIBIDI_GET_ARABIC_SHAPE_PRES(x,shape) FRIBIDI_ACCESS_SHAPE_TABLE(ArShap, 0x0621, 0x06d3, (x), (shape))
|
||||
|
||||
/* End of generated arabic-shaping.tab.i */
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,61 +0,0 @@
|
||||
/* FriBidi
|
||||
* bidi-types.h - define internal bidi types
|
||||
*
|
||||
* $Id: bidi-types.h,v 1.7 2006/01/31 03:23:12 behdad Exp $
|
||||
* $Author: behdad $
|
||||
* $Date: 2006/01/31 03:23:12 $
|
||||
* $Revision: 1.7 $
|
||||
* $Source: /cvs/fribidi/fribidi2/lib/bidi-types.h,v $
|
||||
*
|
||||
* Author:
|
||||
* Behdad Esfahbod, 2001, 2002, 2004
|
||||
*
|
||||
* Copyright (C) 2004 Sharif FarsiWeb, Inc.
|
||||
* Copyright (C) 2001,2002 Behdad Esfahbod
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this library, in a file named COPYING; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
* Boston, MA 02111-1307, USA
|
||||
*
|
||||
* For licensing issues, contact <license@farsiweb.info>.
|
||||
*/
|
||||
#ifndef _BIDI_TYPES_H
|
||||
#define _BIDI_TYPES_H
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#include <fribidi-types.h>
|
||||
#include <fribidi-bidi-types.h>
|
||||
|
||||
#include <fribidi-begindecls.h>
|
||||
|
||||
#define FRIBIDI_LEVEL_INVALID FRIBIDI_BIDI_MAX_RESOLVED_LEVELS
|
||||
#define FRIBIDI_SENTINEL -1
|
||||
|
||||
#if DEBUG+0
|
||||
|
||||
#define fribidi_char_from_bidi_type FRIBIDI_PRIVATESPACE(char_from_bidi_type)
|
||||
char
|
||||
fribidi_char_from_bidi_type (
|
||||
FriBidiCharType t /* input bidi type */
|
||||
) FRIBIDI_GNUC_HIDDEN;
|
||||
|
||||
#endif /* DEBUG */
|
||||
|
||||
#include <fribidi-enddecls.h>
|
||||
|
||||
#endif /* !_BIDI_TYPES_H */
|
||||
/* Editor directions:
|
||||
* vim:textwidth=78:tabstop=8:shiftwidth=2:autoindent:cindent
|
||||
*/
|
||||
@@ -1,190 +0,0 @@
|
||||
/* FriBidi
|
||||
* common.h - common include for library sources
|
||||
*
|
||||
* $Id: common.h,v 1.20 2008-04-08 21:38:23 behdad Exp $
|
||||
* $Author: behdad $
|
||||
* $Date: 2008-04-08 21:38:23 $
|
||||
* $Revision: 1.20 $
|
||||
* $Source: /cvs/fribidi/fribidi2/lib/common.h,v $
|
||||
*
|
||||
* Author:
|
||||
* Behdad Esfahbod, 2004
|
||||
*
|
||||
* Copyright (C) 2004 Sharif FarsiWeb, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this library, in a file named COPYING; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
* Boston, MA 02111-1307, USA
|
||||
*
|
||||
* For licensing issues, contact <license@farsiweb.info>.
|
||||
*/
|
||||
#ifndef _COMMON_H
|
||||
#define _COMMON_H
|
||||
|
||||
#if HAVE_CONFIG_H+0
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <fribidi-common.h>
|
||||
|
||||
/* FRIBIDI_PRIVATESPACE is a macro used to name library internal symbols. */
|
||||
#ifndef FRIBIDI_PRIVATESPACE
|
||||
# define FRIBIDI_PRIVATESPACE1(A,B) A##B
|
||||
# define FRIBIDI_PRIVATESPACE0(A,B) FRIBIDI_PRIVATESPACE1(A,B)
|
||||
# define FRIBIDI_PRIVATESPACE(SYMBOL) FRIBIDI_PRIVATESPACE0(_,FRIBIDI_NAMESPACE(_##SYMBOL##__internal__))
|
||||
#endif /* !FRIBIDI_PRIVATESPACE */
|
||||
|
||||
#if (defined(WIN32)) || (defined(_WIN32_WCE))
|
||||
# define FRIBIDI_ENTRY __declspec(dllexport)
|
||||
#endif /* WIN32 */
|
||||
|
||||
#if FRIBIDI_USE_GLIB+0
|
||||
# ifndef SIZEOF_LONG
|
||||
# define SIZEOF_LONG GLIB_SIZEOF_LONG
|
||||
# endif /* !SIZEOF_LONG */
|
||||
# ifndef SIZEOF_VOID_P
|
||||
# define SIZEOF_VOID_P GLIB_SIZEOF_VOID_P
|
||||
# endif /* !SIZEOF_VOID_P */
|
||||
# ifndef __FRIBIDI_DOC
|
||||
# include <glib/gmem.h>
|
||||
# endif /* !__FRIBIDI_DOC */
|
||||
# ifndef fribidi_malloc
|
||||
# define fribidi_malloc g_try_malloc
|
||||
# define fribidi_free g_free
|
||||
# endif /* !fribidi_malloc */
|
||||
# ifndef fribidi_assert
|
||||
# ifndef __FRIBIDI_DOC
|
||||
# include <glib/gmessages.h>
|
||||
# endif /* !__FRIBIDI_DOC */
|
||||
# define fribidi_assert g_assert
|
||||
# endif /* !fribidi_assert */
|
||||
# ifndef __FRIBIDI_DOC
|
||||
# include <glib/gmacros.h>
|
||||
# endif /* !__FRIBIDI_DOC */
|
||||
# ifndef FRIBIDI_BEGIN_STMT
|
||||
# define FRIBIDI_BEGIN_STMT G_STMT_START {
|
||||
# define FRIBIDI_END_STMT } G_STMT_END
|
||||
# endif /* !FRIBIDI_BEGIN_STMT */
|
||||
# ifndef LIKELY
|
||||
# define LIKELY G_LIKELY
|
||||
# define UNLIKELY G_UNLIKELY
|
||||
# endif /* !LIKELY */
|
||||
# ifndef false
|
||||
# define false FALSE
|
||||
# endif /* !false */
|
||||
# ifndef true
|
||||
# define true TRUE
|
||||
# endif /* !true */
|
||||
#endif /* FRIBIDI_USE_GLIB */
|
||||
|
||||
#ifndef false
|
||||
# define false (0)
|
||||
# endif /* !false */
|
||||
# ifndef true
|
||||
# define true (!false)
|
||||
# endif /* !true */
|
||||
|
||||
#ifndef NULL
|
||||
# ifdef __cplusplus
|
||||
# define NULL (0L)
|
||||
# else /* !__cplusplus */
|
||||
# define NULL ((void*) 0)
|
||||
# endif /* !__cplusplus */
|
||||
#endif /* !NULL */
|
||||
|
||||
/* fribidi_malloc and fribidi_free should be used instead of malloc and free.
|
||||
* No need to include any headers. */
|
||||
#ifndef fribidi_malloc
|
||||
# if HAVE_STDLIB_H
|
||||
# ifndef __FRIBIDI_DOC
|
||||
# include <stdlib.h>
|
||||
# endif /* __FRIBIDI_DOC */
|
||||
# define fribidi_malloc malloc
|
||||
# else /* !HAVE_STDLIB_H */
|
||||
# define fribidi_malloc (void *) malloc
|
||||
# endif /* !HAVE_STDLIB_H */
|
||||
# define fribidi_free free
|
||||
#else /* fribidi_malloc */
|
||||
# ifndef fribidi_free
|
||||
# error "You should define fribidi_free too when you define fribidi_malloc."
|
||||
# endif /* !fribidi_free */
|
||||
#endif /* fribidi_malloc */
|
||||
|
||||
#if HAVE_STRING_H+0
|
||||
# if !STDC_HEADERS && HAVE_MEMORY_H
|
||||
# include <memory.h>
|
||||
# endif
|
||||
# include <string.h>
|
||||
#endif
|
||||
#if HAVE_STRINGS_H+0
|
||||
# include <strings.h>
|
||||
#endif
|
||||
|
||||
/* FRIBIDI_CHUNK_SIZE is the number of bytes in each chunk of memory being
|
||||
* allocated for data structure pools. */
|
||||
#ifndef FRIBIDI_CHUNK_SIZE
|
||||
# if HAVE_ASM_PAGE_H
|
||||
# ifndef __FRIBIDI_DOC
|
||||
# include <asm/page.h>
|
||||
# endif /* __FRIBIDI_DOC */
|
||||
# define FRIBIDI_CHUNK_SIZE (PAGE_SIZE - 16)
|
||||
# else /* !HAVE_ASM_PAGE_H */
|
||||
# define FRIBIDI_CHUNK_SIZE (4096 - 16)
|
||||
# endif /* !HAVE_ASM_PAGE_H */
|
||||
#else /* FRIBIDI_CHUNK_SIZE */
|
||||
# if FRIBIDI_CHUNK_SIZE < 256
|
||||
# error "FRIBIDI_CHUNK_SIZE now should define the size of a chunk in bytes."
|
||||
# endif /* FRIBIDI_CHUNK_SIZE < 256 */
|
||||
#endif /* FRIBIDI_CHUNK_SIZE */
|
||||
|
||||
/* FRIBIDI_BEGIN_STMT should be used at the beginning of your macro
|
||||
* definitions that are to behave like simple statements. Use
|
||||
* FRIBIDI_END_STMT at the end of the macro after the semicolon or brace. */
|
||||
#ifndef FRIBIDI_BEGIN_STMT
|
||||
# define FRIBIDI_BEGIN_STMT do {
|
||||
# define FRIBIDI_END_STMT } while (0)
|
||||
#endif /* !FRIBIDI_BEGIN_STMT */
|
||||
|
||||
/* LIKEYLY and UNLIKELY are used to give a hint on branch prediction to the
|
||||
* compiler. */
|
||||
#ifndef LIKELY
|
||||
# define LIKELY
|
||||
# define UNLIKELY
|
||||
#endif /* !LIKELY */
|
||||
|
||||
#ifndef FRIBIDI_EMPTY_STMT
|
||||
# define FRIBIDI_EMPTY_STMT FRIBIDI_BEGIN_STMT (void) 0; FRIBIDI_END_STMT
|
||||
#endif /* !FRIBIDI_EMPTY_STMT */
|
||||
|
||||
#if HAVE_STRINGIZE+0
|
||||
# define STRINGIZE(symbol) #symbol
|
||||
#else /* !HAVE_STRINGIZE */
|
||||
# error "No stringize operator available?"
|
||||
#endif /* !HAVE_STRINGIZE */
|
||||
|
||||
/* As per recommendation of GNU Coding Standards. */
|
||||
#ifndef _GNU_SOURCE
|
||||
# define _GNU_SOURCE
|
||||
#endif /* !_GNU_SOURCE */
|
||||
|
||||
/* We respect our own rules. */
|
||||
#define FRIBIDI_NO_DEPRECATED
|
||||
|
||||
|
||||
#include "debug.h"
|
||||
|
||||
#endif /* !_COMMON_H */
|
||||
/* Editor directions:
|
||||
* vim:textwidth=78:tabstop=8:shiftwidth=2:autoindent:cindent
|
||||
*/
|
||||
@@ -1,113 +0,0 @@
|
||||
/* FriBidi
|
||||
* debug.h - debug-only interfaces
|
||||
*
|
||||
* $Id: debug.h,v 1.10 2006/01/31 03:23:12 behdad Exp $
|
||||
* $Author: behdad $
|
||||
* $Date: 2006/01/31 03:23:12 $
|
||||
* $Revision: 1.10 $
|
||||
* $Source: /cvs/fribidi/fribidi2/lib/debug.h,v $
|
||||
*
|
||||
* Author:
|
||||
* Behdad Esfahbod, 2001, 2002, 2004
|
||||
*
|
||||
* Copyright (C) 2004 Sharif FarsiWeb, Inc.
|
||||
* Copyright (C) 2001,2002 Behdad Esfahbod
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this library, in a file named COPYING; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
* Boston, MA 02111-1307, USA
|
||||
*
|
||||
* For licensing issues, contact <license@farsiweb.info>.
|
||||
*/
|
||||
#ifndef _DEBUG_H
|
||||
#define _DEBUG_H
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#include <fribidi-types.h>
|
||||
|
||||
#include <fribidi-begindecls.h>
|
||||
|
||||
#if DEBUG+0
|
||||
|
||||
/* These definitions should only be used in DEBUG mode: */
|
||||
#ifndef __LINE__
|
||||
# define __LINE__ 0
|
||||
#endif /* !__LINE__ */
|
||||
#ifndef __FILE__
|
||||
# define __FILE__ "unknown"
|
||||
#endif /* !__FILE__ */
|
||||
|
||||
#ifndef FRIBIDI_FPRINTF
|
||||
# ifndef __FRIBIDI_DOC
|
||||
# include <stdio.h>
|
||||
# endif /* !__FRIBIDI_DOC */
|
||||
# define FRIBIDI_FPRINTF fprintf
|
||||
# define FRIBIDI_STDERR_ stderr,
|
||||
#endif /* !FRIBIDI_FPRINTF */
|
||||
|
||||
#ifndef MSG
|
||||
#define MSG(s) \
|
||||
FRIBIDI_BEGIN_STMT \
|
||||
FRIBIDI_FPRINTF(FRIBIDI_STDERR_ s); \
|
||||
FRIBIDI_END_STMT
|
||||
#define MSG2(s, t) \
|
||||
FRIBIDI_BEGIN_STMT \
|
||||
FRIBIDI_FPRINTF(FRIBIDI_STDERR_ s, t); \
|
||||
FRIBIDI_END_STMT
|
||||
#define MSG5(s, t, u, v, w) \
|
||||
FRIBIDI_BEGIN_STMT \
|
||||
FRIBIDI_FPRINTF(FRIBIDI_STDERR_ s, t, u, v, w); \
|
||||
FRIBIDI_END_STMT
|
||||
#endif /* !MSG */
|
||||
|
||||
#ifndef DBG
|
||||
# define DBG(s) \
|
||||
FRIBIDI_BEGIN_STMT \
|
||||
if (fribidi_debug_status()) { MSG(FRIBIDI ": " s "\n"); } \
|
||||
FRIBIDI_END_STMT
|
||||
# define DBG2(s, t) \
|
||||
FRIBIDI_BEGIN_STMT \
|
||||
if (fribidi_debug_status()) { MSG2(FRIBIDI ": " s "\n", t); } \
|
||||
FRIBIDI_END_STMT
|
||||
#endif /* !DBG */
|
||||
|
||||
#ifndef fribidi_assert
|
||||
# define fribidi_assert(cond) \
|
||||
FRIBIDI_BEGIN_STMT \
|
||||
if (!(cond)) { \
|
||||
DBG(__FILE__ ":" STRINGIZE(__LINE__) ": " \
|
||||
"assertion failed (" STRINGIZE(cond) ")"); \
|
||||
} \
|
||||
FRIBIDI_END_STMT
|
||||
#endif /* !fribidi_assert */
|
||||
|
||||
#else /* !DEBUG */
|
||||
|
||||
#ifndef DBG
|
||||
# define DBG(s) FRIBIDI_EMPTY_STMT
|
||||
# define DBG2(s, t) FRIBIDI_EMPTY_STMT
|
||||
#endif /* !DBG */
|
||||
#ifndef fribidi_assert
|
||||
# define fribidi_assert(cond) FRIBIDI_EMPTY_STMT
|
||||
#endif /* !fribidi_assert */
|
||||
|
||||
#endif /* !DEBUG */
|
||||
|
||||
#include <fribidi-enddecls.h>
|
||||
|
||||
#endif /* !_DEBUG_H */
|
||||
/* Editor directions:
|
||||
* vim:textwidth=78:tabstop=8:shiftwidth=2:autoindent:cindent
|
||||
*/
|
||||
@@ -1,193 +0,0 @@
|
||||
/* fribidi-arabic.c - Arabic shaping
|
||||
*
|
||||
* Copyright (C) 2005 Behdad Esfahbod
|
||||
*
|
||||
* This file is part of GNU FriBidi.
|
||||
*
|
||||
* GNU FriBidi is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation; either version 2.1
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* GNU FriBidi is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with GNU FriBidi; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* For licensing issues, contact <license@farsiweb.info> or write to
|
||||
* Sharif FarsiWeb, Inc., PO Box 13445-389, Tehran, Iran.
|
||||
*/
|
||||
/* $Id: fribidi-arabic.c,v 1.3 2007/04/05 16:14:39 behdad Exp $
|
||||
* $Author: behdad $
|
||||
* $Date: 2007/04/05 16:14:39 $
|
||||
* $Revision: 1.3 $
|
||||
* $Source: /cvs/fribidi/fribidi2/lib/fribidi-arabic.c,v $
|
||||
*
|
||||
* Author(s):
|
||||
* Behdad Esfahbod, 2005
|
||||
*/
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#if HAVE_STDLIB_H+0
|
||||
# include <stdlib.h>
|
||||
#endif
|
||||
|
||||
|
||||
#include <fribidi-arabic.h>
|
||||
#include <fribidi-unicode.h>
|
||||
|
||||
|
||||
typedef struct _PairMap {
|
||||
FriBidiChar pair[2], to;
|
||||
} PairMap;
|
||||
|
||||
|
||||
#define FRIBIDI_ACCESS_SHAPE_TABLE(table,min,max,x,shape) (table), (min), (max)
|
||||
# define FRIBIDI_ACCESS_SHAPE_TABLE_REAL(table,min,max,x,shape) \
|
||||
(((x)<(min)||(x)>(max))?(x):(table)[(x)-(min)][(shape)])
|
||||
|
||||
#include "arabic-shaping.tab.i"
|
||||
#include "arabic-misc.tab.i"
|
||||
|
||||
|
||||
static void
|
||||
fribidi_shape_arabic_joining (
|
||||
/* input */
|
||||
const FriBidiChar table[][4],
|
||||
FriBidiChar min,
|
||||
FriBidiChar max,
|
||||
const FriBidiStrIndex len,
|
||||
const FriBidiArabicProp *ar_props,
|
||||
/* input and output */
|
||||
FriBidiChar *str
|
||||
)
|
||||
{
|
||||
register FriBidiStrIndex i;
|
||||
|
||||
for (i = 0; i < len; i++)
|
||||
if (FRIBIDI_ARAB_SHAPES(ar_props[i]))
|
||||
str[i] = FRIBIDI_ACCESS_SHAPE_TABLE_REAL (table, min, max, str[i], FRIBIDI_JOIN_SHAPE (ar_props[i]));
|
||||
}
|
||||
|
||||
|
||||
|
||||
static int
|
||||
comp_PairMap (const void *pa, const void *pb)
|
||||
{
|
||||
PairMap *a = (PairMap *)pa;
|
||||
PairMap *b = (PairMap *)pb;
|
||||
|
||||
if (a->pair[0] != b->pair[0])
|
||||
return a->pair[0] < b->pair[0] ? -1 : +1;
|
||||
else
|
||||
return a->pair[1] < b->pair[1] ? -1 :
|
||||
a->pair[1] > b->pair[1] ? +1 :
|
||||
0;
|
||||
}
|
||||
|
||||
|
||||
static FriBidiChar
|
||||
find_pair_match (const PairMap *table, int size, FriBidiChar first, FriBidiChar second)
|
||||
{
|
||||
PairMap *match;
|
||||
PairMap x;
|
||||
x.pair[0] = first;
|
||||
x.pair[1] = second;
|
||||
x.to = 0;
|
||||
match = bsearch (&x, table, size, sizeof (table[0]), comp_PairMap);
|
||||
return match ? match->to : 0;
|
||||
}
|
||||
|
||||
#define PAIR_MATCH(table,len,first,second) \
|
||||
((first)<(table[0].pair[0])||(first)>(table[len-1].pair[0])?0: \
|
||||
find_pair_match(table, len, first, second))
|
||||
|
||||
static void
|
||||
fribidi_shape_arabic_ligature (
|
||||
/* input */
|
||||
const PairMap *table,
|
||||
int size,
|
||||
const FriBidiLevel *embedding_levels,
|
||||
const FriBidiStrIndex len,
|
||||
/* input and output */
|
||||
FriBidiArabicProp *ar_props,
|
||||
FriBidiChar *str
|
||||
)
|
||||
{
|
||||
/* TODO: This doesn't form ligatures for even-level Arabic text.
|
||||
* no big problem though. */
|
||||
register FriBidiStrIndex i;
|
||||
|
||||
for (i = 0; i < len - 1; i++) {
|
||||
register FriBidiChar c;
|
||||
if (FRIBIDI_LEVEL_IS_RTL(embedding_levels[i]) &&
|
||||
embedding_levels[i] == embedding_levels[i+1] &&
|
||||
(c = PAIR_MATCH(table, size, str[i], str[i+1])))
|
||||
{
|
||||
str[i] = FRIBIDI_CHAR_FILL;
|
||||
FRIBIDI_SET_BITS(ar_props[i], FRIBIDI_MASK_LIGATURED);
|
||||
str[i+1] = c;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#define DO_LIGATURING(table, levels, len, ar_props, str) \
|
||||
fribidi_shape_arabic_ligature ((table), sizeof(table)/sizeof((table)[0]), levels, len, ar_props, str)
|
||||
|
||||
#define DO_SHAPING(tablemacro, len, ar_props, str) \
|
||||
fribidi_shape_arabic_joining (tablemacro(,), len, ar_props, str);
|
||||
|
||||
|
||||
|
||||
|
||||
FRIBIDI_ENTRY void
|
||||
fribidi_shape_arabic (
|
||||
/* input */
|
||||
FriBidiFlags flags,
|
||||
const FriBidiLevel *embedding_levels,
|
||||
const FriBidiStrIndex len,
|
||||
/* input and output */
|
||||
FriBidiArabicProp *ar_props,
|
||||
FriBidiChar *str
|
||||
)
|
||||
{
|
||||
DBG ("in fribidi_shape_arabic");
|
||||
|
||||
if UNLIKELY
|
||||
(len == 0 || !str) return;
|
||||
|
||||
DBG ("in fribidi_shape");
|
||||
|
||||
fribidi_assert (ar_props);
|
||||
|
||||
if (FRIBIDI_TEST_BITS (flags, FRIBIDI_FLAG_SHAPE_ARAB_PRES))
|
||||
{
|
||||
DO_SHAPING (FRIBIDI_GET_ARABIC_SHAPE_PRES, len, ar_props, str);
|
||||
}
|
||||
|
||||
if (FRIBIDI_TEST_BITS (flags, FRIBIDI_FLAG_SHAPE_ARAB_LIGA))
|
||||
{
|
||||
DO_LIGATURING (mandatory_liga_table, embedding_levels, len, ar_props, str);
|
||||
}
|
||||
|
||||
if (FRIBIDI_TEST_BITS (flags, FRIBIDI_FLAG_SHAPE_ARAB_CONSOLE))
|
||||
{
|
||||
DO_LIGATURING (console_liga_table, embedding_levels, len, ar_props, str);
|
||||
DO_SHAPING (FRIBIDI_GET_ARABIC_SHAPE_NSM, len, ar_props, str);
|
||||
}
|
||||
}
|
||||
|
||||
/* Editor directions:
|
||||
* Local Variables:
|
||||
* mode: c
|
||||
* c-basic-offset: 2
|
||||
* indent-tabs-mode: t
|
||||
* tab-width: 8
|
||||
* End:
|
||||
* vim: textwidth=78: autoindent: cindent: shiftwidth=2: tabstop=8:
|
||||
*/
|
||||
@@ -1,88 +0,0 @@
|
||||
/* fribidi-arabic.h - do Arabic shaping to presentation forms
|
||||
*
|
||||
* Copyright (C) 2005 Behdad Esfahbod
|
||||
*
|
||||
* This file is part of GNU FriBidi.
|
||||
*
|
||||
* GNU FriBidi is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation; either version 2.1
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* GNU FriBidi is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with GNU FriBidi; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* For licensing issues, contact <license@farsiweb.info> or write to
|
||||
* Sharif FarsiWeb, Inc., PO Box 13445-389, Tehran, Iran.
|
||||
*/
|
||||
/* $Id: fribidi-arabic.h,v 1.1 2005/11/03 01:39:01 behdad Exp $
|
||||
* $Author: behdad $
|
||||
* $Date: 2005/11/03 01:39:01 $
|
||||
* $Revision: 1.1 $
|
||||
* $Source: /cvs/fribidi/fribidi2/lib/fribidi-arabic.h,v $
|
||||
*
|
||||
* Author(s):
|
||||
* Behdad Esfahbod, 2005
|
||||
*/
|
||||
#ifndef _FRIBIDI_ARABIC_H
|
||||
#define _FRIBIDI_ARABIC_H
|
||||
|
||||
#include "fribidi-common.h"
|
||||
|
||||
#include "fribidi-types.h"
|
||||
#include "fribidi-flags.h"
|
||||
#include "fribidi-bidi-types.h"
|
||||
#include "fribidi-joining.h"
|
||||
|
||||
#include "fribidi-begindecls.h"
|
||||
|
||||
|
||||
#define fribidi_shape_arabic FRIBIDI_NAMESPACE(shape_arabic)
|
||||
/* fribidi_shape_arabic - do Arabic shaping
|
||||
*
|
||||
* The actual shaping that is done depends on the flags set. Only flags
|
||||
* starting with FRIBIDI_FLAG_SHAPE_ARAB_ affect this function.
|
||||
* Currently these are:
|
||||
*
|
||||
* * FRIBIDI_FLAG_SHAPE_MIRRORING: Do mirroring.
|
||||
* * FRIBIDI_FLAG_SHAPE_ARAB_PRES: Shape Arabic characters to their
|
||||
* presentation form glyphs.
|
||||
* * FRIBIDI_FLAG_SHAPE_ARAB_LIGA: Form mandatory Arabic ligatures.
|
||||
* * FRIBIDI_FLAG_SHAPE_ARAB_CONSOLE: Perform additional Arabic shaping
|
||||
* suitable for text rendered on
|
||||
* grid terminals with no mark
|
||||
* rendering capabilities.
|
||||
*
|
||||
* Of the above, FRIBIDI_FLAG_SHAPE_ARAB_CONSOLE is only used in special
|
||||
* cases, but the rest are recommended in any enviroment that doesn't have
|
||||
* other means for doing Arabic shaping. The set of extra flags that enable
|
||||
* this level of Arabic support has a shortcut named FRIBIDI_FLAGS_ARABIC.
|
||||
*/
|
||||
FRIBIDI_ENTRY void
|
||||
fribidi_shape_arabic (
|
||||
FriBidiFlags flags, /* shaping flags */
|
||||
const FriBidiLevel *embedding_levels,
|
||||
const FriBidiStrIndex len, /* input string length */
|
||||
FriBidiArabicProp *ar_props, /* input/output Arabic properties as
|
||||
* computed by fribidi_join_arabic */
|
||||
FriBidiChar *str /* string to shape */
|
||||
);
|
||||
|
||||
#include "fribidi-enddecls.h"
|
||||
|
||||
#endif /* !_FRIBIDI_ARABIC_H */
|
||||
/* Editor directions:
|
||||
* Local Variables:
|
||||
* mode: c
|
||||
* c-basic-offset: 2
|
||||
* indent-tabs-mode: t
|
||||
* tab-width: 8
|
||||
* End:
|
||||
* vim: textwidth=78: autoindent: cindent: shiftwidth=2: tabstop=8:
|
||||
*/
|
||||
@@ -1,3 +0,0 @@
|
||||
#ifdef FRIBIDI_BEGIN_DECLS
|
||||
FRIBIDI_BEGIN_DECLS
|
||||
#endif /* FRIBIDI_BEGIN_DECLS */
|
||||
@@ -1,98 +0,0 @@
|
||||
#ifndef __FRIBIDI_DOC
|
||||
/* FriBidi
|
||||
* fribidi-bidi-types-list.h - list of bidi types
|
||||
*
|
||||
* $Id: fribidi-bidi-types-list.h,v 1.5 2004/06/13 20:11:42 behdad Exp $
|
||||
* $Author: behdad $
|
||||
* $Date: 2004/06/13 20:11:42 $
|
||||
* $Revision: 1.5 $
|
||||
* $Source: /cvs/fribidi/fribidi2/lib/fribidi-bidi-types-list.h,v $
|
||||
*
|
||||
* Author:
|
||||
* Behdad Esfahbod, 2001, 2002, 2004
|
||||
*
|
||||
* Copyright (C) 2004 Sharif FarsiWeb, Inc.
|
||||
* Copyright (C) 2001,2002 Behdad Esfahbod
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this library, in a file named COPYING; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
* Boston, MA 02111-1307, USA
|
||||
*
|
||||
* For licensing issues, contact <license@farsiweb.info>.
|
||||
*/
|
||||
/* *INDENT-OFF* */
|
||||
#endif /* !__FRIBIDI_DOC */
|
||||
#ifndef _FRIBIDI_ADD_TYPE
|
||||
# define _FRIBIDI_ADD_TYPE(x,y)
|
||||
#endif
|
||||
#ifndef _FRIBIDI_ADD_ALIAS
|
||||
# define _FRIBIDI_ADD_ALIAS(x1,x2)
|
||||
#endif
|
||||
|
||||
#if !defined(_FRIBIDI_PAR_TYPES) || defined(_FRIBIDI_ALL_TYPES)
|
||||
|
||||
_FRIBIDI_ADD_TYPE (LTR, 'L') /* Left-To-Right letter */
|
||||
_FRIBIDI_ADD_TYPE (RTL, 'R') /* Right-To-Left letter */
|
||||
_FRIBIDI_ADD_TYPE (AL, 'A') /* Arabic Letter */
|
||||
_FRIBIDI_ADD_TYPE (EN, '1') /* European Numeral */
|
||||
_FRIBIDI_ADD_TYPE (AN, '9') /* Arabic Numeral */
|
||||
_FRIBIDI_ADD_TYPE (ES, 'w') /* European number Separator */
|
||||
_FRIBIDI_ADD_TYPE (ET, 'w') /* European number Terminator */
|
||||
_FRIBIDI_ADD_TYPE (CS, 'w') /* Common Separator */
|
||||
_FRIBIDI_ADD_TYPE (NSM, '`') /* Non Spacing Mark */
|
||||
_FRIBIDI_ADD_TYPE (BN, 'b') /* Boundary Neutral */
|
||||
_FRIBIDI_ADD_TYPE (BS, 'B') /* Block Separator */
|
||||
_FRIBIDI_ADD_TYPE (SS, 'S') /* Segment Separator */
|
||||
_FRIBIDI_ADD_TYPE (WS, '_') /* WhiteSpace */
|
||||
_FRIBIDI_ADD_TYPE (ON, 'n') /* Other Neutral */
|
||||
_FRIBIDI_ADD_TYPE (LRE, '+') /* Left-to-Right Embedding */
|
||||
_FRIBIDI_ADD_TYPE (RLE, '+') /* Right-to-Left Embedding */
|
||||
_FRIBIDI_ADD_TYPE (LRO, '+') /* Left-to-Right Override */
|
||||
_FRIBIDI_ADD_TYPE (RLO, '+') /* Right-to-Left Override */
|
||||
_FRIBIDI_ADD_TYPE (PDF, '-') /* Pop Directional Flag */
|
||||
|
||||
#if defined(_FRIBIDI_ADD_ALIAS)
|
||||
_FRIBIDI_ADD_ALIAS (L, LTR)
|
||||
_FRIBIDI_ADD_ALIAS (R, RTL)
|
||||
_FRIBIDI_ADD_ALIAS (B, BS)
|
||||
_FRIBIDI_ADD_ALIAS (S, SS)
|
||||
#endif /* _FRIBIDI_ADD_ALIAS */
|
||||
|
||||
#if defined(_FRIBIDI_SENTINEL_TYPE) || defined(_FRIBIDI_ALL_TYPES)
|
||||
_FRIBIDI_ADD_TYPE (SENTINEL, '$') /* SENTINEL */
|
||||
#endif /* _FRIBIDI_SENTINEL_TYPES || _FRIBIDI_ALL_TYPES*/
|
||||
#endif /* !_FRIBIDI_PAR_TYPES || _FRIBIDI_ALL_TYPES */
|
||||
|
||||
#if defined(_FRIBIDI_PAR_TYPES) || defined(_FRIBIDI_ALL_TYPES)
|
||||
# if !defined(_FRIBIDI_ALL_TYPES)
|
||||
_FRIBIDI_ADD_TYPE (LTR, 'L') /* Left-To-Right paragraph */
|
||||
_FRIBIDI_ADD_TYPE (RTL, 'R') /* Right-To-Left paragraph */
|
||||
_FRIBIDI_ADD_TYPE (ON, 'n') /* directiOn-Neutral paragraph */
|
||||
# endif /* !_FRIBIDI_ALL_TYPES */
|
||||
_FRIBIDI_ADD_TYPE (WLTR, 'l') /* Weak Left To Right paragraph */
|
||||
_FRIBIDI_ADD_TYPE (WRTL, 'r') /* Weak Right To Left paragraph */
|
||||
#endif /* _FRIBIDI_PAR_TYPES || _FRIBIDI_ALL_TYPES*/
|
||||
|
||||
#if defined(_FRIBIDI_ENUM_TYPES)
|
||||
typedef enum {
|
||||
# define _FRIBIDI_ADD_TYPE _FRIBIDI_ENUM_ADD_TYPE
|
||||
# include "fribidi-bidi-types-list.h"
|
||||
# undef _FRIBIDI_ADD_TYPE
|
||||
_FRIBIDI_TYPES_MAX
|
||||
} _FRIBIDI_ENUM_TYPES
|
||||
#endif /* _FRIBIDI_ENUM_TYPES */
|
||||
|
||||
#ifndef __FRIBIDI_DOC
|
||||
/* *INDENT-ON* */
|
||||
#endif /* !__FRIBIDI_DOC */
|
||||
@@ -1,125 +0,0 @@
|
||||
/* FriBidi
|
||||
* fribidi-bidi-types.c - character bidi types
|
||||
*
|
||||
* $Id: fribidi-bidi-types.c,v 1.9 2006/01/31 03:23:13 behdad Exp $
|
||||
* $Author: behdad $
|
||||
* $Date: 2006/01/31 03:23:13 $
|
||||
* $Revision: 1.9 $
|
||||
* $Source: /cvs/fribidi/fribidi2/lib/fribidi-bidi-types.c,v $
|
||||
*
|
||||
* Authors:
|
||||
* Behdad Esfahbod, 2001, 2002, 2004
|
||||
*
|
||||
* Copyright (C) 2004 Sharif FarsiWeb, Inc.
|
||||
* Copyright (C) 2001,2002 Behdad Esfahbod
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this library, in a file named COPYING; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
* Boston, MA 02111-1307, USA
|
||||
*
|
||||
* For licensing issues, contact <license@farsiweb.info>.
|
||||
*/
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#include <fribidi-bidi-types.h>
|
||||
|
||||
#include "bidi-types.h"
|
||||
|
||||
enum FriBidiCharTypeLinearEnum
|
||||
{
|
||||
# define _FRIBIDI_ADD_TYPE(TYPE,SYMBOL) TYPE,
|
||||
# include "fribidi-bidi-types-list.h"
|
||||
# undef _FRIBIDI_ADD_TYPE
|
||||
_FRIBIDI_NUM_TYPES
|
||||
};
|
||||
|
||||
#include "bidi-type.tab.i"
|
||||
|
||||
/* Map FriBidiCharTypeLinearEnum to FriBidiCharType. */
|
||||
static const FriBidiCharType linear_enum_to_char_type[] = {
|
||||
# define _FRIBIDI_ADD_TYPE(TYPE,SYMBOL) FRIBIDI_TYPE_##TYPE,
|
||||
# include "fribidi-bidi-types-list.h"
|
||||
# undef _FRIBIDI_ADD_TYPE
|
||||
};
|
||||
|
||||
FRIBIDI_ENTRY FriBidiCharType
|
||||
fribidi_get_bidi_type (
|
||||
/* input */
|
||||
FriBidiChar ch
|
||||
)
|
||||
{
|
||||
return linear_enum_to_char_type[FRIBIDI_GET_BIDI_TYPE (ch)];
|
||||
}
|
||||
|
||||
FRIBIDI_ENTRY void
|
||||
fribidi_get_bidi_types (
|
||||
/* input */
|
||||
const FriBidiChar *str,
|
||||
const FriBidiStrIndex len,
|
||||
/* output */
|
||||
FriBidiCharType *btypes
|
||||
)
|
||||
{
|
||||
register FriBidiStrIndex i = len;
|
||||
for (; i; i--)
|
||||
{
|
||||
*btypes++ = linear_enum_to_char_type[FRIBIDI_GET_BIDI_TYPE (*str)];
|
||||
str++;
|
||||
}
|
||||
}
|
||||
|
||||
FRIBIDI_ENTRY const char *
|
||||
fribidi_get_bidi_type_name (
|
||||
/* input */
|
||||
FriBidiCharType t
|
||||
)
|
||||
{
|
||||
switch (t)
|
||||
{
|
||||
# define _FRIBIDI_ADD_TYPE(TYPE,SYMBOL) case FRIBIDI_TYPE_##TYPE: return STRINGIZE(TYPE);
|
||||
# define _FRIBIDI_ALL_TYPES
|
||||
# include "fribidi-bidi-types-list.h"
|
||||
# undef _FRIBIDI_ALL_TYPES
|
||||
# undef _FRIBIDI_ADD_TYPE
|
||||
default:
|
||||
return "?";
|
||||
}
|
||||
}
|
||||
|
||||
#if DEBUG+0
|
||||
|
||||
char
|
||||
fribidi_char_from_bidi_type (
|
||||
/* input */
|
||||
FriBidiCharType t
|
||||
)
|
||||
{
|
||||
switch (t)
|
||||
{
|
||||
# define _FRIBIDI_ADD_TYPE(TYPE,SYMBOL) case FRIBIDI_TYPE_##TYPE: return SYMBOL;
|
||||
# define _FRIBIDI_ALL_TYPES
|
||||
# include "fribidi-bidi-types-list.h"
|
||||
# undef _FRIBIDI_ALL_TYPES
|
||||
# undef _FRIBIDI_ADD_TYPE
|
||||
default:
|
||||
return '?';
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* DEBUG */
|
||||
|
||||
/* Editor directions:
|
||||
* vim:textwidth=78:tabstop=8:shiftwidth=2:autoindent:cindent
|
||||
*/
|
||||
@@ -1,389 +0,0 @@
|
||||
/* FriBidi
|
||||
* fribidi-bidi-types.h - character bidi types
|
||||
*
|
||||
* $Id: fribidi-bidi-types.h,v 1.15 2008-11-24 17:48:31 behdad Exp $
|
||||
* $Author: behdad $
|
||||
* $Date: 2008-11-24 17:48:31 $
|
||||
* $Revision: 1.15 $
|
||||
* $Source: /cvs/fribidi/fribidi2/lib/fribidi-bidi-types.h,v $
|
||||
*
|
||||
* Author:
|
||||
* Behdad Esfahbod, 2001, 2002, 2004
|
||||
*
|
||||
* Copyright (C) 2004 Sharif FarsiWeb, Inc.
|
||||
* Copyright (C) 2001,2002 Behdad Esfahbod
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this library, in a file named COPYING; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
* Boston, MA 02111-1307, USA
|
||||
*
|
||||
* For licensing issues, contact <license@farsiweb.info>.
|
||||
*/
|
||||
#ifndef _FRIBIDI_BIDI_TYPES_H
|
||||
#define _FRIBIDI_BIDI_TYPES_H
|
||||
|
||||
#include "fribidi-common.h"
|
||||
|
||||
#include "fribidi-types.h"
|
||||
|
||||
#include "fribidi-begindecls.h"
|
||||
|
||||
typedef signed char FriBidiLevel;
|
||||
|
||||
/*
|
||||
* Define bit masks that bidi types are based on, each mask has
|
||||
* only one bit set.
|
||||
*/
|
||||
|
||||
/* RTL mask better be the least significant bit. */
|
||||
#define FRIBIDI_MASK_RTL 0x00000001L /* Is right to left */
|
||||
#define FRIBIDI_MASK_ARABIC 0x00000002L /* Is arabic */
|
||||
|
||||
/* Each char can be only one of the three following. */
|
||||
#define FRIBIDI_MASK_STRONG 0x00000010L /* Is strong */
|
||||
#define FRIBIDI_MASK_WEAK 0x00000020L /* Is weak */
|
||||
#define FRIBIDI_MASK_NEUTRAL 0x00000040L /* Is neutral */
|
||||
#define FRIBIDI_MASK_SENTINEL 0x00000080L /* Is sentinel */
|
||||
/* Sentinels are not valid chars, just identify the start/end of strings. */
|
||||
|
||||
/* Each char can be only one of the five following. */
|
||||
#define FRIBIDI_MASK_LETTER 0x00000100L /* Is letter: L, R, AL */
|
||||
#define FRIBIDI_MASK_NUMBER 0x00000200L /* Is number: EN, AN */
|
||||
#define FRIBIDI_MASK_NUMSEPTER 0x00000400L /* Is separator or terminator: ES, ET, CS */
|
||||
#define FRIBIDI_MASK_SPACE 0x00000800L /* Is space: BN, BS, SS, WS */
|
||||
#define FRIBIDI_MASK_EXPLICIT 0x00001000L /* Is expilict mark: LRE, RLE, LRO, RLO, PDF */
|
||||
|
||||
/* Can be set only if FRIBIDI_MASK_SPACE is also set. */
|
||||
#define FRIBIDI_MASK_SEPARATOR 0x00002000L /* Is text separator: BS, SS */
|
||||
/* Can be set only if FRIBIDI_MASK_EXPLICIT is also set. */
|
||||
#define FRIBIDI_MASK_OVERRIDE 0x00004000L /* Is explicit override: LRO, RLO */
|
||||
|
||||
/* The following exist to make types pairwise different, some of them can
|
||||
* be removed but are here because of efficiency (make queries faster). */
|
||||
|
||||
#define FRIBIDI_MASK_ES 0x00010000L
|
||||
#define FRIBIDI_MASK_ET 0x00020000L
|
||||
#define FRIBIDI_MASK_CS 0x00040000L
|
||||
|
||||
#define FRIBIDI_MASK_NSM 0x00080000L
|
||||
#define FRIBIDI_MASK_BN 0x00100000L
|
||||
|
||||
#define FRIBIDI_MASK_BS 0x00200000L
|
||||
#define FRIBIDI_MASK_SS 0x00400000L
|
||||
#define FRIBIDI_MASK_WS 0x00800000L
|
||||
|
||||
/* We reserve a single bit for user's private use: we will never use it. */
|
||||
#define FRIBIDI_MASK_PRIVATE 0x01000000L
|
||||
|
||||
|
||||
/*
|
||||
* Define values for FriBidiCharType
|
||||
*/
|
||||
|
||||
/* Strong types */
|
||||
|
||||
/* Left-To-Right letter */
|
||||
#define FRIBIDI_TYPE_LTR_VAL ( FRIBIDI_MASK_STRONG | FRIBIDI_MASK_LETTER )
|
||||
/* Right-To-Left letter */
|
||||
#define FRIBIDI_TYPE_RTL_VAL ( FRIBIDI_MASK_STRONG | FRIBIDI_MASK_LETTER \
|
||||
| FRIBIDI_MASK_RTL)
|
||||
/* Arabic Letter */
|
||||
#define FRIBIDI_TYPE_AL_VAL ( FRIBIDI_MASK_STRONG | FRIBIDI_MASK_LETTER \
|
||||
| FRIBIDI_MASK_RTL | FRIBIDI_MASK_ARABIC )
|
||||
/* Left-to-Right Embedding */
|
||||
#define FRIBIDI_TYPE_LRE_VAL ( FRIBIDI_MASK_STRONG | FRIBIDI_MASK_EXPLICIT)
|
||||
/* Right-to-Left Embedding */
|
||||
#define FRIBIDI_TYPE_RLE_VAL ( FRIBIDI_MASK_STRONG | FRIBIDI_MASK_EXPLICIT \
|
||||
| FRIBIDI_MASK_RTL )
|
||||
/* Left-to-Right Override */
|
||||
#define FRIBIDI_TYPE_LRO_VAL ( FRIBIDI_MASK_STRONG | FRIBIDI_MASK_EXPLICIT \
|
||||
| FRIBIDI_MASK_OVERRIDE )
|
||||
/* Right-to-Left Override */
|
||||
#define FRIBIDI_TYPE_RLO_VAL ( FRIBIDI_MASK_STRONG | FRIBIDI_MASK_EXPLICIT \
|
||||
| FRIBIDI_MASK_RTL | FRIBIDI_MASK_OVERRIDE )
|
||||
|
||||
/* Weak types */
|
||||
|
||||
/* Pop Directional Flag*/
|
||||
#define FRIBIDI_TYPE_PDF_VAL ( FRIBIDI_MASK_WEAK | FRIBIDI_MASK_EXPLICIT )
|
||||
/* European Numeral */
|
||||
#define FRIBIDI_TYPE_EN_VAL ( FRIBIDI_MASK_WEAK | FRIBIDI_MASK_NUMBER )
|
||||
/* Arabic Numeral */
|
||||
#define FRIBIDI_TYPE_AN_VAL ( FRIBIDI_MASK_WEAK | FRIBIDI_MASK_NUMBER \
|
||||
| FRIBIDI_MASK_ARABIC )
|
||||
/* European number Separator */
|
||||
#define FRIBIDI_TYPE_ES_VAL ( FRIBIDI_MASK_WEAK | FRIBIDI_MASK_NUMSEPTER \
|
||||
| FRIBIDI_MASK_ES )
|
||||
/* European number Terminator */
|
||||
#define FRIBIDI_TYPE_ET_VAL ( FRIBIDI_MASK_WEAK | FRIBIDI_MASK_NUMSEPTER \
|
||||
| FRIBIDI_MASK_ET )
|
||||
/* Common Separator */
|
||||
#define FRIBIDI_TYPE_CS_VAL ( FRIBIDI_MASK_WEAK | FRIBIDI_MASK_NUMSEPTER \
|
||||
| FRIBIDI_MASK_CS )
|
||||
/* Non Spacing Mark */
|
||||
#define FRIBIDI_TYPE_NSM_VAL ( FRIBIDI_MASK_WEAK | FRIBIDI_MASK_NSM )
|
||||
/* Boundary Neutral */
|
||||
#define FRIBIDI_TYPE_BN_VAL ( FRIBIDI_MASK_WEAK | FRIBIDI_MASK_SPACE \
|
||||
| FRIBIDI_MASK_BN )
|
||||
|
||||
/* Neutral types */
|
||||
|
||||
/* Block Separator */
|
||||
#define FRIBIDI_TYPE_BS_VAL ( FRIBIDI_MASK_NEUTRAL | FRIBIDI_MASK_SPACE \
|
||||
| FRIBIDI_MASK_SEPARATOR | FRIBIDI_MASK_BS )
|
||||
/* Segment Separator */
|
||||
#define FRIBIDI_TYPE_SS_VAL ( FRIBIDI_MASK_NEUTRAL | FRIBIDI_MASK_SPACE \
|
||||
| FRIBIDI_MASK_SEPARATOR | FRIBIDI_MASK_SS )
|
||||
/* WhiteSpace */
|
||||
#define FRIBIDI_TYPE_WS_VAL ( FRIBIDI_MASK_NEUTRAL | FRIBIDI_MASK_SPACE \
|
||||
| FRIBIDI_MASK_WS )
|
||||
/* Other Neutral */
|
||||
#define FRIBIDI_TYPE_ON_VAL ( FRIBIDI_MASK_NEUTRAL )
|
||||
|
||||
|
||||
/* The following are used in specifying paragraph direction only. */
|
||||
|
||||
/* Weak Left-To-Right */
|
||||
#define FRIBIDI_TYPE_WLTR_VAL ( FRIBIDI_MASK_WEAK )
|
||||
/* Weak Right-To-Left */
|
||||
#define FRIBIDI_TYPE_WRTL_VAL ( FRIBIDI_MASK_WEAK | FRIBIDI_MASK_RTL )
|
||||
|
||||
/* start or end of text (run list) SENTINEL. Only used internally */
|
||||
#define FRIBIDI_TYPE_SENTINEL ( FRIBIDI_MASK_SENTINEL )
|
||||
|
||||
/* Private types for applications. More private types can be obtained by
|
||||
* summing up from this one. */
|
||||
#define FRIBIDI_TYPE_PRIVATE ( FRIBIDI_MASK_PRIVATE )
|
||||
|
||||
|
||||
/* Define Enums only if sizeof(int) == 4 (UTF-32), and not compiling C++.
|
||||
* The problem with C++ is that then casts between int32 and enum will fail!
|
||||
*/
|
||||
#if defined(__FRIBIDI_DOC) || (FRIBIDI_SIZEOF_INT+0 == 4 && !defined(__cplusplus))
|
||||
|
||||
typedef enum
|
||||
{
|
||||
# define _FRIBIDI_ADD_TYPE(TYPE,SYMBOL) \
|
||||
FRIBIDI_TYPE_##TYPE = FRIBIDI_TYPE_##TYPE##_VAL,
|
||||
# include "fribidi-bidi-types-list.h"
|
||||
# undef _FRIBIDI_ADD_TYPE
|
||||
_FRIBIDI_TYPE_SENTINEL = FRIBIDI_TYPE_SENTINEL /* Don't use this */
|
||||
} FriBidiCharType;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
# define _FRIBIDI_PAR_TYPES
|
||||
# define _FRIBIDI_ADD_TYPE(TYPE,SYMBOL) \
|
||||
FRIBIDI_PAR_##TYPE = FRIBIDI_TYPE_##TYPE##_VAL,
|
||||
# include "fribidi-bidi-types-list.h"
|
||||
# undef _FRIBIDI_ADD_TYPE
|
||||
# undef _FRIBIDI_PAR_TYPES
|
||||
_FRIBIDI_PAR_SENTINEL = FRIBIDI_TYPE_SENTINEL /* Don't use this */
|
||||
} FriBidiParType;
|
||||
|
||||
#else
|
||||
|
||||
typedef fribidi_uint32 FriBidiCharType;
|
||||
# define FRIBIDI_TYPE_LTR FRIBIDI_TYPE_LTR_VAL
|
||||
# define FRIBIDI_TYPE_RTL FRIBIDI_TYPE_RTL_VAL
|
||||
# define FRIBIDI_TYPE_AL FRIBIDI_TYPE_AL_VAL
|
||||
# define FRIBIDI_TYPE_EN FRIBIDI_TYPE_EN_VAL
|
||||
# define FRIBIDI_TYPE_AN FRIBIDI_TYPE_AN_VAL
|
||||
# define FRIBIDI_TYPE_ES FRIBIDI_TYPE_ES_VAL
|
||||
# define FRIBIDI_TYPE_ET FRIBIDI_TYPE_ET_VAL
|
||||
# define FRIBIDI_TYPE_CS FRIBIDI_TYPE_CS_VAL
|
||||
# define FRIBIDI_TYPE_NSM FRIBIDI_TYPE_NSM_VAL
|
||||
# define FRIBIDI_TYPE_BN FRIBIDI_TYPE_BN_VAL
|
||||
# define FRIBIDI_TYPE_BS FRIBIDI_TYPE_BS_VAL
|
||||
# define FRIBIDI_TYPE_SS FRIBIDI_TYPE_SS_VAL
|
||||
# define FRIBIDI_TYPE_WS FRIBIDI_TYPE_WS_VAL
|
||||
# define FRIBIDI_TYPE_ON FRIBIDI_TYPE_ON_VAL
|
||||
# define FRIBIDI_TYPE_LRE FRIBIDI_TYPE_LRE_VAL
|
||||
# define FRIBIDI_TYPE_RLE FRIBIDI_TYPE_RLE_VAL
|
||||
# define FRIBIDI_TYPE_LRO FRIBIDI_TYPE_LRO_VAL
|
||||
# define FRIBIDI_TYPE_RLO FRIBIDI_TYPE_RLO_VAL
|
||||
# define FRIBIDI_TYPE_PDF FRIBIDI_TYPE_PDF_VAL
|
||||
|
||||
typedef fribidi_uint32 FriBidiParType;
|
||||
# define FRIBIDI_PAR_LTR FRIBIDI_TYPE_LTR_VAL
|
||||
# define FRIBIDI_PAR_RTL FRIBIDI_TYPE_RTL_VAL
|
||||
# define FRIBIDI_PAR_ON FRIBIDI_TYPE_ON_VAL
|
||||
# define FRIBIDI_PAR_WLTR FRIBIDI_TYPE_WLTR_VAL
|
||||
# define FRIBIDI_PAR_WRTL FRIBIDI_TYPE_WRTL_VAL
|
||||
|
||||
#endif
|
||||
|
||||
/* Please don't use these two type names, use FRIBIDI_PAR_* form instead. */
|
||||
#define FRIBIDI_TYPE_WLTR FRIBIDI_PAR_WLTR
|
||||
#define FRIBIDI_TYPE_WRTL FRIBIDI_PAR_WRTL
|
||||
|
||||
|
||||
/*
|
||||
* Defining macros for needed queries, It is fully dependent on the
|
||||
* implementation of FriBidiCharType.
|
||||
*/
|
||||
|
||||
|
||||
/* Is right-to-left level? */
|
||||
#define FRIBIDI_LEVEL_IS_RTL(lev) ((lev) & 1)
|
||||
|
||||
/* Return the bidi type corresponding to the direction of the level number,
|
||||
FRIBIDI_TYPE_LTR for evens and FRIBIDI_TYPE_RTL for odds. */
|
||||
#define FRIBIDI_LEVEL_TO_DIR(lev) \
|
||||
(FRIBIDI_LEVEL_IS_RTL (lev) ? FRIBIDI_TYPE_RTL : FRIBIDI_TYPE_LTR)
|
||||
|
||||
/* Return the minimum level of the direction, 0 for FRIBIDI_TYPE_LTR and
|
||||
1 for FRIBIDI_TYPE_RTL and FRIBIDI_TYPE_AL. */
|
||||
#define FRIBIDI_DIR_TO_LEVEL(dir) \
|
||||
((FriBidiLevel) (FRIBIDI_IS_RTL (dir) ? 1 : 0))
|
||||
|
||||
/* Is right to left: RTL, AL, RLE, RLO? */
|
||||
#define FRIBIDI_IS_RTL(p) ((p) & FRIBIDI_MASK_RTL)
|
||||
/* Is arabic: AL, AN? */
|
||||
#define FRIBIDI_IS_ARABIC(p) ((p) & FRIBIDI_MASK_ARABIC)
|
||||
|
||||
/* Is strong? */
|
||||
#define FRIBIDI_IS_STRONG(p) ((p) & FRIBIDI_MASK_STRONG)
|
||||
/* Is weak? */
|
||||
#define FRIBIDI_IS_WEAK(p) ((p) & FRIBIDI_MASK_WEAK)
|
||||
/* Is neutral? */
|
||||
#define FRIBIDI_IS_NEUTRAL(p) ((p) & FRIBIDI_MASK_NEUTRAL)
|
||||
/* Is sentinel? */
|
||||
#define FRIBIDI_IS_SENTINEL(p) ((p) & FRIBIDI_MASK_SENTINEL)
|
||||
|
||||
/* Is letter: L, R, AL? */
|
||||
#define FRIBIDI_IS_LETTER(p) ((p) & FRIBIDI_MASK_LETTER)
|
||||
/* Is number: EN, AN? */
|
||||
#define FRIBIDI_IS_NUMBER(p) ((p) & FRIBIDI_MASK_NUMBER)
|
||||
/* Is number separator or terminator: ES, ET, CS? */
|
||||
#define FRIBIDI_IS_NUMBER_SEPARATOR_OR_TERMINATOR(p) \
|
||||
((p) & FRIBIDI_MASK_NUMSEPTER)
|
||||
/* Is space: BN, BS, SS, WS? */
|
||||
#define FRIBIDI_IS_SPACE(p) ((p) & FRIBIDI_MASK_SPACE)
|
||||
/* Is explicit mark: LRE, RLE, LRO, RLO, PDF? */
|
||||
#define FRIBIDI_IS_EXPLICIT(p) ((p) & FRIBIDI_MASK_EXPLICIT)
|
||||
|
||||
/* Is text separator: BS, SS? */
|
||||
#define FRIBIDI_IS_SEPARATOR(p) ((p) & FRIBIDI_MASK_SEPARATOR)
|
||||
|
||||
/* Is explicit override: LRO, RLO? */
|
||||
#define FRIBIDI_IS_OVERRIDE(p) ((p) & FRIBIDI_MASK_OVERRIDE)
|
||||
|
||||
/* Some more: */
|
||||
|
||||
/* Is left to right letter: LTR? */
|
||||
#define FRIBIDI_IS_LTR_LETTER(p) \
|
||||
((p) & (FRIBIDI_MASK_LETTER | FRIBIDI_MASK_RTL) == FRIBIDI_MASK_LETTER)
|
||||
|
||||
/* Is right to left letter: RTL, AL? */
|
||||
#define FRIBIDI_IS_RTL_LETTER(p) \
|
||||
((p) & (FRIBIDI_MASK_LETTER | FRIBIDI_MASK_RTL) \
|
||||
== (FRIBIDI_MASK_LETTER | FRIBIDI_MASK_RTL))
|
||||
|
||||
/* Is ES or CS: ES, CS? */
|
||||
#define FRIBIDI_IS_ES_OR_CS(p) \
|
||||
((p) & (FRIBIDI_MASK_ES | FRIBIDI_MASK_CS))
|
||||
|
||||
/* Is explicit or BN: LRE, RLE, LRO, RLO, PDF, BN? */
|
||||
#define FRIBIDI_IS_EXPLICIT_OR_BN(p) \
|
||||
((p) & (FRIBIDI_MASK_EXPLICIT | FRIBIDI_MASK_BN))
|
||||
|
||||
/* Is explicit or BN or NSM: LRE, RLE, LRO, RLO, PDF, BN, NSM? */
|
||||
#define FRIBIDI_IS_EXPLICIT_OR_BN_OR_NSM(p) \
|
||||
((p) & (FRIBIDI_MASK_EXPLICIT | FRIBIDI_MASK_BN | FRIBIDI_MASK_NSM))
|
||||
|
||||
/* Is explicit or BN or WS: LRE, RLE, LRO, RLO, PDF, BN, WS? */
|
||||
#define FRIBIDI_IS_EXPLICIT_OR_BN_OR_WS(p) \
|
||||
((p) & (FRIBIDI_MASK_EXPLICIT | FRIBIDI_MASK_BN | FRIBIDI_MASK_WS))
|
||||
|
||||
/* Is explicit or separator or BN or WS: LRE, RLE, LRO, RLO, PDF, BS, SS, BN, WS? */
|
||||
#define FRIBIDI_IS_EXPLICIT_OR_SEPARATOR_OR_BN_OR_WS(p) \
|
||||
((p) & (FRIBIDI_MASK_EXPLICIT | FRIBIDI_MASK_SEPARATOR \
|
||||
| FRIBIDI_MASK_BN | FRIBIDI_MASK_WS))
|
||||
|
||||
/* Is private-use type for application? */
|
||||
#define FRIBIDI_IS_PRIVATE(p) ((p) & FRIBIDI_MASK_PRIVATE)
|
||||
|
||||
/* Define some conversions. */
|
||||
|
||||
/* Change numbers to RTL: EN,AN -> RTL. */
|
||||
#define FRIBIDI_CHANGE_NUMBER_TO_RTL(p) \
|
||||
(FRIBIDI_IS_NUMBER(p) ? FRIBIDI_TYPE_RTL : (p))
|
||||
|
||||
/* Override status of an explicit mark:
|
||||
* LRO,LRE->LTR, RLO,RLE->RTL, otherwise->ON. */
|
||||
#define FRIBIDI_EXPLICIT_TO_OVERRIDE_DIR(p) \
|
||||
(FRIBIDI_IS_OVERRIDE(p) ? FRIBIDI_LEVEL_TO_DIR(FRIBIDI_DIR_TO_LEVEL(p)) \
|
||||
: FRIBIDI_TYPE_ON)
|
||||
|
||||
/* Weaken type for paragraph fallback purposes:
|
||||
* LTR->WLTR, RTL->WRTL. */
|
||||
#define FRIBIDI_WEAK_PARAGRAPH(p) (FRIBIDI_PAR_WLTR | ((p) & FRIBIDI_MASK_RTL))
|
||||
|
||||
|
||||
/* Functions finally */
|
||||
|
||||
|
||||
#define fribidi_get_bidi_type FRIBIDI_NAMESPACE(get_bidi_type)
|
||||
/* fribidi_get_bidi_type - get character bidi type
|
||||
*
|
||||
* This function returns the bidi type of a character as defined in Table 3.7
|
||||
* Bidirectional Character Types of the Unicode Bidirectional Algorithm
|
||||
* available at
|
||||
* http://www.unicode.org/reports/tr9/#Bidirectional_Character_Types, using
|
||||
* data provided in file UnicodeData.txt of the Unicode Character Database
|
||||
* available at http://www.unicode.org/Public/UNIDATA/UnicodeData.txt.
|
||||
*
|
||||
* There are a few macros defined in fribidi-bidi-types.h for querying a bidi
|
||||
* type.
|
||||
*/
|
||||
FRIBIDI_ENTRY FriBidiCharType
|
||||
fribidi_get_bidi_type (
|
||||
FriBidiChar ch /* input character */
|
||||
) FRIBIDI_GNUC_CONST;
|
||||
|
||||
#define fribidi_get_bidi_types FRIBIDI_NAMESPACE(get_bidi_types)
|
||||
/* fribidi_get_bidi_types - get bidi types for an string of characters
|
||||
*
|
||||
* This function finds the bidi types of an string of characters. See
|
||||
* fribidi_get_bidi_type() for more information about the bidi types returned
|
||||
* by this function.
|
||||
*/
|
||||
FRIBIDI_ENTRY void fribidi_get_bidi_types (
|
||||
const FriBidiChar *str, /* input string */
|
||||
const FriBidiStrIndex len, /* input string length */
|
||||
FriBidiCharType *btypes /* output bidi types */
|
||||
);
|
||||
|
||||
#define fribidi_get_bidi_type_name FRIBIDI_NAMESPACE(get_bidi_type_name)
|
||||
/* fribidi_get_bidi_type_name - get bidi type name
|
||||
*
|
||||
* This function returns the bidi type name of a character type. The
|
||||
* returned string is a static string and should not be freed.
|
||||
*
|
||||
* The type names are the same as ones defined in Table 3.7 Bidirectional
|
||||
* Character Types of the Unicode Bidirectional Algorithm available at
|
||||
* http://www.unicode.org/reports/tr9/#Bidirectional_Character_Types, with a
|
||||
* few modifications: L->LTR, R->RTL, B->BS, S->SS.
|
||||
*/
|
||||
FRIBIDI_ENTRY const char *fribidi_get_bidi_type_name (
|
||||
FriBidiCharType t /* input bidi type */
|
||||
) FRIBIDI_GNUC_CONST;
|
||||
|
||||
#include "fribidi-enddecls.h"
|
||||
|
||||
#endif /* !_FRIBIDI_BIDI_TYPES_H */
|
||||
/* Editor directions:
|
||||
* vim:textwidth=78:tabstop=8:shiftwidth=2:autoindent:cindent
|
||||
*/
|
||||
@@ -1,992 +0,0 @@
|
||||
/* FriBidi
|
||||
* fribidi-bidi.c - bidirectional algorithm
|
||||
*
|
||||
* $Id: fribidi-bidi.c,v 1.21 2007/03/15 18:09:25 behdad Exp $
|
||||
* $Author: behdad $
|
||||
* $Date: 2007/03/15 18:09:25 $
|
||||
* $Revision: 1.21 $
|
||||
* $Source: /cvs/fribidi/fribidi2/lib/fribidi-bidi.c,v $
|
||||
*
|
||||
* Authors:
|
||||
* Behdad Esfahbod, 2001, 2002, 2004
|
||||
* Dov Grobgeld, 1999, 2000
|
||||
*
|
||||
* Copyright (C) 2004 Sharif FarsiWeb, Inc
|
||||
* Copyright (C) 2001,2002 Behdad Esfahbod
|
||||
* Copyright (C) 1999,2000 Dov Grobgeld
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this library, in a file named COPYING; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
* Boston, MA 02111-1307, USA
|
||||
*
|
||||
* For licensing issues, contact <license@farsiweb.info>.
|
||||
*/
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#include <fribidi-bidi.h>
|
||||
#include <fribidi-mirroring.h>
|
||||
#include <fribidi-unicode.h>
|
||||
|
||||
#include "mem.h"
|
||||
#include "bidi-types.h"
|
||||
#include "run.h"
|
||||
|
||||
/*
|
||||
* This file implements most of Unicode Standard Annex #9, Tracking Number 13.
|
||||
*/
|
||||
|
||||
#ifndef MAX
|
||||
# define MAX(a,b) ((a) > (b) ? (a) : (b))
|
||||
#endif /* !MAX */
|
||||
|
||||
/* Some convenience macros */
|
||||
#define RL_TYPE(list) ((list)->type)
|
||||
#define RL_LEN(list) ((list)->len)
|
||||
#define RL_POS(list) ((list)->pos)
|
||||
#define RL_LEVEL(list) ((list)->level)
|
||||
|
||||
static FriBidiRun *
|
||||
merge_with_prev (
|
||||
FriBidiRun *second
|
||||
)
|
||||
{
|
||||
FriBidiRun *first;
|
||||
|
||||
fribidi_assert (second);
|
||||
fribidi_assert (second->next);
|
||||
first = second->prev;
|
||||
fribidi_assert (first);
|
||||
|
||||
first->next = second->next;
|
||||
first->next->prev = first;
|
||||
RL_LEN (first) += RL_LEN (second);
|
||||
free_run (second);
|
||||
return first;
|
||||
}
|
||||
|
||||
static void
|
||||
compact_list (
|
||||
FriBidiRun *list
|
||||
)
|
||||
{
|
||||
fribidi_assert (list);
|
||||
|
||||
if (list->next)
|
||||
for_run_list (list, list)
|
||||
if (RL_TYPE (list->prev) == RL_TYPE (list)
|
||||
&& RL_LEVEL (list->prev) == RL_LEVEL (list))
|
||||
list = merge_with_prev (list);
|
||||
}
|
||||
|
||||
static void
|
||||
compact_neutrals (
|
||||
FriBidiRun *list
|
||||
)
|
||||
{
|
||||
fribidi_assert (list);
|
||||
|
||||
if (list->next)
|
||||
{
|
||||
for_run_list (list, list)
|
||||
{
|
||||
if (RL_LEVEL (list->prev) == RL_LEVEL (list)
|
||||
&&
|
||||
((RL_TYPE
|
||||
(list->prev) == RL_TYPE (list)
|
||||
|| (FRIBIDI_IS_NEUTRAL (RL_TYPE (list->prev))
|
||||
&& FRIBIDI_IS_NEUTRAL (RL_TYPE (list))))))
|
||||
list = merge_with_prev (list);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if DEBUG+0
|
||||
/*======================================================================
|
||||
* For debugging, define some functions for printing the types and the
|
||||
* levels.
|
||||
*----------------------------------------------------------------------*/
|
||||
|
||||
static char char_from_level_array[] = {
|
||||
'$', /* -1 == FRIBIDI_SENTINEL, indicating
|
||||
* start or end of string. */
|
||||
/* 0-61 == 0-9,a-z,A-Z are the the only valid levels before resolving
|
||||
* implicits. after that the level @ may be appear too. */
|
||||
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
|
||||
'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j',
|
||||
'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't',
|
||||
'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D',
|
||||
'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N',
|
||||
'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X',
|
||||
'Y', 'Z',
|
||||
|
||||
'@', /* 62 == only must appear after resolving
|
||||
* implicits. */
|
||||
|
||||
'!', /* 63 == FRIBIDI_LEVEL_INVALID, internal error,
|
||||
* this level shouldn't be seen. */
|
||||
|
||||
'*', '*', '*', '*', '*' /* >= 64 == overflows, this levels and higher
|
||||
* levels show a real bug!. */
|
||||
};
|
||||
|
||||
#define fribidi_char_from_level(level) char_from_level_array[(level) + 1]
|
||||
|
||||
static void
|
||||
print_types_re (
|
||||
const FriBidiRun *pp
|
||||
)
|
||||
{
|
||||
fribidi_assert (pp);
|
||||
|
||||
MSG (" Run types : ");
|
||||
for_run_list (pp, pp)
|
||||
{
|
||||
MSG5 ("%d:%d(%s)[%d] ",
|
||||
pp->pos, pp->len, fribidi_get_bidi_type_name (pp->type), pp->level);
|
||||
}
|
||||
MSG ("\n");
|
||||
}
|
||||
|
||||
static void
|
||||
print_resolved_levels (
|
||||
const FriBidiRun *pp
|
||||
)
|
||||
{
|
||||
fribidi_assert (pp);
|
||||
|
||||
MSG (" Res. levels: ");
|
||||
for_run_list (pp, pp)
|
||||
{
|
||||
register FriBidiStrIndex i;
|
||||
for (i = RL_LEN (pp); i; i--)
|
||||
MSG2 ("%c", fribidi_char_from_level (RL_LEVEL (pp)));
|
||||
}
|
||||
MSG ("\n");
|
||||
}
|
||||
|
||||
static void
|
||||
print_resolved_types (
|
||||
const FriBidiRun *pp
|
||||
)
|
||||
{
|
||||
fribidi_assert (pp);
|
||||
|
||||
MSG (" Res. types : ");
|
||||
for_run_list (pp, pp)
|
||||
{
|
||||
FriBidiStrIndex i;
|
||||
for (i = RL_LEN (pp); i; i--)
|
||||
MSG2 ("%c", fribidi_char_from_bidi_type (pp->type));
|
||||
}
|
||||
MSG ("\n");
|
||||
}
|
||||
|
||||
static void
|
||||
print_bidi_string (
|
||||
/* input */
|
||||
const FriBidiCharType *bidi_types,
|
||||
const FriBidiStrIndex len
|
||||
)
|
||||
{
|
||||
register FriBidiStrIndex i;
|
||||
|
||||
fribidi_assert (bidi_types);
|
||||
|
||||
MSG (" Org. types : ");
|
||||
for (i = 0; i < len; i++)
|
||||
MSG2 ("%c", fribidi_char_from_bidi_type (bidi_types[i]));
|
||||
MSG ("\n");
|
||||
}
|
||||
#endif /* DEBUG */
|
||||
|
||||
|
||||
/*=========================================================================
|
||||
* define macros for push and pop the status in to / out of the stack
|
||||
*-------------------------------------------------------------------------*/
|
||||
|
||||
/* There are a few little points in pushing into and poping from the status
|
||||
stack:
|
||||
1. when the embedding level is not valid (more than
|
||||
FRIBIDI_BIDI_MAX_EXPLICIT_LEVEL=61), you must reject it, and not to push
|
||||
into the stack, but when you see a PDF, you must find the matching code,
|
||||
and if it was pushed in the stack, pop it, it means you must pop if and
|
||||
only if you have pushed the matching code, the over_pushed var counts the
|
||||
number of rejected codes so far.
|
||||
2. there's a more confusing point too, when the embedding level is exactly
|
||||
FRIBIDI_BIDI_MAX_EXPLICIT_LEVEL-1=60, an LRO or LRE is rejected
|
||||
because the new level would be FRIBIDI_BIDI_MAX_EXPLICIT_LEVEL+1=62, that
|
||||
is invalid; but an RLO or RLE is accepted because the new level is
|
||||
FRIBIDI_BIDI_MAX_EXPLICIT_LEVEL=61, that is valid, so the rejected codes
|
||||
may be not continuous in the logical order, in fact there are at most two
|
||||
continuous intervals of codes, with an RLO or RLE between them. To support
|
||||
this case, the first_interval var counts the number of rejected codes in
|
||||
the first interval, when it is 0, means that there is only one interval.
|
||||
*/
|
||||
|
||||
/* a. If this new level would be valid, then this embedding code is valid.
|
||||
Remember (push) the current embedding level and override status.
|
||||
Reset current level to this new level, and reset the override status to
|
||||
new_override.
|
||||
b. If the new level would not be valid, then this code is invalid. Don't
|
||||
change the current level or override status.
|
||||
*/
|
||||
#define PUSH_STATUS \
|
||||
FRIBIDI_BEGIN_STMT \
|
||||
if LIKELY(new_level <= FRIBIDI_BIDI_MAX_EXPLICIT_LEVEL) \
|
||||
{ \
|
||||
if UNLIKELY(level == FRIBIDI_BIDI_MAX_EXPLICIT_LEVEL - 1) \
|
||||
first_interval = over_pushed; \
|
||||
status_stack[stack_size].level = level; \
|
||||
status_stack[stack_size].override = override; \
|
||||
stack_size++; \
|
||||
level = new_level; \
|
||||
override = new_override; \
|
||||
} else \
|
||||
over_pushed++; \
|
||||
FRIBIDI_END_STMT
|
||||
|
||||
/* If there was a valid matching code, restore (pop) the last remembered
|
||||
(pushed) embedding level and directional override.
|
||||
*/
|
||||
#define POP_STATUS \
|
||||
FRIBIDI_BEGIN_STMT \
|
||||
if (stack_size) \
|
||||
{ \
|
||||
if UNLIKELY(over_pushed > first_interval) \
|
||||
over_pushed--; \
|
||||
else \
|
||||
{ \
|
||||
if LIKELY(over_pushed == first_interval) \
|
||||
first_interval = 0; \
|
||||
stack_size--; \
|
||||
level = status_stack[stack_size].level; \
|
||||
override = status_stack[stack_size].override; \
|
||||
} \
|
||||
} \
|
||||
FRIBIDI_END_STMT
|
||||
|
||||
|
||||
/* Return the type of previous run or the SOR, if already at the start of
|
||||
a level run. */
|
||||
#define PREV_TYPE_OR_SOR(pp) \
|
||||
( \
|
||||
RL_LEVEL(pp->prev) == RL_LEVEL(pp) ? \
|
||||
RL_TYPE(pp->prev) : \
|
||||
FRIBIDI_LEVEL_TO_DIR(MAX(RL_LEVEL(pp->prev), RL_LEVEL(pp))) \
|
||||
)
|
||||
|
||||
/* Return the type of next run or the EOR, if already at the end of
|
||||
a level run. */
|
||||
#define NEXT_TYPE_OR_EOR(pp) \
|
||||
( \
|
||||
RL_LEVEL(pp->next) == RL_LEVEL(pp) ? \
|
||||
RL_TYPE(pp->next) : \
|
||||
FRIBIDI_LEVEL_TO_DIR(MAX(RL_LEVEL(pp->next), RL_LEVEL(pp))) \
|
||||
)
|
||||
|
||||
|
||||
/* Return the embedding direction of a link. */
|
||||
#define FRIBIDI_EMBEDDING_DIRECTION(link) \
|
||||
FRIBIDI_LEVEL_TO_DIR(RL_LEVEL(link))
|
||||
|
||||
|
||||
FRIBIDI_ENTRY FriBidiParType
|
||||
fribidi_get_par_direction (
|
||||
/* input */
|
||||
const FriBidiCharType *bidi_types,
|
||||
const FriBidiStrIndex len
|
||||
)
|
||||
{
|
||||
register FriBidiStrIndex i;
|
||||
|
||||
fribidi_assert (bidi_types);
|
||||
|
||||
for (i = 0; i < len; i++)
|
||||
if (FRIBIDI_IS_LETTER (bidi_types[i]))
|
||||
return FRIBIDI_IS_RTL (bidi_types[i]) ? FRIBIDI_PAR_RTL :
|
||||
FRIBIDI_PAR_LTR;
|
||||
|
||||
return FRIBIDI_PAR_ON;
|
||||
}
|
||||
|
||||
FRIBIDI_ENTRY FriBidiLevel
|
||||
fribidi_get_par_embedding_levels (
|
||||
/* input */
|
||||
const FriBidiCharType *bidi_types,
|
||||
const FriBidiStrIndex len,
|
||||
/* input and output */
|
||||
FriBidiParType *pbase_dir,
|
||||
/* output */
|
||||
FriBidiLevel *embedding_levels
|
||||
)
|
||||
{
|
||||
FriBidiLevel base_level, max_level = 0;
|
||||
FriBidiParType base_dir;
|
||||
FriBidiRun *main_run_list = NULL, *explicits_list = NULL, *pp;
|
||||
fribidi_boolean status = false;
|
||||
|
||||
if UNLIKELY
|
||||
(!len)
|
||||
{
|
||||
status = true;
|
||||
goto out;
|
||||
}
|
||||
|
||||
DBG ("in fribidi_get_par_embedding_levels");
|
||||
|
||||
fribidi_assert (bidi_types);
|
||||
fribidi_assert (pbase_dir);
|
||||
fribidi_assert (embedding_levels);
|
||||
|
||||
/* Determinate character types */
|
||||
{
|
||||
/* Get run-length encoded character types */
|
||||
main_run_list = run_list_encode_bidi_types (bidi_types, len);
|
||||
if UNLIKELY
|
||||
(!main_run_list) goto out;
|
||||
}
|
||||
|
||||
/* Find base level */
|
||||
/* If no strong base_dir was found, resort to the weak direction
|
||||
that was passed on input. */
|
||||
base_level = FRIBIDI_DIR_TO_LEVEL (*pbase_dir);
|
||||
if (!FRIBIDI_IS_STRONG (*pbase_dir))
|
||||
/* P2. P3. Search for first strong character and use its direction as
|
||||
base direction */
|
||||
{
|
||||
for_run_list (pp, main_run_list) if (FRIBIDI_IS_LETTER (RL_TYPE (pp)))
|
||||
{
|
||||
base_level = FRIBIDI_DIR_TO_LEVEL (RL_TYPE (pp));
|
||||
*pbase_dir = FRIBIDI_LEVEL_TO_DIR (base_level);
|
||||
break;
|
||||
}
|
||||
}
|
||||
base_dir = FRIBIDI_LEVEL_TO_DIR (base_level);
|
||||
DBG2 (" base level : %c", fribidi_char_from_level (base_level));
|
||||
DBG2 (" base dir : %c", fribidi_char_from_bidi_type (base_dir));
|
||||
|
||||
# if DEBUG
|
||||
if UNLIKELY
|
||||
(fribidi_debug_status ())
|
||||
{
|
||||
print_types_re (main_run_list);
|
||||
}
|
||||
# endif /* DEBUG */
|
||||
|
||||
/* Explicit Levels and Directions */
|
||||
DBG ("explicit levels and directions");
|
||||
{
|
||||
FriBidiLevel level, new_level;
|
||||
FriBidiCharType override, new_override;
|
||||
FriBidiStrIndex i;
|
||||
int stack_size, over_pushed, first_interval;
|
||||
struct
|
||||
{
|
||||
FriBidiCharType override; /* only LTR, RTL and ON are valid */
|
||||
FriBidiLevel level;
|
||||
} *status_stack;
|
||||
FriBidiRun temp_link;
|
||||
|
||||
/* explicits_list is a list like main_run_list, that holds the explicit
|
||||
codes that are removed from main_run_list, to reinsert them later by
|
||||
calling the shadow_run_list.
|
||||
*/
|
||||
explicits_list = new_run_list ();
|
||||
if UNLIKELY
|
||||
(!explicits_list) goto out;
|
||||
|
||||
/* X1. Begin by setting the current embedding level to the paragraph
|
||||
embedding level. Set the directional override status to neutral.
|
||||
Process each character iteratively, applying rules X2 through X9.
|
||||
Only embedding levels from 0 to 61 are valid in this phase. */
|
||||
|
||||
level = base_level;
|
||||
override = FRIBIDI_TYPE_ON;
|
||||
/* stack */
|
||||
stack_size = 0;
|
||||
over_pushed = 0;
|
||||
first_interval = 0;
|
||||
status_stack = fribidi_malloc (sizeof (status_stack[0]) *
|
||||
FRIBIDI_BIDI_MAX_RESOLVED_LEVELS);
|
||||
|
||||
for_run_list (pp, main_run_list)
|
||||
{
|
||||
FriBidiCharType this_type = RL_TYPE (pp);
|
||||
if (FRIBIDI_IS_EXPLICIT_OR_BN (this_type))
|
||||
{
|
||||
if (FRIBIDI_IS_STRONG (this_type))
|
||||
{ /* LRE, RLE, LRO, RLO */
|
||||
/* 1. Explicit Embeddings */
|
||||
/* X2. With each RLE, compute the least greater odd
|
||||
embedding level. */
|
||||
/* X3. With each LRE, compute the least greater even
|
||||
embedding level. */
|
||||
/* 2. Explicit Overrides */
|
||||
/* X4. With each RLO, compute the least greater odd
|
||||
embedding level. */
|
||||
/* X5. With each LRO, compute the least greater even
|
||||
embedding level. */
|
||||
new_override = FRIBIDI_EXPLICIT_TO_OVERRIDE_DIR (this_type);
|
||||
for (i = RL_LEN (pp); i; i--)
|
||||
{
|
||||
new_level =
|
||||
((level + FRIBIDI_DIR_TO_LEVEL (this_type) + 2) & ~1) -
|
||||
FRIBIDI_DIR_TO_LEVEL (this_type);
|
||||
PUSH_STATUS;
|
||||
}
|
||||
}
|
||||
else if (this_type == FRIBIDI_TYPE_PDF)
|
||||
{
|
||||
/* 3. Terminating Embeddings and overrides */
|
||||
/* X7. With each PDF, determine the matching embedding or
|
||||
override code. */
|
||||
for (i = RL_LEN (pp); i; i--)
|
||||
POP_STATUS;
|
||||
}
|
||||
|
||||
/* X9. Remove all RLE, LRE, RLO, LRO, PDF, and BN codes. */
|
||||
/* Remove element and add it to explicits_list */
|
||||
RL_LEVEL (pp) = FRIBIDI_SENTINEL;
|
||||
temp_link.next = pp->next;
|
||||
move_node_before (pp, explicits_list);
|
||||
pp = &temp_link;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* X6. For all types besides RLE, LRE, RLO, LRO, and PDF:
|
||||
a. Set the level of the current character to the current
|
||||
embedding level.
|
||||
b. Whenever the directional override status is not neutral,
|
||||
reset the current character type to the directional override
|
||||
status. */
|
||||
RL_LEVEL (pp) = level;
|
||||
if (!FRIBIDI_IS_NEUTRAL (override))
|
||||
RL_TYPE (pp) = override;
|
||||
}
|
||||
/* X8. All explicit directional embeddings and overrides are
|
||||
completely terminated at the end of each paragraph. Paragraph
|
||||
separators are not included in the embedding. */
|
||||
/* This function is running on a single paragraph, so we can do
|
||||
X8 after all the input is processed. */
|
||||
}
|
||||
|
||||
/* Implementing X8. It has no effect on a single paragraph! */
|
||||
level = base_level;
|
||||
override = FRIBIDI_TYPE_ON;
|
||||
stack_size = 0;
|
||||
over_pushed = 0;
|
||||
|
||||
fribidi_free (status_stack);
|
||||
}
|
||||
/* X10. The remaining rules are applied to each run of characters at the
|
||||
same level. For each run, determine the start-of-level-run (sor) and
|
||||
end-of-level-run (eor) type, either L or R. This depends on the
|
||||
higher of the two levels on either side of the boundary (at the start
|
||||
or end of the paragraph, the level of the 'other' run is the base
|
||||
embedding level). If the higher level is odd, the type is R, otherwise
|
||||
it is L. */
|
||||
/* Resolving Implicit Levels can be done out of X10 loop, so only change
|
||||
of Resolving Weak Types and Resolving Neutral Types is needed. */
|
||||
|
||||
compact_list (main_run_list);
|
||||
|
||||
# if DEBUG
|
||||
if UNLIKELY
|
||||
(fribidi_debug_status ())
|
||||
{
|
||||
print_types_re (main_run_list);
|
||||
print_bidi_string (bidi_types, len);
|
||||
print_resolved_levels (main_run_list);
|
||||
print_resolved_types (main_run_list);
|
||||
}
|
||||
# endif /* DEBUG */
|
||||
|
||||
/* 4. Resolving weak types */
|
||||
DBG ("resolving weak types");
|
||||
{
|
||||
FriBidiCharType last_strong, prev_type_orig;
|
||||
fribidi_boolean w4;
|
||||
|
||||
last_strong = base_dir;
|
||||
|
||||
for_run_list (pp, main_run_list)
|
||||
{
|
||||
register FriBidiCharType prev_type, this_type, next_type;
|
||||
|
||||
prev_type = PREV_TYPE_OR_SOR (pp);
|
||||
this_type = RL_TYPE (pp);
|
||||
next_type = NEXT_TYPE_OR_EOR (pp);
|
||||
|
||||
if (FRIBIDI_IS_STRONG (prev_type))
|
||||
last_strong = prev_type;
|
||||
|
||||
/* W1. NSM
|
||||
Examine each non-spacing mark (NSM) in the level run, and change the
|
||||
type of the NSM to the type of the previous character. If the NSM
|
||||
is at the start of the level run, it will get the type of sor. */
|
||||
/* Implementation note: it is important that if the previous character
|
||||
is not sor, then we should merge this run with the previous,
|
||||
because of rules like W5, that we assume all of a sequence of
|
||||
adjacent ETs are in one FriBidiRun. */
|
||||
if (this_type == FRIBIDI_TYPE_NSM)
|
||||
{
|
||||
if (RL_LEVEL (pp->prev) == RL_LEVEL (pp))
|
||||
pp = merge_with_prev (pp);
|
||||
else
|
||||
RL_TYPE (pp) = prev_type;
|
||||
continue; /* As we know the next condition cannot be true. */
|
||||
}
|
||||
|
||||
/* W2: European numbers. */
|
||||
if (this_type == FRIBIDI_TYPE_EN && last_strong == FRIBIDI_TYPE_AL)
|
||||
{
|
||||
RL_TYPE (pp) = FRIBIDI_TYPE_AN;
|
||||
|
||||
/* Resolving dependency of loops for rules W1 and W2, so we
|
||||
can merge them in one loop. */
|
||||
if (next_type == FRIBIDI_TYPE_NSM)
|
||||
RL_TYPE (pp->next) = FRIBIDI_TYPE_AN;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
last_strong = base_dir;
|
||||
/* Resolving dependency of loops for rules W4 and W5, W5 may
|
||||
want to prevent W4 to take effect in the next turn, do this
|
||||
through "w4". */
|
||||
w4 = true;
|
||||
/* Resolving dependency of loops for rules W4 and W5 with W7,
|
||||
W7 may change an EN to L but it sets the prev_type_orig if needed,
|
||||
so W4 and W5 in next turn can still do their works. */
|
||||
prev_type_orig = FRIBIDI_TYPE_ON;
|
||||
|
||||
for_run_list (pp, main_run_list)
|
||||
{
|
||||
register FriBidiCharType prev_type, this_type, next_type;
|
||||
|
||||
prev_type = PREV_TYPE_OR_SOR (pp);
|
||||
this_type = RL_TYPE (pp);
|
||||
next_type = NEXT_TYPE_OR_EOR (pp);
|
||||
|
||||
if (FRIBIDI_IS_STRONG (prev_type))
|
||||
last_strong = prev_type;
|
||||
|
||||
/* W3: Change ALs to R. */
|
||||
if (this_type == FRIBIDI_TYPE_AL)
|
||||
{
|
||||
RL_TYPE (pp) = FRIBIDI_TYPE_RTL;
|
||||
w4 = true;
|
||||
prev_type_orig = FRIBIDI_TYPE_ON;
|
||||
continue;
|
||||
}
|
||||
|
||||
/* W4. A single european separator changes to a european number.
|
||||
A single common separator between two numbers of the same type
|
||||
changes to that type. */
|
||||
if (w4
|
||||
&& RL_LEN (pp) == 1 && FRIBIDI_IS_ES_OR_CS (this_type)
|
||||
&& FRIBIDI_IS_NUMBER (prev_type_orig)
|
||||
&& prev_type_orig == next_type
|
||||
&& (prev_type_orig == FRIBIDI_TYPE_EN
|
||||
|| this_type == FRIBIDI_TYPE_CS))
|
||||
{
|
||||
RL_TYPE (pp) = prev_type;
|
||||
this_type = RL_TYPE (pp);
|
||||
}
|
||||
w4 = true;
|
||||
|
||||
/* W5. A sequence of European terminators adjacent to European
|
||||
numbers changes to All European numbers. */
|
||||
if (this_type == FRIBIDI_TYPE_ET
|
||||
&& (prev_type_orig == FRIBIDI_TYPE_EN
|
||||
|| next_type == FRIBIDI_TYPE_EN))
|
||||
{
|
||||
RL_TYPE (pp) = FRIBIDI_TYPE_EN;
|
||||
w4 = false;
|
||||
this_type = RL_TYPE (pp);
|
||||
}
|
||||
|
||||
/* W6. Otherwise change separators and terminators to other neutral. */
|
||||
if (FRIBIDI_IS_NUMBER_SEPARATOR_OR_TERMINATOR (this_type))
|
||||
RL_TYPE (pp) = FRIBIDI_TYPE_ON;
|
||||
|
||||
/* W7. Change european numbers to L. */
|
||||
if (this_type == FRIBIDI_TYPE_EN && last_strong == FRIBIDI_TYPE_LTR)
|
||||
{
|
||||
RL_TYPE (pp) = FRIBIDI_TYPE_LTR;
|
||||
prev_type_orig = (RL_LEVEL (pp) == RL_LEVEL (pp->next) ?
|
||||
FRIBIDI_TYPE_EN : FRIBIDI_TYPE_ON);
|
||||
}
|
||||
else
|
||||
prev_type_orig = PREV_TYPE_OR_SOR (pp->next);
|
||||
}
|
||||
}
|
||||
|
||||
compact_neutrals (main_run_list);
|
||||
|
||||
# if DEBUG
|
||||
if UNLIKELY
|
||||
(fribidi_debug_status ())
|
||||
{
|
||||
print_resolved_levels (main_run_list);
|
||||
print_resolved_types (main_run_list);
|
||||
}
|
||||
# endif /* DEBUG */
|
||||
|
||||
/* 5. Resolving Neutral Types */
|
||||
DBG ("resolving neutral types");
|
||||
{
|
||||
/* N1. and N2.
|
||||
For each neutral, resolve it. */
|
||||
for_run_list (pp, main_run_list)
|
||||
{
|
||||
FriBidiCharType prev_type, this_type, next_type;
|
||||
|
||||
/* "European and Arabic numbers are treated as though they were R"
|
||||
FRIBIDI_CHANGE_NUMBER_TO_RTL does this. */
|
||||
this_type = FRIBIDI_CHANGE_NUMBER_TO_RTL (RL_TYPE (pp));
|
||||
prev_type = FRIBIDI_CHANGE_NUMBER_TO_RTL (PREV_TYPE_OR_SOR (pp));
|
||||
next_type = FRIBIDI_CHANGE_NUMBER_TO_RTL (NEXT_TYPE_OR_EOR (pp));
|
||||
|
||||
if (FRIBIDI_IS_NEUTRAL (this_type))
|
||||
RL_TYPE (pp) = (prev_type == next_type) ?
|
||||
/* N1. */ prev_type :
|
||||
/* N2. */ FRIBIDI_EMBEDDING_DIRECTION (pp);
|
||||
}
|
||||
}
|
||||
|
||||
compact_list (main_run_list);
|
||||
|
||||
# if DEBUG
|
||||
if UNLIKELY
|
||||
(fribidi_debug_status ())
|
||||
{
|
||||
print_resolved_levels (main_run_list);
|
||||
print_resolved_types (main_run_list);
|
||||
}
|
||||
# endif /* DEBUG */
|
||||
|
||||
/* 6. Resolving implicit levels */
|
||||
DBG ("resolving implicit levels");
|
||||
{
|
||||
max_level = base_level;
|
||||
|
||||
for_run_list (pp, main_run_list)
|
||||
{
|
||||
FriBidiCharType this_type;
|
||||
int level;
|
||||
|
||||
this_type = RL_TYPE (pp);
|
||||
level = RL_LEVEL (pp);
|
||||
|
||||
/* I1. Even */
|
||||
/* I2. Odd */
|
||||
if (FRIBIDI_IS_NUMBER (this_type))
|
||||
RL_LEVEL (pp) = (level + 2) & ~1;
|
||||
else
|
||||
RL_LEVEL (pp) =
|
||||
level +
|
||||
(FRIBIDI_LEVEL_IS_RTL (level) ^ FRIBIDI_DIR_TO_LEVEL (this_type));
|
||||
|
||||
if (RL_LEVEL (pp) > max_level)
|
||||
max_level = RL_LEVEL (pp);
|
||||
}
|
||||
}
|
||||
|
||||
compact_list (main_run_list);
|
||||
|
||||
# if DEBUG
|
||||
if UNLIKELY
|
||||
(fribidi_debug_status ())
|
||||
{
|
||||
print_bidi_string (bidi_types, len);
|
||||
print_resolved_levels (main_run_list);
|
||||
print_resolved_types (main_run_list);
|
||||
}
|
||||
# endif /* DEBUG */
|
||||
|
||||
/* Reinsert the explicit codes & BN's that are already removed, from the
|
||||
explicits_list to main_run_list. */
|
||||
DBG ("reinserting explicit codes");
|
||||
if UNLIKELY
|
||||
(explicits_list->next != explicits_list)
|
||||
{
|
||||
register FriBidiRun *p;
|
||||
register fribidi_boolean stat =
|
||||
shadow_run_list (main_run_list, explicits_list, true);
|
||||
explicits_list = NULL;
|
||||
if UNLIKELY
|
||||
(!stat) goto out;
|
||||
|
||||
/* Set level of inserted explicit chars to that of their previous
|
||||
* char, such that they do not affect reordering. */
|
||||
p = main_run_list->next;
|
||||
if (p != main_run_list && p->level == FRIBIDI_SENTINEL)
|
||||
p->level = base_level;
|
||||
for_run_list (p, main_run_list) if (p->level == FRIBIDI_SENTINEL)
|
||||
p->level = p->prev->level;
|
||||
}
|
||||
|
||||
# if DEBUG
|
||||
if UNLIKELY
|
||||
(fribidi_debug_status ())
|
||||
{
|
||||
print_types_re (main_run_list);
|
||||
print_resolved_levels (main_run_list);
|
||||
print_resolved_types (main_run_list);
|
||||
}
|
||||
# endif /* DEBUG */
|
||||
|
||||
DBG ("reset the embedding levels, 1, 2, 3.");
|
||||
{
|
||||
register int j, state, pos;
|
||||
register FriBidiCharType char_type;
|
||||
register FriBidiRun *p, *q, *list;
|
||||
|
||||
/* L1. Reset the embedding levels of some chars:
|
||||
1. segment separators,
|
||||
2. paragraph separators,
|
||||
3. any sequence of whitespace characters preceding a segment
|
||||
separator or paragraph separator, and
|
||||
... (to be continued in fribidi_reorder_line()). */
|
||||
list = new_run_list ();
|
||||
if UNLIKELY
|
||||
(!list) goto out;
|
||||
q = list;
|
||||
state = 1;
|
||||
pos = len - 1;
|
||||
for (j = len - 1; j >= -1; j--)
|
||||
{
|
||||
/* close up the open link at the end */
|
||||
if (j >= 0)
|
||||
char_type = bidi_types[j];
|
||||
else
|
||||
char_type = FRIBIDI_TYPE_ON;
|
||||
if (!state && FRIBIDI_IS_SEPARATOR (char_type))
|
||||
{
|
||||
state = 1;
|
||||
pos = j;
|
||||
}
|
||||
else if (state && !FRIBIDI_IS_EXPLICIT_OR_SEPARATOR_OR_BN_OR_WS
|
||||
(char_type))
|
||||
{
|
||||
state = 0;
|
||||
p = new_run ();
|
||||
if UNLIKELY
|
||||
(!p)
|
||||
{
|
||||
free_run_list (list);
|
||||
goto out;
|
||||
}
|
||||
p->pos = j + 1;
|
||||
p->len = pos - j;
|
||||
p->type = base_dir;
|
||||
p->level = base_level;
|
||||
move_node_before (p, q);
|
||||
q = p;
|
||||
}
|
||||
}
|
||||
if UNLIKELY
|
||||
(!shadow_run_list (main_run_list, list, false)) goto out;
|
||||
}
|
||||
|
||||
# if DEBUG
|
||||
if UNLIKELY
|
||||
(fribidi_debug_status ())
|
||||
{
|
||||
print_types_re (main_run_list);
|
||||
print_resolved_levels (main_run_list);
|
||||
print_resolved_types (main_run_list);
|
||||
}
|
||||
# endif /* DEBUG */
|
||||
|
||||
{
|
||||
FriBidiStrIndex pos = 0;
|
||||
for_run_list (pp, main_run_list)
|
||||
{
|
||||
register FriBidiStrIndex l;
|
||||
register FriBidiLevel level = pp->level;
|
||||
for (l = pp->len; l; l--)
|
||||
embedding_levels[pos++] = level;
|
||||
}
|
||||
}
|
||||
|
||||
status = true;
|
||||
|
||||
out:
|
||||
DBG ("leaving fribidi_get_par_embedding_levels");
|
||||
|
||||
if (main_run_list)
|
||||
free_run_list (main_run_list);
|
||||
if UNLIKELY
|
||||
(explicits_list) free_run_list (explicits_list);
|
||||
|
||||
return status ? max_level + 1 : 0;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
bidi_string_reverse (
|
||||
FriBidiChar *str,
|
||||
const FriBidiStrIndex len
|
||||
)
|
||||
{
|
||||
FriBidiStrIndex i;
|
||||
|
||||
fribidi_assert (str);
|
||||
|
||||
for (i = 0; i < len / 2; i++)
|
||||
{
|
||||
FriBidiChar tmp = str[i];
|
||||
str[i] = str[len - 1 - i];
|
||||
str[len - 1 - i] = tmp;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
index_array_reverse (
|
||||
FriBidiStrIndex *arr,
|
||||
const FriBidiStrIndex len
|
||||
)
|
||||
{
|
||||
FriBidiStrIndex i;
|
||||
|
||||
fribidi_assert (arr);
|
||||
|
||||
for (i = 0; i < len / 2; i++)
|
||||
{
|
||||
FriBidiStrIndex tmp = arr[i];
|
||||
arr[i] = arr[len - 1 - i];
|
||||
arr[len - 1 - i] = tmp;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
FRIBIDI_ENTRY FriBidiLevel
|
||||
fribidi_reorder_line (
|
||||
/* input */
|
||||
FriBidiFlags flags, /* reorder flags */
|
||||
const FriBidiCharType *bidi_types,
|
||||
const FriBidiStrIndex len,
|
||||
const FriBidiStrIndex off,
|
||||
const FriBidiParType base_dir,
|
||||
/* input and output */
|
||||
FriBidiLevel *embedding_levels,
|
||||
FriBidiChar *visual_str,
|
||||
/* output */
|
||||
FriBidiStrIndex *map
|
||||
)
|
||||
{
|
||||
fribidi_boolean status = false;
|
||||
FriBidiLevel max_level = 0;
|
||||
|
||||
if UNLIKELY
|
||||
(len == 0)
|
||||
{
|
||||
status = true;
|
||||
goto out;
|
||||
}
|
||||
|
||||
DBG ("in fribidi_reorder_line");
|
||||
|
||||
fribidi_assert (bidi_types);
|
||||
fribidi_assert (embedding_levels);
|
||||
|
||||
DBG ("reset the embedding levels, 4. whitespace at the end of line");
|
||||
{
|
||||
register FriBidiStrIndex i;
|
||||
|
||||
/* L1. Reset the embedding levels of some chars:
|
||||
4. any sequence of white space characters at the end of the line. */
|
||||
for (i = off + len - 1; i >= off &&
|
||||
FRIBIDI_IS_EXPLICIT_OR_BN_OR_WS (bidi_types[i]); i--)
|
||||
embedding_levels[i] = FRIBIDI_DIR_TO_LEVEL (base_dir);
|
||||
}
|
||||
|
||||
/* 7. Reordering resolved levels */
|
||||
{
|
||||
register FriBidiLevel level;
|
||||
register FriBidiStrIndex i;
|
||||
|
||||
/* Reorder both the outstring and the order array */
|
||||
{
|
||||
if (FRIBIDI_TEST_BITS (flags, FRIBIDI_FLAG_REORDER_NSM))
|
||||
{
|
||||
/* L3. Reorder NSMs. */
|
||||
for (i = off + len - 1; i >= off; i--)
|
||||
if (FRIBIDI_LEVEL_IS_RTL (embedding_levels[i])
|
||||
&& bidi_types[i] == FRIBIDI_TYPE_NSM)
|
||||
{
|
||||
register FriBidiStrIndex seq_end = i;
|
||||
level = embedding_levels[i];
|
||||
|
||||
for (i--; i >= off &&
|
||||
FRIBIDI_IS_EXPLICIT_OR_BN_OR_NSM (bidi_types[i])
|
||||
&& embedding_levels[i] == level; i--)
|
||||
;
|
||||
|
||||
if (i < off || embedding_levels[i] != level)
|
||||
{
|
||||
i++;
|
||||
DBG ("warning: NSM(s) at the beggining of level run");
|
||||
}
|
||||
|
||||
if (visual_str)
|
||||
{
|
||||
bidi_string_reverse (visual_str + i, seq_end - i + 1);
|
||||
}
|
||||
if (map)
|
||||
{
|
||||
index_array_reverse (map + i, seq_end - i + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Find max_level of the line. We don't reuse the paragraph
|
||||
* max_level, both for a cleaner API, and that the line max_level
|
||||
* may be far less than paragraph max_level. */
|
||||
for (i = off + len - 1; i >= off; i--)
|
||||
if (embedding_levels[i] > max_level)
|
||||
max_level = embedding_levels[i];
|
||||
|
||||
/* L2. Reorder. */
|
||||
for (level = max_level; level > 0; level--)
|
||||
for (i = off + len - 1; i >= off; i--)
|
||||
if (embedding_levels[i] >= level)
|
||||
{
|
||||
/* Find all stretches that are >= level_idx */
|
||||
register FriBidiStrIndex seq_end = i;
|
||||
for (i--; i >= off && embedding_levels[i] >= level; i--)
|
||||
;
|
||||
|
||||
if (visual_str)
|
||||
bidi_string_reverse (visual_str + i + 1, seq_end - i);
|
||||
if (map)
|
||||
index_array_reverse (map + i + 1, seq_end - i);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
status = true;
|
||||
|
||||
out:
|
||||
|
||||
return status ? max_level + 1 : 0;
|
||||
}
|
||||
|
||||
/* Editor directions:
|
||||
* vim:textwidth=78:tabstop=8:shiftwidth=2:autoindent:cindent
|
||||
*/
|
||||
@@ -1,149 +0,0 @@
|
||||
/* FriBidi
|
||||
* fribidi-bidi.h - bidirectional algorithm
|
||||
*
|
||||
* $Id: fribidi-bidi.h,v 1.15 2005/11/03 01:39:01 behdad Exp $
|
||||
* $Author: behdad $
|
||||
* $Date: 2005/11/03 01:39:01 $
|
||||
* $Revision: 1.15 $
|
||||
* $Source: /cvs/fribidi/fribidi2/lib/fribidi-bidi.h,v $
|
||||
*
|
||||
* Authors:
|
||||
* Behdad Esfahbod, 2001, 2002, 2004
|
||||
* Dov Grobgeld, 1999, 2000
|
||||
*
|
||||
* Copyright (C) 2004 Sharif FarsiWeb, Inc
|
||||
* Copyright (C) 2001,2002 Behdad Esfahbod
|
||||
* Copyright (C) 1999,2000 Dov Grobgeld
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this library, in a file named COPYING; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
* Boston, MA 02111-1307, USA
|
||||
*
|
||||
* For licensing issues, contact <license@farsiweb.info>.
|
||||
*/
|
||||
#ifndef _FRIBIDI_BIDI_H
|
||||
#define _FRIBIDI_BIDI_H
|
||||
|
||||
#include "fribidi-common.h"
|
||||
|
||||
#include "fribidi-types.h"
|
||||
#include "fribidi-flags.h"
|
||||
#include "fribidi-bidi-types.h"
|
||||
|
||||
#include "fribidi-begindecls.h"
|
||||
|
||||
#define fribidi_get_par_embedding_levels FRIBIDI_NAMESPACE(get_par_embedding_levels)
|
||||
/* fribidi_get_par_direction - get base paragraph direction
|
||||
*
|
||||
* This function finds the base direction of a single paragraph,
|
||||
* as defined by rule P2 of the Unicode Bidirectional Algorithm available at
|
||||
* http://www.unicode.org/reports/tr9/#P2.
|
||||
*
|
||||
* You typically do not need this function as
|
||||
* fribidi_get_par_embedding_levels() knows how to compute base direction
|
||||
* itself, but you may need this to implement a more sophisticated paragraph
|
||||
* direction handling. Note that you can pass more than a paragraph to this
|
||||
* function and the direction of the first non-neutral paragraph is returned,
|
||||
* which is a very good heuristic to set direction of the neutral paragraphs
|
||||
* at the beginning of text. For other neutral paragraphs, you better use the
|
||||
* direction of the previous paragraph.
|
||||
*
|
||||
* Returns: Base pargraph direction. No weak paragraph direction is returned,
|
||||
* only LTR, RTL, or ON.
|
||||
*/
|
||||
FRIBIDI_ENTRY FriBidiParType fribidi_get_par_direction (
|
||||
const FriBidiCharType *bidi_types, /* input list of bidi types as returned by
|
||||
fribidi_get_bidi_types() */
|
||||
const FriBidiStrIndex len /* input string length */
|
||||
);
|
||||
|
||||
#define fribidi_get_par_embedding_levels FRIBIDI_NAMESPACE(get_par_embedding_levels)
|
||||
/* fribidi_get_par_embedding_levels - get bidi embedding levels of a paragraph
|
||||
*
|
||||
* This function finds the bidi embedding levels of a single paragraph,
|
||||
* as defined by the Unicode Bidirectional Algorithm available at
|
||||
* http://www.unicode.org/reports/tr9/. This function implements rules P2 to
|
||||
* I1 inclusive, and parts 1 to 3 of L1, except for rule X9 which is
|
||||
* implemented in fribidi_remove_bidi_marks(). Part 4 of L1 is implemented
|
||||
* in fribidi_reorder_line().
|
||||
*
|
||||
* There are a few macros defined in fribidi-bidi-types.h to work with this
|
||||
* embedding levels.
|
||||
*
|
||||
* Returns: Maximum level found plus one, or zero if any error occured
|
||||
* (memory allocation failure most probably).
|
||||
*/
|
||||
FRIBIDI_ENTRY FriBidiLevel
|
||||
fribidi_get_par_embedding_levels (
|
||||
const FriBidiCharType *bidi_types, /* input list of bidi types as returned by
|
||||
fribidi_get_bidi_types() */
|
||||
const FriBidiStrIndex len, /* input string length of the paragraph */
|
||||
FriBidiParType *pbase_dir, /* requested and resolved paragraph
|
||||
* base direction */
|
||||
FriBidiLevel *embedding_levels /* output list of embedding levels */
|
||||
) FRIBIDI_GNUC_WARN_UNUSED;
|
||||
|
||||
#define fribidi_reorder_line FRIBIDI_NAMESPACE(reorder_line)
|
||||
/* fribidi_reorder_line - reorder a line of logical string to visual
|
||||
*
|
||||
* This function reorders the characters in a line of text from logical to
|
||||
* final visual order. This function implements part 4 of rule L1, and rules
|
||||
* L2 and L3 of the Unicode Bidirectional Algorithm available at
|
||||
* http://www.unicode.org/reports/tr9/#Reordering_Resolved_Levels.
|
||||
*
|
||||
* As a side effect it also sets position maps if not NULL.
|
||||
*
|
||||
* You should provide the resolved paragraph direction and embedding levels as
|
||||
* set by fribidi_get_par_embedding_levels(). Also note that the embedding
|
||||
* levels may change a bit. To be exact, the embedding level of any sequence
|
||||
* of white space at the end of line is reset to the paragraph embedding level
|
||||
* (That is part 4 of rule L1).
|
||||
*
|
||||
* Note that the bidi types and embedding levels are not reordered. You can
|
||||
* reorder these (or any other) arrays using the map later. The user is
|
||||
* responsible to initialize map to something sensible, like an identity
|
||||
* mapping, or pass NULL if no map is needed.
|
||||
*
|
||||
* There is an optional part to this function, which is whether non-spacing
|
||||
* marks for right-to-left parts of the text should be reordered to come after
|
||||
* their base characters in the visual string or not. Most rendering engines
|
||||
* expect this behavior, but console-based systems for example do not like it.
|
||||
* This is controlled by the FRIBIDI_FLAG_REORDER_NSM flag. The flag is on
|
||||
* in FRIBIDI_FLAGS_DEFAULT.
|
||||
*
|
||||
* Returns: Maximum level found in this line plus one, or zero if any error
|
||||
* occured (memory allocation failure most probably).
|
||||
*/
|
||||
FRIBIDI_ENTRY FriBidiLevel fribidi_reorder_line (
|
||||
FriBidiFlags flags, /* reorder flags */
|
||||
const FriBidiCharType *bidi_types, /* input list of bidi types as returned by
|
||||
fribidi_get_bidi_types() */
|
||||
const FriBidiStrIndex len, /* input length of the line */
|
||||
const FriBidiStrIndex off, /* input offset of the beginning of the line
|
||||
in the paragraph */
|
||||
const FriBidiParType base_dir, /* resolved paragraph base direction */
|
||||
FriBidiLevel *embedding_levels, /* input list of embedding levels,
|
||||
as returned by
|
||||
fribidi_get_par_embedding_levels */
|
||||
FriBidiChar *visual_str, /* visual string to reorder */
|
||||
FriBidiStrIndex *map /* a map of string indices which is reordered
|
||||
* to reflect where each glyph ends up. */
|
||||
) FRIBIDI_GNUC_WARN_UNUSED;
|
||||
|
||||
#include "fribidi-enddecls.h"
|
||||
|
||||
#endif /* !_FRIBIDI_BIDI_H */
|
||||
/* Editor directions:
|
||||
* vim:textwidth=78:tabstop=8:shiftwidth=2:autoindent:cindent
|
||||
*/
|
||||
@@ -1,130 +0,0 @@
|
||||
/* FriBidi
|
||||
* fribidi-common.h - common include for library headers
|
||||
*
|
||||
* $Id: fribidi-common.h,v 1.13 2007/04/05 16:13:24 behdad Exp $
|
||||
* $Author: behdad $
|
||||
* $Date: 2007/04/05 16:13:24 $
|
||||
* $Revision: 1.13 $
|
||||
* $Source: /cvs/fribidi/fribidi2/lib/fribidi-common.h,v $
|
||||
*
|
||||
* Author:
|
||||
* Behdad Esfahbod, 2004
|
||||
*
|
||||
* Copyright (C) 2004 Sharif FarsiWeb, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this library, in a file named COPYING; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
* Boston, MA 02111-1307, USA
|
||||
*
|
||||
* For licensing issues, contact <license@farsiweb.info>.
|
||||
*/
|
||||
#ifndef _FRIBIDI_COMMON_H
|
||||
#define _FRIBIDI_COMMON_H
|
||||
|
||||
#if DONT_HAVE_FRIBIDI_CONFIG_H+0
|
||||
# define FRIBIDI "fribidi"
|
||||
# define FRIBIDI_NAME "fribidi"
|
||||
# define FRIBIDI_VERSION "unknown"
|
||||
# define FRIBIDI_BUGREPORT "unknown"
|
||||
# define FRIBIDI_INTERFACE_VERSION_STRING "unknown"
|
||||
#else /* !DONT_HAVE_FRIBIDI_CONFIG_H */
|
||||
# include "fribidi-config.h"
|
||||
#endif /* !DONT_HAVE_FRIBIDI_CONFIG_H */
|
||||
|
||||
#if HAVE_FRIBIDI_CUSTOM_H+0
|
||||
# include <fribidi-custom.h>
|
||||
#endif /* HAVE_FRIBIDI_CUSTOM_H */
|
||||
|
||||
/* FRIBIDI_NAMESPACE is a macro used to name library symbols. */
|
||||
#ifndef FRIBIDI_NAMESPACE
|
||||
# define FRIBIDI_NAMESPACE(SYMBOL) fribidi##_##SYMBOL
|
||||
#endif /* !FRIBIDI_NAMESPACE */
|
||||
|
||||
/* FRIBIDI_ENTRY is a macro used to declare library entry points. */
|
||||
#ifndef FRIBIDI_ENTRY
|
||||
# if (defined(WIN32)) || (defined(_WIN32_WCE))
|
||||
# define FRIBIDI_ENTRY __declspec(dllimport)
|
||||
# else /* !WIN32 */
|
||||
# define FRIBIDI_ENTRY /* empty */
|
||||
# endif /* !WIN32 */
|
||||
#endif /* !FRIBIDI_ENTRY */
|
||||
|
||||
#if FRIBIDI_USE_GLIB+0
|
||||
# ifndef __FRIBIDI_DOC
|
||||
# include <glib/gmacros.h>
|
||||
# endif /* !__FRIBIDI_DOC */
|
||||
# define FRIBIDI_BEGIN_DECLS G_BEGIN_DECLS
|
||||
# define FRIBIDI_END_DECLS G_END_DECLS
|
||||
# define FRIBIDI_GNUC_CONST G_GNUC_CONST
|
||||
# define FRIBIDI_GNUC_DEPRECATED G_GNUC_DEPRECATED
|
||||
# if __GNUC__ > 2
|
||||
# define FRIBIDI_GNUC_WARN_UNUSED \
|
||||
__attribute__((__warn_unused_result__))
|
||||
# define FRIBIDI_GNUC_MALLOC \
|
||||
__attribute__((__malloc__))
|
||||
# define FRIBIDI_GNUC_HIDDEN \
|
||||
__attribute__((__visibility__ ("hidden")))
|
||||
# else /* __GNUC__ <= 2 */
|
||||
# define FRIBIDI_GNUC_WARN_UNUSED
|
||||
# define FRIBIDI_GNUC_MALLOC
|
||||
# define FRIBIDI_GNUC_HIDDEN
|
||||
# endif /* __GNUC__ <= 2 */
|
||||
#else /* !FRIBIDI_USE_GLIB */
|
||||
# define FRIBIDI_GNUC_CONST
|
||||
# define FRIBIDI_GNUC_DEPRECATED
|
||||
# define FRIBIDI_GNUC_WARN_UNUSED
|
||||
# define FRIBIDI_GNUC_MALLOC
|
||||
# define FRIBIDI_GNUC_HIDDEN
|
||||
#endif /* !FRIBIDI_USE_GLIB */
|
||||
|
||||
/* FRIBIDI_BEGIN_DECLS should be used at the beginning of your declarations,
|
||||
* so that C++ compilers don't mangle their names. Use FRIBIDI_END_DECLS at
|
||||
* the end of C declarations. */
|
||||
#ifndef FRIBIDI_BEGIN_DECLS
|
||||
# ifdef __cplusplus
|
||||
# define FRIBIDI_BEGIN_DECLS extern "C" {
|
||||
# define FRIBIDI_END_DECLS }
|
||||
# else /* !__cplusplus */
|
||||
# define FRIBIDI_BEGIN_DECLS /* empty */
|
||||
# define FRIBIDI_END_DECLS /* empty */
|
||||
# endif /* !__cplusplus */
|
||||
#endif /* !FRIBIDI_BEGIN_DECLS */
|
||||
|
||||
|
||||
|
||||
|
||||
#define fribidi_debug_status FRIBIDI_NAMESPACE(debug_status)
|
||||
FRIBIDI_ENTRY int fribidi_debug_status (
|
||||
void
|
||||
);
|
||||
#define fribidi_set_debug FRIBIDI_NAMESPACE(set_debug)
|
||||
FRIBIDI_ENTRY int
|
||||
fribidi_set_debug (
|
||||
int state /* new state to set */
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif /* !_FRIBIDI_COMMON_H */
|
||||
/* Editor directions:
|
||||
* vim:textwidth=78:tabstop=8:shiftwidth=2:autoindent:cindent
|
||||
*/
|
||||
@@ -1,26 +0,0 @@
|
||||
/* lib/fribidi-config.h. Generated from fribidi-config.h.in by configure. */
|
||||
/* Not copyrighted, in public domain. */
|
||||
#ifndef FRIBIDI_CONFIG_H
|
||||
#define FRIBIDI_CONFIG_H
|
||||
|
||||
#define FRIBIDI "fribidi"
|
||||
#define FRIBIDI_NAME "GNU FriBidi"
|
||||
#define FRIBIDI_BUGREPORT "http://fribidi.org/bug"
|
||||
|
||||
#define FRIBIDI_VERSION "0.19.2"
|
||||
#define FRIBIDI_MAJOR_VERSION 0
|
||||
#define FRIBIDI_MINOR_VERSION 19
|
||||
#define FRIBIDI_MICRO_VERSION 2
|
||||
#define FRIBIDI_INTERFACE_VERSION 3
|
||||
#define FRIBIDI_INTERFACE_VERSION_STRING "3"
|
||||
|
||||
/* Define to 1 if you want charset conversion codes in the library */
|
||||
#define FRIBIDI_CHARSETS 0
|
||||
|
||||
/* Define to 1 if you want to use glib */
|
||||
#define FRIBIDI_USE_GLIB 0
|
||||
|
||||
/* The size of a `int', as computed by sizeof. */
|
||||
#define FRIBIDI_SIZEOF_INT 4
|
||||
|
||||
#endif /* FRIBIDI_CONFIG_H */
|
||||
@@ -1,26 +0,0 @@
|
||||
/* @configure_input@ */
|
||||
/* Not copyrighted, in public domain. */
|
||||
#ifndef FRIBIDI_CONFIG_H
|
||||
#define FRIBIDI_CONFIG_H
|
||||
|
||||
#define FRIBIDI "@PACKAGE@"
|
||||
#define FRIBIDI_NAME "@PACKAGE_NAME@"
|
||||
#define FRIBIDI_BUGREPORT "@PACKAGE_BUGREPORT@"
|
||||
|
||||
#define FRIBIDI_VERSION "@FRIBIDI_VERSION@"
|
||||
#define FRIBIDI_MAJOR_VERSION @FRIBIDI_MAJOR_VERSION@
|
||||
#define FRIBIDI_MINOR_VERSION @FRIBIDI_MINOR_VERSION@
|
||||
#define FRIBIDI_MICRO_VERSION @FRIBIDI_MICRO_VERSION@
|
||||
#define FRIBIDI_INTERFACE_VERSION @FRIBIDI_INTERFACE_VERSION@
|
||||
#define FRIBIDI_INTERFACE_VERSION_STRING "@FRIBIDI_INTERFACE_VERSION@"
|
||||
|
||||
/* Define to 1 if you want charset conversion codes in the library */
|
||||
#define FRIBIDI_CHARSETS @FRIBIDI_CHARSETS@
|
||||
|
||||
/* Define to 1 if you want to use glib */
|
||||
#define FRIBIDI_USE_GLIB @FRIBIDI_USE_GLIB@
|
||||
|
||||
/* The size of a `int', as computed by sizeof. */
|
||||
#define FRIBIDI_SIZEOF_INT @SIZEOF_INT@
|
||||
|
||||
#endif /* FRIBIDI_CONFIG_H */
|
||||
@@ -1,314 +0,0 @@
|
||||
/* FriBidi
|
||||
* fribidi-deprecated.c - deprecated interfaces.
|
||||
*
|
||||
* $Id: fribidi-deprecated.c,v 1.6 2006/06/01 22:53:55 behdad Exp $
|
||||
* $Author: behdad $
|
||||
* $Date: 2006/06/01 22:53:55 $
|
||||
* $Revision: 1.6 $
|
||||
* $Source: /cvs/fribidi/fribidi2/lib/fribidi-deprecated.c,v $
|
||||
*
|
||||
* Authors:
|
||||
* Behdad Esfahbod, 2001, 2002, 2004
|
||||
* Dov Grobgeld, 1999, 2000
|
||||
*
|
||||
* Copyright (C) 2004 Sharif FarsiWeb, Inc
|
||||
* Copyright (C) 2001,2002 Behdad Esfahbod
|
||||
* Copyright (C) 1999,2000 Dov Grobgeld
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this library, in a file named COPYING; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
* Boston, MA 02111-1307, USA
|
||||
*
|
||||
* For licensing issues, contact <license@farsiweb.info>.
|
||||
*/
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#undef FRIBIDI_NO_DEPRECATED
|
||||
|
||||
#include <fribidi-deprecated.h>
|
||||
#include <fribidi.h>
|
||||
|
||||
#if FRIBIDI_NO_DEPRECATED+0
|
||||
#else
|
||||
|
||||
static FriBidiFlags flags = FRIBIDI_FLAGS_DEFAULT | FRIBIDI_FLAGS_ARABIC;
|
||||
|
||||
FRIBIDI_ENTRY fribidi_boolean
|
||||
fribidi_set_mirroring (
|
||||
/* input */
|
||||
fribidi_boolean state
|
||||
)
|
||||
{
|
||||
return FRIBIDI_ADJUST_AND_TEST_BITS (flags, FRIBIDI_FLAG_SHAPE_MIRRORING, state);
|
||||
}
|
||||
|
||||
FRIBIDI_ENTRY fribidi_boolean
|
||||
fribidi_mirroring_status (
|
||||
void
|
||||
)
|
||||
{
|
||||
return FRIBIDI_TEST_BITS (flags, FRIBIDI_FLAG_SHAPE_MIRRORING);
|
||||
}
|
||||
|
||||
FRIBIDI_ENTRY fribidi_boolean
|
||||
fribidi_set_reorder_nsm (
|
||||
/* input */
|
||||
fribidi_boolean state
|
||||
)
|
||||
{
|
||||
return FRIBIDI_ADJUST_AND_TEST_BITS (flags, FRIBIDI_FLAG_REORDER_NSM, state);
|
||||
}
|
||||
|
||||
fribidi_boolean
|
||||
fribidi_reorder_nsm_status (
|
||||
void
|
||||
)
|
||||
{
|
||||
return FRIBIDI_TEST_BITS (flags, FRIBIDI_FLAG_REORDER_NSM);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
FRIBIDI_ENTRY FriBidiLevel
|
||||
fribidi_log2vis_get_embedding_levels (
|
||||
const FriBidiCharType *bidi_types, /* input list of bidi types as returned by
|
||||
fribidi_get_bidi_types() */
|
||||
const FriBidiStrIndex len, /* input string length of the paragraph */
|
||||
FriBidiParType *pbase_dir, /* requested and resolved paragraph
|
||||
* base direction */
|
||||
FriBidiLevel *embedding_levels /* output list of embedding levels */
|
||||
)
|
||||
{
|
||||
return fribidi_get_par_embedding_levels (bidi_types, len, pbase_dir, embedding_levels);
|
||||
}
|
||||
|
||||
FRIBIDI_ENTRY FriBidiCharType
|
||||
fribidi_get_type (
|
||||
FriBidiChar ch /* input character */
|
||||
)
|
||||
{
|
||||
return fribidi_get_bidi_type (ch);
|
||||
}
|
||||
|
||||
FRIBIDI_ENTRY FriBidiCharType
|
||||
fribidi_get_type_internal (
|
||||
FriBidiChar ch /* input character */
|
||||
)
|
||||
{
|
||||
return fribidi_get_bidi_type (ch);
|
||||
}
|
||||
|
||||
|
||||
|
||||
FRIBIDI_ENTRY FriBidiStrIndex
|
||||
fribidi_remove_bidi_marks (
|
||||
FriBidiChar *str,
|
||||
const FriBidiStrIndex len,
|
||||
FriBidiStrIndex *positions_to_this,
|
||||
FriBidiStrIndex *position_from_this_list,
|
||||
FriBidiLevel *embedding_levels
|
||||
)
|
||||
{
|
||||
register FriBidiStrIndex i, j = 0;
|
||||
fribidi_boolean private_from_this = false;
|
||||
fribidi_boolean status = false;
|
||||
|
||||
if UNLIKELY
|
||||
(len == 0)
|
||||
{
|
||||
status = true;
|
||||
goto out;
|
||||
}
|
||||
|
||||
DBG ("in fribidi_remove_bidi_marks");
|
||||
|
||||
fribidi_assert (str);
|
||||
|
||||
/* If to_this is not NULL, we must have from_this as well. If it is
|
||||
not given by the caller, we have to make a private instance of it. */
|
||||
if (positions_to_this && !position_from_this_list)
|
||||
{
|
||||
position_from_this_list = fribidi_malloc (sizeof
|
||||
(position_from_this_list[0]) *
|
||||
len);
|
||||
if UNLIKELY
|
||||
(!position_from_this_list) goto out;
|
||||
private_from_this = true;
|
||||
for (i = 0; i < len; i++)
|
||||
position_from_this_list[positions_to_this[i]] = i;
|
||||
}
|
||||
|
||||
for (i = 0; i < len; i++)
|
||||
if (!FRIBIDI_IS_EXPLICIT_OR_BN (fribidi_get_bidi_type (str[i]))
|
||||
&& str[i] != FRIBIDI_CHAR_LRM && str[i] != FRIBIDI_CHAR_RLM)
|
||||
{
|
||||
str[j] = str[i];
|
||||
if (embedding_levels)
|
||||
embedding_levels[j] = embedding_levels[i];
|
||||
if (position_from_this_list)
|
||||
position_from_this_list[j] = position_from_this_list[i];
|
||||
j++;
|
||||
}
|
||||
|
||||
/* Convert the from_this list to to_this */
|
||||
if (positions_to_this)
|
||||
{
|
||||
for (i = 0; i < len; i++)
|
||||
positions_to_this[i] = -1;
|
||||
for (i = 0; i < len; i++)
|
||||
positions_to_this[position_from_this_list[i]] = i;
|
||||
}
|
||||
|
||||
status = true;
|
||||
|
||||
out:
|
||||
|
||||
if (private_from_this)
|
||||
fribidi_free (position_from_this_list);
|
||||
|
||||
return status ? j : -1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
FRIBIDI_ENTRY FriBidiLevel
|
||||
fribidi_log2vis (
|
||||
/* input */
|
||||
const FriBidiChar *str,
|
||||
FriBidiStrIndex len,
|
||||
/* input and output */
|
||||
FriBidiParType *pbase_dir,
|
||||
/* output */
|
||||
FriBidiChar *visual_str,
|
||||
FriBidiStrIndex *positions_L_to_V,
|
||||
FriBidiStrIndex *positions_V_to_L,
|
||||
FriBidiLevel *embedding_levels
|
||||
)
|
||||
{
|
||||
register FriBidiStrIndex i;
|
||||
FriBidiLevel max_level = 0;
|
||||
fribidi_boolean private_V_to_L = false;
|
||||
fribidi_boolean private_embedding_levels = false;
|
||||
fribidi_boolean status = false;
|
||||
FriBidiArabicProp *ar_props = NULL;
|
||||
FriBidiCharType *bidi_types = NULL;
|
||||
|
||||
if UNLIKELY
|
||||
(len == 0)
|
||||
{
|
||||
status = true;
|
||||
goto out;
|
||||
}
|
||||
|
||||
DBG ("in fribidi_log2vis");
|
||||
|
||||
fribidi_assert (str);
|
||||
fribidi_assert (pbase_dir);
|
||||
|
||||
bidi_types = fribidi_malloc (len * sizeof bidi_types[0]);
|
||||
if (!bidi_types)
|
||||
goto out;
|
||||
|
||||
fribidi_get_bidi_types (str, len, bidi_types);
|
||||
|
||||
if (!embedding_levels)
|
||||
{
|
||||
embedding_levels = fribidi_malloc (len * sizeof embedding_levels[0]);
|
||||
if (!embedding_levels)
|
||||
goto out;
|
||||
private_embedding_levels = true;
|
||||
}
|
||||
|
||||
max_level = fribidi_get_par_embedding_levels (bidi_types, len, pbase_dir,
|
||||
embedding_levels) - 1;
|
||||
if UNLIKELY
|
||||
(max_level < 0) goto out;
|
||||
|
||||
/* If l2v is to be calculated we must have v2l as well. If it is not
|
||||
given by the caller, we have to make a private instance of it. */
|
||||
if (positions_L_to_V && !positions_V_to_L)
|
||||
{
|
||||
positions_V_to_L =
|
||||
(FriBidiStrIndex *) fribidi_malloc (sizeof (FriBidiStrIndex) * len);
|
||||
if (!positions_V_to_L)
|
||||
goto out;
|
||||
private_V_to_L = true;
|
||||
}
|
||||
|
||||
/* Set up the ordering array to identity order */
|
||||
if (positions_V_to_L)
|
||||
{
|
||||
for (i = 0; i < len; i++)
|
||||
positions_V_to_L[i] = i;
|
||||
}
|
||||
|
||||
|
||||
if (visual_str)
|
||||
{
|
||||
/* Using memcpy instead
|
||||
for (i = len - 1; i >= 0; i--)
|
||||
visual_str[i] = str[i];
|
||||
*/
|
||||
memcpy (visual_str, str, len * sizeof (*visual_str));
|
||||
|
||||
/* Arabic joining */
|
||||
ar_props = fribidi_malloc (len * sizeof ar_props[0]);
|
||||
fribidi_get_joining_types (str, len, ar_props);
|
||||
fribidi_join_arabic (bidi_types, len, embedding_levels, ar_props);
|
||||
|
||||
fribidi_shape (flags, embedding_levels, len, ar_props, visual_str);
|
||||
}
|
||||
|
||||
/* line breaking goes here, but we assume one line in this function */
|
||||
|
||||
/* and this should be called once per line, but again, we assume one
|
||||
* line in this deprecated function */
|
||||
status =
|
||||
fribidi_reorder_line (flags, bidi_types, len, 0, *pbase_dir,
|
||||
embedding_levels, visual_str,
|
||||
positions_V_to_L);
|
||||
|
||||
/* Convert the v2l list to l2v */
|
||||
if (positions_L_to_V)
|
||||
{
|
||||
for (i = 0; i < len; i++)
|
||||
positions_L_to_V[i] = -1;
|
||||
for (i = 0; i < len; i++)
|
||||
positions_L_to_V[positions_V_to_L[i]] = i;
|
||||
}
|
||||
|
||||
out:
|
||||
|
||||
if (private_V_to_L)
|
||||
fribidi_free (positions_V_to_L);
|
||||
|
||||
if (private_embedding_levels)
|
||||
fribidi_free (embedding_levels);
|
||||
|
||||
if (ar_props)
|
||||
fribidi_free (ar_props);
|
||||
|
||||
if (bidi_types)
|
||||
fribidi_free (bidi_types);
|
||||
|
||||
return status ? max_level + 1 : 0;
|
||||
}
|
||||
|
||||
#endif /* !FRIBIDI_NO_DEPRECATED */
|
||||
|
||||
/* Editor directions:
|
||||
* vim:textwidth=78:tabstop=8:shiftwidth=2:autoindent:cindent
|
||||
*/
|
||||
@@ -1,243 +0,0 @@
|
||||
/* FriBidi
|
||||
* fribidi-deprecated.h - Deprecated interfaces
|
||||
*
|
||||
* $Id: fribidi-deprecated.h,v 1.3 2006/01/31 03:23:13 behdad Exp $
|
||||
* $Author: behdad $
|
||||
* $Date: 2006/01/31 03:23:13 $
|
||||
* $Revision: 1.3 $
|
||||
* $Source: /cvs/fribidi/fribidi2/lib/fribidi-deprecated.h,v $
|
||||
*
|
||||
* Author:
|
||||
* Behdad Esfahbod, 2004, 2005
|
||||
*
|
||||
* Copyright (C) 2004 Sharif FarsiWeb, Inc
|
||||
* Copyright (C) 2004, 2005 Behdad Esfahbod
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this library, in a file named COPYING; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
* Boston, MA 02111-1307, USA
|
||||
*
|
||||
* For licensing issues, contact <license@farsiweb.info>.
|
||||
*/
|
||||
#ifndef _FRIBIDI_DEPRECATED_H
|
||||
#define _FRIBIDI_DEPRECATED_H
|
||||
|
||||
#include "fribidi-common.h"
|
||||
|
||||
#include "fribidi-types.h"
|
||||
|
||||
#include "fribidi-bidi-types.h"
|
||||
|
||||
#include "fribidi-begindecls.h"
|
||||
|
||||
|
||||
|
||||
#define fribidi_mirroring_status FRIBIDI_NAMESPACE(mirroring_status)
|
||||
/* fribidi_mirroring_status - get current mirroring status
|
||||
*
|
||||
* This function is deprecated and only used with other deprecated functions.
|
||||
*/
|
||||
FRIBIDI_ENTRY fribidi_boolean fribidi_mirroring_status (
|
||||
void
|
||||
) FRIBIDI_GNUC_DEPRECATED;
|
||||
|
||||
#define fribidi_set_mirroring FRIBIDI_NAMESPACE(set_mirroring)
|
||||
/* fribidi_set_mirroring - set mirroring on or off
|
||||
*
|
||||
* This function is used to turn character mirroring on or off.
|
||||
* Character mirroring is the act of replacing a mirrorable glyph
|
||||
* (character), eg. left paranthesis, with the matching glyph,
|
||||
* eg. right paranthesis, in a right-to-left resolved context.
|
||||
* If your rendering engine does mirroring itself, you may want to
|
||||
* turn it off here.
|
||||
*
|
||||
* This flag is on by default.
|
||||
* This function is deprecated and only used with other deprecated functions.
|
||||
*
|
||||
* Returns: the new mirroring status.
|
||||
*/
|
||||
FRIBIDI_ENTRY fribidi_boolean fribidi_set_mirroring (
|
||||
fribidi_boolean state /* new state to set */
|
||||
) FRIBIDI_GNUC_DEPRECATED;
|
||||
|
||||
|
||||
#define fribidi_reorder_nsm_status FRIBIDI_NAMESPACE(reorder_nsm_status)
|
||||
/* fribidi_reorder_nsm_status - get current marks reordering status
|
||||
*
|
||||
* This function is deprecated and only used with other deprecated functions.
|
||||
*/
|
||||
FRIBIDI_ENTRY fribidi_boolean fribidi_reorder_nsm_status (
|
||||
void
|
||||
) FRIBIDI_GNUC_DEPRECATED;
|
||||
|
||||
#define fribidi_set_reorder_nsm FRIBIDI_NAMESPACE(set_reorder_nsm)
|
||||
/* fribidi_set_reorder_nsm - set marks reordering on or off
|
||||
*
|
||||
* This function is used to turn non-spacing marks reordering on or
|
||||
* off. Reordering non-spacing marks is the act of placing non-spacing
|
||||
* marks (bidi class NSM) after their base character in a right-to-left
|
||||
* resolved context. If your rendering engine expects non-spacing marks
|
||||
* always after the base character in the memory representation of the
|
||||
* visual string, you need this option on. An example of where people
|
||||
* may need it off is when rendering in the console when non-spacing
|
||||
* marks cannot be applied on top of the base character.
|
||||
*
|
||||
* This flag is on by default.
|
||||
* This function is deprecated and only used with other deprecated functions.
|
||||
*
|
||||
* Returns: the new marks reordering status.
|
||||
*/
|
||||
FRIBIDI_ENTRY fribidi_boolean fribidi_set_reorder_nsm (
|
||||
fribidi_boolean state /* new state to set */
|
||||
) FRIBIDI_GNUC_DEPRECATED;
|
||||
|
||||
|
||||
|
||||
|
||||
/* fribidi_log2vis_get_embedding_levels - get embedding levels
|
||||
*
|
||||
* Deprecated. Replaced by fribidi_get_par_embedding_levels.
|
||||
*/
|
||||
#define fribidi_log2vis_get_embedding_levels FRIBIDI_NAMESPACE(log2vis_get_embedding_levels)
|
||||
FRIBIDI_ENTRY FriBidiLevel
|
||||
fribidi_log2vis_get_embedding_levels (
|
||||
const FriBidiCharType *bidi_types, /* input list of bidi types as returned by
|
||||
fribidi_get_bidi_types() */
|
||||
const FriBidiStrIndex len, /* input string length of the paragraph */
|
||||
FriBidiParType *pbase_dir, /* requested and resolved paragraph
|
||||
* base direction */
|
||||
FriBidiLevel *embedding_levels /* output list of embedding levels */
|
||||
) FRIBIDI_GNUC_DEPRECATED;
|
||||
|
||||
/* fribidi_get_type - get character bidi type
|
||||
*
|
||||
* Deprecated. Replaced by fribidi_get_bidi_type.
|
||||
*/
|
||||
#define fribidi_get_type FRIBIDI_NAMESPACE(get_type)
|
||||
FRIBIDI_ENTRY FriBidiCharType
|
||||
fribidi_get_type (
|
||||
FriBidiChar ch /* input character */
|
||||
) FRIBIDI_GNUC_DEPRECATED;
|
||||
|
||||
/* fribidi_get_type_internal - get character bidi type
|
||||
*
|
||||
* Deprecated. Replaced by fribidi_get_bidi_type.
|
||||
*/
|
||||
#define fribidi_get_type_internal FRIBIDI_NAMESPACE(get_type_internal)
|
||||
FRIBIDI_ENTRY FriBidiCharType
|
||||
fribidi_get_type_internal (
|
||||
FriBidiChar ch /* input character */
|
||||
) FRIBIDI_GNUC_DEPRECATED;
|
||||
|
||||
#define fribidi_remove_bidi_marks FRIBIDI_NAMESPACE(remove_bidi_marks)
|
||||
/* fribidi_remove_bidi_marks - remove bidi marks out of an string
|
||||
*
|
||||
* This function removes the bidi and boundary-neutral marks out of an string
|
||||
* and the accompanying lists. It implements rule X9 of the Unicode
|
||||
* Bidirectional Algorithm available at
|
||||
* http://www.unicode.org/reports/tr9/#X9, with the exception that it removes
|
||||
* U+200E LEFT-TO-RIGHT MARK and U+200F RIGHT-TO-LEFT MARK too.
|
||||
*
|
||||
* If any of the input lists are NULL, the list is skipped. If str is the
|
||||
* visual string, then positions_to_this is positions_L_to_V and
|
||||
* position_from_this_list is positions_V_to_L; if str is the logical
|
||||
* string, the other way. Moreover, the position maps should be filled with
|
||||
* valid entries.
|
||||
*
|
||||
* A position map pointing to a removed character is filled with -1. By the
|
||||
* way, you should not use embedding_levels if str is visual string.
|
||||
*
|
||||
* For best results this function should be run on a whole paragraph, not
|
||||
* lines; but feel free to do otherwise if you know what you are doing.
|
||||
* Deprecated. Use fribidi_remove_special_chars instead.
|
||||
*
|
||||
* Returns: New length of the string, or -1 if an error occured (memory
|
||||
* allocation failure most probably).
|
||||
*/
|
||||
FRIBIDI_ENTRY FriBidiStrIndex
|
||||
fribidi_remove_bidi_marks (
|
||||
FriBidiChar *str, /* input string to clean */
|
||||
const FriBidiStrIndex len, /* input string length */
|
||||
FriBidiStrIndex *positions_to_this, /* list mapping positions to the
|
||||
order used in str */
|
||||
FriBidiStrIndex *position_from_this_list, /* list mapping positions from the
|
||||
order used in str */
|
||||
FriBidiLevel *embedding_levels /* list of embedding levels */
|
||||
)
|
||||
FRIBIDI_GNUC_WARN_UNUSED FRIBIDI_GNUC_DEPRECATED;
|
||||
|
||||
|
||||
#define fribidi_log2vis FRIBIDI_NAMESPACE(log2vis)
|
||||
/* fribidi_log2vis - get visual string
|
||||
*
|
||||
* This function converts the logical input string to the visual output
|
||||
* strings as specified by the Unicode Bidirectional Algorithm. As a side
|
||||
* effect it also generates mapping lists between the two strings, and the
|
||||
* list of embedding levels as defined by the algorithm.
|
||||
*
|
||||
* If NULL is passed as any of the the lists, the list is ignored and not
|
||||
* filled.
|
||||
*
|
||||
* This function is obsolete because it only handles one-line paragraphs.
|
||||
* Please consider using other functions instead. Deprecated.
|
||||
*
|
||||
* Returns: Maximum level found plus one, or zero if any error occured
|
||||
* (memory allocation failure most probably).
|
||||
*/
|
||||
FRIBIDI_ENTRY FriBidiLevel fribidi_log2vis (
|
||||
const FriBidiChar *str, /* input logical string */
|
||||
const FriBidiStrIndex len, /* input string length */
|
||||
FriBidiParType *pbase_dir, /* requested and resolved paragraph
|
||||
* base direction */
|
||||
FriBidiChar *visual_str, /* output visual string */
|
||||
FriBidiStrIndex *positions_L_to_V, /* output mapping from logical to
|
||||
* visual string positions */
|
||||
FriBidiStrIndex *positions_V_to_L, /* output mapping from visual string
|
||||
* back to the logical string
|
||||
* positions */
|
||||
FriBidiLevel *embedding_levels /* output list of embedding levels */
|
||||
)
|
||||
FRIBIDI_GNUC_WARN_UNUSED FRIBIDI_GNUC_DEPRECATED;
|
||||
|
||||
|
||||
#define UNI_MAX_BIDI_LEVEL FRIBIDI_BIDI_MAX_EXPLICIT_LEVEL
|
||||
#define UNI_LRM FRIBIDI_CHAR_LRM
|
||||
#define UNI_RLM FRIBIDI_CHAR_RLM
|
||||
#define UNI_LRE FRIBIDI_CHAR_LRE
|
||||
#define UNI_RLE FRIBIDI_CHAR_RLE
|
||||
#define UNI_LRO FRIBIDI_CHAR_LRO
|
||||
#define UNI_RLO FRIBIDI_CHAR_RLO
|
||||
#define UNI_LS FRIBIDI_CHAR_LS
|
||||
#define UNI_PS FRIBIDI_CHAR_PS
|
||||
#define UNI_ZWNJ FRIBIDI_CHAR_ZWNJ
|
||||
#define UNI_ZWJ FRIBIDI_CHAR_ZWJ
|
||||
#define UNI_HEBREW_ALEF FRIBIDI_CHAR_HEBREW_ALEF
|
||||
#define UNI_ARABIC_ALEF FRIBIDI_CHAR_ARABIC_ALEF
|
||||
#define UNI_ARABIC_ZERO FRIBIDI_CHAR_ARABIC_ZERO
|
||||
#define UNI_FARSI_ZERO FRIBIDI_CHAR_PERSIAN_ZERO
|
||||
|
||||
#define FRIBIDI_TYPE_WL FRIBIDI_PAR_WLTR
|
||||
#define FRIBIDI_TYPE_WR FRIBIDI_PAR_WRTL
|
||||
#define FRIBIDI_TYPE_L FRIBIDI_PAR_LTR
|
||||
#define FRIBIDI_TYPE_R FRIBIDI_PAR_RTL
|
||||
#define FRIBIDI_TYPE_N FRIBIDI_PAR_ON
|
||||
#define FRIBIDI_TYPE_B FRIBIDI_TYPE_BS
|
||||
#define FRIBIDI_TYPE_S FRIBIDI_TYPE_SS
|
||||
|
||||
#include "fribidi-enddecls.h"
|
||||
|
||||
#endif /* !_FRIBIDI_DEPRECATED_H */
|
||||
/* Editor directions:
|
||||
* vim:textwidth=78:tabstop=8:shiftwidth=2:autoindent:cindent
|
||||
*/
|
||||
@@ -1,3 +0,0 @@
|
||||
#ifdef FRIBIDI_END_DECLS
|
||||
FRIBIDI_END_DECLS
|
||||
#endif /* FRIBIDI_END_DECLS */
|
||||
@@ -1,78 +0,0 @@
|
||||
/* FriBidi
|
||||
* fribidi-flags.h - option flags
|
||||
*
|
||||
* $Id: fribidi-flags.h,v 1.1 2005/11/03 01:39:01 behdad Exp $
|
||||
* $Author: behdad $
|
||||
* $Date: 2005/11/03 01:39:01 $
|
||||
* $Revision: 1.1 $
|
||||
* $Source: /cvs/fribidi/fribidi2/lib/fribidi-flags.h,v $
|
||||
*
|
||||
* Author:
|
||||
* Behdad Esfahbod, 2005
|
||||
*
|
||||
* Copyright (C) 2005 Behdad Esfahbod
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this library, in a file named COPYING; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
* Boston, MA 02111-1307, USA
|
||||
*
|
||||
* For licensing issues, contact <license@farsiweb.info>.
|
||||
*/
|
||||
#ifndef _FRIBIDI_FLAGS_H
|
||||
#define _FRIBIDI_FLAGS_H
|
||||
|
||||
#include "fribidi-common.h"
|
||||
|
||||
#include "fribidi-types.h"
|
||||
|
||||
#include "fribidi-begindecls.h"
|
||||
|
||||
typedef fribidi_uint32 FriBidiFlags;
|
||||
|
||||
/*
|
||||
* Define option flags that various functions use. Each mask has
|
||||
* only one bit set.
|
||||
*/
|
||||
|
||||
#define FRIBIDI_FLAG_SHAPE_MIRRORING 0x00000001
|
||||
#define FRIBIDI_FLAG_REORDER_NSM 0x00000002
|
||||
|
||||
#define FRIBIDI_FLAG_SHAPE_ARAB_PRES 0x00000100
|
||||
#define FRIBIDI_FLAG_SHAPE_ARAB_LIGA 0x00000200
|
||||
#define FRIBIDI_FLAG_SHAPE_ARAB_CONSOLE 0x00000400
|
||||
|
||||
#define FRIBIDI_FLAG_REMOVE_BIDI 0x00010000
|
||||
#define FRIBIDI_FLAG_REMOVE_JOINING 0x00020000
|
||||
#define FRIBIDI_FLAG_REMOVE_SPECIALS 0x00040000
|
||||
|
||||
|
||||
/*
|
||||
* And their combinations.
|
||||
*/
|
||||
|
||||
#define FRIBIDI_FLAGS_DEFAULT ( \
|
||||
FRIBIDI_FLAG_SHAPE_MIRRORING | \
|
||||
FRIBIDI_FLAG_REORDER_NSM | \
|
||||
FRIBIDI_FLAG_REMOVE_SPECIALS )
|
||||
|
||||
#define FRIBIDI_FLAGS_ARABIC ( \
|
||||
FRIBIDI_FLAG_SHAPE_ARAB_PRES | \
|
||||
FRIBIDI_FLAG_SHAPE_ARAB_LIGA )
|
||||
|
||||
#include "fribidi-enddecls.h"
|
||||
|
||||
#endif /* !_FRIBIDI_FLAGS_H */
|
||||
/* Editor directions:
|
||||
* vim:textwidth=78:tabstop=8:shiftwidth=2:autoindent:cindent
|
||||
*/
|
||||
@@ -1,50 +0,0 @@
|
||||
#ifndef __FRIBIDI_DOC
|
||||
/* FriBidi
|
||||
* fribidi-joining-types-list.h - list of joining types
|
||||
*
|
||||
* $Id: fribidi-joining-types-list.h,v 1.2 2004/06/15 11:52:02 behdad Exp $
|
||||
* $Author: behdad $
|
||||
* $Date: 2004/06/15 11:52:02 $
|
||||
* $Revision: 1.2 $
|
||||
* $Source: /cvs/fribidi/fribidi2/lib/fribidi-joining-types-list.h,v $
|
||||
*
|
||||
* Author:
|
||||
* Behdad Esfahbod, 2004
|
||||
*
|
||||
* Copyright (C) 2004 Sharif FarsiWeb, Inc.
|
||||
* Copyright (C) 2004 Behdad Esfahbod
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this library, in a file named COPYING; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
* Boston, MA 02111-1307, USA
|
||||
*
|
||||
* For licensing issues, contact <license@farsiweb.info>.
|
||||
*/
|
||||
/* *INDENT-OFF* */
|
||||
#endif /* !__FRIBIDI_DOC */
|
||||
#ifndef _FRIBIDI_ADD_TYPE
|
||||
# define _FRIBIDI_ADD_TYPE(x,y)
|
||||
#endif
|
||||
|
||||
_FRIBIDI_ADD_TYPE (U, '|') /* nUn-joining, e.g. Full Stop */
|
||||
_FRIBIDI_ADD_TYPE (R, '<') /* Right-joining, e.g. Arabic Letter Dal */
|
||||
_FRIBIDI_ADD_TYPE (D, '+') /* Dual-joining, e.g. Arabic Letter Ain */
|
||||
_FRIBIDI_ADD_TYPE (C, '-') /* join-Causing, e.g. Tatweel, ZWJ */
|
||||
_FRIBIDI_ADD_TYPE (T, '^') /* Transparent, e.g. Arabic Fatha */
|
||||
_FRIBIDI_ADD_TYPE (L, '>') /* Left-joining, i.e. fictional */
|
||||
_FRIBIDI_ADD_TYPE (G, '~') /* iGnored, e.g. LRE, RLE, ZWNBSP */
|
||||
|
||||
#ifndef __FRIBIDI_DOC
|
||||
/* *INDENT-ON* */
|
||||
#endif /* !__FRIBIDI_DOC */
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user