Compare commits
1793
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a8df763823 | ||
|
|
58af8f84b9 | ||
|
|
b0395ad539 | ||
|
|
b712cba62d | ||
|
|
16c0b48f4a | ||
|
|
fcadd03607 | ||
|
|
e1ad48ec16 | ||
|
|
fbb77e8428 | ||
|
|
72c05fae77 | ||
|
|
8867dc959e | ||
|
|
e9fc57b97d | ||
|
|
7c490de93e | ||
|
|
3c85295622 | ||
|
|
bdeb7e5e9d | ||
|
|
2e766a7e16 | ||
|
|
9bab3d5795 | ||
|
|
1015800483 | ||
|
|
c4149e26e8 | ||
|
|
602e4df5b9 | ||
|
|
9be5780597 | ||
|
|
363f4c56f4 | ||
|
|
9ca21f1fb4 | ||
|
|
826183ce2a | ||
|
|
ec41a7152c | ||
|
|
4e394951bc | ||
|
|
837f74f28a | ||
|
|
fb02389922 | ||
|
|
f12f5b8bd1 | ||
|
|
20a3f4b6f3 | ||
|
|
f1ca991041 | ||
|
|
83df870bb5 | ||
|
|
8e56998c9a | ||
|
|
43e5f694bc | ||
|
|
9197a50c5b | ||
|
|
40fb4da2e8 | ||
|
|
f458fdbebe | ||
|
|
069f8bc009 | ||
|
|
a9f579d949 | ||
|
|
7b0b2d8cd7 | ||
|
|
4dce42e458 | ||
|
|
f819471c06 | ||
|
|
45393cbb78 | ||
|
|
bf6727b43a | ||
|
|
87134a42b4 | ||
|
|
d27a849d79 | ||
|
|
2aaa52c639 | ||
|
|
5348739a2c | ||
|
|
b21396bd34 | ||
|
|
19c97d3137 | ||
|
|
421dca5615 | ||
|
|
d5b64a4df3 | ||
|
|
098d1afb50 | ||
|
|
9d122aa686 | ||
|
|
e465e83cb3 | ||
|
|
619a8e2f42 | ||
|
|
b3c0c6f2b4 | ||
|
|
f0a1cd01c3 | ||
|
|
144740a270 | ||
|
|
0b478b7a91 | ||
|
|
d23451b6e7 | ||
|
|
20897deeee | ||
|
|
677e381a2c | ||
|
|
4b06a3eabf | ||
|
|
36c1369041 | ||
|
|
d4b179d59e | ||
|
|
81fbd75646 | ||
|
|
c7e37eac05 | ||
|
|
dd6403691f | ||
|
|
e42b179fad | ||
|
|
ebb0ebcab0 | ||
|
|
347a5ed40a | ||
|
|
dee91ed1ef | ||
|
|
a80f702bb8 | ||
|
|
7d91d06ce0 | ||
|
|
ab1f04ac31 | ||
|
|
0696ac7340 | ||
|
|
137a917f58 | ||
|
|
00cfdfef27 | ||
|
|
c1d5d153aa | ||
|
|
1fb3b2110c | ||
|
|
ef9472097d | ||
|
|
ed75d89baf | ||
|
|
fed4c934ad | ||
|
|
63ea13ab3c | ||
|
|
2c802799e8 | ||
|
|
fe30cbb4aa | ||
|
|
ca1d3e337a | ||
|
|
28f1ee6335 | ||
|
|
91f377b382 | ||
|
|
6d6fa156f3 | ||
|
|
5383fee6af | ||
|
|
a2c7b68a60 | ||
|
|
7be0b38f47 | ||
|
|
4e05679b10 | ||
|
|
36d3c76a52 | ||
|
|
eee263c2c2 | ||
|
|
c1cdb83e8d | ||
|
|
451ab81f0b | ||
|
|
d803c1b9cd | ||
|
|
72b26c19ce | ||
|
|
f35d827bd4 | ||
|
|
358eeaa981 | ||
|
|
55e88cf740 | ||
|
|
be4125e4ca | ||
|
|
920b00348e | ||
|
|
80aeae1692 | ||
|
|
0e52845f50 | ||
|
|
ca5dd9e78f | ||
|
|
956fc099ad | ||
|
|
1da376e777 | ||
|
|
b0b4259af6 | ||
|
|
26343b4449 | ||
|
|
a46926f5cc | ||
|
|
49518059d1 | ||
|
|
e6ce425bbd | ||
|
|
19b9ec0521 | ||
|
|
c98861be6e | ||
|
|
29db810c54 | ||
|
|
14bf24ed27 | ||
|
|
ff5bb34204 | ||
|
|
77a00b08a5 | ||
|
|
27caf1bc70 | ||
|
|
01b24e5417 | ||
|
|
7a320c9c54 | ||
|
|
3a65b687a8 | ||
|
|
0919ad015c | ||
|
|
437f900c25 | ||
|
|
cd7ce5698c | ||
|
|
86eda4f358 | ||
|
|
d791d2ce55 | ||
|
|
1883a4884a | ||
|
|
403c34fe5c | ||
|
|
f86a99cd1b | ||
|
|
85cac497ea | ||
|
|
92d6c2b7b0 | ||
|
|
46be62b256 | ||
|
|
f67f8e7dbf | ||
|
|
191fd4b68a | ||
|
|
c504c0f8f0 | ||
|
|
6adf39b460 | ||
|
|
e160427108 | ||
|
|
275d28c9c6 | ||
|
|
2a848e32e4 | ||
|
|
039daa0145 | ||
|
|
a425935bc4 | ||
|
|
6af09bd215 | ||
|
|
015d9208e3 | ||
|
|
f247796ffc | ||
|
|
29c72be994 | ||
|
|
8d70016edc | ||
|
|
6919b9fd91 | ||
|
|
c5d58f5de2 | ||
|
|
4855d29d31 | ||
|
|
2d22c2b265 | ||
|
|
acf121cac6 | ||
|
|
94d01d1ee9 | ||
|
|
e3c9ae6de5 | ||
|
|
dff8f549da | ||
|
|
b93a5c5305 | ||
|
|
0c75d8aca3 | ||
|
|
71c28ad00b | ||
|
|
7e5acd72c1 | ||
|
|
29006e9926 | ||
|
|
10d4365376 | ||
|
|
611edea6e0 | ||
|
|
fcbf45521a | ||
|
|
32d8120516 | ||
|
|
fdba6a253a | ||
|
|
18bdbfdb07 | ||
|
|
6f93299aaf | ||
|
|
c47814c29a | ||
|
|
0dd49869f5 | ||
|
|
74c9c09fcd | ||
|
|
6f891dd235 | ||
|
|
6e123b0732 | ||
|
|
2c51c9f5f8 | ||
|
|
8a781b4fa2 | ||
|
|
e3a79ab099 | ||
|
|
05364cc4dc | ||
|
|
3c5d997eff | ||
|
|
696a9ea464 | ||
|
|
c2d97397e8 | ||
|
|
4f534c5ce3 | ||
|
|
15288ced57 | ||
|
|
30eca524d9 | ||
|
|
168a2c9684 | ||
|
|
0e05dca3d5 | ||
|
|
717f5e3c13 | ||
|
|
2cad7f7210 | ||
|
|
34783cfe94 | ||
|
|
12149a4773 | ||
|
|
7d81990699 | ||
|
|
531de8bd1e | ||
|
|
232e6a4b5b | ||
|
|
65d3684d0b | ||
|
|
6017543666 | ||
|
|
7c7f924ef1 | ||
|
|
ba40d45321 | ||
|
|
3af0009453 | ||
|
|
7ac01390d0 | ||
|
|
6dee986a28 | ||
|
|
145eecf8a4 | ||
|
|
080719c251 | ||
|
|
d58719d09b | ||
|
|
05d1eab441 | ||
|
|
caffda3221 | ||
|
|
650a50278a | ||
|
|
1ef0909204 | ||
|
|
42878841e6 | ||
|
|
34e4cf123d | ||
|
|
7ffb3ebdfe | ||
|
|
684a43a95c | ||
|
|
4fcb41f659 | ||
|
|
2d1c876e0d | ||
|
|
8d1ef1721f | ||
|
|
02ffceb300 | ||
|
|
44fe156751 | ||
|
|
aca48d69cd | ||
|
|
294ce055cd | ||
|
|
4117eb5b40 | ||
|
|
a9068ee162 | ||
|
|
9549a204a5 | ||
|
|
c276736002 | ||
|
|
cfd960124e | ||
|
|
77cd898bd2 | ||
|
|
e7c40dd914 | ||
|
|
bcb1a1d5eb | ||
|
|
bf53db8d68 | ||
|
|
b5dfe74cfe | ||
|
|
6c891f1146 | ||
|
|
7d06f59da5 | ||
|
|
9dee0f0ea8 | ||
|
|
9338b5b10f | ||
|
|
b7ecffedcd | ||
|
|
71ab8c0b7d | ||
|
|
8901c62201 | ||
|
|
7deeb4486f | ||
|
|
a559e36306 | ||
|
|
602bd1a010 | ||
|
|
f57b8092fc | ||
|
|
5777c638f1 | ||
|
|
60307da80e | ||
|
|
d6e97c328a | ||
|
|
e4f35e827d | ||
|
|
e7cab1a376 | ||
|
|
6eb1114d17 | ||
|
|
e6a0b4f58b | ||
|
|
c8d9ff6575 | ||
|
|
0d9d176415 | ||
|
|
e1413764f6 | ||
|
|
ca04e084a2 | ||
|
|
56d03042ec | ||
|
|
0c8df833e9 | ||
|
|
f275eb5f9a | ||
|
|
88081068e9 | ||
|
|
9893584b4f | ||
|
|
0b4fad3cca | ||
|
|
bbb4749815 | ||
|
|
4fc780298f | ||
|
|
f24f3b5b23 | ||
|
|
ff6279a406 | ||
|
|
c36f64e97b | ||
|
|
2c4bee6e6a | ||
|
|
7b776f01bd | ||
|
|
43b7492300 | ||
|
|
1fe79fe236 | ||
|
|
222b63d2c3 | ||
|
|
a7c41b458a | ||
|
|
3901c7c7da | ||
|
|
932a08b2da | ||
|
|
4c97a4f9e0 | ||
|
|
a1d16b4613 | ||
|
|
16e1e00c67 | ||
|
|
b76fc9699a | ||
|
|
cb3638e3ab | ||
|
|
e85d91e682 | ||
|
|
2653b59af4 | ||
|
|
caff071a1b | ||
|
|
86ccf40884 | ||
|
|
85dba64b84 | ||
|
|
40165fd6db | ||
|
|
c701e1fe7e | ||
|
|
525e19566e | ||
|
|
27e734bde0 | ||
|
|
fa10eb5801 | ||
|
|
2e44a50f7f | ||
|
|
bd53786887 | ||
|
|
ad1b1eabe4 | ||
|
|
2de9a2be68 | ||
|
|
e120907e0f | ||
|
|
b0c217201e | ||
|
|
dac7026739 | ||
|
|
91a4646f19 | ||
|
|
8963e17b83 | ||
|
|
8ba52e2530 | ||
|
|
bf2184582a | ||
|
|
501a770fee | ||
|
|
327f7085f6 | ||
|
|
8aef549cfc | ||
|
|
8dd268b83e | ||
|
|
5fddc3156b | ||
|
|
d6976ca64f | ||
|
|
809219d5e8 | ||
|
|
278dd12ced | ||
|
|
f3cfa969c9 | ||
|
|
7b64b22012 | ||
|
|
267ccae3a9 | ||
|
|
5f77dbb946 | ||
|
|
1a46d7d16c | ||
|
|
c8a2278cb7 | ||
|
|
75b269d4bb | ||
|
|
35e499027d | ||
|
|
356b2f279c | ||
|
|
eba5965220 | ||
|
|
feda0bae80 | ||
|
|
44ecb677ad | ||
|
|
3e99f4d142 | ||
|
|
2891983cde | ||
|
|
612f910b9c | ||
|
|
a9d0e2154b | ||
|
|
16a0953d1d | ||
|
|
737ae08355 | ||
|
|
6d83a7e187 | ||
|
|
56df9b6af3 | ||
|
|
7f2435d821 | ||
|
|
b180f29fd9 | ||
|
|
32c85f96a4 | ||
|
|
ec83c60320 | ||
|
|
fb4a912dba | ||
|
|
123b2aa60b | ||
|
|
bd82a8db29 | ||
|
|
6f71fc17c2 | ||
|
|
d8c3e9f41c | ||
|
|
e10345b4de | ||
|
|
2ab66b113c | ||
|
|
f64263cf6f | ||
|
|
55c72f32da | ||
|
|
53bc12baad | ||
|
|
b391e763bc | ||
|
|
2bae0bdb0f | ||
|
|
d42df54901 | ||
|
|
e6256d448f | ||
|
|
ad1a980eb1 | ||
|
|
1b50858fa6 | ||
|
|
3276bbb7b6 | ||
|
|
dc00fa3429 | ||
|
|
dc9276b73c | ||
|
|
271d70d6f3 | ||
|
|
e52a6c430b | ||
|
|
d77d25acf8 | ||
|
|
9898809f0a | ||
|
|
48768aa13c | ||
|
|
b1c01a763f | ||
|
|
d9bcd6007c | ||
|
|
d1b478b3b1 | ||
|
|
14b421f533 | ||
|
|
7310a8e4df | ||
|
|
c1c3a7dc78 | ||
|
|
ff10b77414 | ||
|
|
4667c332b4 | ||
|
|
4a9f6b6a22 | ||
|
|
f1d78243d0 | ||
|
|
6e41c8a2a0 | ||
|
|
9c5955feb0 | ||
|
|
0764b180f7 | ||
|
|
b883e4e4fe | ||
|
|
f78688b684 | ||
|
|
097cd5e2ca | ||
|
|
cd4836ae99 | ||
|
|
f0acf179c2 | ||
|
|
836ad12c40 | ||
|
|
a147fa3100 | ||
|
|
4f0cf44e78 | ||
|
|
2417647110 | ||
|
|
982cd7bde2 | ||
|
|
d6bd289fcf | ||
|
|
a68a05a838 | ||
|
|
95504547df | ||
|
|
ceb2a70664 | ||
|
|
8593a1975c | ||
|
|
ba44e61733 | ||
|
|
845652cbfe | ||
|
|
ceafa06efc | ||
|
|
e6f487474b | ||
|
|
d8461bb44f | ||
|
|
e25d366728 | ||
|
|
2abf0b98ac | ||
|
|
0f087d13bb | ||
|
|
2e914c61d1 | ||
|
|
3f599d5a28 | ||
|
|
6ef1f73d4d | ||
|
|
38b84baf9d | ||
|
|
fae50c0e19 | ||
|
|
50f7e2084c | ||
|
|
67cc5402cf | ||
|
|
2259d4f309 | ||
|
|
f8d903e7d2 | ||
|
|
805cde8ae8 | ||
|
|
b23906e327 | ||
|
|
2052afdb66 | ||
|
|
d9c7a40d4a | ||
|
|
48d9b2bc98 | ||
|
|
939bf588b3 | ||
|
|
cb2e017bcf | ||
|
|
d91fbf5d36 | ||
|
|
9859e43be7 | ||
|
|
306fec6f9e | ||
|
|
3e8b3e868b | ||
|
|
9261d9c5b2 | ||
|
|
f97941f86e | ||
|
|
a4810bd6c8 | ||
|
|
93cbba218a | ||
|
|
e749346f0c | ||
|
|
a658883664 | ||
|
|
d94c10014f | ||
|
|
45629386bb | ||
|
|
ffec9d64d5 | ||
|
|
3e9f17af86 | ||
|
|
03ff2fc007 | ||
|
|
4492c00840 | ||
|
|
e15319ac9b | ||
|
|
fa012aefe1 | ||
|
|
e681d2d24d | ||
|
|
76e54762d8 | ||
|
|
3b7d517be2 | ||
|
|
f4da64e3fa | ||
|
|
384acf8e31 | ||
|
|
a423451383 | ||
|
|
66cfceedaf | ||
|
|
fe9107fa9d | ||
|
|
e4f2db54e7 | ||
|
|
2f5fe01ae0 | ||
|
|
1bb7bd0abc | ||
|
|
a84ec88bc3 | ||
|
|
4a2e78081a | ||
|
|
d09d2cb445 | ||
|
|
1faa585e83 | ||
|
|
7479c82691 | ||
|
|
cfab2236da | ||
|
|
d2ee344b22 | ||
|
|
b22737223e | ||
|
|
578158c060 | ||
|
|
8eda0f78f7 | ||
|
|
2c2c82dc1a | ||
|
|
d8c9522ec9 | ||
|
|
492aef2165 | ||
|
|
fc0409e967 | ||
|
|
8a89b57e48 | ||
|
|
0f6b9ba181 | ||
|
|
8f1b4004c9 | ||
|
|
bee5250940 | ||
|
|
c61a2e6ba2 | ||
|
|
d293bb9672 | ||
|
|
9fb3f4c9a3 | ||
|
|
9a60441e54 | ||
|
|
a61b028e97 | ||
|
|
29cf728fac | ||
|
|
3c78c5c57d | ||
|
|
7f3f332821 | ||
|
|
38576082fb | ||
|
|
4a4b5661f2 | ||
|
|
1e879dc432 | ||
|
|
e29bdd09c5 | ||
|
|
f3c8ff19b9 | ||
|
|
fdd19632bf | ||
|
|
74b082760d | ||
|
|
4460fa608b | ||
|
|
949192c570 | ||
|
|
4fa0ca2304 | ||
|
|
d9d2f043fa | ||
|
|
1ea51f29c5 | ||
|
|
b0653416f6 | ||
|
|
efc4a513ce | ||
|
|
b13793b2a4 | ||
|
|
e102d218ff | ||
|
|
20cdec33fb | ||
|
|
12d4a6d291 | ||
|
|
d2b1ff595d | ||
|
|
03d79fba16 | ||
|
|
989c29f7a0 | ||
|
|
8a79c0a4e0 | ||
|
|
307c333c50 | ||
|
|
3ce8b9f09c | ||
|
|
4dbe637510 | ||
|
|
c0e97e7f43 | ||
|
|
37fc64e97d | ||
|
|
ca93f08230 | ||
|
|
3581ce811c | ||
|
|
b4570cbdaa | ||
|
|
f2dc344bf8 | ||
|
|
c0654448f0 | ||
|
|
2bf3912633 | ||
|
|
4d71fb8409 | ||
|
|
8543a099f4 | ||
|
|
9c6ec02b18 | ||
|
|
bb9118ee32 | ||
|
|
0411c40fae | ||
|
|
68cb96ab97 | ||
|
|
0159b8d0a3 | ||
|
|
aea3b49a51 | ||
|
|
1a6f775cc3 | ||
|
|
ddd192fad0 | ||
|
|
2e4fb32dac | ||
|
|
7d6e210625 | ||
|
|
3ca42ce42f | ||
|
|
e4e40cf049 | ||
|
|
d4f912e3b0 | ||
|
|
eec4443c95 | ||
|
|
b938c75892 | ||
|
|
455cb9ca24 | ||
|
|
24e7f5f864 | ||
|
|
298fa36c5d | ||
|
|
d31e9c5b55 | ||
|
|
30f53f398f | ||
|
|
eee217deec | ||
|
|
1847aac223 | ||
|
|
487ef6f1b9 | ||
|
|
14be968089 | ||
|
|
9f678263d0 | ||
|
|
a554b886c6 | ||
|
|
f2d68b075c | ||
|
|
dc24de3501 | ||
|
|
d2c73f072e | ||
|
|
96bc7f7aa6 | ||
|
|
bd48b24000 | ||
|
|
a26867bbdb | ||
|
|
8d570b7ba3 | ||
|
|
96f5a8adb3 | ||
|
|
3b34f0a972 | ||
|
|
fe5a0b7c64 | ||
|
|
2aa5324225 | ||
|
|
22f50402fe | ||
|
|
4e2f1bcf2b | ||
|
|
ca34b0c8d6 | ||
|
|
0df5ef996c | ||
|
|
4c0ea2695e | ||
|
|
48556ca428 | ||
|
|
cb0667921e | ||
|
|
52ab27a825 | ||
|
|
5db50bbaff | ||
|
|
416da7cdc8 | ||
|
|
f47057e800 | ||
|
|
090559a766 | ||
|
|
1a6a3de443 | ||
|
|
0293fbfe99 | ||
|
|
ecfb52eabe | ||
|
|
999e1a525e | ||
|
|
ef530c2f7d | ||
|
|
3e5d1a436c | ||
|
|
38b89093fa | ||
|
|
224ce007e1 | ||
|
|
2800685cfc | ||
|
|
962eb531ff | ||
|
|
07e1ca40a4 | ||
|
|
c479d9d706 | ||
|
|
338fbfbeaf | ||
|
|
5ca12bb421 | ||
|
|
6c94e0c9bf | ||
|
|
83d0f6bb50 | ||
|
|
0241d7fe00 | ||
|
|
7e06fc986f | ||
|
|
3f5328371a | ||
|
|
148fcc8dab | ||
|
|
72a67d306f | ||
|
|
0dcdcc3da1 | ||
|
|
729c60c9b0 | ||
|
|
1b418caf6b | ||
|
|
d275db9bb4 | ||
|
|
21cfd7c361 | ||
|
|
5d8bb3223f | ||
|
|
5e1f943a38 | ||
|
|
612431c1f1 | ||
|
|
fca7b4a837 | ||
|
|
02ce2ff5ec | ||
|
|
d2bab80b29 | ||
|
|
667a8bb166 | ||
|
|
76a18d001f | ||
|
|
78ab90c1a6 | ||
|
|
45b9aeb85a | ||
|
|
d580306b8a | ||
|
|
102e944fd5 | ||
|
|
04385d9700 | ||
|
|
7ef2da5922 | ||
|
|
5638709670 | ||
|
|
3748896ebc | ||
|
|
79988dea3d | ||
|
|
4409a5848f | ||
|
|
07c13636fc | ||
|
|
51cc706b1e | ||
|
|
54bd31c80a | ||
|
|
61534d7356 | ||
|
|
9bd4a933cf | ||
|
|
e233635783 | ||
|
|
da24ba20c7 | ||
|
|
74bdabc636 | ||
|
|
4b129314d3 | ||
|
|
3a55972997 | ||
|
|
6e04e4171e | ||
|
|
db67176eca | ||
|
|
0b7a4ff4e0 | ||
|
|
02feb3ad5c | ||
|
|
49f13d2a59 | ||
|
|
cccfaaabfd | ||
|
|
eadbe9c2e5 | ||
|
|
9bbabcee06 | ||
|
|
7ca6fa6772 | ||
|
|
6317e9c510 | ||
|
|
0a80985771 | ||
|
|
548d52cc60 | ||
|
|
11c6c69a00 | ||
|
|
08025d2da3 | ||
|
|
4169e7bd71 | ||
|
|
bfb7a6b08d | ||
|
|
58abb0d4c3 | ||
|
|
9658279cb1 | ||
|
|
83bb908ff0 | ||
|
|
515c18c855 | ||
|
|
d1a6394e52 | ||
|
|
6f4e387061 | ||
|
|
33ef566fd2 | ||
|
|
eeecd954e2 | ||
|
|
ccb804a4ed | ||
|
|
a21029ee9e | ||
|
|
ccc90842a7 | ||
|
|
dc069d7bb5 | ||
|
|
f4a827dfc2 | ||
|
|
4f3232b6cc | ||
|
|
7393eb728c | ||
|
|
1e715f8cd7 | ||
|
|
d6b838f7cb | ||
|
|
7aadc77a69 | ||
|
|
8fb1775606 | ||
|
|
fab7635373 | ||
|
|
b29ca13916 | ||
|
|
27e1406e6d | ||
|
|
796204d376 | ||
|
|
e13ba89f1a | ||
|
|
acabd1a03e | ||
|
|
c08aae2622 | ||
|
|
68ae880979 | ||
|
|
d8b2134aef | ||
|
|
c168832f8e | ||
|
|
448a603a56 | ||
|
|
2a95201c6d | ||
|
|
a73de55f96 | ||
|
|
e4a4496be6 | ||
|
|
a8f3a8dfb0 | ||
|
|
e19b9d1c60 | ||
|
|
e28ec4e7cb | ||
|
|
d0f09b467b | ||
|
|
3eba512ad4 | ||
|
|
c99115d552 | ||
|
|
bf6c682cc1 | ||
|
|
dc2f0b5707 | ||
|
|
58de672915 | ||
|
|
9488d98cfd | ||
|
|
906b8165d3 | ||
|
|
16b5037486 | ||
|
|
359befd857 | ||
|
|
74c8325987 | ||
|
|
e30efbfe6c | ||
|
|
5d4bb0f5ce | ||
|
|
e63777c7d6 | ||
|
|
279dfcafc4 | ||
|
|
a34ca05bff | ||
|
|
bcec8b98f7 | ||
|
|
af9ffc1f6f | ||
|
|
18816453f4 | ||
|
|
1eb8a75058 | ||
|
|
5abf42fe75 | ||
|
|
1306a233b8 | ||
|
|
46f8c6b7a5 | ||
|
|
face5cf447 | ||
|
|
603267b753 | ||
|
|
7cf3113d67 | ||
|
|
397fa962b1 | ||
|
|
d2637ab71f | ||
|
|
a6e020adeb | ||
|
|
d50dcac0c0 | ||
|
|
dd6bc23a8e | ||
|
|
71575f5cf8 | ||
|
|
3685502edf | ||
|
|
9899747a7f | ||
|
|
d2a415380d | ||
|
|
dd7ffd7dfe | ||
|
|
770f9af5e1 | ||
|
|
c2ab5be8b8 | ||
|
|
b8ae656968 | ||
|
|
553b61e1f5 | ||
|
|
f87bcef079 | ||
|
|
c3458afe2b | ||
|
|
17bc8a4a36 | ||
|
|
b04f017ab6 | ||
|
|
083ddb6396 | ||
|
|
c3129742c3 | ||
|
|
877bd640f3 | ||
|
|
3233df9c6c | ||
|
|
9ad5f5189c | ||
|
|
c7718dea79 | ||
|
|
fa3dcdb24f | ||
|
|
311258dda0 | ||
|
|
a0f8816de7 | ||
|
|
c546b6225c | ||
|
|
f6c6621af8 | ||
|
|
5a0fb59b26 | ||
|
|
07c52e6af5 | ||
|
|
405c566038 | ||
|
|
78780799ea | ||
|
|
82b9457aa7 | ||
|
|
4e6abb39dd | ||
|
|
14400097dd | ||
|
|
c44c0e10c1 | ||
|
|
bbf49db184 | ||
|
|
15787a97bb | ||
|
|
b76ce23ed2 | ||
|
|
d6c5066bfd | ||
|
|
60783d7109 | ||
|
|
db525f15da | ||
|
|
f33daf6bee | ||
|
|
d13928b394 | ||
|
|
5613a0d173 | ||
|
|
aa38586f82 | ||
|
|
d2b1ceb641 | ||
|
|
9dd7e9a25f | ||
|
|
1648273ddd | ||
|
|
3f90e4f12a | ||
|
|
2b9d565f0c | ||
|
|
70af63cc94 | ||
|
|
64b92881f9 | ||
|
|
be5ea069ad | ||
|
|
71e9357114 | ||
|
|
e28f86ac32 | ||
|
|
f97fe4bd65 | ||
|
|
3d0ac03f06 | ||
|
|
094132b7d3 | ||
|
|
51b9c9ae5a | ||
|
|
d31941ef13 | ||
|
|
48db826142 | ||
|
|
32b62d19ff | ||
|
|
e4f2961129 | ||
|
|
eba09dfad2 | ||
|
|
d9b72fcae6 | ||
|
|
6f17e7f735 | ||
|
|
047b82acc0 | ||
|
|
5347039d75 | ||
|
|
edc8095577 | ||
|
|
06f69723c2 | ||
|
|
8218fd4f57 | ||
|
|
6ee22edac5 | ||
|
|
37215ef1f4 | ||
|
|
a2eb2222b9 | ||
|
|
d63b4d9463 | ||
|
|
3bd85c20bc | ||
|
|
f70063c7d8 | ||
|
|
a2f7dd7408 | ||
|
|
147014d43a | ||
|
|
9460d1e9a1 | ||
|
|
b3a9a6b59a | ||
|
|
69f7d669c8 | ||
|
|
74a68b1462 | ||
|
|
006ea90493 | ||
|
|
aede063266 | ||
|
|
5aaeff4c5d | ||
|
|
5f80d6c18d | ||
|
|
7c59c9e6ec | ||
|
|
aae83b3235 | ||
|
|
520165128a | ||
|
|
556ced63cf | ||
|
|
063bf830ff | ||
|
|
7fd3bd412c | ||
|
|
47b9508af2 | ||
|
|
417c44aad0 | ||
|
|
1fefa0a99a | ||
|
|
06db4d2b62 | ||
|
|
bf7fc12a8d | ||
|
|
395daf57fa | ||
|
|
97219b7a84 | ||
|
|
0d5d677eff | ||
|
|
3bd6c99a3b | ||
|
|
1d2d8d58db | ||
|
|
9909b002fe | ||
|
|
ccda1ef104 | ||
|
|
52a882bda2 | ||
|
|
177c60e857 | ||
|
|
0566b96738 | ||
|
|
f72c179f56 | ||
|
|
0da963c794 | ||
|
|
7d885f7100 | ||
|
|
c1c2f794e3 | ||
|
|
8bb1c7a032 | ||
|
|
804123afc1 | ||
|
|
8e4f278ce4 | ||
|
|
3193241b11 | ||
|
|
edb44fa6a2 | ||
|
|
66e9ac3657 | ||
|
|
87e0796bf4 | ||
|
|
6bc6db3665 | ||
|
|
2a4aa51373 | ||
|
|
e15b052570 | ||
|
|
629e249a12 | ||
|
|
86a260bb89 | ||
|
|
6ab2de2787 | ||
|
|
8effdc1615 | ||
|
|
561fc2d01a | ||
|
|
3fd9cf573b | ||
|
|
d7c0bed4eb | ||
|
|
afd1f595e1 | ||
|
|
f47a43df2f | ||
|
|
4385327101 | ||
|
|
4e73c05ef9 | ||
|
|
c01ef035a5 | ||
|
|
b59c080943 | ||
|
|
814c65b290 | ||
|
|
9f1c1c3f18 | ||
|
|
e0df7dfba5 | ||
|
|
220db7212f | ||
|
|
d59f45a26a | ||
|
|
f88d92ecee | ||
|
|
c28188b6d8 | ||
|
|
80419748db | ||
|
|
874e6cd5af | ||
|
|
cd500fc344 | ||
|
|
ae7afc5749 | ||
|
|
b0fa94c781 | ||
|
|
9bf717fae9 | ||
|
|
859c1020e6 | ||
|
|
9108d64820 | ||
|
|
e9d3c1a421 | ||
|
|
f36e069f40 | ||
|
|
1f5c7b1d12 | ||
|
|
94ecb9e634 | ||
|
|
b9db67bc08 | ||
|
|
c152799295 | ||
|
|
f91165857d | ||
|
|
29b93f02f1 | ||
|
|
f9a6452528 | ||
|
|
e7e51957e9 | ||
|
|
f8903e7ce7 | ||
|
|
d3548a4dfb | ||
|
|
eca72c6dc6 | ||
|
|
6e378f4de6 | ||
|
|
94ac52d792 | ||
|
|
1f276a7eb6 | ||
|
|
a28a590078 | ||
|
|
91d052d25e | ||
|
|
2f6ded132d | ||
|
|
51cdc1ce90 | ||
|
|
494fe0b1e7 | ||
|
|
eac5310f5e | ||
|
|
7f4a2f9943 | ||
|
|
28a31301d4 | ||
|
|
1c5e575718 | ||
|
|
4a2d6b2241 | ||
|
|
001baec444 | ||
|
|
1b35d4f03b | ||
|
|
75fc8cb766 | ||
|
|
28bef8c54f | ||
|
|
787973a3d5 | ||
|
|
f0e3ca7c1f | ||
|
|
1b837a81ef | ||
|
|
b74dd85ef2 | ||
|
|
fc9cc62b12 | ||
|
|
e665edb652 | ||
|
|
e81cde8753 | ||
|
|
4e995436c5 | ||
|
|
c57154a8e5 | ||
|
|
31fbba057a | ||
|
|
46fa6e7ba4 | ||
|
|
bbb0379813 | ||
|
|
156b63440e | ||
|
|
20e062b031 | ||
|
|
c98ebc9f35 | ||
|
|
c6001c7bf6 | ||
|
|
2d0945264f | ||
|
|
3d0981cf7b | ||
|
|
cce581fa51 | ||
|
|
2446b804c7 | ||
|
|
20cdb1c5ec | ||
|
|
212b184320 | ||
|
|
37e98f342c | ||
|
|
578f5b85dd | ||
|
|
99b1e3f969 | ||
|
|
8c9ef0e8f3 | ||
|
|
f91d3ccf24 | ||
|
|
691063983e | ||
|
|
b912047f68 | ||
|
|
f2ddbf1e68 | ||
|
|
5cd36e55ab | ||
|
|
1cb590ebb8 | ||
|
|
280e937844 | ||
|
|
5afb55547d | ||
|
|
e3c91629db | ||
|
|
1b0496b1e7 | ||
|
|
b7369b40cb | ||
|
|
6567313de6 | ||
|
|
5ecf3cc36c | ||
|
|
71e3d89181 | ||
|
|
a284ece8e4 | ||
|
|
e73e75e740 | ||
|
|
9bfd61fabc | ||
|
|
a2aeaa51e8 | ||
|
|
b558c3db98 | ||
|
|
0f70bcbf28 | ||
|
|
f7c4600007 | ||
|
|
8910f073e5 | ||
|
|
ea18be1866 | ||
|
|
0bd687eb15 | ||
|
|
25b74bf3dd | ||
|
|
e4f9ca3f3c | ||
|
|
38a3f403bd | ||
|
|
51dd2030a0 | ||
|
|
7e31067e6a | ||
|
|
9bf06ff30b | ||
|
|
85aa726bb7 | ||
|
|
3a67ff3afa | ||
|
|
0a022a4348 | ||
|
|
ad24beea5b | ||
|
|
9026ae7a16 | ||
|
|
2fee9b861f | ||
|
|
b7e2bcf02e | ||
|
|
d548848b18 | ||
|
|
4c628ea74f | ||
|
|
d3ef97f637 | ||
|
|
02bd819f7e | ||
|
|
ea3b4ddeb0 | ||
|
|
ab3ea7475f | ||
|
|
b9b97d0a56 | ||
|
|
e19db23bb5 | ||
|
|
5ec1ca46e5 | ||
|
|
c2c918fdda | ||
|
|
4627989401 | ||
|
|
9552e09471 | ||
|
|
c8fb25066b | ||
|
|
b1cb6d42f4 | ||
|
|
caf7e4a1cf | ||
|
|
6a5c0223c4 | ||
|
|
9ff2d66079 | ||
|
|
2db2b9309d | ||
|
|
7a38c15d59 | ||
|
|
cb7375f873 | ||
|
|
41e52f9e88 | ||
|
|
ce7e30a752 | ||
|
|
3214811fcb | ||
|
|
edda2a5399 | ||
|
|
926bc8e72c | ||
|
|
eadffb6be3 | ||
|
|
cf04e8c23c | ||
|
|
ec5840f840 | ||
|
|
7dc4a7177d | ||
|
|
3d91de8178 | ||
|
|
6ea1abfedc | ||
|
|
5251482dd7 | ||
|
|
dd73787c8b | ||
|
|
340450a67e | ||
|
|
0d40989f4c | ||
|
|
c640096d9c | ||
|
|
76081869e3 | ||
|
|
9156c1b850 | ||
|
|
d78718d8f4 | ||
|
|
eef1e986a6 | ||
|
|
8fa99c34be | ||
|
|
a35fbdd1b5 | ||
|
|
0efef78684 | ||
|
|
62ce17cb4c | ||
|
|
6112be232a | ||
|
|
c1a9c58eb5 | ||
|
|
0393588fe8 | ||
|
|
b7ff0325ea | ||
|
|
c4d39eae25 | ||
|
|
0e88981425 | ||
|
|
ed7fcae33b | ||
|
|
8b967fb3b7 | ||
|
|
4d68a5dc2b | ||
|
|
ecd6ef40ef | ||
|
|
0c9dc33ff0 | ||
|
|
98c27fe8ef | ||
|
|
3d490f52b2 | ||
|
|
c78c17d953 | ||
|
|
ee5d667a24 | ||
|
|
b9653b4ff8 | ||
|
|
78bcfa8cfa | ||
|
|
1f1130efda | ||
|
|
3d7b05d633 | ||
|
|
343bbd8a1a | ||
|
|
f702df48f5 | ||
|
|
bc382366a1 | ||
|
|
c158144b7b | ||
|
|
d4337fbc56 | ||
|
|
e822d8e7d1 | ||
|
|
dc95b2e8d7 | ||
|
|
d226ad38ff | ||
|
|
2a160c5247 | ||
|
|
641a9dc4e2 | ||
|
|
7e71af8d25 | ||
|
|
8e33d2e1b2 | ||
|
|
61118b348c | ||
|
|
84faff82a2 | ||
|
|
d6cf7cc06f | ||
|
|
0688b94729 | ||
|
|
695f53194d | ||
|
|
1b963c9439 | ||
|
|
b50d6dd389 | ||
|
|
2afad9490e | ||
|
|
812a275add | ||
|
|
90ccf7699b | ||
|
|
31ed12d88a | ||
|
|
5a4e44d064 | ||
|
|
515c67fa3a | ||
|
|
81d60165a3 | ||
|
|
cc0fac3546 | ||
|
|
d71ad13fcf | ||
|
|
0d13811305 | ||
|
|
b69cc4e34a | ||
|
|
caf8f383ad | ||
|
|
7db160a8e2 | ||
|
|
202a3d1fb1 | ||
|
|
332135fc6f | ||
|
|
7e895f82b2 | ||
|
|
c5c61f7692 | ||
|
|
bd8a392882 | ||
|
|
36183e6dc8 | ||
|
|
5ae4af54da | ||
|
|
620bdd1419 | ||
|
|
c18eacbb81 | ||
|
|
bb8acc5f51 | ||
|
|
d41f4810d7 | ||
|
|
387c4edb3b | ||
|
|
c3fd7c1a7a | ||
|
|
94f1ec18de | ||
|
|
e00f8f6cee | ||
|
|
79b0a9c833 | ||
|
|
5e8e2f4b3a | ||
|
|
f0158dd915 | ||
|
|
10cf251b46 | ||
|
|
72231e5658 | ||
|
|
c510ff3b1c | ||
|
|
936e138fee | ||
|
|
8325696b55 | ||
|
|
d63f517ae5 | ||
|
|
e74df8db90 | ||
|
|
1a0bf67452 | ||
|
|
f0df9b399b | ||
|
|
f9345308ff | ||
|
|
6ed7c75448 | ||
|
|
cb71167fb7 | ||
|
|
d4292987cc | ||
|
|
5da24a18dc | ||
|
|
1cf7b3e697 | ||
|
|
3f3672497b | ||
|
|
7714304c7a | ||
|
|
ff640639b2 | ||
|
|
0965603c8f | ||
|
|
b8412cec96 | ||
|
|
86b7e192b2 | ||
|
|
32b9e6094b | ||
|
|
3ff7f3158b | ||
|
|
bd83ba8ca9 | ||
|
|
785881c90e | ||
|
|
567ccf8a59 | ||
|
|
11423a6d78 | ||
|
|
ab6b716e78 | ||
|
|
7b1be2e34f | ||
|
|
19d0d247b4 | ||
|
|
1074a9e1d2 | ||
|
|
0648f384bb | ||
|
|
58d72204cc | ||
|
|
067b4c260f | ||
|
|
9e7e4d5fe7 | ||
|
|
7d9609be76 | ||
|
|
7e510f8bc5 | ||
|
|
a16e009370 | ||
|
|
a021c497b6 | ||
|
|
e77159cb58 | ||
|
|
36ac353f1f | ||
|
|
58122bf023 | ||
|
|
c5da23bb02 | ||
|
|
fd45391616 | ||
|
|
11dd80e4e7 | ||
|
|
298f8ef842 | ||
|
|
4c45b9fb85 | ||
|
|
599cea3238 | ||
|
|
0c5685e9eb | ||
|
|
760b82fd63 | ||
|
|
340034adf7 | ||
|
|
d978bfd0db | ||
|
|
de9f9722ac | ||
|
|
4dd9dc03fe | ||
|
|
47fc4aa39a | ||
|
|
84ad608d70 | ||
|
|
d4dd0c9992 | ||
|
|
ac93d027af | ||
|
|
190a95584c | ||
|
|
9ad368e420 | ||
|
|
a524215479 | ||
|
|
6104c36455 | ||
|
|
a04287c9f6 | ||
|
|
99876e3f73 | ||
|
|
f16f498f27 | ||
|
|
4f9b5923bd | ||
|
|
84476cd51f | ||
|
|
bf9a6bde82 | ||
|
|
a6f8f57725 | ||
|
|
02f4c334f0 | ||
|
|
9884b294c6 | ||
|
|
49f22b5790 | ||
|
|
841270e824 | ||
|
|
630ce57303 | ||
|
|
94aed4d1d1 | ||
|
|
cdc0ec96a9 | ||
|
|
751188bcd8 | ||
|
|
c0c44d46bc | ||
|
|
19d8749abf | ||
|
|
c6f9fb2ac2 | ||
|
|
b1cfdfbc14 | ||
|
|
360df11aa6 | ||
|
|
d88cc3251f | ||
|
|
cd7079da92 | ||
|
|
77a0e8213b | ||
|
|
5efa778509 | ||
|
|
02e6463fae | ||
|
|
b411787fe7 | ||
|
|
8fd91194a7 | ||
|
|
4f85e1d603 | ||
|
|
fae0aeb442 | ||
|
|
ec77824a96 | ||
|
|
4127936eef | ||
|
|
ae829375a0 | ||
|
|
a1afcbc855 | ||
|
|
e1e3aa899d | ||
|
|
2644a3bf6e | ||
|
|
6b4e81e1ec | ||
|
|
c705a0f35a | ||
|
|
b1b3102b31 | ||
|
|
2d823d34f9 | ||
|
|
1bb9fb2c67 | ||
|
|
b90e3ce9da | ||
|
|
e04a074a79 | ||
|
|
f98c3311af | ||
|
|
1a8c44af27 | ||
|
|
a57089c1a9 | ||
|
|
87001f7e78 | ||
|
|
1fbb05c938 | ||
|
|
3eef9d3b62 | ||
|
|
af2adf0134 | ||
|
|
bbdfee8d33 | ||
|
|
2c4da83502 | ||
|
|
75f2868971 | ||
|
|
87d9ecc3c8 | ||
|
|
b637943bd9 | ||
|
|
0514475155 | ||
|
|
8cfb39e035 | ||
|
|
a9a7cb7be0 | ||
|
|
f8649a24aa | ||
|
|
ee5a860e07 | ||
|
|
e6f03c1136 | ||
|
|
780162f516 | ||
|
|
a6d32d834b | ||
|
|
cef3c7f032 | ||
|
|
07f8a532f9 | ||
|
|
352adf526a | ||
|
|
df48f9caf9 | ||
|
|
f611053d4f | ||
|
|
39011cd93b | ||
|
|
562cb8cebd | ||
|
|
89ae721421 | ||
|
|
f65f4b32e2 | ||
|
|
303fca6bcc | ||
|
|
4aba159ee8 | ||
|
|
5838e60bf6 | ||
|
|
527e436d57 | ||
|
|
60ede73ff8 | ||
|
|
298d5e95fc | ||
|
|
e9a68f0b7d | ||
|
|
d613cf4d4c | ||
|
|
3487fae95d | ||
|
|
9ee47a071b | ||
|
|
3579fc3dea | ||
|
|
921bff19f1 | ||
|
|
d07420eaeb | ||
|
|
8028db77d8 | ||
|
|
e49a059783 | ||
|
|
482b6e6844 | ||
|
|
aa70635919 | ||
|
|
c331b0fa89 | ||
|
|
fe55744de2 | ||
|
|
15e9d85a14 | ||
|
|
51043b61a1 | ||
|
|
6620d5fb26 | ||
|
|
f547020fc5 | ||
|
|
89ea473c3b | ||
|
|
b60d9d0be7 | ||
|
|
4fdb2174f0 | ||
|
|
06a48584d6 | ||
|
|
e9f9c1009d | ||
|
|
b66ceda525 | ||
|
|
7c9c28f026 | ||
|
|
72f0552ef1 | ||
|
|
877a1f15a9 | ||
|
|
efa2a68805 | ||
|
|
023209bb76 | ||
|
|
da5dcde6ee | ||
|
|
e92c5e1bf9 | ||
|
|
2b7c4ae76c | ||
|
|
ea26db2cbd | ||
|
|
b9e3747f99 | ||
|
|
4d608b7f37 | ||
|
|
9c42b77879 | ||
|
|
a2d0ea9d11 | ||
|
|
298b4d23e8 | ||
|
|
875adb17b1 | ||
|
|
9eb68bf052 | ||
|
|
8cec2dab82 | ||
|
|
5f58e7b343 | ||
|
|
28bb88e9b4 | ||
|
|
04455c9625 | ||
|
|
9853150e57 | ||
|
|
85c7216eaa | ||
|
|
a54384a579 | ||
|
|
19f1d8b847 | ||
|
|
8270b64624 | ||
|
|
81e3810c32 | ||
|
|
c266151071 | ||
|
|
27d55260e8 | ||
|
|
233583657e | ||
|
|
7bb1eed249 | ||
|
|
aa85fc3787 | ||
|
|
c9a88617b1 | ||
|
|
2f899fdfcc | ||
|
|
cdd2b6560e | ||
|
|
60f29edbca | ||
|
|
60cffe1ed1 | ||
|
|
e77e7d1643 | ||
|
|
5dc22f502e | ||
|
|
7a309c1175 | ||
|
|
9ce5baad9e | ||
|
|
a4aa9a76f2 | ||
|
|
befa25de5c | ||
|
|
83175d5c09 | ||
|
|
d8df8e8778 | ||
|
|
09957d0279 | ||
|
|
9e44985f56 | ||
|
|
b657a84699 | ||
|
|
5ec7835556 | ||
|
|
03a864156d | ||
|
|
c823bf3320 | ||
|
|
4f4d2f1f4c | ||
|
|
1bb389052d | ||
|
|
31fdc5bbc1 | ||
|
|
db3833430d | ||
|
|
6d2212d259 | ||
|
|
912c0e7fc4 | ||
|
|
43d232819a | ||
|
|
302eaf60b5 | ||
|
|
84535faa90 | ||
|
|
8c55d3c705 | ||
|
|
ec11b9268f | ||
|
|
a45af4a80c | ||
|
|
df627b6830 | ||
|
|
dfbeaf30ad | ||
|
|
a03f74b125 | ||
|
|
1a01f1299c | ||
|
|
91f0cdbaca | ||
|
|
e50bd4125d | ||
|
|
ded2c8a7c8 | ||
|
|
88ce9fc0a6 | ||
|
|
3c713248b3 | ||
|
|
75f3edcd92 | ||
|
|
081a7779a6 | ||
|
|
6e995207a6 | ||
|
|
3492b77aa0 | ||
|
|
e864901035 | ||
|
|
7ee6de6b6a | ||
|
|
553b8ccf6b | ||
|
|
bceef0b861 | ||
|
|
53cce6c6bb | ||
|
|
b95047d09f | ||
|
|
c6cb4375f5 | ||
|
|
a07e2b8eda | ||
|
|
98e7002167 | ||
|
|
3428dde3c6 | ||
|
|
13d48f982b | ||
|
|
b2e4dc27e4 | ||
|
|
deddeab049 | ||
|
|
c3a6410822 | ||
|
|
c5915091aa | ||
|
|
4401f0659e | ||
|
|
a0c72d32e8 | ||
|
|
1493045ec4 | ||
|
|
210efb2be7 | ||
|
|
a02fc1de63 | ||
|
|
7755bfc861 | ||
|
|
01172bca77 | ||
|
|
143cbc8587 | ||
|
|
b65f655a8a | ||
|
|
ed04c86369 | ||
|
|
c0eaa17eb3 | ||
|
|
6383a55038 | ||
|
|
574df60d58 | ||
|
|
61ee575cd3 | ||
|
|
bdd963081e | ||
|
|
6b908d7a14 | ||
|
|
7d0d70c094 | ||
|
|
e75c5a9248 | ||
|
|
b8ed5f4f1a | ||
|
|
660d7060e4 | ||
|
|
79c5f57714 | ||
|
|
606d8fbe55 | ||
|
|
edfa116a40 | ||
|
|
55ca0c712f | ||
|
|
16bef488ee | ||
|
|
82d784d9f8 | ||
|
|
103fb2dfc1 | ||
|
|
bba3e1810b | ||
|
|
af5333f63e | ||
|
|
ea77a5fb53 | ||
|
|
a4aef0894b | ||
|
|
bab7972518 | ||
|
|
88853a7aee | ||
|
|
d3339df853 | ||
|
|
385614b448 | ||
|
|
c47ba80f5d | ||
|
|
6de0700f49 | ||
|
|
d9fe52b1a1 | ||
|
|
ccfc476ec0 | ||
|
|
f518b3c48b | ||
|
|
81d52db722 | ||
|
|
df9973da99 | ||
|
|
ca4c779c66 | ||
|
|
7897352175 | ||
|
|
e0e75eac33 | ||
|
|
31d83dd26e | ||
|
|
698a0b811f | ||
|
|
f69609b403 | ||
|
|
56259e3476 | ||
|
|
f3dfa53f31 | ||
|
|
e10d60c08e | ||
|
|
ad4037351f | ||
|
|
f9e1da8c9f | ||
|
|
2f05137af7 | ||
|
|
c305e31c2e | ||
|
|
a55fabe4f9 | ||
|
|
c58848b298 | ||
|
|
ede644d3c4 | ||
|
|
4ff98e62a9 | ||
|
|
e87fd2fff6 | ||
|
|
33e8b10579 | ||
|
|
d11780f62d | ||
|
|
7706aa0bf0 | ||
|
|
cf96e10552 | ||
|
|
1d01e1e6cd | ||
|
|
a5c4759662 | ||
|
|
e7ff1d693b | ||
|
|
9b4354a057 | ||
|
|
51a46ba92c | ||
|
|
31c4e0d59f | ||
|
|
6b246548c3 | ||
|
|
57dda3843a | ||
|
|
b04ac14751 | ||
|
|
5ad8497db2 | ||
|
|
672f07a5ee | ||
|
|
aceffafc4e | ||
|
|
891b3183ed | ||
|
|
26dd066280 | ||
|
|
157ebdb5fe | ||
|
|
1a18839f82 | ||
|
|
e7f8e7628f | ||
|
|
07190571a1 | ||
|
|
f04d922fca | ||
|
|
7fa382d4e9 | ||
|
|
97766710c0 | ||
|
|
994ee060a7 | ||
|
|
589c27fdcf | ||
|
|
37a018fda4 | ||
|
|
f49381d1c5 | ||
|
|
573095bbad | ||
|
|
0fdcc8e288 | ||
|
|
03d7e26c3d | ||
|
|
3a5cd835ad | ||
|
|
47a8f081e9 | ||
|
|
ad8d691c11 | ||
|
|
8186696e62 | ||
|
|
183ec22923 | ||
|
|
5376995350 | ||
|
|
acb6e30fad | ||
|
|
fe0dabb177 | ||
|
|
194ae46ce8 | ||
|
|
2e9f1bfe90 | ||
|
|
a82adc4948 | ||
|
|
6440c70a38 | ||
|
|
748eb07c9a | ||
|
|
5be2f591d2 | ||
|
|
f2e4950e89 | ||
|
|
7444c5b826 | ||
|
|
5f6cca68cc | ||
|
|
3d33e5351b | ||
|
|
c6e245450d | ||
|
|
36854a16b7 | ||
|
|
b4ee8229ee | ||
|
|
cf0a3841e8 | ||
|
|
3ebd2257f8 | ||
|
|
844d1967cc | ||
|
|
dac37f8938 | ||
|
|
dd74bc7c2b | ||
|
|
7eec58a834 | ||
|
|
da81998c71 | ||
|
|
d1552e7b71 | ||
|
|
c64e10083b | ||
|
|
43e2be58da | ||
|
|
63b60d2546 | ||
|
|
91ddc709eb | ||
|
|
1bcb67ffb9 | ||
|
|
976177c244 | ||
|
|
a37c81a142 | ||
|
|
58de3a35a0 | ||
|
|
44b8a8a0d8 | ||
|
|
b0f5f4338f | ||
|
|
6457847633 | ||
|
|
69d47a5e53 | ||
|
|
02177a7794 | ||
|
|
65c15126f1 | ||
|
|
76c78b8e63 | ||
|
|
f63342ff0f | ||
|
|
e3410cf34c | ||
|
|
7a129047e7 | ||
|
|
343716b7da | ||
|
|
1687fb9120 | ||
|
|
3e89057c23 | ||
|
|
774587efa6 | ||
|
|
2dc8bf321e | ||
|
|
992813d770 | ||
|
|
46882dee93 | ||
|
|
8bbb7b540f | ||
|
|
f5f1ab036d | ||
|
|
f15d556c05 | ||
|
|
570a664db8 | ||
|
|
52f69324d9 | ||
|
|
ea6016b1ba | ||
|
|
30fcffd63c | ||
|
|
50446bbde4 | ||
|
|
b307033aab | ||
|
|
3e5985833c | ||
|
|
8421f02aab | ||
|
|
b6daafec17 | ||
|
|
fc058b669e | ||
|
|
99214b98b9 | ||
|
|
ab35a44ed9 | ||
|
|
125b82a5bb | ||
|
|
f294ea157f | ||
|
|
486ae052ef | ||
|
|
53b5442dad | ||
|
|
507c5f75bd | ||
|
|
0fb72c579e | ||
|
|
c5d6ac63c5 | ||
|
|
a934c76263 | ||
|
|
0098c3bbc0 | ||
|
|
f3eedc03e6 | ||
|
|
17c71a2528 | ||
|
|
d2ecbd7c6e | ||
|
|
2ce7dc0c37 | ||
|
|
b648424c18 | ||
|
|
301754c857 | ||
|
|
c9a3c4c9b8 | ||
|
|
ce0c8b363a | ||
|
|
9d6c38004c | ||
|
|
19a58cc8c6 | ||
|
|
d855c39da2 | ||
|
|
03f4bfecc1 | ||
|
|
c8d9e4c7b3 | ||
|
|
cb2b8f2e7c | ||
|
|
0272dd4c24 | ||
|
|
3b327937c2 | ||
|
|
f8f2f17184 | ||
|
|
2efaebcf89 | ||
|
|
150c695979 | ||
|
|
6fe87ab05a | ||
|
|
f6613a5555 | ||
|
|
947d5c2739 | ||
|
|
1544706ff4 | ||
|
|
e121d1a8a1 | ||
|
|
badbdbf03f | ||
|
|
3b5495b53a | ||
|
|
545027ae64 | ||
|
|
91896433f8 | ||
|
|
a60074fc8a | ||
|
|
eb82aa14bb | ||
|
|
cb4b640730 | ||
|
|
266d9a3c71 | ||
|
|
7a5a704a15 | ||
|
|
29ed8de935 | ||
|
|
3418cab5de | ||
|
|
e2ce015d49 | ||
|
|
0d0ab3f414 | ||
|
|
22b5bcc7e1 | ||
|
|
34d5d73d7e | ||
|
|
7ae4441731 | ||
|
|
d0b7f6203c | ||
|
|
3757f3ae57 | ||
|
|
8f9366da5a | ||
|
|
b8e55f87a9 | ||
|
|
b469f70e02 | ||
|
|
6df69b24db | ||
|
|
0133a5eb23 | ||
|
|
86712c2c48 | ||
|
|
5195caa3c6 | ||
|
|
684ad38d4b | ||
|
|
c6d292a3d7 | ||
|
|
246414a735 | ||
|
|
429bcffaf8 | ||
|
|
d92e7b138c | ||
|
|
cd51ad2a25 | ||
|
|
8732825404 | ||
|
|
fc37cdcc95 | ||
|
|
2435ec9515 | ||
|
|
623fab8ea8 | ||
|
|
e063345c4b | ||
|
|
27533a1dcd | ||
|
|
d232e0e2c6 | ||
|
|
0475489e24 | ||
|
|
34b35db27f | ||
|
|
b47bc12e48 | ||
|
|
4d102dcf68 | ||
|
|
a8c9663200 | ||
|
|
57660cc5af | ||
|
|
c459e918af | ||
|
|
962abba1b2 | ||
|
|
5297d18f92 | ||
|
|
7853e48a6f | ||
|
|
303d87f69d | ||
|
|
9dcdc9500d | ||
|
|
7723bafff6 | ||
|
|
d74a89c6c1 | ||
|
|
cce443be0b | ||
|
|
81fa3d27bf | ||
|
|
493091cd66 | ||
|
|
c75f5ee961 | ||
|
|
083e0ca2e0 | ||
|
|
79bd89016c | ||
|
|
eca7e38763 | ||
|
|
b5cbfb970f | ||
|
|
74e1cafd9d | ||
|
|
ee7381b67d | ||
|
|
7f93bc305d | ||
|
|
c7931ca69c | ||
|
|
90f06a3289 | ||
|
|
0e344a7e02 | ||
|
|
3f91a4e908 | ||
|
|
fb443c58ab | ||
|
|
b233514b58 | ||
|
|
11615171d1 | ||
|
|
2df4738af2 | ||
|
|
9e62f5bd52 | ||
|
|
80349ae8ee | ||
|
|
06d51f2648 | ||
|
|
fcc810f703 | ||
|
|
d6d70e1525 | ||
|
|
e5f79e061c | ||
|
|
ad3c0a1ffd | ||
|
|
2ef935198a | ||
|
|
dc3b9c648a | ||
|
|
2d610d40b6 | ||
|
|
d2c686f48b | ||
|
|
5cafec3262 | ||
|
|
580c42d167 | ||
|
|
dcfec35e57 | ||
|
|
701bac6e11 | ||
|
|
0c46d593d8 | ||
|
|
b867de0667 | ||
|
|
e207b75c7a | ||
|
|
fc3df5bfe4 | ||
|
|
dfb05b9d39 | ||
|
|
19702daecd | ||
|
|
dde4b4df3b | ||
|
|
c070930a8c | ||
|
|
d36b5f7c59 | ||
|
|
0e517907ce | ||
|
|
739e9716ab | ||
|
|
0e5972d895 | ||
|
|
71975658ca | ||
|
|
6572e29a64 | ||
|
|
41b21c2a0c | ||
|
|
2b19d2e6de | ||
|
|
f99aa3459c | ||
|
|
5bce9d5abf | ||
|
|
abe102649e | ||
|
|
424fcdc63a | ||
|
|
a3fd451c74 | ||
|
|
731fd113d2 | ||
|
|
c9ca1bda5c | ||
|
|
58ea822050 | ||
|
|
671484d6f9 | ||
|
|
e6e74194bc | ||
|
|
04432c8368 | ||
|
|
6782876c0c | ||
|
|
4b09e92d7c | ||
|
|
3266f64fb9 | ||
|
|
2a9886e698 | ||
|
|
1319e3a811 | ||
|
|
6cbb40f874 | ||
|
|
07fd6a3ad4 | ||
|
|
8891869013 | ||
|
|
04fc735e12 | ||
|
|
7b9860f1be | ||
|
|
38f26a2bd8 | ||
|
|
a9750f8cff | ||
|
|
ad86e7f34a | ||
|
|
496435ef3b | ||
|
|
5275b31e7e | ||
|
|
e341991703 | ||
|
|
fb65496507 | ||
|
|
abe52ba440 | ||
|
|
ee5d097201 | ||
|
|
0ea182d04f | ||
|
|
8d737c96c9 | ||
|
|
5c93b90c2e | ||
|
|
41bee850da | ||
|
|
416c2a9e9d | ||
|
|
8fa9fccc79 | ||
|
|
c5a4071a06 | ||
|
|
930e48ad39 | ||
|
|
868678f321 | ||
|
|
8530b6512c | ||
|
|
2a5f487e5f | ||
|
|
141f6c51dc | ||
|
|
1fc9492b30 | ||
|
|
65782d3d75 | ||
|
|
b5cb6dfb9d | ||
|
|
6667e4b8bc | ||
|
|
5e2492a930 | ||
|
|
4f07372e0f | ||
|
|
80a1a97083 | ||
|
|
204476c55d | ||
|
|
8fab258778 | ||
|
|
12059955e5 | ||
|
|
3ca1f957ba | ||
|
|
b11362aec1 | ||
|
|
75630df10e | ||
|
|
4d93abb7ac | ||
|
|
731943f980 | ||
|
|
265dc1f296 | ||
|
|
c449ffcc98 | ||
|
|
34500d32d0 | ||
|
|
d3e5dfc346 | ||
|
|
8ed11107eb | ||
|
|
2f51108783 | ||
|
|
2667a66419 | ||
|
|
0fd073f2f0 | ||
|
|
840cf4e00a | ||
|
|
d5d99f94b7 | ||
|
|
dea19e4416 | ||
|
|
f7612d7398 | ||
|
|
e39182607e | ||
|
|
79f1febbce | ||
|
|
120def9676 | ||
|
|
82562bc20d | ||
|
|
1c51361120 | ||
|
|
c07e79deb7 | ||
|
|
81cb1111b4 | ||
|
|
369307181e | ||
|
|
7881e04e6b | ||
|
|
66a72eb1be | ||
|
|
ad77f11859 | ||
|
|
96d177876f | ||
|
|
dc7392f86b | ||
|
|
6f6252b6f8 | ||
|
|
20b32df2c6 | ||
|
|
d413d02bf7 | ||
|
|
426c0366cc | ||
|
|
d3d3655580 | ||
|
|
d4a011ee6d | ||
|
|
b08118734e | ||
|
|
41ee6de784 | ||
|
|
139d2e6be8 | ||
|
|
a866461b0a | ||
|
|
6f61331d46 | ||
|
|
7731ca9fb2 | ||
|
|
3de0c4f5d8 | ||
|
|
2e602f8861 | ||
|
|
1a7d92a082 | ||
|
|
5aa2a0c821 | ||
|
|
4f2328b8dc | ||
|
|
e929e524a3 | ||
|
|
e6b9f18d3d | ||
|
|
7f197ef84e | ||
|
|
a9d7ca3332 | ||
|
|
a65e586de5 | ||
|
|
7072a50060 | ||
|
|
fc1a367c2e | ||
|
|
3b376d85d4 | ||
|
|
9aca8438a2 | ||
|
|
c2d37dfb61 | ||
|
|
3c3bd0f0ea | ||
|
|
958db336b7 | ||
|
|
342d570b3b | ||
|
|
67457c25df | ||
|
|
a98d46f8a8 | ||
|
|
b2fca84b15 | ||
|
|
2e31169738 | ||
|
|
4cda2c8093 | ||
|
|
73b4e8a988 | ||
|
|
82dbfb4379 | ||
|
|
0e2ff2390a | ||
|
|
220d5db739 | ||
|
|
212d475f50 | ||
|
|
b7fbd0433f | ||
|
|
d28dd96aa0 | ||
|
|
0e46f91c51 | ||
|
|
d6dabacb05 | ||
|
|
4363473955 | ||
|
|
7e5fd4e290 | ||
|
|
c30a0cd4f1 | ||
|
|
98d56a38f5 | ||
|
|
f26e95e7c9 | ||
|
|
f39e1a9b70 | ||
|
|
1d5b531ba3 | ||
|
|
a90bd08405 | ||
|
|
1cbb726cab | ||
|
|
ce61d00dcf | ||
|
|
2d92b798c6 | ||
|
|
cc62164a7c | ||
|
|
af510bce93 | ||
|
|
4ba60bedcd | ||
|
|
583bf26129 | ||
|
|
d8c3623141 | ||
|
|
2cd0875da6 | ||
|
|
73d0848f7e | ||
|
|
d757e82e3f | ||
|
|
007238e7dd | ||
|
|
944e019020 | ||
|
|
634f8897b4 | ||
|
|
7651d31c50 | ||
|
|
1702873ab1 | ||
|
|
44e7d5249c | ||
|
|
8ab37040db | ||
|
|
ac203b0ccb | ||
|
|
557546c9c3 | ||
|
|
52a94dbe78 | ||
|
|
f4ffc19981 | ||
|
|
ac3c117b03 | ||
|
|
1ac008ab02 | ||
|
|
58ac86e3bf | ||
|
|
1daf06858b | ||
|
|
a4e8ce7f01 | ||
|
|
ed6e16cdce | ||
|
|
57bb92a36c | ||
|
|
142540e263 | ||
|
|
5a17430747 | ||
|
|
23c84a9e96 | ||
|
|
6bb9dcc216 | ||
|
|
1901e4dbdc | ||
|
|
1657f769da | ||
|
|
c82eb489fe | ||
|
|
9f05befd70 | ||
|
|
f274ed3fd8 | ||
|
|
f6e027abcb | ||
|
|
a92114a854 | ||
|
|
ffb84705d3 | ||
|
|
2f8366b6f9 | ||
|
|
a6f062c126 | ||
|
|
41c24f3bc9 | ||
|
|
af40bdb11b | ||
|
|
00a69e6aed | ||
|
|
04b2d784ce | ||
|
|
a5de51b039 | ||
|
|
4a80e9f20f | ||
|
|
8676769a8f | ||
|
|
2f8c7a81ca | ||
|
|
ac11af6048 | ||
|
|
7c558802a4 | ||
|
|
5a516aa1ad | ||
|
|
4d1b6ed974 | ||
|
|
e8e6bb0499 | ||
|
|
58f94666d1 | ||
|
|
085efaa605 | ||
|
|
6028e392f0 | ||
|
|
fa67dd74a0 | ||
|
|
cb734b50c3 | ||
|
|
087e58b88b | ||
|
|
78b9d67aaa | ||
|
|
a6015e4647 | ||
|
|
fcbe95447a | ||
|
|
760fe392a8 | ||
|
|
5dab606980 | ||
|
|
c265575dfd | ||
|
|
4a1f526ac6 | ||
|
|
497b633661 | ||
|
|
c7f54a98e0 | ||
|
|
7da8c20409 | ||
|
|
116328c7bf | ||
|
|
bd68fef4a2 | ||
|
|
7759d56ad3 | ||
|
|
9c7020a369 | ||
|
|
f8c1903316 | ||
|
|
652423ad14 |
No files matched your search
@@ -4,6 +4,7 @@
|
||||
*.plg
|
||||
*.suo
|
||||
*.vcproj.*.*.user
|
||||
*.kate-swp
|
||||
Win32_LIB_ASM_Debug
|
||||
Win32_LIB_ASM_Release
|
||||
*.bsc
|
||||
|
||||
+43
@@ -161,6 +161,49 @@ Duration is in milliseconds and is optional to set, default value is 84ms.
|
||||
Exactly same as P_CheckSight but uses cheaper algorithm, useful for things like nametags. Doesn't work exactly
|
||||
like P_CheckSight so don't use it for anything gameplay-related.
|
||||
|
||||
## musicdef_t
|
||||
|
||||
Userdata structure representing a musicdef. Fields:
|
||||
|
||||
`musicdef.name` - song identifier ("kmap01" for example).
|
||||
|
||||
`musicdef.usage`, `musicdef.source` - fields from vanilla MUSICDEFS lump.
|
||||
|
||||
`musicdef.filename` - unused for now.
|
||||
|
||||
`musicdef.title`, `musicdef.alttitle`, `musicdef.authors` - fields from MUSCINFO lump.
|
||||
|
||||
`#musicdef` - returns integer id for musicdef (which can be used as index in `musicdefs`).
|
||||
|
||||
All fields are read-only.
|
||||
|
||||
## S_FindMusicCredit(name)
|
||||
|
||||
Returns musicdef corresponding to music with given identifier. For example, `S_FindMusicCredit("kmap01")` will return
|
||||
musicdef for green hills music.
|
||||
|
||||
## musicdefs
|
||||
|
||||
Global table for all musicdefs, similar to mobjinfo, states, etc. Can take either integer indices,
|
||||
from `0` to `#musicdefs-1`, or string indices (which is equal to calling `S_FindMusicCredit`).
|
||||
|
||||
## addHook("MusicCredit", function(musicdef))
|
||||
|
||||
Hook is called whenever `S_ShowMusicCredit` (either from game or mod) is called. Takes musicdef as only argument, returning true
|
||||
will overwrite vanilla behavior (not show music credit), can be used to implement custom music credit pop-ups.
|
||||
|
||||
## addHook("SetupVote", function(result, gt, secondgt, prevmap))
|
||||
|
||||
Hook is called whenever server sets up options for vote screen. `result` is table where lua can store options to,
|
||||
(for example, `result[1] = 1` will force green hills as first option), gt is current gametype, secondgt is
|
||||
alternative gametype picked for 3rd entry (for example, gt can be `GT_RACE`, and secondgt can be `GT_MATCH`)
|
||||
prevmap is the previous map that was played (small note - in game code, it is offset by -1, but for lua its offset back,
|
||||
so if previous gamemap was 1, prevmap would also be 1. Which means you can safely do mapheaderinfo[prevmap] to get info on previous map)
|
||||
|
||||
Limitations: currently, game can only change gametype for 3rd option in map (meaning for example, if current gametype is race, and you
|
||||
put battle map in first option, when it gets picked that map will be still run in race gametype). That means, game will only handle maps with
|
||||
different gametype if it is put in 3rd vote option.
|
||||
|
||||
# Other changes
|
||||
|
||||
## P_PlayRinglossSound(source, damager)
|
||||
|
||||
@@ -30,6 +30,24 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
0-Clause BSD License
|
||||
applies to:
|
||||
- qs22k
|
||||
Copyright (c) 2022, Raymond Gardner
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
|
||||
SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
||||
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
curl License
|
||||
applies to:
|
||||
|
||||
@@ -1,717 +0,0 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# Copyright (C) 2002-2010 Free Software Foundation, Inc.
|
||||
#
|
||||
# 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
# This file is meant for authors, maintainers, co-maintainers or installers
|
||||
# of packages which are internationalized with the help of GNU gettext. For
|
||||
# further information how to use it consult the GNU gettext manual.
|
||||
|
||||
progname=$0
|
||||
package=gettext-tools
|
||||
version=0.18.1
|
||||
|
||||
# Set variables
|
||||
# - gettext_dir directory where the sources are stored.
|
||||
prefix="/usr/local/i686-w64-mingw32/stow/gettext-0.18.1.1"
|
||||
datarootdir="${prefix}/share"
|
||||
gettext_dir="${datarootdir}/gettext"
|
||||
|
||||
# func_tmpdir
|
||||
# creates a temporary directory.
|
||||
# Sets variable
|
||||
# - tmp pathname of freshly created temporary directory
|
||||
func_tmpdir ()
|
||||
{
|
||||
# Use the environment variable TMPDIR, falling back to /tmp. This allows
|
||||
# users to specify a different temporary directory, for example, if their
|
||||
# /tmp is filled up or too small.
|
||||
: ${TMPDIR=/tmp}
|
||||
{
|
||||
# Use the mktemp program if available. If not available, hide the error
|
||||
# message.
|
||||
tmp=`(umask 077 && mktemp -d "$TMPDIR/gtXXXXXX") 2>/dev/null` &&
|
||||
test -n "$tmp" && test -d "$tmp"
|
||||
} ||
|
||||
{
|
||||
# Use a simple mkdir command. It is guaranteed to fail if the directory
|
||||
# already exists. $RANDOM is bash specific and expands to empty in shells
|
||||
# other than bash, ksh and zsh. Its use does not increase security;
|
||||
# rather, it minimizes the probability of failure in a very cluttered /tmp
|
||||
# directory.
|
||||
tmp=$TMPDIR/gt$$-$RANDOM
|
||||
(umask 077 && mkdir "$tmp")
|
||||
} ||
|
||||
{
|
||||
echo "$0: cannot create a temporary directory in $TMPDIR" >&2
|
||||
{ (exit 1); exit 1; }
|
||||
}
|
||||
}
|
||||
|
||||
# Support for relocatability.
|
||||
func_find_curr_installdir ()
|
||||
{
|
||||
# Determine curr_installdir, even taking into account symlinks.
|
||||
curr_executable="$0"
|
||||
case "$curr_executable" in
|
||||
*/* | *\\*) ;;
|
||||
*) # Need to look in the PATH.
|
||||
if test "${PATH_SEPARATOR+set}" != set; then
|
||||
func_tmpdir
|
||||
{ echo "#! /bin/sh"; echo "exit 0"; } > "$tmp"/conf.sh
|
||||
chmod +x "$tmp"/conf.sh
|
||||
if (PATH="/nonexistent;$tmp"; conf.sh) >/dev/null 2>&1; then
|
||||
PATH_SEPARATOR=';'
|
||||
else
|
||||
PATH_SEPARATOR=:
|
||||
fi
|
||||
rm -rf "$tmp"
|
||||
fi
|
||||
save_IFS="$IFS"; IFS="$PATH_SEPARATOR"
|
||||
for dir in $PATH; do
|
||||
IFS="$save_IFS"
|
||||
test -z "$dir" && dir=.
|
||||
for exec_ext in ''; do
|
||||
if test -f "$dir/$curr_executable$exec_ext"; then
|
||||
curr_executable="$dir/$curr_executable$exec_ext"
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
done
|
||||
IFS="$save_IFS"
|
||||
;;
|
||||
esac
|
||||
# Make absolute.
|
||||
case "$curr_executable" in
|
||||
/* | ?:/* | ?:\\*) ;;
|
||||
*) curr_executable=`pwd`/"$curr_executable" ;;
|
||||
esac
|
||||
# Resolve symlinks.
|
||||
sed_dirname='s,/[^/]*$,,'
|
||||
sed_linkdest='s,^.* -> \(.*\),\1,p'
|
||||
while : ; do
|
||||
lsline=`LC_ALL=C ls -l "$curr_executable"`
|
||||
case "$lsline" in
|
||||
*" -> "*)
|
||||
linkdest=`echo "$lsline" | sed -n -e "$sed_linkdest"`
|
||||
case "$linkdest" in
|
||||
/* | ?:/* | ?:\\*) curr_executable="$linkdest" ;;
|
||||
*) curr_executable=`echo "$curr_executable" | sed -e "$sed_dirname"`/"$linkdest" ;;
|
||||
esac ;;
|
||||
*) break ;;
|
||||
esac
|
||||
done
|
||||
curr_installdir=`echo "$curr_executable" | sed -e 's,/[^/]*$,,'`
|
||||
# Canonicalize.
|
||||
curr_installdir=`cd "$curr_installdir" && pwd`
|
||||
}
|
||||
func_find_prefixes ()
|
||||
{
|
||||
# Compute the original/current installation prefixes by stripping the
|
||||
# trailing directories off the original/current installation directories.
|
||||
orig_installprefix="$orig_installdir"
|
||||
curr_installprefix="$curr_installdir"
|
||||
while true; do
|
||||
orig_last=`echo "$orig_installprefix" | sed -n -e 's,^.*/\([^/]*\)$,\1,p'`
|
||||
curr_last=`echo "$curr_installprefix" | sed -n -e 's,^.*/\([^/]*\)$,\1,p'`
|
||||
if test -z "$orig_last" || test -z "$curr_last"; then
|
||||
break
|
||||
fi
|
||||
if test "$orig_last" != "$curr_last"; then
|
||||
break
|
||||
fi
|
||||
orig_installprefix=`echo "$orig_installprefix" | sed -e 's,/[^/]*$,,'`
|
||||
curr_installprefix=`echo "$curr_installprefix" | sed -e 's,/[^/]*$,,'`
|
||||
done
|
||||
}
|
||||
if test "no" = yes; then
|
||||
exec_prefix="${prefix}"
|
||||
bindir="${exec_prefix}/bin"
|
||||
orig_installdir="$bindir" # see Makefile.am's *_SCRIPTS variables
|
||||
func_find_curr_installdir # determine curr_installdir
|
||||
func_find_prefixes
|
||||
# Relocate the directory variables that we use.
|
||||
gettext_dir=`echo "$gettext_dir/" | sed -e "s%^${orig_installprefix}/%${curr_installprefix}/%" | sed -e 's,/$,,'`
|
||||
fi
|
||||
|
||||
# func_usage
|
||||
# outputs to stdout the --help usage message.
|
||||
func_usage ()
|
||||
{
|
||||
echo "\
|
||||
Usage: autopoint [OPTION]...
|
||||
|
||||
Copies standard gettext infrastructure files into a source package.
|
||||
|
||||
Options:
|
||||
--help print this help and exit
|
||||
--version print version information and exit
|
||||
-f, --force force overwriting of files that already exist
|
||||
-n, --dry-run print modifications but don't perform them"
|
||||
# echo "\
|
||||
# -V version copy the infrastructure of the specified gettext version
|
||||
# (dangerous)"
|
||||
echo "
|
||||
Report bugs to <bug-gnu-gettext@gnu.org>."
|
||||
}
|
||||
|
||||
# func_version
|
||||
# outputs to stdout the --version message.
|
||||
func_version ()
|
||||
{
|
||||
echo "$progname (GNU $package) $version"
|
||||
echo "Uses a versions archive in git format."
|
||||
echo "Copyright (C) 2002-2010 Free Software Foundation, Inc.
|
||||
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
|
||||
This is free software: you are free to change and redistribute it.
|
||||
There is NO WARRANTY, to the extent permitted by law."
|
||||
echo "Written by" "Bruno Haible"
|
||||
}
|
||||
|
||||
# func_fatal_error message
|
||||
# outputs to stderr a fatal error message, and terminates the program.
|
||||
func_fatal_error ()
|
||||
{
|
||||
echo "autopoint: *** $1" 1>&2
|
||||
echo "autopoint: *** Stop." 1>&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Command-line option processing.
|
||||
# Removes the OPTIONS from the arguments. Sets the variables:
|
||||
# - force yes if --force was given, empty otherwise
|
||||
# - ver gettext version if -V was given, empty otherwise
|
||||
# - doit false if --dry-run was given, : otherwise
|
||||
{
|
||||
force=
|
||||
ver=
|
||||
doit=:
|
||||
|
||||
while test $# -gt 0; do
|
||||
case "$1" in
|
||||
-n | --dry-run | --dry-ru | --dry-r | --dry- | --dry | --dr | --d )
|
||||
shift
|
||||
doit=false ;;
|
||||
-f | --force | --forc | --for | --fo | --f )
|
||||
shift
|
||||
force=yes ;;
|
||||
--help | --hel | --he | --h )
|
||||
func_usage; exit 0 ;;
|
||||
# -V ) # Some people put a space between -V and the version number.
|
||||
# shift
|
||||
# if test $# = 0; then
|
||||
# func_usage 1>&2
|
||||
# exit 1
|
||||
# fi
|
||||
# ver=$1;
|
||||
# shift ;;
|
||||
# -V*) # Some people omit the space between -V and the version number.
|
||||
# ver=`echo "X$1" | sed -e 's/^X-V//'`
|
||||
# shift ;;
|
||||
--version | --versio | --versi | --vers | --ver | --ve | --v )
|
||||
func_version
|
||||
exit 0 ;;
|
||||
-- ) # Stop option prcessing
|
||||
shift; break ;;
|
||||
-* )
|
||||
echo "autopoint: unknown option $1" 1>&2
|
||||
echo "Try 'autopoint --help' for more information." 1>&2
|
||||
exit 1 ;;
|
||||
* )
|
||||
break ;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
# Command-line argument processing.
|
||||
# Analyzes the remaining arguments.
|
||||
{
|
||||
if test $# -gt 0; then
|
||||
func_usage 1>&2
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
srcdir=`pwd`
|
||||
# The current directory is now $srcdir.
|
||||
|
||||
# Check integrity of package: A configure.in/ac must be present. Sets variable
|
||||
# - configure_in name of configure.in/ac file.
|
||||
if test -f configure.in; then
|
||||
configure_in=configure.in
|
||||
else
|
||||
if test -f configure.ac; then
|
||||
configure_in=configure.ac
|
||||
else
|
||||
# KDE specific convention: configure.in.in
|
||||
if test -f configure.in.in; then
|
||||
configure_in=configure.in.in
|
||||
else
|
||||
func_fatal_error "Missing configure.in or configure.ac, please cd to your package first."
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# Check whether the -V option and the version number in configure.in match.
|
||||
# At least one of the two must be given. If both are given, they must agree.
|
||||
sed_extract_AM_GNU_GETTEXT_VERSION_argument='s/^AM_GNU_GETTEXT_VERSION(\([^()]*\)).*$/\1/'
|
||||
sed_remove_outer_brackets='s/^\[\(.*\)\]$/\1/'
|
||||
xver=`cat "$configure_in" | grep '^AM_GNU_GETTEXT_VERSION(' | sed -n -e "$sed_extract_AM_GNU_GETTEXT_VERSION_argument"p | sed -e "$sed_remove_outer_brackets" | sed -e 1q`
|
||||
if test -z "$xver" && test -f intl/VERSION; then
|
||||
xver=`cat intl/VERSION | LC_ALL=C sed -n -e 's/^.*gettext-\([-+_.0-9A-Za-z]*\).*$/\1/p'`
|
||||
fi
|
||||
if test -n "$xver"; then
|
||||
if test -n "$ver"; then
|
||||
if test "X$ver" != "X$xver"; then
|
||||
func_fatal_error "Version mismatch: specified -V $ver but the package uses gettext version $xver"
|
||||
fi
|
||||
else
|
||||
ver="$xver"
|
||||
fi
|
||||
else
|
||||
if test -z "$ver"; then
|
||||
func_fatal_error "Missing version: please specify in $configure_in through a line 'AM_GNU_GETTEXT_VERSION(x.yy.zz)' the gettext version the package is using"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Check whether the version number is supported.
|
||||
case "$ver" in
|
||||
0.10.35 | 0.10.36 | 0.10.37 | 0.10.38 | 0.10.39 | 0.10.40 | \
|
||||
0.11 | 0.11.1 | 0.11.2 | 0.11.3 | 0.11.4 | 0.11.5 | \
|
||||
0.12 | 0.12.1 | \
|
||||
0.13 | 0.13.1 | \
|
||||
0.14 | 0.14.1 | 0.14.2 | 0.14.3 | 0.14.4 | 0.14.5 | 0.14.6 | \
|
||||
0.15 | \
|
||||
0.16 | 0.16.1 | \
|
||||
0.17 | \
|
||||
0.18 | 0.18.1 )
|
||||
;;
|
||||
*)
|
||||
func_fatal_error "The AM_GNU_GETTEXT_VERSION declaration in your $configure_in
|
||||
file requires the infrastructure from gettext-$ver but this version
|
||||
is older. Please upgrade to gettext-$ver or newer."
|
||||
;;
|
||||
esac
|
||||
|
||||
# Check in which directory config.rpath, mkinstalldirs etc. belong.
|
||||
auxdir=`cat "$configure_in" | grep '^AC_CONFIG_AUX_DIR' | sed -n -e 's/AC_CONFIG_AUX_DIR(\([^()]*\))/\1/p' | sed -e 's/^\[\(.*\)\]$/\1/' | sed -e 1q`
|
||||
if test -n "$auxdir"; then
|
||||
auxdir="$auxdir/"
|
||||
fi
|
||||
|
||||
# Check in which directory the *.m4 macros belong.
|
||||
m4dir=m4
|
||||
if test -f Makefile.am; then
|
||||
# A package using automake.
|
||||
# Extract the macro directory name from Makefile.am.
|
||||
aclocal_amflags=`grep '^ACLOCAL_AMFLAGS[ ]*=' Makefile.am | sed -e 's/^ACLOCAL_AMFLAGS[ ]*=\(.*\)$/\1/'`
|
||||
m4dir_is_next=
|
||||
for arg in $aclocal_amflags; do
|
||||
if test -n "$m4dir_is_next"; then
|
||||
m4dir="$arg"
|
||||
break
|
||||
else
|
||||
if test "X$arg" = "X-I"; then
|
||||
m4dir_is_next=yes
|
||||
else
|
||||
m4dir_is_next=
|
||||
fi
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
# Check whether to omit the intl/ directory.
|
||||
omitintl=`cat "$configure_in" | grep '^AM_GNU_GETTEXT' | sed -n -e 's/^AM_GNU_GETTEXT(\([^(),]*\).*$/\1/p' | sed -e 's/^\[\(.*\)\]$/\1/' | sed -e 1q`
|
||||
omitintl=`if test 'external' = "$omitintl"; then echo yes; fi`
|
||||
|
||||
# Check in which directory or directories the po/* infrastructure belongs.
|
||||
sed_extract_config_files='s,#.*$,,
|
||||
s,^dnl .*$,,
|
||||
s, dnl .*$,,
|
||||
/AC_CONFIG_FILES(/ {
|
||||
ta
|
||||
:a
|
||||
s/)/)/
|
||||
tb
|
||||
s/\\$//
|
||||
N
|
||||
ba
|
||||
:b
|
||||
s,^.*AC_CONFIG_FILES([[ ]*\([^]"$`\\)]*\).*$,\1,p
|
||||
}'
|
||||
configfiles=`cat "$configure_in" | sed -n -e "$sed_extract_config_files"`
|
||||
# PO directories have a Makefile.in generated from Makefile.in.in.
|
||||
# Treat a directory as a PO directory if and only if it has a
|
||||
# POTFILES.in file. This allows packages to have multiple PO
|
||||
# directories under different names or in different locations.
|
||||
sed_remove_Makefile_in='s,/Makefile\.in$,,'
|
||||
podirs=`for f in $configfiles; do case "$f" in */Makefile.in) echo $f;; esac; done | sed -e "$sed_remove_Makefile_in"`
|
||||
if test -z "$podirs"; then
|
||||
# If we cannot get the list of PO directories from configure.ac, assume the
|
||||
# common default.
|
||||
podirs="po"
|
||||
fi
|
||||
|
||||
# Set up a temporary checkout directory.
|
||||
# Set variables
|
||||
# - work_dir directory containing the temporary checkout
|
||||
work_dir=tmpwrk$$
|
||||
mkdir "$work_dir" || {
|
||||
if test -d "$work_dir"; then
|
||||
func_fatal_error "directory $work_dir already exists"
|
||||
else
|
||||
func_fatal_error "cannot create directory $work_dir"
|
||||
fi
|
||||
}
|
||||
|
||||
# We support three archive formats.
|
||||
#
|
||||
# Format | Size (KiB) for gettext-0.17 | Extra tools needed |
|
||||
# -------+-----------------------------+--------------------+
|
||||
# dir | 3000 | -- |
|
||||
# cvs | 356 | cvs |
|
||||
# git | 484 | git |
|
||||
# -------+-----------------------------+--------------------+
|
||||
|
||||
case "git" in
|
||||
dir)
|
||||
# The archive of different versions is very large, but using it does not
|
||||
# require special tools.
|
||||
gzip -d -c < "$gettext_dir/archive.dir.tar.gz" | (cd "$work_dir" && tar xf - "gettext-$ver")
|
||||
if test `find "$work_dir" -type f -print | wc -l` = 0; then
|
||||
rm -rf "$work_dir"
|
||||
func_fatal_error "infrastructure files for version $ver not found; this is autopoint from GNU $package $version"
|
||||
fi
|
||||
mv "$work_dir/gettext-$ver" "$work_dir/archive"
|
||||
;;
|
||||
|
||||
cvs)
|
||||
# We distributed the many different versions of the files in a CVS
|
||||
# repository. This guaranteed a good compression rate:
|
||||
#
|
||||
# Including version size in KB of
|
||||
# "du autopoint-files/archive"
|
||||
# 0.10.35 240
|
||||
# 0.10.36 428
|
||||
# 0.10.37 436
|
||||
# 0.10.38 488
|
||||
# 0.10.39 500
|
||||
# 0.10.40 528
|
||||
# 0.11 720
|
||||
# 0.11.1 740
|
||||
# 0.11.2 748
|
||||
# 0.11.3 804
|
||||
# 0.11.4 864
|
||||
# 0.11.5 880
|
||||
# 0.12 1032
|
||||
# 0.12.1 1032
|
||||
# 0.13 1220
|
||||
# 0.13.1 1236
|
||||
# 0.14 1296
|
||||
# 0.14.1 1300
|
||||
# 0.14.2 1420
|
||||
# 0.14.3 1428
|
||||
# 0.14.4 1464
|
||||
# 0.14.5 1508
|
||||
# 0.14.6 1580
|
||||
# 0.15 1760
|
||||
# 0.16 1808
|
||||
# 0.16.1 1812
|
||||
# 0.17 2128
|
||||
# 0.18 2656
|
||||
#
|
||||
# The requirement that the user must have the CVS program available is not
|
||||
# a severe restrictions, because most of the people who use autopoint are
|
||||
# users of CVS.
|
||||
#
|
||||
# But the CVS format is now deprecated, because "cvs init" does not work in
|
||||
# all circumstances
|
||||
# (see <http://lists.gnu.org/archive/html/bug-cvs/2010-05/msg00003.html>)
|
||||
# and we are not allowed to distribute the cvs infrastructure files
|
||||
# ourselves
|
||||
# (see <http://lists.gnu.org/archive/html/bug-cvs/2010-06/msg00011.html>).
|
||||
#
|
||||
# Check availability of the CVS program.
|
||||
(cvs -v) >/dev/null 2>/dev/null || func_fatal_error "cvs program not found"
|
||||
|
||||
# Set up a temporary CVS repository.
|
||||
# We need the temporary CVS repository because any checkout needs write
|
||||
# access to the CVSROOT/history file, so it cannot be under $gettext_dir.
|
||||
# We need the temporary checkout directory because when --force was not
|
||||
# given, we need to compare the existing files with the checked out ones.
|
||||
# Set variables
|
||||
# - cvs_dir directory containing the temporary repository
|
||||
cvs_dir=tmpcvs$$
|
||||
# Use an umask of 077, to avoid attacks that work by overwriting files in
|
||||
# the "$CVSROOT"/CVSROOT directory.
|
||||
(umask 077 && mkdir "$cvs_dir") || {
|
||||
if test -d "$cvs_dir"; then
|
||||
func_fatal_error "directory $cvs_dir already exists"
|
||||
else
|
||||
func_fatal_error "cannot create directory $cvs_dir"
|
||||
fi
|
||||
}
|
||||
CVSROOT="$srcdir/$cvs_dir"
|
||||
unset CVS_CLIENT_LOG
|
||||
unset CVS_CLIENT_PORT
|
||||
unset CVS_IGNORE_REMOTE_ROOT
|
||||
unset CVS_LOCAL_BRANCH_NUM
|
||||
unset CVS_NOBASES
|
||||
unset CVS_PASSFILE
|
||||
unset CVS_PASSWORD
|
||||
unset CVS_PROXY_PORT
|
||||
unset CVS_RCMD_PORT
|
||||
unset CVS_RSH
|
||||
unset CVS_SERVER
|
||||
unset CVS_SERVER_SLEEP
|
||||
CVS_SIGN_COMMITS=
|
||||
export CVS_SIGN_COMMITS
|
||||
unset CVS_SSH
|
||||
unset CVS_VERIFY_CHECKOUTS
|
||||
unset CVS_VERIFY_TEMPLATE
|
||||
unset CVSIGNORE
|
||||
unset CVSREAD
|
||||
unset CVSREADONLYFS
|
||||
unset CVSUMASK
|
||||
unset CVSWRAPPERS
|
||||
|
||||
# Need to pass -d "$CVSROOT", because there may be a CVS directory in the
|
||||
# current directory.
|
||||
cvs -d "$CVSROOT" init
|
||||
gzip -d -c < "$gettext_dir/archive.cvs.tar.gz" | (cd "$cvs_dir" && tar xf -)
|
||||
|
||||
cd "$work_dir"
|
||||
cvsver=gettext-`echo "$ver" | sed -e 's/\./_/g'`
|
||||
(cvs -d "$CVSROOT" checkout -r"$cvsver" archive > /dev/null) 2>&1 | grep -v '^cvs checkout: Updating'
|
||||
find archive -name CVS -type d -print | xargs rm -rf
|
||||
cd ..
|
||||
rm -rf "$cvs_dir"
|
||||
# Check that really all CVS directories are gone, otherwise we would overwrite
|
||||
# the contents of the user's CVS directories.
|
||||
if test `find $work_dir/archive -name CVS -type d -print | wc -l` != 0; then
|
||||
rm -rf "$work_dir"
|
||||
func_fatal_error "failed to remove all CVS subdirectories"
|
||||
fi
|
||||
if test `find $work_dir/archive -type f -print | wc -l` = 0; then
|
||||
rm -rf "$work_dir"
|
||||
func_fatal_error "infrastructure files for version $ver not found; this is autopoint from GNU $package $version"
|
||||
fi
|
||||
;;
|
||||
|
||||
git)
|
||||
# Check availability of the git program.
|
||||
(git --version) >/dev/null 2>/dev/null || func_fatal_error "git program not found"
|
||||
mkdir "$work_dir/archive"
|
||||
gzip -d -c < "$gettext_dir/archive.git.tar.gz" | (cd "$work_dir/archive" && tar xf -)
|
||||
(cd "$work_dir/archive" && git checkout -q "gettext-$ver") || {
|
||||
rm -rf "$work_dir"
|
||||
func_fatal_error "infrastructure files for version $ver not found; this is autopoint from GNU $package $version"
|
||||
}
|
||||
(cd "$work_dir/archive" && rm -rf .git .gitignore)
|
||||
;;
|
||||
esac
|
||||
|
||||
# func_destfile file
|
||||
# determines the destination file, relative to the package's top level
|
||||
# directory, for a given file name, relative to archive.
|
||||
# Sets variables
|
||||
# - destfile relative destination file name, or
|
||||
# empty if the file shall be omitted
|
||||
# - sharedowner yes if the file is not only owned by GNU gettext but may
|
||||
# be installed by automake or other tools, otherwise empty
|
||||
# - allpodirs yes if the file is to be installed in every dir in $podirs
|
||||
func_destfile ()
|
||||
{
|
||||
# There are five categories of files:
|
||||
# ABOUT_NLS -> top level directory
|
||||
# config.rpath mkinstalldirs -> $auxdir
|
||||
# m4/* -> $m4dir/
|
||||
# intl/* -> intl/
|
||||
# po/* ->
|
||||
sharedowner=
|
||||
allpodirs=
|
||||
case `echo "$1" | sed -e 's,[^/]*$,,'` in
|
||||
"" )
|
||||
case "$1" in
|
||||
config.rpath ) destfile="$auxdir$1" ;;
|
||||
mkinstalldirs ) destfile="$auxdir$1" sharedowner=yes ;;
|
||||
* ) destfile="$1" ;;
|
||||
esac
|
||||
;;
|
||||
m4/ ) destfile=`echo "$1" | sed -e "s,^m4/,$m4dir/,"` ;;
|
||||
intl/ ) if test -n "$omitintl"; then destfile=""; else destfile="$1"; fi ;;
|
||||
po/ ) destfile=`echo "$1" | sed -e "s,^po/,,"` allpodirs=yes ;;
|
||||
* ) destfile="$1" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
# func_compare existingfile gettextfile
|
||||
# compares the existing file and the file from gettext, and decides whether the
|
||||
# existing file should be overwritten with the file from gettext. Returns 0 if
|
||||
# it should be overwritten, or 1 if it should be skipped.
|
||||
sed_extract_serial='s/^#.* serial \([^ ]*\).*/\1/p
|
||||
1q'
|
||||
func_compare ()
|
||||
{
|
||||
if cmp -s "$1" "$2"; then
|
||||
false
|
||||
else
|
||||
case "$2" in
|
||||
*.m4)
|
||||
# For interoperability with gnulib. gnulib often has newer versions of
|
||||
# the *.m4 files than the latest gettext release. Don't overwrite a
|
||||
# newer version from gnulib with an older version from the gettext
|
||||
# release. The version can be retrieved from the first line, which
|
||||
# looks like this: # file.m4 serial NN ...
|
||||
existing_serial=`sed -n -e "$sed_extract_serial" < "$1"`
|
||||
gettext_serial=`sed -n -e "$sed_extract_serial" < "$2"`
|
||||
if test -n "$existing_serial" && test -n "$gettext_serial" \
|
||||
&& test "$existing_serial" -ge "$gettext_serial" 2> /dev/null; then
|
||||
false
|
||||
else
|
||||
true
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
true
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
}
|
||||
|
||||
# If some files have been locally modified and we have not been requested
|
||||
# to overwrite them, then bail out. This is better than leaving a source
|
||||
# package around where half of the files are locally modified and half are
|
||||
# original - too great risk of version mismatch.
|
||||
if test -z "$force"; then
|
||||
mismatch=
|
||||
func_tmpdir
|
||||
mismatchfile="$tmp"/autopoint.diff
|
||||
for file in `find "$work_dir/archive" -type f -print | sed -e "s,^$work_dir/archive/,," | LC_ALL=C sort`; do
|
||||
func_destfile "$file"
|
||||
if test -n "$destfile"; then
|
||||
func_compare_to_destfile ()
|
||||
{
|
||||
finaldestfile="$1"
|
||||
if test -f "$finaldestfile"; then
|
||||
if func_compare "$finaldestfile" "$work_dir/archive/$file"; then
|
||||
if test -n "$sharedowner"; then
|
||||
echo "autopoint: warning: File $finaldestfile has been locally modified." 1>&2
|
||||
else
|
||||
echo "autopoint: File $finaldestfile has been locally modified." 1>&2
|
||||
mismatch=yes
|
||||
diff -c "$work_dir/archive/$file" "$finaldestfile" | sed -e "1s,$work_dir/archive/,," >> "$mismatchfile"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
}
|
||||
if test -n "$allpodirs"; then
|
||||
for dir in $podirs; do
|
||||
func_compare_to_destfile "$dir/$destfile"
|
||||
done
|
||||
else
|
||||
func_compare_to_destfile "$destfile"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
if test -n "$mismatch"; then
|
||||
rm -rf "$work_dir"
|
||||
func_fatal_error "Some files have been locally modified. Not overwriting them because --force has not been specified. For your convenience, you find the local modifications in the file '$mismatchfile'."
|
||||
fi
|
||||
rm -rf "$tmp"
|
||||
fi
|
||||
|
||||
# func_mkdir_for to
|
||||
# ensures the directory that would the given file exists.
|
||||
# 'to' is a relative pathname, relative to the current directory.
|
||||
func_mkdir_for ()
|
||||
{
|
||||
base=`echo "$1" | sed -e 's,/[^/]*$,,'`
|
||||
if test "X$base" != "X$1" && test -n "$base"; then
|
||||
func_mkdir_for "$base"
|
||||
# Recompute base. It was clobbered by the recursive call.
|
||||
base=`echo "$1" | sed -e 's,/[^/]*$,,'`
|
||||
test -d "$base" || { echo "Creating directory $base"; mkdir "$base"; }
|
||||
fi
|
||||
}
|
||||
|
||||
# func_copy from to
|
||||
# copies a file.
|
||||
# 'from' is a relative pathname, relative to the current directory.
|
||||
# 'to' is a relative pathname, relative to the current directory.
|
||||
func_copy ()
|
||||
{
|
||||
if $doit; then
|
||||
func_mkdir_for "$2"
|
||||
rm -f "$2"
|
||||
echo "Copying file $2"
|
||||
cp "$1" "$2"
|
||||
else
|
||||
echo "Copy file $2"
|
||||
fi
|
||||
}
|
||||
|
||||
# func_backup to
|
||||
# makes a backup of a file that is about to be overwritten or replaced.
|
||||
# 'to' is a relative pathname, relative to the current directory.
|
||||
func_backup ()
|
||||
{
|
||||
if $doit; then
|
||||
if test -f "$1"; then
|
||||
rm -f "$1~"
|
||||
cp -p "$1" "$1~"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# Now copy the files.
|
||||
for file in `find "$work_dir/archive" -type f -print | sed -e "s,^$work_dir/archive/,," | LC_ALL=C sort`; do
|
||||
func_destfile "$file"
|
||||
if test -n "$destfile"; then
|
||||
func_copy_to_destfile ()
|
||||
{
|
||||
finaldestfile="$1"
|
||||
mustcopy=
|
||||
if test -f "$finaldestfile"; then
|
||||
if func_compare "$finaldestfile" "$work_dir/archive/$file"; then
|
||||
if test -n "$force"; then
|
||||
# Overwrite locally modified file.
|
||||
mustcopy=yes
|
||||
fi
|
||||
# If --force is not specified, don't overwrite locally modified files
|
||||
# for which GNU gettext is a shared owner.
|
||||
fi
|
||||
else
|
||||
mustcopy=yes
|
||||
fi
|
||||
if test -n "$mustcopy"; then
|
||||
func_backup "$finaldestfile"
|
||||
func_copy "$work_dir/archive/$file" "$finaldestfile"
|
||||
fi
|
||||
}
|
||||
if test -n "$allpodirs"; then
|
||||
for dir in $podirs; do
|
||||
func_copy_to_destfile "$dir/$destfile"
|
||||
done
|
||||
else
|
||||
func_copy_to_destfile "$destfile"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
# That's it.
|
||||
rm -rf "$work_dir"
|
||||
exit 0
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,123 +0,0 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# Copyright (C) 2003, 2005-2007 Free Software Foundation, Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU Library General Public License as published
|
||||
# by the Free Software Foundation; either version 2, 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 Library General Public
|
||||
# License along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
# USA.
|
||||
#
|
||||
|
||||
# Find a way to echo strings without interpreting backslash.
|
||||
if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
|
||||
echo='echo'
|
||||
else
|
||||
if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
|
||||
echo='printf %s\n'
|
||||
else
|
||||
echo_func () {
|
||||
cat <<EOT
|
||||
$*
|
||||
EOT
|
||||
}
|
||||
echo='echo_func'
|
||||
fi
|
||||
fi
|
||||
|
||||
# This script is primarily a shell function library. In order for
|
||||
# ". gettext.sh" to find it, we install it in $PREFIX/bin (that is usually
|
||||
# contained in $PATH), rather than in some other location such as
|
||||
# $PREFIX/share/sh-scripts or $PREFIX/share/gettext. In order to not violate
|
||||
# the Filesystem Hierarchy Standard when doing so, this script is executable.
|
||||
# Therefore it needs to support the standard --help and --version.
|
||||
if test -z "$ZSH_VERSION"; then
|
||||
# zsh is not POSIX compliant: By default, while ". gettext.sh" is executed,
|
||||
# it sets $0 to "gettext.sh", defeating the purpose of this test. But
|
||||
# fortunately we know that when running under zsh, this script is always
|
||||
# being sourced, not executed, because hardly anyone is crazy enough to
|
||||
# install zsh as /bin/sh.
|
||||
case "$0" in
|
||||
gettext.sh | */gettext.sh | *\\gettext.sh)
|
||||
progname=$0
|
||||
package=gettext-runtime
|
||||
version=0.18.1
|
||||
# func_usage
|
||||
# outputs to stdout the --help usage message.
|
||||
func_usage ()
|
||||
{
|
||||
echo "GNU gettext shell script function library version $version"
|
||||
echo "Usage: . gettext.sh"
|
||||
}
|
||||
# func_version
|
||||
# outputs to stdout the --version message.
|
||||
func_version ()
|
||||
{
|
||||
echo "$progname (GNU $package) $version"
|
||||
echo "Copyright (C) 2003-2007 Free Software Foundation, Inc.
|
||||
License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl.html>
|
||||
This is free software: you are free to change and redistribute it.
|
||||
There is NO WARRANTY, to the extent permitted by law."
|
||||
echo "Written by" "Bruno Haible"
|
||||
}
|
||||
if test $# = 1; then
|
||||
case "$1" in
|
||||
--help | --hel | --he | --h )
|
||||
func_usage; exit 0 ;;
|
||||
--version | --versio | --versi | --vers | --ver | --ve | --v )
|
||||
func_version; exit 0 ;;
|
||||
esac
|
||||
fi
|
||||
func_usage 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# eval_gettext MSGID
|
||||
# looks up the translation of MSGID and substitutes shell variables in the
|
||||
# result.
|
||||
eval_gettext () {
|
||||
gettext "$1" | (export PATH `envsubst --variables "$1"`; envsubst "$1")
|
||||
}
|
||||
|
||||
# eval_ngettext MSGID MSGID-PLURAL COUNT
|
||||
# looks up the translation of MSGID / MSGID-PLURAL for COUNT and substitutes
|
||||
# shell variables in the result.
|
||||
eval_ngettext () {
|
||||
ngettext "$1" "$2" "$3" | (export PATH `envsubst --variables "$1 $2"`; envsubst "$1 $2")
|
||||
}
|
||||
|
||||
# Note: This use of envsubst is much safer than using the shell built-in 'eval'
|
||||
# would be.
|
||||
# 1) The security problem with Chinese translations that happen to use a
|
||||
# character such as \xe0\x60 is avoided.
|
||||
# 2) The security problem with malevolent translators who put in command lists
|
||||
# like "$(...)" or "`...`" is avoided.
|
||||
# 3) The translations can only refer to shell variables that are already
|
||||
# mentioned in MSGID or MSGID-PLURAL.
|
||||
#
|
||||
# Note: "export PATH" above is a dummy; this is for the case when
|
||||
# `envsubst --variables ...` returns nothing.
|
||||
#
|
||||
# Note: In eval_ngettext above, "$1 $2" means a string whose variables set is
|
||||
# the union of the variables set of "$1" and "$2".
|
||||
#
|
||||
# Note: The minimal use of backquote above ensures that trailing newlines are
|
||||
# not dropped, not from the gettext invocation and not from the value of any
|
||||
# shell variable.
|
||||
#
|
||||
# Note: Field splitting on the `envsubst --variables ...` result is desired,
|
||||
# since envsubst outputs the variables, separated by newlines. Pathname
|
||||
# wildcard expansion or tilde expansion has no effect here, since the words
|
||||
# output by "envsubst --variables ..." consist solely of alphanumeric
|
||||
# characters and underscore.
|
||||
File diff suppressed because it is too large.
Load diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,717 +0,0 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# Copyright (C) 2002-2010 Free Software Foundation, Inc.
|
||||
#
|
||||
# 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
# This file is meant for authors, maintainers, co-maintainers or installers
|
||||
# of packages which are internationalized with the help of GNU gettext. For
|
||||
# further information how to use it consult the GNU gettext manual.
|
||||
|
||||
progname=$0
|
||||
package=gettext-tools
|
||||
version=0.18.1
|
||||
|
||||
# Set variables
|
||||
# - gettext_dir directory where the sources are stored.
|
||||
prefix="/usr/local/x86_64-w64-mingw32/stow/gettext-0.18.1.1"
|
||||
datarootdir="${prefix}/share"
|
||||
gettext_dir="${datarootdir}/gettext"
|
||||
|
||||
# func_tmpdir
|
||||
# creates a temporary directory.
|
||||
# Sets variable
|
||||
# - tmp pathname of freshly created temporary directory
|
||||
func_tmpdir ()
|
||||
{
|
||||
# Use the environment variable TMPDIR, falling back to /tmp. This allows
|
||||
# users to specify a different temporary directory, for example, if their
|
||||
# /tmp is filled up or too small.
|
||||
: ${TMPDIR=/tmp}
|
||||
{
|
||||
# Use the mktemp program if available. If not available, hide the error
|
||||
# message.
|
||||
tmp=`(umask 077 && mktemp -d "$TMPDIR/gtXXXXXX") 2>/dev/null` &&
|
||||
test -n "$tmp" && test -d "$tmp"
|
||||
} ||
|
||||
{
|
||||
# Use a simple mkdir command. It is guaranteed to fail if the directory
|
||||
# already exists. $RANDOM is bash specific and expands to empty in shells
|
||||
# other than bash, ksh and zsh. Its use does not increase security;
|
||||
# rather, it minimizes the probability of failure in a very cluttered /tmp
|
||||
# directory.
|
||||
tmp=$TMPDIR/gt$$-$RANDOM
|
||||
(umask 077 && mkdir "$tmp")
|
||||
} ||
|
||||
{
|
||||
echo "$0: cannot create a temporary directory in $TMPDIR" >&2
|
||||
{ (exit 1); exit 1; }
|
||||
}
|
||||
}
|
||||
|
||||
# Support for relocatability.
|
||||
func_find_curr_installdir ()
|
||||
{
|
||||
# Determine curr_installdir, even taking into account symlinks.
|
||||
curr_executable="$0"
|
||||
case "$curr_executable" in
|
||||
*/* | *\\*) ;;
|
||||
*) # Need to look in the PATH.
|
||||
if test "${PATH_SEPARATOR+set}" != set; then
|
||||
func_tmpdir
|
||||
{ echo "#! /bin/sh"; echo "exit 0"; } > "$tmp"/conf.sh
|
||||
chmod +x "$tmp"/conf.sh
|
||||
if (PATH="/nonexistent;$tmp"; conf.sh) >/dev/null 2>&1; then
|
||||
PATH_SEPARATOR=';'
|
||||
else
|
||||
PATH_SEPARATOR=:
|
||||
fi
|
||||
rm -rf "$tmp"
|
||||
fi
|
||||
save_IFS="$IFS"; IFS="$PATH_SEPARATOR"
|
||||
for dir in $PATH; do
|
||||
IFS="$save_IFS"
|
||||
test -z "$dir" && dir=.
|
||||
for exec_ext in ''; do
|
||||
if test -f "$dir/$curr_executable$exec_ext"; then
|
||||
curr_executable="$dir/$curr_executable$exec_ext"
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
done
|
||||
IFS="$save_IFS"
|
||||
;;
|
||||
esac
|
||||
# Make absolute.
|
||||
case "$curr_executable" in
|
||||
/* | ?:/* | ?:\\*) ;;
|
||||
*) curr_executable=`pwd`/"$curr_executable" ;;
|
||||
esac
|
||||
# Resolve symlinks.
|
||||
sed_dirname='s,/[^/]*$,,'
|
||||
sed_linkdest='s,^.* -> \(.*\),\1,p'
|
||||
while : ; do
|
||||
lsline=`LC_ALL=C ls -l "$curr_executable"`
|
||||
case "$lsline" in
|
||||
*" -> "*)
|
||||
linkdest=`echo "$lsline" | sed -n -e "$sed_linkdest"`
|
||||
case "$linkdest" in
|
||||
/* | ?:/* | ?:\\*) curr_executable="$linkdest" ;;
|
||||
*) curr_executable=`echo "$curr_executable" | sed -e "$sed_dirname"`/"$linkdest" ;;
|
||||
esac ;;
|
||||
*) break ;;
|
||||
esac
|
||||
done
|
||||
curr_installdir=`echo "$curr_executable" | sed -e 's,/[^/]*$,,'`
|
||||
# Canonicalize.
|
||||
curr_installdir=`cd "$curr_installdir" && pwd`
|
||||
}
|
||||
func_find_prefixes ()
|
||||
{
|
||||
# Compute the original/current installation prefixes by stripping the
|
||||
# trailing directories off the original/current installation directories.
|
||||
orig_installprefix="$orig_installdir"
|
||||
curr_installprefix="$curr_installdir"
|
||||
while true; do
|
||||
orig_last=`echo "$orig_installprefix" | sed -n -e 's,^.*/\([^/]*\)$,\1,p'`
|
||||
curr_last=`echo "$curr_installprefix" | sed -n -e 's,^.*/\([^/]*\)$,\1,p'`
|
||||
if test -z "$orig_last" || test -z "$curr_last"; then
|
||||
break
|
||||
fi
|
||||
if test "$orig_last" != "$curr_last"; then
|
||||
break
|
||||
fi
|
||||
orig_installprefix=`echo "$orig_installprefix" | sed -e 's,/[^/]*$,,'`
|
||||
curr_installprefix=`echo "$curr_installprefix" | sed -e 's,/[^/]*$,,'`
|
||||
done
|
||||
}
|
||||
if test "no" = yes; then
|
||||
exec_prefix="${prefix}"
|
||||
bindir="${exec_prefix}/bin"
|
||||
orig_installdir="$bindir" # see Makefile.am's *_SCRIPTS variables
|
||||
func_find_curr_installdir # determine curr_installdir
|
||||
func_find_prefixes
|
||||
# Relocate the directory variables that we use.
|
||||
gettext_dir=`echo "$gettext_dir/" | sed -e "s%^${orig_installprefix}/%${curr_installprefix}/%" | sed -e 's,/$,,'`
|
||||
fi
|
||||
|
||||
# func_usage
|
||||
# outputs to stdout the --help usage message.
|
||||
func_usage ()
|
||||
{
|
||||
echo "\
|
||||
Usage: autopoint [OPTION]...
|
||||
|
||||
Copies standard gettext infrastructure files into a source package.
|
||||
|
||||
Options:
|
||||
--help print this help and exit
|
||||
--version print version information and exit
|
||||
-f, --force force overwriting of files that already exist
|
||||
-n, --dry-run print modifications but don't perform them"
|
||||
# echo "\
|
||||
# -V version copy the infrastructure of the specified gettext version
|
||||
# (dangerous)"
|
||||
echo "
|
||||
Report bugs to <bug-gnu-gettext@gnu.org>."
|
||||
}
|
||||
|
||||
# func_version
|
||||
# outputs to stdout the --version message.
|
||||
func_version ()
|
||||
{
|
||||
echo "$progname (GNU $package) $version"
|
||||
echo "Uses a versions archive in git format."
|
||||
echo "Copyright (C) 2002-2010 Free Software Foundation, Inc.
|
||||
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
|
||||
This is free software: you are free to change and redistribute it.
|
||||
There is NO WARRANTY, to the extent permitted by law."
|
||||
echo "Written by" "Bruno Haible"
|
||||
}
|
||||
|
||||
# func_fatal_error message
|
||||
# outputs to stderr a fatal error message, and terminates the program.
|
||||
func_fatal_error ()
|
||||
{
|
||||
echo "autopoint: *** $1" 1>&2
|
||||
echo "autopoint: *** Stop." 1>&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Command-line option processing.
|
||||
# Removes the OPTIONS from the arguments. Sets the variables:
|
||||
# - force yes if --force was given, empty otherwise
|
||||
# - ver gettext version if -V was given, empty otherwise
|
||||
# - doit false if --dry-run was given, : otherwise
|
||||
{
|
||||
force=
|
||||
ver=
|
||||
doit=:
|
||||
|
||||
while test $# -gt 0; do
|
||||
case "$1" in
|
||||
-n | --dry-run | --dry-ru | --dry-r | --dry- | --dry | --dr | --d )
|
||||
shift
|
||||
doit=false ;;
|
||||
-f | --force | --forc | --for | --fo | --f )
|
||||
shift
|
||||
force=yes ;;
|
||||
--help | --hel | --he | --h )
|
||||
func_usage; exit 0 ;;
|
||||
# -V ) # Some people put a space between -V and the version number.
|
||||
# shift
|
||||
# if test $# = 0; then
|
||||
# func_usage 1>&2
|
||||
# exit 1
|
||||
# fi
|
||||
# ver=$1;
|
||||
# shift ;;
|
||||
# -V*) # Some people omit the space between -V and the version number.
|
||||
# ver=`echo "X$1" | sed -e 's/^X-V//'`
|
||||
# shift ;;
|
||||
--version | --versio | --versi | --vers | --ver | --ve | --v )
|
||||
func_version
|
||||
exit 0 ;;
|
||||
-- ) # Stop option prcessing
|
||||
shift; break ;;
|
||||
-* )
|
||||
echo "autopoint: unknown option $1" 1>&2
|
||||
echo "Try 'autopoint --help' for more information." 1>&2
|
||||
exit 1 ;;
|
||||
* )
|
||||
break ;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
# Command-line argument processing.
|
||||
# Analyzes the remaining arguments.
|
||||
{
|
||||
if test $# -gt 0; then
|
||||
func_usage 1>&2
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
srcdir=`pwd`
|
||||
# The current directory is now $srcdir.
|
||||
|
||||
# Check integrity of package: A configure.in/ac must be present. Sets variable
|
||||
# - configure_in name of configure.in/ac file.
|
||||
if test -f configure.in; then
|
||||
configure_in=configure.in
|
||||
else
|
||||
if test -f configure.ac; then
|
||||
configure_in=configure.ac
|
||||
else
|
||||
# KDE specific convention: configure.in.in
|
||||
if test -f configure.in.in; then
|
||||
configure_in=configure.in.in
|
||||
else
|
||||
func_fatal_error "Missing configure.in or configure.ac, please cd to your package first."
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# Check whether the -V option and the version number in configure.in match.
|
||||
# At least one of the two must be given. If both are given, they must agree.
|
||||
sed_extract_AM_GNU_GETTEXT_VERSION_argument='s/^AM_GNU_GETTEXT_VERSION(\([^()]*\)).*$/\1/'
|
||||
sed_remove_outer_brackets='s/^\[\(.*\)\]$/\1/'
|
||||
xver=`cat "$configure_in" | grep '^AM_GNU_GETTEXT_VERSION(' | sed -n -e "$sed_extract_AM_GNU_GETTEXT_VERSION_argument"p | sed -e "$sed_remove_outer_brackets" | sed -e 1q`
|
||||
if test -z "$xver" && test -f intl/VERSION; then
|
||||
xver=`cat intl/VERSION | LC_ALL=C sed -n -e 's/^.*gettext-\([-+_.0-9A-Za-z]*\).*$/\1/p'`
|
||||
fi
|
||||
if test -n "$xver"; then
|
||||
if test -n "$ver"; then
|
||||
if test "X$ver" != "X$xver"; then
|
||||
func_fatal_error "Version mismatch: specified -V $ver but the package uses gettext version $xver"
|
||||
fi
|
||||
else
|
||||
ver="$xver"
|
||||
fi
|
||||
else
|
||||
if test -z "$ver"; then
|
||||
func_fatal_error "Missing version: please specify in $configure_in through a line 'AM_GNU_GETTEXT_VERSION(x.yy.zz)' the gettext version the package is using"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Check whether the version number is supported.
|
||||
case "$ver" in
|
||||
0.10.35 | 0.10.36 | 0.10.37 | 0.10.38 | 0.10.39 | 0.10.40 | \
|
||||
0.11 | 0.11.1 | 0.11.2 | 0.11.3 | 0.11.4 | 0.11.5 | \
|
||||
0.12 | 0.12.1 | \
|
||||
0.13 | 0.13.1 | \
|
||||
0.14 | 0.14.1 | 0.14.2 | 0.14.3 | 0.14.4 | 0.14.5 | 0.14.6 | \
|
||||
0.15 | \
|
||||
0.16 | 0.16.1 | \
|
||||
0.17 | \
|
||||
0.18 | 0.18.1 )
|
||||
;;
|
||||
*)
|
||||
func_fatal_error "The AM_GNU_GETTEXT_VERSION declaration in your $configure_in
|
||||
file requires the infrastructure from gettext-$ver but this version
|
||||
is older. Please upgrade to gettext-$ver or newer."
|
||||
;;
|
||||
esac
|
||||
|
||||
# Check in which directory config.rpath, mkinstalldirs etc. belong.
|
||||
auxdir=`cat "$configure_in" | grep '^AC_CONFIG_AUX_DIR' | sed -n -e 's/AC_CONFIG_AUX_DIR(\([^()]*\))/\1/p' | sed -e 's/^\[\(.*\)\]$/\1/' | sed -e 1q`
|
||||
if test -n "$auxdir"; then
|
||||
auxdir="$auxdir/"
|
||||
fi
|
||||
|
||||
# Check in which directory the *.m4 macros belong.
|
||||
m4dir=m4
|
||||
if test -f Makefile.am; then
|
||||
# A package using automake.
|
||||
# Extract the macro directory name from Makefile.am.
|
||||
aclocal_amflags=`grep '^ACLOCAL_AMFLAGS[ ]*=' Makefile.am | sed -e 's/^ACLOCAL_AMFLAGS[ ]*=\(.*\)$/\1/'`
|
||||
m4dir_is_next=
|
||||
for arg in $aclocal_amflags; do
|
||||
if test -n "$m4dir_is_next"; then
|
||||
m4dir="$arg"
|
||||
break
|
||||
else
|
||||
if test "X$arg" = "X-I"; then
|
||||
m4dir_is_next=yes
|
||||
else
|
||||
m4dir_is_next=
|
||||
fi
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
# Check whether to omit the intl/ directory.
|
||||
omitintl=`cat "$configure_in" | grep '^AM_GNU_GETTEXT' | sed -n -e 's/^AM_GNU_GETTEXT(\([^(),]*\).*$/\1/p' | sed -e 's/^\[\(.*\)\]$/\1/' | sed -e 1q`
|
||||
omitintl=`if test 'external' = "$omitintl"; then echo yes; fi`
|
||||
|
||||
# Check in which directory or directories the po/* infrastructure belongs.
|
||||
sed_extract_config_files='s,#.*$,,
|
||||
s,^dnl .*$,,
|
||||
s, dnl .*$,,
|
||||
/AC_CONFIG_FILES(/ {
|
||||
ta
|
||||
:a
|
||||
s/)/)/
|
||||
tb
|
||||
s/\\$//
|
||||
N
|
||||
ba
|
||||
:b
|
||||
s,^.*AC_CONFIG_FILES([[ ]*\([^]"$`\\)]*\).*$,\1,p
|
||||
}'
|
||||
configfiles=`cat "$configure_in" | sed -n -e "$sed_extract_config_files"`
|
||||
# PO directories have a Makefile.in generated from Makefile.in.in.
|
||||
# Treat a directory as a PO directory if and only if it has a
|
||||
# POTFILES.in file. This allows packages to have multiple PO
|
||||
# directories under different names or in different locations.
|
||||
sed_remove_Makefile_in='s,/Makefile\.in$,,'
|
||||
podirs=`for f in $configfiles; do case "$f" in */Makefile.in) echo $f;; esac; done | sed -e "$sed_remove_Makefile_in"`
|
||||
if test -z "$podirs"; then
|
||||
# If we cannot get the list of PO directories from configure.ac, assume the
|
||||
# common default.
|
||||
podirs="po"
|
||||
fi
|
||||
|
||||
# Set up a temporary checkout directory.
|
||||
# Set variables
|
||||
# - work_dir directory containing the temporary checkout
|
||||
work_dir=tmpwrk$$
|
||||
mkdir "$work_dir" || {
|
||||
if test -d "$work_dir"; then
|
||||
func_fatal_error "directory $work_dir already exists"
|
||||
else
|
||||
func_fatal_error "cannot create directory $work_dir"
|
||||
fi
|
||||
}
|
||||
|
||||
# We support three archive formats.
|
||||
#
|
||||
# Format | Size (KiB) for gettext-0.17 | Extra tools needed |
|
||||
# -------+-----------------------------+--------------------+
|
||||
# dir | 3000 | -- |
|
||||
# cvs | 356 | cvs |
|
||||
# git | 484 | git |
|
||||
# -------+-----------------------------+--------------------+
|
||||
|
||||
case "git" in
|
||||
dir)
|
||||
# The archive of different versions is very large, but using it does not
|
||||
# require special tools.
|
||||
gzip -d -c < "$gettext_dir/archive.dir.tar.gz" | (cd "$work_dir" && tar xf - "gettext-$ver")
|
||||
if test `find "$work_dir" -type f -print | wc -l` = 0; then
|
||||
rm -rf "$work_dir"
|
||||
func_fatal_error "infrastructure files for version $ver not found; this is autopoint from GNU $package $version"
|
||||
fi
|
||||
mv "$work_dir/gettext-$ver" "$work_dir/archive"
|
||||
;;
|
||||
|
||||
cvs)
|
||||
# We distributed the many different versions of the files in a CVS
|
||||
# repository. This guaranteed a good compression rate:
|
||||
#
|
||||
# Including version size in KB of
|
||||
# "du autopoint-files/archive"
|
||||
# 0.10.35 240
|
||||
# 0.10.36 428
|
||||
# 0.10.37 436
|
||||
# 0.10.38 488
|
||||
# 0.10.39 500
|
||||
# 0.10.40 528
|
||||
# 0.11 720
|
||||
# 0.11.1 740
|
||||
# 0.11.2 748
|
||||
# 0.11.3 804
|
||||
# 0.11.4 864
|
||||
# 0.11.5 880
|
||||
# 0.12 1032
|
||||
# 0.12.1 1032
|
||||
# 0.13 1220
|
||||
# 0.13.1 1236
|
||||
# 0.14 1296
|
||||
# 0.14.1 1300
|
||||
# 0.14.2 1420
|
||||
# 0.14.3 1428
|
||||
# 0.14.4 1464
|
||||
# 0.14.5 1508
|
||||
# 0.14.6 1580
|
||||
# 0.15 1760
|
||||
# 0.16 1808
|
||||
# 0.16.1 1812
|
||||
# 0.17 2128
|
||||
# 0.18 2656
|
||||
#
|
||||
# The requirement that the user must have the CVS program available is not
|
||||
# a severe restrictions, because most of the people who use autopoint are
|
||||
# users of CVS.
|
||||
#
|
||||
# But the CVS format is now deprecated, because "cvs init" does not work in
|
||||
# all circumstances
|
||||
# (see <http://lists.gnu.org/archive/html/bug-cvs/2010-05/msg00003.html>)
|
||||
# and we are not allowed to distribute the cvs infrastructure files
|
||||
# ourselves
|
||||
# (see <http://lists.gnu.org/archive/html/bug-cvs/2010-06/msg00011.html>).
|
||||
#
|
||||
# Check availability of the CVS program.
|
||||
(cvs -v) >/dev/null 2>/dev/null || func_fatal_error "cvs program not found"
|
||||
|
||||
# Set up a temporary CVS repository.
|
||||
# We need the temporary CVS repository because any checkout needs write
|
||||
# access to the CVSROOT/history file, so it cannot be under $gettext_dir.
|
||||
# We need the temporary checkout directory because when --force was not
|
||||
# given, we need to compare the existing files with the checked out ones.
|
||||
# Set variables
|
||||
# - cvs_dir directory containing the temporary repository
|
||||
cvs_dir=tmpcvs$$
|
||||
# Use an umask of 077, to avoid attacks that work by overwriting files in
|
||||
# the "$CVSROOT"/CVSROOT directory.
|
||||
(umask 077 && mkdir "$cvs_dir") || {
|
||||
if test -d "$cvs_dir"; then
|
||||
func_fatal_error "directory $cvs_dir already exists"
|
||||
else
|
||||
func_fatal_error "cannot create directory $cvs_dir"
|
||||
fi
|
||||
}
|
||||
CVSROOT="$srcdir/$cvs_dir"
|
||||
unset CVS_CLIENT_LOG
|
||||
unset CVS_CLIENT_PORT
|
||||
unset CVS_IGNORE_REMOTE_ROOT
|
||||
unset CVS_LOCAL_BRANCH_NUM
|
||||
unset CVS_NOBASES
|
||||
unset CVS_PASSFILE
|
||||
unset CVS_PASSWORD
|
||||
unset CVS_PROXY_PORT
|
||||
unset CVS_RCMD_PORT
|
||||
unset CVS_RSH
|
||||
unset CVS_SERVER
|
||||
unset CVS_SERVER_SLEEP
|
||||
CVS_SIGN_COMMITS=
|
||||
export CVS_SIGN_COMMITS
|
||||
unset CVS_SSH
|
||||
unset CVS_VERIFY_CHECKOUTS
|
||||
unset CVS_VERIFY_TEMPLATE
|
||||
unset CVSIGNORE
|
||||
unset CVSREAD
|
||||
unset CVSREADONLYFS
|
||||
unset CVSUMASK
|
||||
unset CVSWRAPPERS
|
||||
|
||||
# Need to pass -d "$CVSROOT", because there may be a CVS directory in the
|
||||
# current directory.
|
||||
cvs -d "$CVSROOT" init
|
||||
gzip -d -c < "$gettext_dir/archive.cvs.tar.gz" | (cd "$cvs_dir" && tar xf -)
|
||||
|
||||
cd "$work_dir"
|
||||
cvsver=gettext-`echo "$ver" | sed -e 's/\./_/g'`
|
||||
(cvs -d "$CVSROOT" checkout -r"$cvsver" archive > /dev/null) 2>&1 | grep -v '^cvs checkout: Updating'
|
||||
find archive -name CVS -type d -print | xargs rm -rf
|
||||
cd ..
|
||||
rm -rf "$cvs_dir"
|
||||
# Check that really all CVS directories are gone, otherwise we would overwrite
|
||||
# the contents of the user's CVS directories.
|
||||
if test `find $work_dir/archive -name CVS -type d -print | wc -l` != 0; then
|
||||
rm -rf "$work_dir"
|
||||
func_fatal_error "failed to remove all CVS subdirectories"
|
||||
fi
|
||||
if test `find $work_dir/archive -type f -print | wc -l` = 0; then
|
||||
rm -rf "$work_dir"
|
||||
func_fatal_error "infrastructure files for version $ver not found; this is autopoint from GNU $package $version"
|
||||
fi
|
||||
;;
|
||||
|
||||
git)
|
||||
# Check availability of the git program.
|
||||
(git --version) >/dev/null 2>/dev/null || func_fatal_error "git program not found"
|
||||
mkdir "$work_dir/archive"
|
||||
gzip -d -c < "$gettext_dir/archive.git.tar.gz" | (cd "$work_dir/archive" && tar xf -)
|
||||
(cd "$work_dir/archive" && git checkout -q "gettext-$ver") || {
|
||||
rm -rf "$work_dir"
|
||||
func_fatal_error "infrastructure files for version $ver not found; this is autopoint from GNU $package $version"
|
||||
}
|
||||
(cd "$work_dir/archive" && rm -rf .git .gitignore)
|
||||
;;
|
||||
esac
|
||||
|
||||
# func_destfile file
|
||||
# determines the destination file, relative to the package's top level
|
||||
# directory, for a given file name, relative to archive.
|
||||
# Sets variables
|
||||
# - destfile relative destination file name, or
|
||||
# empty if the file shall be omitted
|
||||
# - sharedowner yes if the file is not only owned by GNU gettext but may
|
||||
# be installed by automake or other tools, otherwise empty
|
||||
# - allpodirs yes if the file is to be installed in every dir in $podirs
|
||||
func_destfile ()
|
||||
{
|
||||
# There are five categories of files:
|
||||
# ABOUT_NLS -> top level directory
|
||||
# config.rpath mkinstalldirs -> $auxdir
|
||||
# m4/* -> $m4dir/
|
||||
# intl/* -> intl/
|
||||
# po/* ->
|
||||
sharedowner=
|
||||
allpodirs=
|
||||
case `echo "$1" | sed -e 's,[^/]*$,,'` in
|
||||
"" )
|
||||
case "$1" in
|
||||
config.rpath ) destfile="$auxdir$1" ;;
|
||||
mkinstalldirs ) destfile="$auxdir$1" sharedowner=yes ;;
|
||||
* ) destfile="$1" ;;
|
||||
esac
|
||||
;;
|
||||
m4/ ) destfile=`echo "$1" | sed -e "s,^m4/,$m4dir/,"` ;;
|
||||
intl/ ) if test -n "$omitintl"; then destfile=""; else destfile="$1"; fi ;;
|
||||
po/ ) destfile=`echo "$1" | sed -e "s,^po/,,"` allpodirs=yes ;;
|
||||
* ) destfile="$1" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
# func_compare existingfile gettextfile
|
||||
# compares the existing file and the file from gettext, and decides whether the
|
||||
# existing file should be overwritten with the file from gettext. Returns 0 if
|
||||
# it should be overwritten, or 1 if it should be skipped.
|
||||
sed_extract_serial='s/^#.* serial \([^ ]*\).*/\1/p
|
||||
1q'
|
||||
func_compare ()
|
||||
{
|
||||
if cmp -s "$1" "$2"; then
|
||||
false
|
||||
else
|
||||
case "$2" in
|
||||
*.m4)
|
||||
# For interoperability with gnulib. gnulib often has newer versions of
|
||||
# the *.m4 files than the latest gettext release. Don't overwrite a
|
||||
# newer version from gnulib with an older version from the gettext
|
||||
# release. The version can be retrieved from the first line, which
|
||||
# looks like this: # file.m4 serial NN ...
|
||||
existing_serial=`sed -n -e "$sed_extract_serial" < "$1"`
|
||||
gettext_serial=`sed -n -e "$sed_extract_serial" < "$2"`
|
||||
if test -n "$existing_serial" && test -n "$gettext_serial" \
|
||||
&& test "$existing_serial" -ge "$gettext_serial" 2> /dev/null; then
|
||||
false
|
||||
else
|
||||
true
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
true
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
}
|
||||
|
||||
# If some files have been locally modified and we have not been requested
|
||||
# to overwrite them, then bail out. This is better than leaving a source
|
||||
# package around where half of the files are locally modified and half are
|
||||
# original - too great risk of version mismatch.
|
||||
if test -z "$force"; then
|
||||
mismatch=
|
||||
func_tmpdir
|
||||
mismatchfile="$tmp"/autopoint.diff
|
||||
for file in `find "$work_dir/archive" -type f -print | sed -e "s,^$work_dir/archive/,," | LC_ALL=C sort`; do
|
||||
func_destfile "$file"
|
||||
if test -n "$destfile"; then
|
||||
func_compare_to_destfile ()
|
||||
{
|
||||
finaldestfile="$1"
|
||||
if test -f "$finaldestfile"; then
|
||||
if func_compare "$finaldestfile" "$work_dir/archive/$file"; then
|
||||
if test -n "$sharedowner"; then
|
||||
echo "autopoint: warning: File $finaldestfile has been locally modified." 1>&2
|
||||
else
|
||||
echo "autopoint: File $finaldestfile has been locally modified." 1>&2
|
||||
mismatch=yes
|
||||
diff -c "$work_dir/archive/$file" "$finaldestfile" | sed -e "1s,$work_dir/archive/,," >> "$mismatchfile"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
}
|
||||
if test -n "$allpodirs"; then
|
||||
for dir in $podirs; do
|
||||
func_compare_to_destfile "$dir/$destfile"
|
||||
done
|
||||
else
|
||||
func_compare_to_destfile "$destfile"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
if test -n "$mismatch"; then
|
||||
rm -rf "$work_dir"
|
||||
func_fatal_error "Some files have been locally modified. Not overwriting them because --force has not been specified. For your convenience, you find the local modifications in the file '$mismatchfile'."
|
||||
fi
|
||||
rm -rf "$tmp"
|
||||
fi
|
||||
|
||||
# func_mkdir_for to
|
||||
# ensures the directory that would the given file exists.
|
||||
# 'to' is a relative pathname, relative to the current directory.
|
||||
func_mkdir_for ()
|
||||
{
|
||||
base=`echo "$1" | sed -e 's,/[^/]*$,,'`
|
||||
if test "X$base" != "X$1" && test -n "$base"; then
|
||||
func_mkdir_for "$base"
|
||||
# Recompute base. It was clobbered by the recursive call.
|
||||
base=`echo "$1" | sed -e 's,/[^/]*$,,'`
|
||||
test -d "$base" || { echo "Creating directory $base"; mkdir "$base"; }
|
||||
fi
|
||||
}
|
||||
|
||||
# func_copy from to
|
||||
# copies a file.
|
||||
# 'from' is a relative pathname, relative to the current directory.
|
||||
# 'to' is a relative pathname, relative to the current directory.
|
||||
func_copy ()
|
||||
{
|
||||
if $doit; then
|
||||
func_mkdir_for "$2"
|
||||
rm -f "$2"
|
||||
echo "Copying file $2"
|
||||
cp "$1" "$2"
|
||||
else
|
||||
echo "Copy file $2"
|
||||
fi
|
||||
}
|
||||
|
||||
# func_backup to
|
||||
# makes a backup of a file that is about to be overwritten or replaced.
|
||||
# 'to' is a relative pathname, relative to the current directory.
|
||||
func_backup ()
|
||||
{
|
||||
if $doit; then
|
||||
if test -f "$1"; then
|
||||
rm -f "$1~"
|
||||
cp -p "$1" "$1~"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# Now copy the files.
|
||||
for file in `find "$work_dir/archive" -type f -print | sed -e "s,^$work_dir/archive/,," | LC_ALL=C sort`; do
|
||||
func_destfile "$file"
|
||||
if test -n "$destfile"; then
|
||||
func_copy_to_destfile ()
|
||||
{
|
||||
finaldestfile="$1"
|
||||
mustcopy=
|
||||
if test -f "$finaldestfile"; then
|
||||
if func_compare "$finaldestfile" "$work_dir/archive/$file"; then
|
||||
if test -n "$force"; then
|
||||
# Overwrite locally modified file.
|
||||
mustcopy=yes
|
||||
fi
|
||||
# If --force is not specified, don't overwrite locally modified files
|
||||
# for which GNU gettext is a shared owner.
|
||||
fi
|
||||
else
|
||||
mustcopy=yes
|
||||
fi
|
||||
if test -n "$mustcopy"; then
|
||||
func_backup "$finaldestfile"
|
||||
func_copy "$work_dir/archive/$file" "$finaldestfile"
|
||||
fi
|
||||
}
|
||||
if test -n "$allpodirs"; then
|
||||
for dir in $podirs; do
|
||||
func_copy_to_destfile "$dir/$destfile"
|
||||
done
|
||||
else
|
||||
func_copy_to_destfile "$destfile"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
# That's it.
|
||||
rm -rf "$work_dir"
|
||||
exit 0
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,123 +0,0 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# Copyright (C) 2003, 2005-2007 Free Software Foundation, Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU Library General Public License as published
|
||||
# by the Free Software Foundation; either version 2, 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 Library General Public
|
||||
# License along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
# USA.
|
||||
#
|
||||
|
||||
# Find a way to echo strings without interpreting backslash.
|
||||
if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
|
||||
echo='echo'
|
||||
else
|
||||
if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
|
||||
echo='printf %s\n'
|
||||
else
|
||||
echo_func () {
|
||||
cat <<EOT
|
||||
$*
|
||||
EOT
|
||||
}
|
||||
echo='echo_func'
|
||||
fi
|
||||
fi
|
||||
|
||||
# This script is primarily a shell function library. In order for
|
||||
# ". gettext.sh" to find it, we install it in $PREFIX/bin (that is usually
|
||||
# contained in $PATH), rather than in some other location such as
|
||||
# $PREFIX/share/sh-scripts or $PREFIX/share/gettext. In order to not violate
|
||||
# the Filesystem Hierarchy Standard when doing so, this script is executable.
|
||||
# Therefore it needs to support the standard --help and --version.
|
||||
if test -z "$ZSH_VERSION"; then
|
||||
# zsh is not POSIX compliant: By default, while ". gettext.sh" is executed,
|
||||
# it sets $0 to "gettext.sh", defeating the purpose of this test. But
|
||||
# fortunately we know that when running under zsh, this script is always
|
||||
# being sourced, not executed, because hardly anyone is crazy enough to
|
||||
# install zsh as /bin/sh.
|
||||
case "$0" in
|
||||
gettext.sh | */gettext.sh | *\\gettext.sh)
|
||||
progname=$0
|
||||
package=gettext-runtime
|
||||
version=0.18.1
|
||||
# func_usage
|
||||
# outputs to stdout the --help usage message.
|
||||
func_usage ()
|
||||
{
|
||||
echo "GNU gettext shell script function library version $version"
|
||||
echo "Usage: . gettext.sh"
|
||||
}
|
||||
# func_version
|
||||
# outputs to stdout the --version message.
|
||||
func_version ()
|
||||
{
|
||||
echo "$progname (GNU $package) $version"
|
||||
echo "Copyright (C) 2003-2007 Free Software Foundation, Inc.
|
||||
License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl.html>
|
||||
This is free software: you are free to change and redistribute it.
|
||||
There is NO WARRANTY, to the extent permitted by law."
|
||||
echo "Written by" "Bruno Haible"
|
||||
}
|
||||
if test $# = 1; then
|
||||
case "$1" in
|
||||
--help | --hel | --he | --h )
|
||||
func_usage; exit 0 ;;
|
||||
--version | --versio | --versi | --vers | --ver | --ve | --v )
|
||||
func_version; exit 0 ;;
|
||||
esac
|
||||
fi
|
||||
func_usage 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# eval_gettext MSGID
|
||||
# looks up the translation of MSGID and substitutes shell variables in the
|
||||
# result.
|
||||
eval_gettext () {
|
||||
gettext "$1" | (export PATH `envsubst --variables "$1"`; envsubst "$1")
|
||||
}
|
||||
|
||||
# eval_ngettext MSGID MSGID-PLURAL COUNT
|
||||
# looks up the translation of MSGID / MSGID-PLURAL for COUNT and substitutes
|
||||
# shell variables in the result.
|
||||
eval_ngettext () {
|
||||
ngettext "$1" "$2" "$3" | (export PATH `envsubst --variables "$1 $2"`; envsubst "$1 $2")
|
||||
}
|
||||
|
||||
# Note: This use of envsubst is much safer than using the shell built-in 'eval'
|
||||
# would be.
|
||||
# 1) The security problem with Chinese translations that happen to use a
|
||||
# character such as \xe0\x60 is avoided.
|
||||
# 2) The security problem with malevolent translators who put in command lists
|
||||
# like "$(...)" or "`...`" is avoided.
|
||||
# 3) The translations can only refer to shell variables that are already
|
||||
# mentioned in MSGID or MSGID-PLURAL.
|
||||
#
|
||||
# Note: "export PATH" above is a dummy; this is for the case when
|
||||
# `envsubst --variables ...` returns nothing.
|
||||
#
|
||||
# Note: In eval_ngettext above, "$1 $2" means a string whose variables set is
|
||||
# the union of the variables set of "$1" and "$2".
|
||||
#
|
||||
# Note: The minimal use of backquote above ensures that trailing newlines are
|
||||
# not dropped, not from the gettext invocation and not from the value of any
|
||||
# shell variable.
|
||||
#
|
||||
# Note: Field splitting on the `envsubst --variables ...` result is desired,
|
||||
# since envsubst outputs the variables, separated by newlines. Pathname
|
||||
# wildcard expansion or tilde expansion has no effect here, since the words
|
||||
# output by "envsubst --variables ..." consist solely of alphanumeric
|
||||
# characters and underscore.
|
||||
File diff suppressed because it is too large.
Load diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,177 +0,0 @@
|
||||
--- gettext-runtime/intl/printf.c
|
||||
+++ gettext-runtime/intl/printf.c
|
||||
@@ -69,7 +69,7 @@
|
||||
#define STATIC static
|
||||
|
||||
/* This needs to be consistent with libgnuintl.h.in. */
|
||||
-#if defined __NetBSD__ || defined __BEOS__ || defined __CYGWIN__ || defined __MINGW32__
|
||||
+#if defined __NetBSD__ || defined __BEOS__ || defined __CYGWIN__
|
||||
/* Don't break __attribute__((format(printf,M,N))).
|
||||
This redefinition is only possible because the libc in NetBSD, Cygwin,
|
||||
mingw does not have a function __printf__. */
|
||||
--- gettext-runtime/intl/libgnuintl.h.in
|
||||
+++ gettext-runtime/intl/libgnuintl.h.in
|
||||
@@ -330,7 +330,7 @@
|
||||
|
||||
#if !(defined printf && defined _GL_STDIO_H) /* don't override gnulib */
|
||||
#undef printf
|
||||
-#if defined __NetBSD__ || defined __BEOS__ || defined __CYGWIN__ || defined __MINGW32__
|
||||
+#if defined __NetBSD__ || defined __BEOS__ || defined __CYGWIN__
|
||||
/* Don't break __attribute__((format(printf,M,N))).
|
||||
This redefinition is only possible because the libc in NetBSD, Cygwin,
|
||||
mingw does not have a function __printf__.
|
||||
---- gettext-tools/gnulib-lib/clean-temp.c
|
||||
+++ gettext-tools/gnulib-lib/clean-temp.c
|
||||
@@ -66,9 +66,11 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
+#ifndef _WIN64
|
||||
#ifndef uintptr_t
|
||||
# define uintptr_t unsigned long
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
#if !GNULIB_FCNTL_SAFER
|
||||
/* The results of open() in this file are not used with fchdir,
|
||||
--- gettext-tools/gnulib-lib/fstrcmp.c
|
||||
+++ gettext-tools/gnulib-lib/fstrcmp.c
|
||||
@@ -55,9 +55,11 @@
|
||||
#include "minmax.h"
|
||||
#include "xalloc.h"
|
||||
|
||||
+#ifndef _WIN64
|
||||
#ifndef uintptr_t
|
||||
# define uintptr_t unsigned long
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
|
||||
#define ELEMENT char
|
||||
--- gettext-tools/gnulib-lib/gl_array_list.c
|
||||
+++ gettext-tools/gnulib-lib/gl_array_list.c
|
||||
@@ -55,9 +55,11 @@
|
||||
/* Checked size_t computations. */
|
||||
#include "xsize.h"
|
||||
|
||||
+#ifndef _WIN64
|
||||
#ifndef uintptr_t
|
||||
# define uintptr_t unsigned long
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
/* -------------------------- gl_list_t Data Type -------------------------- */
|
||||
|
||||
--- gettext-tools/gnulib-lib/gl_linkedhash_list.c
|
||||
+++ gettext-tools/gnulib-lib/gl_linkedhash_list.c
|
||||
@@ -55,9 +55,11 @@
|
||||
|
||||
#include "xsize.h"
|
||||
|
||||
+#ifndef _WIN64
|
||||
#ifndef uintptr_t
|
||||
# define uintptr_t unsigned long
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
#define WITH_HASHTABLE 1
|
||||
|
||||
--- gettext-tools/gnulib-lib/stdio.in.h
|
||||
+++ gettext-tools/gnulib-lib/stdio.in.h
|
||||
@@ -642,10 +642,6 @@
|
||||
# if (@GNULIB_PRINTF_POSIX@ && @REPLACE_PRINTF@) \
|
||||
|| (@GNULIB_PRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@)
|
||||
# if defined __GNUC__
|
||||
-# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
-/* Don't break __attribute__((format(printf,M,N))). */
|
||||
-# define printf __printf__
|
||||
-# endif
|
||||
_GL_FUNCDECL_RPL_1 (__printf__, int,
|
||||
(const char *format, ...)
|
||||
__asm__ (@ASM_SYMBOL_PREFIX@
|
||||
--- gettext-tools/gnulib-lib/tempname.c
|
||||
+++ gettext-tools/gnulib-lib/tempname.c
|
||||
@@ -54,6 +54,10 @@
|
||||
#include <stdint.h>
|
||||
#include <unistd.h>
|
||||
|
||||
+#ifdef _WIN32
|
||||
+# include <direct.h>
|
||||
+#endif
|
||||
+
|
||||
#include <sys/stat.h>
|
||||
|
||||
#if _LIBC
|
||||
@@ -73,6 +73,10 @@
|
||||
# define __xstat64(version, file, buf) stat (file, buf)
|
||||
#endif
|
||||
|
||||
+#ifdef _WIN32
|
||||
+# define mkdir(path,mode) _mkdir(path)
|
||||
+#endif
|
||||
+
|
||||
#if ! (HAVE___SECURE_GETENV || _LIBC)
|
||||
# define __secure_getenv getenv
|
||||
#endif
|
||||
--- gettext-tools/src/write-java.c
|
||||
+++ gettext-tools/src/write-java.c
|
||||
@@ -30,6 +30,10 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
+#ifdef _WIN32
|
||||
+# include <direct.h>
|
||||
+#endif
|
||||
+
|
||||
#include <sys/stat.h>
|
||||
#if !defined S_ISDIR && defined S_IFDIR
|
||||
# define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR)
|
||||
@@ -53,6 +53,10 @@
|
||||
# define S_IXUSR 00100
|
||||
#endif
|
||||
|
||||
+#ifdef _WIN32
|
||||
+# define mkdir(path,mode) _mkdir(path)
|
||||
+#endif
|
||||
+
|
||||
#include "c-ctype.h"
|
||||
#include "error.h"
|
||||
#include "xerror.h"
|
||||
--- gettext-tools/src/write-csharp.c
|
||||
+++ gettext-tools/src/write-csharp.c
|
||||
@@ -29,6 +29,10 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
+#ifdef _WIN32
|
||||
+# include <direct.h>
|
||||
+#endif
|
||||
+
|
||||
#include <sys/stat.h>
|
||||
#if !defined S_ISDIR && defined S_IFDIR
|
||||
# define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR)
|
||||
@@ -70,6 +70,10 @@
|
||||
# define S_IXOTH (S_IXUSR >> 6)
|
||||
#endif
|
||||
|
||||
+#ifdef _WIN32
|
||||
+# define mkdir(path,mode) _mkdir(path)
|
||||
+#endif
|
||||
+
|
||||
#include "c-ctype.h"
|
||||
#include "relocatable.h"
|
||||
#include "error.h"
|
||||
--- gettext-tools/woe32dll/export.h
|
||||
+++ gettext-tools/woe32dll/export.h
|
||||
@@ -90,7 +90,11 @@
|
||||
--export-all-symbols is used. */
|
||||
|
||||
/* IMP(x) is a symbol that contains the address of x. */
|
||||
+#ifdef _WIN64
|
||||
+#define IMP(x) __imp_##x
|
||||
+#else
|
||||
#define IMP(x) _imp__##x
|
||||
+#endif
|
||||
|
||||
/* Ensure that the variable x is exported from the library, and that a
|
||||
pseudo-variable IMP(x) is available. */
|
||||
@@ -1,66 +0,0 @@
|
||||
/* Class autosprintf - formatted output to an ostream.
|
||||
Copyright (C) 2002 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU Library General Public License as published
|
||||
by the Free Software Foundation; either version 2, 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
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
USA. */
|
||||
|
||||
#ifndef _AUTOSPRINTF_H
|
||||
#define _AUTOSPRINTF_H
|
||||
|
||||
#ifndef __attribute__
|
||||
/* This feature is available in gcc versions 2.5 and later. */
|
||||
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__
|
||||
# define __attribute__(Spec) /* empty */
|
||||
# endif
|
||||
/* The __-protected variants of `format' and `printf' attributes
|
||||
are accepted by gcc versions 2.6.4 (effectively 2.7) and later. */
|
||||
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
|
||||
# define __format__ format
|
||||
# define __printf__ printf
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
|
||||
namespace gnu
|
||||
{
|
||||
/* A temporary object, usually allocated on the stack, representing
|
||||
the result of an asprintf() call. */
|
||||
class autosprintf
|
||||
{
|
||||
public:
|
||||
/* Constructor: takes a format string and the printf arguments. */
|
||||
autosprintf (const char *format, ...)
|
||||
__attribute__ ((__format__ (__printf__, 2, 3)));
|
||||
/* Copy constructor. */
|
||||
autosprintf (const autosprintf& src);
|
||||
/* Destructor: frees the temporarily allocated string. */
|
||||
~autosprintf ();
|
||||
/* Conversion to string. */
|
||||
operator char * () const;
|
||||
operator std::string () const;
|
||||
/* Output to an ostream. */
|
||||
friend inline std::ostream& operator<< (std::ostream& stream, const autosprintf& tmp)
|
||||
{
|
||||
stream << (tmp.str ? tmp.str : "(error in autosprintf)");
|
||||
return stream;
|
||||
}
|
||||
private:
|
||||
char *str;
|
||||
};
|
||||
}
|
||||
|
||||
#endif /* _AUTOSPRINTF_H */
|
||||
@@ -1,357 +0,0 @@
|
||||
/* Public API for GNU gettext PO files - contained in libgettextpo.
|
||||
Copyright (C) 2003-2008, 2010 Free Software Foundation, Inc.
|
||||
Written by Bruno Haible <bruno@clisp.org>, 2003.
|
||||
|
||||
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 3 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, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _GETTEXT_PO_H
|
||||
#define _GETTEXT_PO_H 1
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/* =========================== Meta Information ============================ */
|
||||
|
||||
/* Version number: (major<<16) + (minor<<8) + subminor */
|
||||
#define LIBGETTEXTPO_VERSION 0x001201
|
||||
extern __declspec (dllimport) int libgettextpo_version;
|
||||
|
||||
/* ================================= Types ================================= */
|
||||
|
||||
/* A po_file_t represents the contents of a PO file. */
|
||||
typedef struct po_file *po_file_t;
|
||||
|
||||
/* A po_message_iterator_t represents an iterator through a domain of a
|
||||
PO file. */
|
||||
typedef struct po_message_iterator *po_message_iterator_t;
|
||||
|
||||
/* A po_message_t represents a message in a PO file. */
|
||||
typedef struct po_message *po_message_t;
|
||||
|
||||
/* A po_filepos_t represents a string's position within a source file. */
|
||||
typedef struct po_filepos *po_filepos_t;
|
||||
|
||||
/* A po_error_handler handles error situations. */
|
||||
struct po_error_handler
|
||||
{
|
||||
/* Signal an error. The error message is built from FORMAT and the following
|
||||
arguments. ERRNUM, if nonzero, is an errno value.
|
||||
Must increment the error_message_count variable declared in error.h.
|
||||
Must not return if STATUS is nonzero. */
|
||||
void (*error) (int status, int errnum,
|
||||
const char *format, ...)
|
||||
#if ((__GNUC__ == 3 && __GNUC_MINOR__ >= 1) || __GNUC__ > 3) && !__STRICT_ANSI__
|
||||
__attribute__ ((__format__ (__printf__, 3, 4)))
|
||||
#endif
|
||||
;
|
||||
|
||||
/* Signal an error. The error message is built from FORMAT and the following
|
||||
arguments. The error location is at FILENAME line LINENO. ERRNUM, if
|
||||
nonzero, is an errno value.
|
||||
Must increment the error_message_count variable declared in error.h.
|
||||
Must not return if STATUS is nonzero. */
|
||||
void (*error_at_line) (int status, int errnum,
|
||||
const char *filename, unsigned int lineno,
|
||||
const char *format, ...)
|
||||
#if ((__GNUC__ == 3 && __GNUC_MINOR__ >= 1) || __GNUC__ > 3) && !__STRICT_ANSI__
|
||||
__attribute__ ((__format__ (__printf__, 5, 6)))
|
||||
#endif
|
||||
;
|
||||
|
||||
/* Signal a multiline warning. The PREFIX applies to all lines of the
|
||||
MESSAGE. Free the PREFIX and MESSAGE when done. */
|
||||
void (*multiline_warning) (char *prefix, char *message);
|
||||
|
||||
/* Signal a multiline error. The PREFIX applies to all lines of the
|
||||
MESSAGE. Free the PREFIX and MESSAGE when done.
|
||||
Must increment the error_message_count variable declared in error.h if
|
||||
PREFIX is non-NULL. */
|
||||
void (*multiline_error) (char *prefix, char *message);
|
||||
};
|
||||
typedef const struct po_error_handler *po_error_handler_t;
|
||||
|
||||
/* A po_xerror_handler handles warnings, error and fatal error situations. */
|
||||
#define PO_SEVERITY_WARNING 0 /* just a warning, tell the user */
|
||||
#define PO_SEVERITY_ERROR 1 /* an error, the operation cannot complete */
|
||||
#define PO_SEVERITY_FATAL_ERROR 2 /* an error, the operation must be aborted */
|
||||
struct po_xerror_handler
|
||||
{
|
||||
/* Signal a problem of the given severity.
|
||||
MESSAGE and/or FILENAME + LINENO indicate where the problem occurred.
|
||||
If FILENAME is NULL, FILENAME and LINENO and COLUMN should be ignored.
|
||||
If LINENO is (size_t)(-1), LINENO and COLUMN should be ignored.
|
||||
If COLUMN is (size_t)(-1), it should be ignored.
|
||||
MESSAGE_TEXT is the problem description (if MULTILINE_P is true,
|
||||
multiple lines of text, each terminated with a newline, otherwise
|
||||
usually a single line).
|
||||
Must not return if SEVERITY is PO_SEVERITY_FATAL_ERROR. */
|
||||
void (*xerror) (int severity,
|
||||
po_message_t message,
|
||||
const char *filename, size_t lineno, size_t column,
|
||||
int multiline_p, const char *message_text);
|
||||
/* Signal a problem that refers to two messages.
|
||||
Similar to two calls to xerror.
|
||||
If possible, a "..." can be appended to MESSAGE_TEXT1 and prepended to
|
||||
MESSAGE_TEXT2. */
|
||||
void (*xerror2) (int severity,
|
||||
po_message_t message1,
|
||||
const char *filename1, size_t lineno1, size_t column1,
|
||||
int multiline_p1, const char *message_text1,
|
||||
po_message_t message2,
|
||||
const char *filename2, size_t lineno2, size_t column2,
|
||||
int multiline_p2, const char *message_text2);
|
||||
};
|
||||
typedef const struct po_xerror_handler *po_xerror_handler_t;
|
||||
|
||||
/* Memory allocation:
|
||||
The memory allocations performed by these functions use xmalloc(),
|
||||
therefore will cause a program exit if memory is exhausted.
|
||||
The memory allocated by po_file_read, and implicitly returned through
|
||||
the po_message_* functions, lasts until freed with po_file_free. */
|
||||
|
||||
|
||||
/* ============================= po_file_t API ============================= */
|
||||
|
||||
/* Create an empty PO file representation in memory. */
|
||||
extern po_file_t po_file_create (void);
|
||||
|
||||
/* Read a PO file into memory.
|
||||
Return its contents. Upon failure, return NULL and set errno. */
|
||||
#define po_file_read po_file_read_v3
|
||||
extern po_file_t po_file_read (const char *filename,
|
||||
po_xerror_handler_t handler);
|
||||
|
||||
/* Write an in-memory PO file to a file.
|
||||
Upon failure, return NULL and set errno. */
|
||||
#define po_file_write po_file_write_v2
|
||||
extern po_file_t po_file_write (po_file_t file, const char *filename,
|
||||
po_xerror_handler_t handler);
|
||||
|
||||
/* Free a PO file from memory. */
|
||||
extern void po_file_free (po_file_t file);
|
||||
|
||||
/* Return the names of the domains covered by a PO file in memory. */
|
||||
extern const char * const * po_file_domains (po_file_t file);
|
||||
|
||||
|
||||
/* =========================== Header entry API ============================ */
|
||||
|
||||
/* Return the header entry of a domain of a PO file in memory.
|
||||
The domain NULL denotes the default domain.
|
||||
Return NULL if there is no header entry. */
|
||||
extern const char * po_file_domain_header (po_file_t file, const char *domain);
|
||||
|
||||
/* Return the value of a field in a header entry.
|
||||
The return value is either a freshly allocated string, to be freed by the
|
||||
caller, or NULL. */
|
||||
extern char * po_header_field (const char *header, const char *field);
|
||||
|
||||
/* Return the header entry with a given field set to a given value. The field
|
||||
is added if necessary.
|
||||
The return value is a freshly allocated string. */
|
||||
extern char * po_header_set_field (const char *header, const char *field, const char *value);
|
||||
|
||||
|
||||
/* ======================= po_message_iterator_t API ======================= */
|
||||
|
||||
/* Create an iterator for traversing a domain of a PO file in memory.
|
||||
The domain NULL denotes the default domain. */
|
||||
extern po_message_iterator_t po_message_iterator (po_file_t file, const char *domain);
|
||||
|
||||
/* Free an iterator. */
|
||||
extern void po_message_iterator_free (po_message_iterator_t iterator);
|
||||
|
||||
/* Return the next message, and advance the iterator.
|
||||
Return NULL at the end of the message list. */
|
||||
extern po_message_t po_next_message (po_message_iterator_t iterator);
|
||||
|
||||
/* Insert a message in a PO file in memory, in the domain and at the position
|
||||
indicated by the iterator. The iterator thereby advances past the freshly
|
||||
inserted message. */
|
||||
extern void po_message_insert (po_message_iterator_t iterator, po_message_t message);
|
||||
|
||||
|
||||
/* =========================== po_message_t API ============================ */
|
||||
|
||||
/* Return a freshly constructed message.
|
||||
To finish initializing the message, you must set the msgid and msgstr. */
|
||||
extern po_message_t po_message_create (void);
|
||||
|
||||
/* Return the context of a message, or NULL for a message not restricted to a
|
||||
context. */
|
||||
extern const char * po_message_msgctxt (po_message_t message);
|
||||
|
||||
/* Change the context of a message. NULL means a message not restricted to a
|
||||
context. */
|
||||
extern void po_message_set_msgctxt (po_message_t message, const char *msgctxt);
|
||||
|
||||
/* Return the msgid (untranslated English string) of a message. */
|
||||
extern const char * po_message_msgid (po_message_t message);
|
||||
|
||||
/* Change the msgid (untranslated English string) of a message. */
|
||||
extern void po_message_set_msgid (po_message_t message, const char *msgid);
|
||||
|
||||
/* Return the msgid_plural (untranslated English plural string) of a message,
|
||||
or NULL for a message without plural. */
|
||||
extern const char * po_message_msgid_plural (po_message_t message);
|
||||
|
||||
/* Change the msgid_plural (untranslated English plural string) of a message.
|
||||
NULL means a message without plural. */
|
||||
extern void po_message_set_msgid_plural (po_message_t message, const char *msgid_plural);
|
||||
|
||||
/* Return the msgstr (translation) of a message.
|
||||
Return the empty string for an untranslated message. */
|
||||
extern const char * po_message_msgstr (po_message_t message);
|
||||
|
||||
/* Change the msgstr (translation) of a message.
|
||||
Use an empty string to denote an untranslated message. */
|
||||
extern void po_message_set_msgstr (po_message_t message, const char *msgstr);
|
||||
|
||||
/* Return the msgstr[index] for a message with plural handling, or
|
||||
NULL when the index is out of range or for a message without plural. */
|
||||
extern const char * po_message_msgstr_plural (po_message_t message, int index);
|
||||
|
||||
/* Change the msgstr[index] for a message with plural handling.
|
||||
Use a NULL value at the end to reduce the number of plural forms. */
|
||||
extern void po_message_set_msgstr_plural (po_message_t message, int index, const char *msgstr);
|
||||
|
||||
/* Return the comments for a message. */
|
||||
extern const char * po_message_comments (po_message_t message);
|
||||
|
||||
/* Change the comments for a message.
|
||||
comments should be a multiline string, ending in a newline, or empty. */
|
||||
extern void po_message_set_comments (po_message_t message, const char *comments);
|
||||
|
||||
/* Return the extracted comments for a message. */
|
||||
extern const char * po_message_extracted_comments (po_message_t message);
|
||||
|
||||
/* Change the extracted comments for a message.
|
||||
comments should be a multiline string, ending in a newline, or empty. */
|
||||
extern void po_message_set_extracted_comments (po_message_t message, const char *comments);
|
||||
|
||||
/* Return the i-th file position for a message, or NULL if i is out of
|
||||
range. */
|
||||
extern po_filepos_t po_message_filepos (po_message_t message, int i);
|
||||
|
||||
/* Remove the i-th file position from a message.
|
||||
The indices of all following file positions for the message are decremented
|
||||
by one. */
|
||||
extern void po_message_remove_filepos (po_message_t message, int i);
|
||||
|
||||
/* Add a file position to a message, if it is not already present for the
|
||||
message.
|
||||
file is the file name.
|
||||
start_line is the line number where the string starts, or (size_t)(-1) if no
|
||||
line number is available. */
|
||||
extern void po_message_add_filepos (po_message_t message, const char *file, size_t start_line);
|
||||
|
||||
/* Return the previous context of a message, or NULL for none. */
|
||||
extern const char * po_message_prev_msgctxt (po_message_t message);
|
||||
|
||||
/* Change the previous context of a message. NULL is allowed. */
|
||||
extern void po_message_set_prev_msgctxt (po_message_t message, const char *prev_msgctxt);
|
||||
|
||||
/* Return the previous msgid (untranslated English string) of a message, or
|
||||
NULL for none. */
|
||||
extern const char * po_message_prev_msgid (po_message_t message);
|
||||
|
||||
/* Change the previous msgid (untranslated English string) of a message.
|
||||
NULL is allowed. */
|
||||
extern void po_message_set_prev_msgid (po_message_t message, const char *prev_msgid);
|
||||
|
||||
/* Return the previous msgid_plural (untranslated English plural string) of a
|
||||
message, or NULL for none. */
|
||||
extern const char * po_message_prev_msgid_plural (po_message_t message);
|
||||
|
||||
/* Change the previous msgid_plural (untranslated English plural string) of a
|
||||
message. NULL is allowed. */
|
||||
extern void po_message_set_prev_msgid_plural (po_message_t message, const char *prev_msgid_plural);
|
||||
|
||||
/* Return true if the message is marked obsolete. */
|
||||
extern int po_message_is_obsolete (po_message_t message);
|
||||
|
||||
/* Change the obsolete mark of a message. */
|
||||
extern void po_message_set_obsolete (po_message_t message, int obsolete);
|
||||
|
||||
/* Return true if the message is marked fuzzy. */
|
||||
extern int po_message_is_fuzzy (po_message_t message);
|
||||
|
||||
/* Change the fuzzy mark of a message. */
|
||||
extern void po_message_set_fuzzy (po_message_t message, int fuzzy);
|
||||
|
||||
/* Return true if the message is marked as being a format string of the given
|
||||
type (e.g. "c-format"). */
|
||||
extern int po_message_is_format (po_message_t message, const char *format_type);
|
||||
|
||||
/* Change the format string mark for a given type of a message. */
|
||||
extern void po_message_set_format (po_message_t message, const char *format_type, /*bool*/int value);
|
||||
|
||||
/* If a numeric range of a message is set, return true and store the minimum
|
||||
and maximum value in *MINP and *MAXP. */
|
||||
extern int po_message_is_range (po_message_t message, int *minp, int *maxp);
|
||||
|
||||
/* Change the numeric range of a message. MIN and MAX must be non-negative,
|
||||
with MIN < MAX. Use MIN = MAX = -1 to remove the numeric range of a
|
||||
message. */
|
||||
extern void po_message_set_range (po_message_t message, int min, int max);
|
||||
|
||||
|
||||
/* =========================== po_filepos_t API ============================ */
|
||||
|
||||
/* Return the file name. */
|
||||
extern const char * po_filepos_file (po_filepos_t filepos);
|
||||
|
||||
/* Return the line number where the string starts, or (size_t)(-1) if no line
|
||||
number is available. */
|
||||
extern size_t po_filepos_start_line (po_filepos_t filepos);
|
||||
|
||||
|
||||
/* ============================ Format type API ============================= */
|
||||
|
||||
/* Return a NULL terminated array of the supported format types. */
|
||||
extern const char * const * po_format_list (void);
|
||||
|
||||
/* Return the pretty name associated with a format type.
|
||||
For example, for "csharp-format", return "C#".
|
||||
Return NULL if the argument is not a supported format type. */
|
||||
extern const char * po_format_pretty_name (const char *format_type);
|
||||
|
||||
|
||||
/* ============================= Checking API ============================== */
|
||||
|
||||
/* Test whether an entire file PO file is valid, like msgfmt does it.
|
||||
If it is invalid, pass the reasons to the handler. */
|
||||
extern void po_file_check_all (po_file_t file, po_xerror_handler_t handler);
|
||||
|
||||
/* Test a single message, to be inserted in a PO file in memory, like msgfmt
|
||||
does it. If it is invalid, pass the reasons to the handler. The iterator
|
||||
is not modified by this call; it only specifies the file and the domain. */
|
||||
extern void po_message_check_all (po_message_t message, po_message_iterator_t iterator, po_xerror_handler_t handler);
|
||||
|
||||
/* Test whether the message translation is a valid format string if the message
|
||||
is marked as being a format string. If it is invalid, pass the reasons to
|
||||
the handler. */
|
||||
#define po_message_check_format po_message_check_format_v2
|
||||
extern void po_message_check_format (po_message_t message, po_xerror_handler_t handler);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _GETTEXT_PO_H */
|
||||
@@ -1,464 +0,0 @@
|
||||
/* Message catalogs for internationalization.
|
||||
Copyright (C) 1995-1997, 2000-2010 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU Library General Public License as published
|
||||
by the Free Software Foundation; either version 2, 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
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
USA. */
|
||||
|
||||
#ifndef _LIBINTL_H
|
||||
#define _LIBINTL_H 1
|
||||
|
||||
#include <locale.h>
|
||||
#if (defined __APPLE__ && defined __MACH__) && 0
|
||||
# include <xlocale.h>
|
||||
#endif
|
||||
|
||||
/* The LC_MESSAGES locale category is the category used by the functions
|
||||
gettext() and dgettext(). It is specified in POSIX, but not in ANSI C.
|
||||
On systems that don't define it, use an arbitrary value instead.
|
||||
On Solaris, <locale.h> defines __LOCALE_H (or _LOCALE_H in Solaris 2.5)
|
||||
then includes <libintl.h> (i.e. this file!) and then only defines
|
||||
LC_MESSAGES. To avoid a redefinition warning, don't define LC_MESSAGES
|
||||
in this case. */
|
||||
#if !defined LC_MESSAGES && !(defined __LOCALE_H || (defined _LOCALE_H && defined __sun))
|
||||
# define LC_MESSAGES 1729
|
||||
#endif
|
||||
|
||||
/* We define an additional symbol to signal that we use the GNU
|
||||
implementation of gettext. */
|
||||
#define __USE_GNU_GETTEXT 1
|
||||
|
||||
/* Provide information about the supported file formats. Returns the
|
||||
maximum minor revision number supported for a given major revision. */
|
||||
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) \
|
||||
((major) == 0 || (major) == 1 ? 1 : -1)
|
||||
|
||||
/* Resolve a platform specific conflict on DJGPP. GNU gettext takes
|
||||
precedence over _conio_gettext. */
|
||||
#ifdef __DJGPP__
|
||||
# undef gettext
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/* Version number: (major<<16) + (minor<<8) + subminor */
|
||||
#define LIBINTL_VERSION 0x001201
|
||||
extern int libintl_version;
|
||||
|
||||
|
||||
/* We redirect the functions to those prefixed with "libintl_". This is
|
||||
necessary, because some systems define gettext/textdomain/... in the C
|
||||
library (namely, Solaris 2.4 and newer, and GNU libc 2.0 and newer).
|
||||
If we used the unprefixed names, there would be cases where the
|
||||
definition in the C library would override the one in the libintl.so
|
||||
shared library. Recall that on ELF systems, the symbols are looked
|
||||
up in the following order:
|
||||
1. in the executable,
|
||||
2. in the shared libraries specified on the link command line, in order,
|
||||
3. in the dependencies of the shared libraries specified on the link
|
||||
command line,
|
||||
4. in the dlopen()ed shared libraries, in the order in which they were
|
||||
dlopen()ed.
|
||||
The definition in the C library would override the one in libintl.so if
|
||||
either
|
||||
* -lc is given on the link command line and -lintl isn't, or
|
||||
* -lc is given on the link command line before -lintl, or
|
||||
* libintl.so is a dependency of a dlopen()ed shared library but not
|
||||
linked to the executable at link time.
|
||||
Since Solaris gettext() behaves differently than GNU gettext(), this
|
||||
would be unacceptable.
|
||||
|
||||
The redirection happens by default through macros in C, so that &gettext
|
||||
is independent of the compilation unit, but through inline functions in
|
||||
C++, in order not to interfere with the name mangling of class fields or
|
||||
class methods called 'gettext'. */
|
||||
|
||||
/* The user can define _INTL_REDIRECT_INLINE or _INTL_REDIRECT_MACROS.
|
||||
If he doesn't, we choose the method. A third possible method is
|
||||
_INTL_REDIRECT_ASM, supported only by GCC. */
|
||||
#if !(defined _INTL_REDIRECT_INLINE || defined _INTL_REDIRECT_MACROS)
|
||||
# if defined __GNUC__ && __GNUC__ >= 2 && !(defined __APPLE_CC__ && __APPLE_CC__ > 1) && !defined __MINGW32__ && !(__GNUC__ == 2 && defined _AIX) && (defined __STDC__ || defined __cplusplus)
|
||||
# define _INTL_REDIRECT_ASM
|
||||
# else
|
||||
# ifdef __cplusplus
|
||||
# define _INTL_REDIRECT_INLINE
|
||||
# else
|
||||
# define _INTL_REDIRECT_MACROS
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
/* Auxiliary macros. */
|
||||
#ifdef _INTL_REDIRECT_ASM
|
||||
# define _INTL_ASM(cname) __asm__ (_INTL_ASMNAME (__USER_LABEL_PREFIX__, #cname))
|
||||
# define _INTL_ASMNAME(prefix,cnamestring) _INTL_STRINGIFY (prefix) cnamestring
|
||||
# define _INTL_STRINGIFY(prefix) #prefix
|
||||
#else
|
||||
# define _INTL_ASM(cname)
|
||||
#endif
|
||||
|
||||
/* _INTL_MAY_RETURN_STRING_ARG(n) declares that the given function may return
|
||||
its n-th argument literally. This enables GCC to warn for example about
|
||||
printf (gettext ("foo %y")). */
|
||||
#if defined __GNUC__ && __GNUC__ >= 3 && !(defined __APPLE_CC__ && __APPLE_CC__ > 1 && defined __cplusplus)
|
||||
# define _INTL_MAY_RETURN_STRING_ARG(n) __attribute__ ((__format_arg__ (n)))
|
||||
#else
|
||||
# define _INTL_MAY_RETURN_STRING_ARG(n)
|
||||
#endif
|
||||
|
||||
/* Look up MSGID in the current default message catalog for the current
|
||||
LC_MESSAGES locale. If not found, returns MSGID itself (the default
|
||||
text). */
|
||||
#ifdef _INTL_REDIRECT_INLINE
|
||||
extern char *libintl_gettext (const char *__msgid)
|
||||
_INTL_MAY_RETURN_STRING_ARG (1);
|
||||
static inline char *gettext (const char *__msgid)
|
||||
{
|
||||
return libintl_gettext (__msgid);
|
||||
}
|
||||
#else
|
||||
#ifdef _INTL_REDIRECT_MACROS
|
||||
# define gettext libintl_gettext
|
||||
#endif
|
||||
extern char *gettext (const char *__msgid)
|
||||
_INTL_ASM (libintl_gettext)
|
||||
_INTL_MAY_RETURN_STRING_ARG (1);
|
||||
#endif
|
||||
|
||||
/* Look up MSGID in the DOMAINNAME message catalog for the current
|
||||
LC_MESSAGES locale. */
|
||||
#ifdef _INTL_REDIRECT_INLINE
|
||||
extern char *libintl_dgettext (const char *__domainname, const char *__msgid)
|
||||
_INTL_MAY_RETURN_STRING_ARG (2);
|
||||
static inline char *dgettext (const char *__domainname, const char *__msgid)
|
||||
{
|
||||
return libintl_dgettext (__domainname, __msgid);
|
||||
}
|
||||
#else
|
||||
#ifdef _INTL_REDIRECT_MACROS
|
||||
# define dgettext libintl_dgettext
|
||||
#endif
|
||||
extern char *dgettext (const char *__domainname, const char *__msgid)
|
||||
_INTL_ASM (libintl_dgettext)
|
||||
_INTL_MAY_RETURN_STRING_ARG (2);
|
||||
#endif
|
||||
|
||||
/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
|
||||
locale. */
|
||||
#ifdef _INTL_REDIRECT_INLINE
|
||||
extern char *libintl_dcgettext (const char *__domainname, const char *__msgid,
|
||||
int __category)
|
||||
_INTL_MAY_RETURN_STRING_ARG (2);
|
||||
static inline char *dcgettext (const char *__domainname, const char *__msgid,
|
||||
int __category)
|
||||
{
|
||||
return libintl_dcgettext (__domainname, __msgid, __category);
|
||||
}
|
||||
#else
|
||||
#ifdef _INTL_REDIRECT_MACROS
|
||||
# define dcgettext libintl_dcgettext
|
||||
#endif
|
||||
extern char *dcgettext (const char *__domainname, const char *__msgid,
|
||||
int __category)
|
||||
_INTL_ASM (libintl_dcgettext)
|
||||
_INTL_MAY_RETURN_STRING_ARG (2);
|
||||
#endif
|
||||
|
||||
|
||||
/* Similar to `gettext' but select the plural form corresponding to the
|
||||
number N. */
|
||||
#ifdef _INTL_REDIRECT_INLINE
|
||||
extern char *libintl_ngettext (const char *__msgid1, const char *__msgid2,
|
||||
unsigned long int __n)
|
||||
_INTL_MAY_RETURN_STRING_ARG (1) _INTL_MAY_RETURN_STRING_ARG (2);
|
||||
static inline char *ngettext (const char *__msgid1, const char *__msgid2,
|
||||
unsigned long int __n)
|
||||
{
|
||||
return libintl_ngettext (__msgid1, __msgid2, __n);
|
||||
}
|
||||
#else
|
||||
#ifdef _INTL_REDIRECT_MACROS
|
||||
# define ngettext libintl_ngettext
|
||||
#endif
|
||||
extern char *ngettext (const char *__msgid1, const char *__msgid2,
|
||||
unsigned long int __n)
|
||||
_INTL_ASM (libintl_ngettext)
|
||||
_INTL_MAY_RETURN_STRING_ARG (1) _INTL_MAY_RETURN_STRING_ARG (2);
|
||||
#endif
|
||||
|
||||
/* Similar to `dgettext' but select the plural form corresponding to the
|
||||
number N. */
|
||||
#ifdef _INTL_REDIRECT_INLINE
|
||||
extern char *libintl_dngettext (const char *__domainname, const char *__msgid1,
|
||||
const char *__msgid2, unsigned long int __n)
|
||||
_INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3);
|
||||
static inline char *dngettext (const char *__domainname, const char *__msgid1,
|
||||
const char *__msgid2, unsigned long int __n)
|
||||
{
|
||||
return libintl_dngettext (__domainname, __msgid1, __msgid2, __n);
|
||||
}
|
||||
#else
|
||||
#ifdef _INTL_REDIRECT_MACROS
|
||||
# define dngettext libintl_dngettext
|
||||
#endif
|
||||
extern char *dngettext (const char *__domainname,
|
||||
const char *__msgid1, const char *__msgid2,
|
||||
unsigned long int __n)
|
||||
_INTL_ASM (libintl_dngettext)
|
||||
_INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3);
|
||||
#endif
|
||||
|
||||
/* Similar to `dcgettext' but select the plural form corresponding to the
|
||||
number N. */
|
||||
#ifdef _INTL_REDIRECT_INLINE
|
||||
extern char *libintl_dcngettext (const char *__domainname,
|
||||
const char *__msgid1, const char *__msgid2,
|
||||
unsigned long int __n, int __category)
|
||||
_INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3);
|
||||
static inline char *dcngettext (const char *__domainname,
|
||||
const char *__msgid1, const char *__msgid2,
|
||||
unsigned long int __n, int __category)
|
||||
{
|
||||
return libintl_dcngettext (__domainname, __msgid1, __msgid2, __n, __category);
|
||||
}
|
||||
#else
|
||||
#ifdef _INTL_REDIRECT_MACROS
|
||||
# define dcngettext libintl_dcngettext
|
||||
#endif
|
||||
extern char *dcngettext (const char *__domainname,
|
||||
const char *__msgid1, const char *__msgid2,
|
||||
unsigned long int __n, int __category)
|
||||
_INTL_ASM (libintl_dcngettext)
|
||||
_INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3);
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/* Set the current default message catalog to DOMAINNAME.
|
||||
If DOMAINNAME is null, return the current default.
|
||||
If DOMAINNAME is "", reset to the default of "messages". */
|
||||
#ifdef _INTL_REDIRECT_INLINE
|
||||
extern char *libintl_textdomain (const char *__domainname);
|
||||
static inline char *textdomain (const char *__domainname)
|
||||
{
|
||||
return libintl_textdomain (__domainname);
|
||||
}
|
||||
#else
|
||||
#ifdef _INTL_REDIRECT_MACROS
|
||||
# define textdomain libintl_textdomain
|
||||
#endif
|
||||
extern char *textdomain (const char *__domainname)
|
||||
_INTL_ASM (libintl_textdomain);
|
||||
#endif
|
||||
|
||||
/* Specify that the DOMAINNAME message catalog will be found
|
||||
in DIRNAME rather than in the system locale data base. */
|
||||
#ifdef _INTL_REDIRECT_INLINE
|
||||
extern char *libintl_bindtextdomain (const char *__domainname,
|
||||
const char *__dirname);
|
||||
static inline char *bindtextdomain (const char *__domainname,
|
||||
const char *__dirname)
|
||||
{
|
||||
return libintl_bindtextdomain (__domainname, __dirname);
|
||||
}
|
||||
#else
|
||||
#ifdef _INTL_REDIRECT_MACROS
|
||||
# define bindtextdomain libintl_bindtextdomain
|
||||
#endif
|
||||
extern char *bindtextdomain (const char *__domainname, const char *__dirname)
|
||||
_INTL_ASM (libintl_bindtextdomain);
|
||||
#endif
|
||||
|
||||
/* Specify the character encoding in which the messages from the
|
||||
DOMAINNAME message catalog will be returned. */
|
||||
#ifdef _INTL_REDIRECT_INLINE
|
||||
extern char *libintl_bind_textdomain_codeset (const char *__domainname,
|
||||
const char *__codeset);
|
||||
static inline char *bind_textdomain_codeset (const char *__domainname,
|
||||
const char *__codeset)
|
||||
{
|
||||
return libintl_bind_textdomain_codeset (__domainname, __codeset);
|
||||
}
|
||||
#else
|
||||
#ifdef _INTL_REDIRECT_MACROS
|
||||
# define bind_textdomain_codeset libintl_bind_textdomain_codeset
|
||||
#endif
|
||||
extern char *bind_textdomain_codeset (const char *__domainname,
|
||||
const char *__codeset)
|
||||
_INTL_ASM (libintl_bind_textdomain_codeset);
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/* Support for format strings with positions in *printf(), following the
|
||||
POSIX/XSI specification.
|
||||
Note: These replacements for the *printf() functions are visible only
|
||||
in source files that #include <libintl.h> or #include "gettext.h".
|
||||
Packages that use *printf() in source files that don't refer to _()
|
||||
or gettext() but for which the format string could be the return value
|
||||
of _() or gettext() need to add this #include. Oh well. */
|
||||
|
||||
#if !0
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stddef.h>
|
||||
|
||||
/* Get va_list. */
|
||||
#if (defined __STDC__ && __STDC__) || defined __cplusplus || defined _MSC_VER
|
||||
# include <stdarg.h>
|
||||
#else
|
||||
# include <varargs.h>
|
||||
#endif
|
||||
|
||||
#if !(defined fprintf && defined _GL_STDIO_H) /* don't override gnulib */
|
||||
#undef fprintf
|
||||
#define fprintf libintl_fprintf
|
||||
extern int fprintf (FILE *, const char *, ...);
|
||||
#endif
|
||||
#if !(defined vfprintf && defined _GL_STDIO_H) /* don't override gnulib */
|
||||
#undef vfprintf
|
||||
#define vfprintf libintl_vfprintf
|
||||
extern int vfprintf (FILE *, const char *, va_list);
|
||||
#endif
|
||||
|
||||
#if !(defined printf && defined _GL_STDIO_H) /* don't override gnulib */
|
||||
#undef printf
|
||||
#if defined __NetBSD__ || defined __BEOS__ || defined __CYGWIN__ || defined __MINGW32__
|
||||
/* Don't break __attribute__((format(printf,M,N))).
|
||||
This redefinition is only possible because the libc in NetBSD, Cygwin,
|
||||
mingw does not have a function __printf__.
|
||||
Alternatively, we could have done this redirection only when compiling with
|
||||
__GNUC__, together with a symbol redirection:
|
||||
extern int printf (const char *, ...)
|
||||
__asm__ (#__USER_LABEL_PREFIX__ "libintl_printf");
|
||||
But doing it now would introduce a binary incompatibility with already
|
||||
distributed versions of libintl on these systems. */
|
||||
# define libintl_printf __printf__
|
||||
#endif
|
||||
#define printf libintl_printf
|
||||
extern int printf (const char *, ...);
|
||||
#endif
|
||||
#if !(defined vprintf && defined _GL_STDIO_H) /* don't override gnulib */
|
||||
#undef vprintf
|
||||
#define vprintf libintl_vprintf
|
||||
extern int vprintf (const char *, va_list);
|
||||
#endif
|
||||
|
||||
#if !(defined sprintf && defined _GL_STDIO_H) /* don't override gnulib */
|
||||
#undef sprintf
|
||||
#define sprintf libintl_sprintf
|
||||
extern int sprintf (char *, const char *, ...);
|
||||
#endif
|
||||
#if !(defined vsprintf && defined _GL_STDIO_H) /* don't override gnulib */
|
||||
#undef vsprintf
|
||||
#define vsprintf libintl_vsprintf
|
||||
extern int vsprintf (char *, const char *, va_list);
|
||||
#endif
|
||||
|
||||
#if 1
|
||||
|
||||
#if !(defined snprintf && defined _GL_STDIO_H) /* don't override gnulib */
|
||||
#undef snprintf
|
||||
#define snprintf libintl_snprintf
|
||||
extern int snprintf (char *, size_t, const char *, ...);
|
||||
#endif
|
||||
#if !(defined vsnprintf && defined _GL_STDIO_H) /* don't override gnulib */
|
||||
#undef vsnprintf
|
||||
#define vsnprintf libintl_vsnprintf
|
||||
extern int vsnprintf (char *, size_t, const char *, va_list);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
|
||||
#if !(defined asprintf && defined _GL_STDIO_H) /* don't override gnulib */
|
||||
#undef asprintf
|
||||
#define asprintf libintl_asprintf
|
||||
extern int asprintf (char **, const char *, ...);
|
||||
#endif
|
||||
#if !(defined vasprintf && defined _GL_STDIO_H) /* don't override gnulib */
|
||||
#undef vasprintf
|
||||
#define vasprintf libintl_vasprintf
|
||||
extern int vasprintf (char **, const char *, va_list);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
|
||||
#undef fwprintf
|
||||
#define fwprintf libintl_fwprintf
|
||||
extern int fwprintf (FILE *, const wchar_t *, ...);
|
||||
#undef vfwprintf
|
||||
#define vfwprintf libintl_vfwprintf
|
||||
extern int vfwprintf (FILE *, const wchar_t *, va_list);
|
||||
|
||||
#undef wprintf
|
||||
#define wprintf libintl_wprintf
|
||||
extern int wprintf (const wchar_t *, ...);
|
||||
#undef vwprintf
|
||||
#define vwprintf libintl_vwprintf
|
||||
extern int vwprintf (const wchar_t *, va_list);
|
||||
|
||||
#undef swprintf
|
||||
#define swprintf libintl_swprintf
|
||||
extern int swprintf (wchar_t *, size_t, const wchar_t *, ...);
|
||||
#undef vswprintf
|
||||
#define vswprintf libintl_vswprintf
|
||||
extern int vswprintf (wchar_t *, size_t, const wchar_t *, va_list);
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/* Support for the locale chosen by the user. */
|
||||
#if (defined __APPLE__ && defined __MACH__) || defined _WIN32 || defined __WIN32__ || defined __CYGWIN__
|
||||
|
||||
#undef setlocale
|
||||
#define setlocale libintl_setlocale
|
||||
extern char *setlocale (int, const char *);
|
||||
|
||||
#if 0
|
||||
|
||||
#undef newlocale
|
||||
#define newlocale libintl_newlocale
|
||||
extern locale_t newlocale (int, const char *, locale_t);
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/* Support for relocatable packages. */
|
||||
|
||||
/* Sets the original and the current installation prefix of the package.
|
||||
Relocation simply replaces a pathname starting with the original prefix
|
||||
by the corresponding pathname with the current prefix instead. Both
|
||||
prefixes should be directory names without trailing slash (i.e. use ""
|
||||
instead of "/"). */
|
||||
#define libintl_set_relocation_prefix libintl_set_relocation_prefix
|
||||
extern void
|
||||
libintl_set_relocation_prefix (const char *orig_prefix,
|
||||
const char *curr_prefix);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* libintl.h */
|
||||
@@ -1,66 +0,0 @@
|
||||
/* Class autosprintf - formatted output to an ostream.
|
||||
Copyright (C) 2002 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU Library General Public License as published
|
||||
by the Free Software Foundation; either version 2, 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
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
USA. */
|
||||
|
||||
#ifndef _AUTOSPRINTF_H
|
||||
#define _AUTOSPRINTF_H
|
||||
|
||||
#ifndef __attribute__
|
||||
/* This feature is available in gcc versions 2.5 and later. */
|
||||
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__
|
||||
# define __attribute__(Spec) /* empty */
|
||||
# endif
|
||||
/* The __-protected variants of `format' and `printf' attributes
|
||||
are accepted by gcc versions 2.6.4 (effectively 2.7) and later. */
|
||||
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
|
||||
# define __format__ format
|
||||
# define __printf__ printf
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
|
||||
namespace gnu
|
||||
{
|
||||
/* A temporary object, usually allocated on the stack, representing
|
||||
the result of an asprintf() call. */
|
||||
class autosprintf
|
||||
{
|
||||
public:
|
||||
/* Constructor: takes a format string and the printf arguments. */
|
||||
autosprintf (const char *format, ...)
|
||||
__attribute__ ((__format__ (__printf__, 2, 3)));
|
||||
/* Copy constructor. */
|
||||
autosprintf (const autosprintf& src);
|
||||
/* Destructor: frees the temporarily allocated string. */
|
||||
~autosprintf ();
|
||||
/* Conversion to string. */
|
||||
operator char * () const;
|
||||
operator std::string () const;
|
||||
/* Output to an ostream. */
|
||||
friend inline std::ostream& operator<< (std::ostream& stream, const autosprintf& tmp)
|
||||
{
|
||||
stream << (tmp.str ? tmp.str : "(error in autosprintf)");
|
||||
return stream;
|
||||
}
|
||||
private:
|
||||
char *str;
|
||||
};
|
||||
}
|
||||
|
||||
#endif /* _AUTOSPRINTF_H */
|
||||
@@ -1,357 +0,0 @@
|
||||
/* Public API for GNU gettext PO files - contained in libgettextpo.
|
||||
Copyright (C) 2003-2008, 2010 Free Software Foundation, Inc.
|
||||
Written by Bruno Haible <bruno@clisp.org>, 2003.
|
||||
|
||||
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 3 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, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _GETTEXT_PO_H
|
||||
#define _GETTEXT_PO_H 1
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/* =========================== Meta Information ============================ */
|
||||
|
||||
/* Version number: (major<<16) + (minor<<8) + subminor */
|
||||
#define LIBGETTEXTPO_VERSION 0x001201
|
||||
extern int libgettextpo_version;
|
||||
|
||||
/* ================================= Types ================================= */
|
||||
|
||||
/* A po_file_t represents the contents of a PO file. */
|
||||
typedef struct po_file *po_file_t;
|
||||
|
||||
/* A po_message_iterator_t represents an iterator through a domain of a
|
||||
PO file. */
|
||||
typedef struct po_message_iterator *po_message_iterator_t;
|
||||
|
||||
/* A po_message_t represents a message in a PO file. */
|
||||
typedef struct po_message *po_message_t;
|
||||
|
||||
/* A po_filepos_t represents a string's position within a source file. */
|
||||
typedef struct po_filepos *po_filepos_t;
|
||||
|
||||
/* A po_error_handler handles error situations. */
|
||||
struct po_error_handler
|
||||
{
|
||||
/* Signal an error. The error message is built from FORMAT and the following
|
||||
arguments. ERRNUM, if nonzero, is an errno value.
|
||||
Must increment the error_message_count variable declared in error.h.
|
||||
Must not return if STATUS is nonzero. */
|
||||
void (*error) (int status, int errnum,
|
||||
const char *format, ...)
|
||||
#if ((__GNUC__ == 3 && __GNUC_MINOR__ >= 1) || __GNUC__ > 3) && !__STRICT_ANSI__
|
||||
__attribute__ ((__format__ (__printf__, 3, 4)))
|
||||
#endif
|
||||
;
|
||||
|
||||
/* Signal an error. The error message is built from FORMAT and the following
|
||||
arguments. The error location is at FILENAME line LINENO. ERRNUM, if
|
||||
nonzero, is an errno value.
|
||||
Must increment the error_message_count variable declared in error.h.
|
||||
Must not return if STATUS is nonzero. */
|
||||
void (*error_at_line) (int status, int errnum,
|
||||
const char *filename, unsigned int lineno,
|
||||
const char *format, ...)
|
||||
#if ((__GNUC__ == 3 && __GNUC_MINOR__ >= 1) || __GNUC__ > 3) && !__STRICT_ANSI__
|
||||
__attribute__ ((__format__ (__printf__, 5, 6)))
|
||||
#endif
|
||||
;
|
||||
|
||||
/* Signal a multiline warning. The PREFIX applies to all lines of the
|
||||
MESSAGE. Free the PREFIX and MESSAGE when done. */
|
||||
void (*multiline_warning) (char *prefix, char *message);
|
||||
|
||||
/* Signal a multiline error. The PREFIX applies to all lines of the
|
||||
MESSAGE. Free the PREFIX and MESSAGE when done.
|
||||
Must increment the error_message_count variable declared in error.h if
|
||||
PREFIX is non-NULL. */
|
||||
void (*multiline_error) (char *prefix, char *message);
|
||||
};
|
||||
typedef const struct po_error_handler *po_error_handler_t;
|
||||
|
||||
/* A po_xerror_handler handles warnings, error and fatal error situations. */
|
||||
#define PO_SEVERITY_WARNING 0 /* just a warning, tell the user */
|
||||
#define PO_SEVERITY_ERROR 1 /* an error, the operation cannot complete */
|
||||
#define PO_SEVERITY_FATAL_ERROR 2 /* an error, the operation must be aborted */
|
||||
struct po_xerror_handler
|
||||
{
|
||||
/* Signal a problem of the given severity.
|
||||
MESSAGE and/or FILENAME + LINENO indicate where the problem occurred.
|
||||
If FILENAME is NULL, FILENAME and LINENO and COLUMN should be ignored.
|
||||
If LINENO is (size_t)(-1), LINENO and COLUMN should be ignored.
|
||||
If COLUMN is (size_t)(-1), it should be ignored.
|
||||
MESSAGE_TEXT is the problem description (if MULTILINE_P is true,
|
||||
multiple lines of text, each terminated with a newline, otherwise
|
||||
usually a single line).
|
||||
Must not return if SEVERITY is PO_SEVERITY_FATAL_ERROR. */
|
||||
void (*xerror) (int severity,
|
||||
po_message_t message,
|
||||
const char *filename, size_t lineno, size_t column,
|
||||
int multiline_p, const char *message_text);
|
||||
/* Signal a problem that refers to two messages.
|
||||
Similar to two calls to xerror.
|
||||
If possible, a "..." can be appended to MESSAGE_TEXT1 and prepended to
|
||||
MESSAGE_TEXT2. */
|
||||
void (*xerror2) (int severity,
|
||||
po_message_t message1,
|
||||
const char *filename1, size_t lineno1, size_t column1,
|
||||
int multiline_p1, const char *message_text1,
|
||||
po_message_t message2,
|
||||
const char *filename2, size_t lineno2, size_t column2,
|
||||
int multiline_p2, const char *message_text2);
|
||||
};
|
||||
typedef const struct po_xerror_handler *po_xerror_handler_t;
|
||||
|
||||
/* Memory allocation:
|
||||
The memory allocations performed by these functions use xmalloc(),
|
||||
therefore will cause a program exit if memory is exhausted.
|
||||
The memory allocated by po_file_read, and implicitly returned through
|
||||
the po_message_* functions, lasts until freed with po_file_free. */
|
||||
|
||||
|
||||
/* ============================= po_file_t API ============================= */
|
||||
|
||||
/* Create an empty PO file representation in memory. */
|
||||
extern po_file_t po_file_create (void);
|
||||
|
||||
/* Read a PO file into memory.
|
||||
Return its contents. Upon failure, return NULL and set errno. */
|
||||
#define po_file_read po_file_read_v3
|
||||
extern po_file_t po_file_read (const char *filename,
|
||||
po_xerror_handler_t handler);
|
||||
|
||||
/* Write an in-memory PO file to a file.
|
||||
Upon failure, return NULL and set errno. */
|
||||
#define po_file_write po_file_write_v2
|
||||
extern po_file_t po_file_write (po_file_t file, const char *filename,
|
||||
po_xerror_handler_t handler);
|
||||
|
||||
/* Free a PO file from memory. */
|
||||
extern void po_file_free (po_file_t file);
|
||||
|
||||
/* Return the names of the domains covered by a PO file in memory. */
|
||||
extern const char * const * po_file_domains (po_file_t file);
|
||||
|
||||
|
||||
/* =========================== Header entry API ============================ */
|
||||
|
||||
/* Return the header entry of a domain of a PO file in memory.
|
||||
The domain NULL denotes the default domain.
|
||||
Return NULL if there is no header entry. */
|
||||
extern const char * po_file_domain_header (po_file_t file, const char *domain);
|
||||
|
||||
/* Return the value of a field in a header entry.
|
||||
The return value is either a freshly allocated string, to be freed by the
|
||||
caller, or NULL. */
|
||||
extern char * po_header_field (const char *header, const char *field);
|
||||
|
||||
/* Return the header entry with a given field set to a given value. The field
|
||||
is added if necessary.
|
||||
The return value is a freshly allocated string. */
|
||||
extern char * po_header_set_field (const char *header, const char *field, const char *value);
|
||||
|
||||
|
||||
/* ======================= po_message_iterator_t API ======================= */
|
||||
|
||||
/* Create an iterator for traversing a domain of a PO file in memory.
|
||||
The domain NULL denotes the default domain. */
|
||||
extern po_message_iterator_t po_message_iterator (po_file_t file, const char *domain);
|
||||
|
||||
/* Free an iterator. */
|
||||
extern void po_message_iterator_free (po_message_iterator_t iterator);
|
||||
|
||||
/* Return the next message, and advance the iterator.
|
||||
Return NULL at the end of the message list. */
|
||||
extern po_message_t po_next_message (po_message_iterator_t iterator);
|
||||
|
||||
/* Insert a message in a PO file in memory, in the domain and at the position
|
||||
indicated by the iterator. The iterator thereby advances past the freshly
|
||||
inserted message. */
|
||||
extern void po_message_insert (po_message_iterator_t iterator, po_message_t message);
|
||||
|
||||
|
||||
/* =========================== po_message_t API ============================ */
|
||||
|
||||
/* Return a freshly constructed message.
|
||||
To finish initializing the message, you must set the msgid and msgstr. */
|
||||
extern po_message_t po_message_create (void);
|
||||
|
||||
/* Return the context of a message, or NULL for a message not restricted to a
|
||||
context. */
|
||||
extern const char * po_message_msgctxt (po_message_t message);
|
||||
|
||||
/* Change the context of a message. NULL means a message not restricted to a
|
||||
context. */
|
||||
extern void po_message_set_msgctxt (po_message_t message, const char *msgctxt);
|
||||
|
||||
/* Return the msgid (untranslated English string) of a message. */
|
||||
extern const char * po_message_msgid (po_message_t message);
|
||||
|
||||
/* Change the msgid (untranslated English string) of a message. */
|
||||
extern void po_message_set_msgid (po_message_t message, const char *msgid);
|
||||
|
||||
/* Return the msgid_plural (untranslated English plural string) of a message,
|
||||
or NULL for a message without plural. */
|
||||
extern const char * po_message_msgid_plural (po_message_t message);
|
||||
|
||||
/* Change the msgid_plural (untranslated English plural string) of a message.
|
||||
NULL means a message without plural. */
|
||||
extern void po_message_set_msgid_plural (po_message_t message, const char *msgid_plural);
|
||||
|
||||
/* Return the msgstr (translation) of a message.
|
||||
Return the empty string for an untranslated message. */
|
||||
extern const char * po_message_msgstr (po_message_t message);
|
||||
|
||||
/* Change the msgstr (translation) of a message.
|
||||
Use an empty string to denote an untranslated message. */
|
||||
extern void po_message_set_msgstr (po_message_t message, const char *msgstr);
|
||||
|
||||
/* Return the msgstr[index] for a message with plural handling, or
|
||||
NULL when the index is out of range or for a message without plural. */
|
||||
extern const char * po_message_msgstr_plural (po_message_t message, int index);
|
||||
|
||||
/* Change the msgstr[index] for a message with plural handling.
|
||||
Use a NULL value at the end to reduce the number of plural forms. */
|
||||
extern void po_message_set_msgstr_plural (po_message_t message, int index, const char *msgstr);
|
||||
|
||||
/* Return the comments for a message. */
|
||||
extern const char * po_message_comments (po_message_t message);
|
||||
|
||||
/* Change the comments for a message.
|
||||
comments should be a multiline string, ending in a newline, or empty. */
|
||||
extern void po_message_set_comments (po_message_t message, const char *comments);
|
||||
|
||||
/* Return the extracted comments for a message. */
|
||||
extern const char * po_message_extracted_comments (po_message_t message);
|
||||
|
||||
/* Change the extracted comments for a message.
|
||||
comments should be a multiline string, ending in a newline, or empty. */
|
||||
extern void po_message_set_extracted_comments (po_message_t message, const char *comments);
|
||||
|
||||
/* Return the i-th file position for a message, or NULL if i is out of
|
||||
range. */
|
||||
extern po_filepos_t po_message_filepos (po_message_t message, int i);
|
||||
|
||||
/* Remove the i-th file position from a message.
|
||||
The indices of all following file positions for the message are decremented
|
||||
by one. */
|
||||
extern void po_message_remove_filepos (po_message_t message, int i);
|
||||
|
||||
/* Add a file position to a message, if it is not already present for the
|
||||
message.
|
||||
file is the file name.
|
||||
start_line is the line number where the string starts, or (size_t)(-1) if no
|
||||
line number is available. */
|
||||
extern void po_message_add_filepos (po_message_t message, const char *file, size_t start_line);
|
||||
|
||||
/* Return the previous context of a message, or NULL for none. */
|
||||
extern const char * po_message_prev_msgctxt (po_message_t message);
|
||||
|
||||
/* Change the previous context of a message. NULL is allowed. */
|
||||
extern void po_message_set_prev_msgctxt (po_message_t message, const char *prev_msgctxt);
|
||||
|
||||
/* Return the previous msgid (untranslated English string) of a message, or
|
||||
NULL for none. */
|
||||
extern const char * po_message_prev_msgid (po_message_t message);
|
||||
|
||||
/* Change the previous msgid (untranslated English string) of a message.
|
||||
NULL is allowed. */
|
||||
extern void po_message_set_prev_msgid (po_message_t message, const char *prev_msgid);
|
||||
|
||||
/* Return the previous msgid_plural (untranslated English plural string) of a
|
||||
message, or NULL for none. */
|
||||
extern const char * po_message_prev_msgid_plural (po_message_t message);
|
||||
|
||||
/* Change the previous msgid_plural (untranslated English plural string) of a
|
||||
message. NULL is allowed. */
|
||||
extern void po_message_set_prev_msgid_plural (po_message_t message, const char *prev_msgid_plural);
|
||||
|
||||
/* Return true if the message is marked obsolete. */
|
||||
extern int po_message_is_obsolete (po_message_t message);
|
||||
|
||||
/* Change the obsolete mark of a message. */
|
||||
extern void po_message_set_obsolete (po_message_t message, int obsolete);
|
||||
|
||||
/* Return true if the message is marked fuzzy. */
|
||||
extern int po_message_is_fuzzy (po_message_t message);
|
||||
|
||||
/* Change the fuzzy mark of a message. */
|
||||
extern void po_message_set_fuzzy (po_message_t message, int fuzzy);
|
||||
|
||||
/* Return true if the message is marked as being a format string of the given
|
||||
type (e.g. "c-format"). */
|
||||
extern int po_message_is_format (po_message_t message, const char *format_type);
|
||||
|
||||
/* Change the format string mark for a given type of a message. */
|
||||
extern void po_message_set_format (po_message_t message, const char *format_type, /*bool*/int value);
|
||||
|
||||
/* If a numeric range of a message is set, return true and store the minimum
|
||||
and maximum value in *MINP and *MAXP. */
|
||||
extern int po_message_is_range (po_message_t message, int *minp, int *maxp);
|
||||
|
||||
/* Change the numeric range of a message. MIN and MAX must be non-negative,
|
||||
with MIN < MAX. Use MIN = MAX = -1 to remove the numeric range of a
|
||||
message. */
|
||||
extern void po_message_set_range (po_message_t message, int min, int max);
|
||||
|
||||
|
||||
/* =========================== po_filepos_t API ============================ */
|
||||
|
||||
/* Return the file name. */
|
||||
extern const char * po_filepos_file (po_filepos_t filepos);
|
||||
|
||||
/* Return the line number where the string starts, or (size_t)(-1) if no line
|
||||
number is available. */
|
||||
extern size_t po_filepos_start_line (po_filepos_t filepos);
|
||||
|
||||
|
||||
/* ============================ Format type API ============================= */
|
||||
|
||||
/* Return a NULL terminated array of the supported format types. */
|
||||
extern const char * const * po_format_list (void);
|
||||
|
||||
/* Return the pretty name associated with a format type.
|
||||
For example, for "csharp-format", return "C#".
|
||||
Return NULL if the argument is not a supported format type. */
|
||||
extern const char * po_format_pretty_name (const char *format_type);
|
||||
|
||||
|
||||
/* ============================= Checking API ============================== */
|
||||
|
||||
/* Test whether an entire file PO file is valid, like msgfmt does it.
|
||||
If it is invalid, pass the reasons to the handler. */
|
||||
extern void po_file_check_all (po_file_t file, po_xerror_handler_t handler);
|
||||
|
||||
/* Test a single message, to be inserted in a PO file in memory, like msgfmt
|
||||
does it. If it is invalid, pass the reasons to the handler. The iterator
|
||||
is not modified by this call; it only specifies the file and the domain. */
|
||||
extern void po_message_check_all (po_message_t message, po_message_iterator_t iterator, po_xerror_handler_t handler);
|
||||
|
||||
/* Test whether the message translation is a valid format string if the message
|
||||
is marked as being a format string. If it is invalid, pass the reasons to
|
||||
the handler. */
|
||||
#define po_message_check_format po_message_check_format_v2
|
||||
extern void po_message_check_format (po_message_t message, po_xerror_handler_t handler);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _GETTEXT_PO_H */
|
||||
@@ -1,464 +0,0 @@
|
||||
/* Message catalogs for internationalization.
|
||||
Copyright (C) 1995-1997, 2000-2010 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU Library General Public License as published
|
||||
by the Free Software Foundation; either version 2, 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
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
USA. */
|
||||
|
||||
#ifndef _LIBINTL_H
|
||||
#define _LIBINTL_H 1
|
||||
|
||||
#include <locale.h>
|
||||
#if (defined __APPLE__ && defined __MACH__) && 0
|
||||
# include <xlocale.h>
|
||||
#endif
|
||||
|
||||
/* The LC_MESSAGES locale category is the category used by the functions
|
||||
gettext() and dgettext(). It is specified in POSIX, but not in ANSI C.
|
||||
On systems that don't define it, use an arbitrary value instead.
|
||||
On Solaris, <locale.h> defines __LOCALE_H (or _LOCALE_H in Solaris 2.5)
|
||||
then includes <libintl.h> (i.e. this file!) and then only defines
|
||||
LC_MESSAGES. To avoid a redefinition warning, don't define LC_MESSAGES
|
||||
in this case. */
|
||||
#if !defined LC_MESSAGES && !(defined __LOCALE_H || (defined _LOCALE_H && defined __sun))
|
||||
# define LC_MESSAGES 1729
|
||||
#endif
|
||||
|
||||
/* We define an additional symbol to signal that we use the GNU
|
||||
implementation of gettext. */
|
||||
#define __USE_GNU_GETTEXT 1
|
||||
|
||||
/* Provide information about the supported file formats. Returns the
|
||||
maximum minor revision number supported for a given major revision. */
|
||||
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) \
|
||||
((major) == 0 || (major) == 1 ? 1 : -1)
|
||||
|
||||
/* Resolve a platform specific conflict on DJGPP. GNU gettext takes
|
||||
precedence over _conio_gettext. */
|
||||
#ifdef __DJGPP__
|
||||
# undef gettext
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/* Version number: (major<<16) + (minor<<8) + subminor */
|
||||
#define LIBINTL_VERSION 0x001201
|
||||
extern int libintl_version;
|
||||
|
||||
|
||||
/* We redirect the functions to those prefixed with "libintl_". This is
|
||||
necessary, because some systems define gettext/textdomain/... in the C
|
||||
library (namely, Solaris 2.4 and newer, and GNU libc 2.0 and newer).
|
||||
If we used the unprefixed names, there would be cases where the
|
||||
definition in the C library would override the one in the libintl.so
|
||||
shared library. Recall that on ELF systems, the symbols are looked
|
||||
up in the following order:
|
||||
1. in the executable,
|
||||
2. in the shared libraries specified on the link command line, in order,
|
||||
3. in the dependencies of the shared libraries specified on the link
|
||||
command line,
|
||||
4. in the dlopen()ed shared libraries, in the order in which they were
|
||||
dlopen()ed.
|
||||
The definition in the C library would override the one in libintl.so if
|
||||
either
|
||||
* -lc is given on the link command line and -lintl isn't, or
|
||||
* -lc is given on the link command line before -lintl, or
|
||||
* libintl.so is a dependency of a dlopen()ed shared library but not
|
||||
linked to the executable at link time.
|
||||
Since Solaris gettext() behaves differently than GNU gettext(), this
|
||||
would be unacceptable.
|
||||
|
||||
The redirection happens by default through macros in C, so that &gettext
|
||||
is independent of the compilation unit, but through inline functions in
|
||||
C++, in order not to interfere with the name mangling of class fields or
|
||||
class methods called 'gettext'. */
|
||||
|
||||
/* The user can define _INTL_REDIRECT_INLINE or _INTL_REDIRECT_MACROS.
|
||||
If he doesn't, we choose the method. A third possible method is
|
||||
_INTL_REDIRECT_ASM, supported only by GCC. */
|
||||
#if !(defined _INTL_REDIRECT_INLINE || defined _INTL_REDIRECT_MACROS)
|
||||
# if defined __GNUC__ && __GNUC__ >= 2 && !(defined __APPLE_CC__ && __APPLE_CC__ > 1) && !defined __MINGW32__ && !(__GNUC__ == 2 && defined _AIX) && (defined __STDC__ || defined __cplusplus)
|
||||
# define _INTL_REDIRECT_ASM
|
||||
# else
|
||||
# ifdef __cplusplus
|
||||
# define _INTL_REDIRECT_INLINE
|
||||
# else
|
||||
# define _INTL_REDIRECT_MACROS
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
/* Auxiliary macros. */
|
||||
#ifdef _INTL_REDIRECT_ASM
|
||||
# define _INTL_ASM(cname) __asm__ (_INTL_ASMNAME (__USER_LABEL_PREFIX__, #cname))
|
||||
# define _INTL_ASMNAME(prefix,cnamestring) _INTL_STRINGIFY (prefix) cnamestring
|
||||
# define _INTL_STRINGIFY(prefix) #prefix
|
||||
#else
|
||||
# define _INTL_ASM(cname)
|
||||
#endif
|
||||
|
||||
/* _INTL_MAY_RETURN_STRING_ARG(n) declares that the given function may return
|
||||
its n-th argument literally. This enables GCC to warn for example about
|
||||
printf (gettext ("foo %y")). */
|
||||
#if defined __GNUC__ && __GNUC__ >= 3 && !(defined __APPLE_CC__ && __APPLE_CC__ > 1 && defined __cplusplus)
|
||||
# define _INTL_MAY_RETURN_STRING_ARG(n) __attribute__ ((__format_arg__ (n)))
|
||||
#else
|
||||
# define _INTL_MAY_RETURN_STRING_ARG(n)
|
||||
#endif
|
||||
|
||||
/* Look up MSGID in the current default message catalog for the current
|
||||
LC_MESSAGES locale. If not found, returns MSGID itself (the default
|
||||
text). */
|
||||
#ifdef _INTL_REDIRECT_INLINE
|
||||
extern char *libintl_gettext (const char *__msgid)
|
||||
_INTL_MAY_RETURN_STRING_ARG (1);
|
||||
static inline char *gettext (const char *__msgid)
|
||||
{
|
||||
return libintl_gettext (__msgid);
|
||||
}
|
||||
#else
|
||||
#ifdef _INTL_REDIRECT_MACROS
|
||||
# define gettext libintl_gettext
|
||||
#endif
|
||||
extern char *gettext (const char *__msgid)
|
||||
_INTL_ASM (libintl_gettext)
|
||||
_INTL_MAY_RETURN_STRING_ARG (1);
|
||||
#endif
|
||||
|
||||
/* Look up MSGID in the DOMAINNAME message catalog for the current
|
||||
LC_MESSAGES locale. */
|
||||
#ifdef _INTL_REDIRECT_INLINE
|
||||
extern char *libintl_dgettext (const char *__domainname, const char *__msgid)
|
||||
_INTL_MAY_RETURN_STRING_ARG (2);
|
||||
static inline char *dgettext (const char *__domainname, const char *__msgid)
|
||||
{
|
||||
return libintl_dgettext (__domainname, __msgid);
|
||||
}
|
||||
#else
|
||||
#ifdef _INTL_REDIRECT_MACROS
|
||||
# define dgettext libintl_dgettext
|
||||
#endif
|
||||
extern char *dgettext (const char *__domainname, const char *__msgid)
|
||||
_INTL_ASM (libintl_dgettext)
|
||||
_INTL_MAY_RETURN_STRING_ARG (2);
|
||||
#endif
|
||||
|
||||
/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
|
||||
locale. */
|
||||
#ifdef _INTL_REDIRECT_INLINE
|
||||
extern char *libintl_dcgettext (const char *__domainname, const char *__msgid,
|
||||
int __category)
|
||||
_INTL_MAY_RETURN_STRING_ARG (2);
|
||||
static inline char *dcgettext (const char *__domainname, const char *__msgid,
|
||||
int __category)
|
||||
{
|
||||
return libintl_dcgettext (__domainname, __msgid, __category);
|
||||
}
|
||||
#else
|
||||
#ifdef _INTL_REDIRECT_MACROS
|
||||
# define dcgettext libintl_dcgettext
|
||||
#endif
|
||||
extern char *dcgettext (const char *__domainname, const char *__msgid,
|
||||
int __category)
|
||||
_INTL_ASM (libintl_dcgettext)
|
||||
_INTL_MAY_RETURN_STRING_ARG (2);
|
||||
#endif
|
||||
|
||||
|
||||
/* Similar to `gettext' but select the plural form corresponding to the
|
||||
number N. */
|
||||
#ifdef _INTL_REDIRECT_INLINE
|
||||
extern char *libintl_ngettext (const char *__msgid1, const char *__msgid2,
|
||||
unsigned long int __n)
|
||||
_INTL_MAY_RETURN_STRING_ARG (1) _INTL_MAY_RETURN_STRING_ARG (2);
|
||||
static inline char *ngettext (const char *__msgid1, const char *__msgid2,
|
||||
unsigned long int __n)
|
||||
{
|
||||
return libintl_ngettext (__msgid1, __msgid2, __n);
|
||||
}
|
||||
#else
|
||||
#ifdef _INTL_REDIRECT_MACROS
|
||||
# define ngettext libintl_ngettext
|
||||
#endif
|
||||
extern char *ngettext (const char *__msgid1, const char *__msgid2,
|
||||
unsigned long int __n)
|
||||
_INTL_ASM (libintl_ngettext)
|
||||
_INTL_MAY_RETURN_STRING_ARG (1) _INTL_MAY_RETURN_STRING_ARG (2);
|
||||
#endif
|
||||
|
||||
/* Similar to `dgettext' but select the plural form corresponding to the
|
||||
number N. */
|
||||
#ifdef _INTL_REDIRECT_INLINE
|
||||
extern char *libintl_dngettext (const char *__domainname, const char *__msgid1,
|
||||
const char *__msgid2, unsigned long int __n)
|
||||
_INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3);
|
||||
static inline char *dngettext (const char *__domainname, const char *__msgid1,
|
||||
const char *__msgid2, unsigned long int __n)
|
||||
{
|
||||
return libintl_dngettext (__domainname, __msgid1, __msgid2, __n);
|
||||
}
|
||||
#else
|
||||
#ifdef _INTL_REDIRECT_MACROS
|
||||
# define dngettext libintl_dngettext
|
||||
#endif
|
||||
extern char *dngettext (const char *__domainname,
|
||||
const char *__msgid1, const char *__msgid2,
|
||||
unsigned long int __n)
|
||||
_INTL_ASM (libintl_dngettext)
|
||||
_INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3);
|
||||
#endif
|
||||
|
||||
/* Similar to `dcgettext' but select the plural form corresponding to the
|
||||
number N. */
|
||||
#ifdef _INTL_REDIRECT_INLINE
|
||||
extern char *libintl_dcngettext (const char *__domainname,
|
||||
const char *__msgid1, const char *__msgid2,
|
||||
unsigned long int __n, int __category)
|
||||
_INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3);
|
||||
static inline char *dcngettext (const char *__domainname,
|
||||
const char *__msgid1, const char *__msgid2,
|
||||
unsigned long int __n, int __category)
|
||||
{
|
||||
return libintl_dcngettext (__domainname, __msgid1, __msgid2, __n, __category);
|
||||
}
|
||||
#else
|
||||
#ifdef _INTL_REDIRECT_MACROS
|
||||
# define dcngettext libintl_dcngettext
|
||||
#endif
|
||||
extern char *dcngettext (const char *__domainname,
|
||||
const char *__msgid1, const char *__msgid2,
|
||||
unsigned long int __n, int __category)
|
||||
_INTL_ASM (libintl_dcngettext)
|
||||
_INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3);
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/* Set the current default message catalog to DOMAINNAME.
|
||||
If DOMAINNAME is null, return the current default.
|
||||
If DOMAINNAME is "", reset to the default of "messages". */
|
||||
#ifdef _INTL_REDIRECT_INLINE
|
||||
extern char *libintl_textdomain (const char *__domainname);
|
||||
static inline char *textdomain (const char *__domainname)
|
||||
{
|
||||
return libintl_textdomain (__domainname);
|
||||
}
|
||||
#else
|
||||
#ifdef _INTL_REDIRECT_MACROS
|
||||
# define textdomain libintl_textdomain
|
||||
#endif
|
||||
extern char *textdomain (const char *__domainname)
|
||||
_INTL_ASM (libintl_textdomain);
|
||||
#endif
|
||||
|
||||
/* Specify that the DOMAINNAME message catalog will be found
|
||||
in DIRNAME rather than in the system locale data base. */
|
||||
#ifdef _INTL_REDIRECT_INLINE
|
||||
extern char *libintl_bindtextdomain (const char *__domainname,
|
||||
const char *__dirname);
|
||||
static inline char *bindtextdomain (const char *__domainname,
|
||||
const char *__dirname)
|
||||
{
|
||||
return libintl_bindtextdomain (__domainname, __dirname);
|
||||
}
|
||||
#else
|
||||
#ifdef _INTL_REDIRECT_MACROS
|
||||
# define bindtextdomain libintl_bindtextdomain
|
||||
#endif
|
||||
extern char *bindtextdomain (const char *__domainname, const char *__dirname)
|
||||
_INTL_ASM (libintl_bindtextdomain);
|
||||
#endif
|
||||
|
||||
/* Specify the character encoding in which the messages from the
|
||||
DOMAINNAME message catalog will be returned. */
|
||||
#ifdef _INTL_REDIRECT_INLINE
|
||||
extern char *libintl_bind_textdomain_codeset (const char *__domainname,
|
||||
const char *__codeset);
|
||||
static inline char *bind_textdomain_codeset (const char *__domainname,
|
||||
const char *__codeset)
|
||||
{
|
||||
return libintl_bind_textdomain_codeset (__domainname, __codeset);
|
||||
}
|
||||
#else
|
||||
#ifdef _INTL_REDIRECT_MACROS
|
||||
# define bind_textdomain_codeset libintl_bind_textdomain_codeset
|
||||
#endif
|
||||
extern char *bind_textdomain_codeset (const char *__domainname,
|
||||
const char *__codeset)
|
||||
_INTL_ASM (libintl_bind_textdomain_codeset);
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/* Support for format strings with positions in *printf(), following the
|
||||
POSIX/XSI specification.
|
||||
Note: These replacements for the *printf() functions are visible only
|
||||
in source files that #include <libintl.h> or #include "gettext.h".
|
||||
Packages that use *printf() in source files that don't refer to _()
|
||||
or gettext() but for which the format string could be the return value
|
||||
of _() or gettext() need to add this #include. Oh well. */
|
||||
|
||||
#if !0
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stddef.h>
|
||||
|
||||
/* Get va_list. */
|
||||
#if (defined __STDC__ && __STDC__) || defined __cplusplus || defined _MSC_VER
|
||||
# include <stdarg.h>
|
||||
#else
|
||||
# include <varargs.h>
|
||||
#endif
|
||||
|
||||
#if !(defined fprintf && defined _GL_STDIO_H) /* don't override gnulib */
|
||||
#undef fprintf
|
||||
#define fprintf libintl_fprintf
|
||||
extern int fprintf (FILE *, const char *, ...);
|
||||
#endif
|
||||
#if !(defined vfprintf && defined _GL_STDIO_H) /* don't override gnulib */
|
||||
#undef vfprintf
|
||||
#define vfprintf libintl_vfprintf
|
||||
extern int vfprintf (FILE *, const char *, va_list);
|
||||
#endif
|
||||
|
||||
#if !(defined printf && defined _GL_STDIO_H) /* don't override gnulib */
|
||||
#undef printf
|
||||
#if defined __NetBSD__ || defined __BEOS__ || defined __CYGWIN__ || defined __MINGW32__
|
||||
/* Don't break __attribute__((format(printf,M,N))).
|
||||
This redefinition is only possible because the libc in NetBSD, Cygwin,
|
||||
mingw does not have a function __printf__.
|
||||
Alternatively, we could have done this redirection only when compiling with
|
||||
__GNUC__, together with a symbol redirection:
|
||||
extern int printf (const char *, ...)
|
||||
__asm__ (#__USER_LABEL_PREFIX__ "libintl_printf");
|
||||
But doing it now would introduce a binary incompatibility with already
|
||||
distributed versions of libintl on these systems. */
|
||||
# define libintl_printf __printf__
|
||||
#endif
|
||||
#define printf libintl_printf
|
||||
extern int printf (const char *, ...);
|
||||
#endif
|
||||
#if !(defined vprintf && defined _GL_STDIO_H) /* don't override gnulib */
|
||||
#undef vprintf
|
||||
#define vprintf libintl_vprintf
|
||||
extern int vprintf (const char *, va_list);
|
||||
#endif
|
||||
|
||||
#if !(defined sprintf && defined _GL_STDIO_H) /* don't override gnulib */
|
||||
#undef sprintf
|
||||
#define sprintf libintl_sprintf
|
||||
extern int sprintf (char *, const char *, ...);
|
||||
#endif
|
||||
#if !(defined vsprintf && defined _GL_STDIO_H) /* don't override gnulib */
|
||||
#undef vsprintf
|
||||
#define vsprintf libintl_vsprintf
|
||||
extern int vsprintf (char *, const char *, va_list);
|
||||
#endif
|
||||
|
||||
#if 1
|
||||
|
||||
#if !(defined snprintf && defined _GL_STDIO_H) /* don't override gnulib */
|
||||
#undef snprintf
|
||||
#define snprintf libintl_snprintf
|
||||
extern int snprintf (char *, size_t, const char *, ...);
|
||||
#endif
|
||||
#if !(defined vsnprintf && defined _GL_STDIO_H) /* don't override gnulib */
|
||||
#undef vsnprintf
|
||||
#define vsnprintf libintl_vsnprintf
|
||||
extern int vsnprintf (char *, size_t, const char *, va_list);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
|
||||
#if !(defined asprintf && defined _GL_STDIO_H) /* don't override gnulib */
|
||||
#undef asprintf
|
||||
#define asprintf libintl_asprintf
|
||||
extern int asprintf (char **, const char *, ...);
|
||||
#endif
|
||||
#if !(defined vasprintf && defined _GL_STDIO_H) /* don't override gnulib */
|
||||
#undef vasprintf
|
||||
#define vasprintf libintl_vasprintf
|
||||
extern int vasprintf (char **, const char *, va_list);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
|
||||
#undef fwprintf
|
||||
#define fwprintf libintl_fwprintf
|
||||
extern int fwprintf (FILE *, const wchar_t *, ...);
|
||||
#undef vfwprintf
|
||||
#define vfwprintf libintl_vfwprintf
|
||||
extern int vfwprintf (FILE *, const wchar_t *, va_list);
|
||||
|
||||
#undef wprintf
|
||||
#define wprintf libintl_wprintf
|
||||
extern int wprintf (const wchar_t *, ...);
|
||||
#undef vwprintf
|
||||
#define vwprintf libintl_vwprintf
|
||||
extern int vwprintf (const wchar_t *, va_list);
|
||||
|
||||
#undef swprintf
|
||||
#define swprintf libintl_swprintf
|
||||
extern int swprintf (wchar_t *, size_t, const wchar_t *, ...);
|
||||
#undef vswprintf
|
||||
#define vswprintf libintl_vswprintf
|
||||
extern int vswprintf (wchar_t *, size_t, const wchar_t *, va_list);
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/* Support for the locale chosen by the user. */
|
||||
#if (defined __APPLE__ && defined __MACH__) || defined _WIN32 || defined __WIN32__ || defined __CYGWIN__
|
||||
|
||||
#undef setlocale
|
||||
#define setlocale libintl_setlocale
|
||||
extern char *setlocale (int, const char *);
|
||||
|
||||
#if 0
|
||||
|
||||
#undef newlocale
|
||||
#define newlocale libintl_newlocale
|
||||
extern locale_t newlocale (int, const char *, locale_t);
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/* Support for relocatable packages. */
|
||||
|
||||
/* Sets the original and the current installation prefix of the package.
|
||||
Relocation simply replaces a pathname starting with the original prefix
|
||||
by the corresponding pathname with the current prefix instead. Both
|
||||
prefixes should be directory names without trailing slash (i.e. use ""
|
||||
instead of "/"). */
|
||||
#define libintl_set_relocation_prefix libintl_set_relocation_prefix
|
||||
extern void
|
||||
libintl_set_relocation_prefix (const char *orig_prefix,
|
||||
const char *curr_prefix);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* libintl.h */
|
||||
Binary file not shown.
@@ -1,86 +0,0 @@
|
||||
#!/bin/sh
|
||||
# Prints a package's identification PACKAGE VERSION or PACKAGE.
|
||||
#
|
||||
# Copyright (C) 2001-2003, 2005 Free Software Foundation, Inc.
|
||||
#
|
||||
# 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
want_version="$1"
|
||||
|
||||
# NLS nuisances: Letter ranges are different in the Estonian locale.
|
||||
LC_ALL=C
|
||||
|
||||
while true; do
|
||||
if test -f configure; then
|
||||
package=`(grep '^PACKAGE_NAME=' configure; grep '^ *PACKAGE=' configure) | grep -v '=[ ]*$' | sed -e '1q' | sed -e 's/^[^=]*=//' | sed -e "s/^'//" -e "s/'$//"`
|
||||
case "$package" in
|
||||
*[\"\$\`\{\}]*)
|
||||
# Some packages (gcal) retrieve the package name dynamically.
|
||||
package=
|
||||
;;
|
||||
esac
|
||||
if test -n "$package"; then
|
||||
is_gnu=`LC_ALL=C grep "GNU $package" * 2>/dev/null | grep -v '^libtool:'`
|
||||
if test -n "$is_gnu"; then
|
||||
package="GNU $package"
|
||||
fi
|
||||
if test -n "$want_version"; then
|
||||
version=`(grep '^PACKAGE_VERSION=' configure; grep '^ *VERSION=' configure) | grep -v '=[ ]*$' | sed -e '1q' | sed -e 's/^[^=]*=//' | sed -e "s/^'//" -e "s/'$//"`
|
||||
case "$version" in
|
||||
*[\"\$\`\{\}]*)
|
||||
# Some packages (gcal, gcc, clisp) retrieve the version dynamically.
|
||||
version=
|
||||
;;
|
||||
esac
|
||||
if test -n "$version"; then
|
||||
echo "$package $version"
|
||||
else
|
||||
echo "$package"
|
||||
fi
|
||||
else
|
||||
echo "$package"
|
||||
fi
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
dir=`basename \`pwd\``
|
||||
case "$dir" in
|
||||
i18n)
|
||||
# This directory name, used in GNU make, is not the top level directory.
|
||||
;;
|
||||
*[A-Za-z]*[0-9]*)
|
||||
package=`echo "$dir" | sed -e 's/^\([^0-9]*\)[0-9].*$/\1/' -e 's/[-_]$//'`
|
||||
if test -n "$want_version"; then
|
||||
version=`echo "$dir" | sed -e 's/^[^0-9]*\([0-9].*\)$/\1/'`
|
||||
echo "$package $version"
|
||||
else
|
||||
echo "$package"
|
||||
fi
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
# Go to parent directory
|
||||
last=`/bin/pwd`
|
||||
cd ..
|
||||
curr=`/bin/pwd`
|
||||
if test "$last" = "$curr"; then
|
||||
# Oops, didn't find the package name.
|
||||
if test -n "$want_version"; then
|
||||
echo "PACKAGE VERSION"
|
||||
else
|
||||
echo "PACKAGE"
|
||||
fi
|
||||
exit 0
|
||||
fi
|
||||
done
|
||||
Binary file not shown.
@@ -1,436 +0,0 @@
|
||||
#!/bin/sh
|
||||
# Prints the user's email address, with confirmation from the user.
|
||||
#
|
||||
# Copyright (C) 2001-2003, 2005 Free Software Foundation, Inc.
|
||||
#
|
||||
# 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Prerequisites for using ${exec_prefix}/lib and ${datarootdir}/locale.
|
||||
prefix="/usr/local/i686-w64-mingw32/stow/gettext-0.18.1.1"
|
||||
exec_prefix="${prefix}"
|
||||
datarootdir="${prefix}/share"
|
||||
datadir="${datarootdir}"
|
||||
# Set variables libdir, localedir.
|
||||
libdir="${exec_prefix}/lib"
|
||||
localedir="${datarootdir}/locale"
|
||||
|
||||
# Support for relocatability.
|
||||
if test "no" = yes; then
|
||||
orig_installdir="$libdir"/gettext # see Makefile.am's install rule
|
||||
# Determine curr_installdir without caring for symlinked callers.
|
||||
curr_installdir=`echo "$0" | sed -e 's,/[^/]*$,,'`
|
||||
curr_installdir=`cd "$curr_installdir" && pwd`
|
||||
# Compute the original/current installation prefixes by stripping the
|
||||
# trailing directories off the original/current installation directories.
|
||||
while true; do
|
||||
orig_last=`echo "$orig_installdir" | sed -n -e 's,^.*/\([^/]*\)$,\1,p'`
|
||||
curr_last=`echo "$curr_installdir" | sed -n -e 's,^.*/\([^/]*\)$,\1,p'`
|
||||
if test -z "$orig_last" || test -z "$curr_last"; then
|
||||
break
|
||||
fi
|
||||
if test "$orig_last" != "$curr_last"; then
|
||||
break
|
||||
fi
|
||||
orig_installdir=`echo "$orig_installdir" | sed -e 's,/[^/]*$,,'`
|
||||
curr_installdir=`echo "$curr_installdir" | sed -e 's,/[^/]*$,,'`
|
||||
done
|
||||
# Now relocate the directory variables that we use.
|
||||
libdir=`echo "$libdir/" | sed -e "s%^${orig_installdir}/%${curr_installdir}/%" | sed -e 's,/$,,'`
|
||||
localedir=`echo "$localedir/" | sed -e "s%^${orig_installdir}/%${curr_installdir}/%" | sed -e 's,/$,,'`
|
||||
fi
|
||||
|
||||
# Internationalization.
|
||||
. gettext.sh
|
||||
TEXTDOMAIN=gettext-tools
|
||||
export TEXTDOMAIN
|
||||
TEXTDOMAINDIR="$localedir"
|
||||
export TEXTDOMAINDIR
|
||||
|
||||
# Redirect fileno 3 to interactive I/O.
|
||||
exec 3>/dev/tty
|
||||
|
||||
# Output a prompt.
|
||||
if test $# != 0; then
|
||||
echo "$1" 1>&3
|
||||
fi
|
||||
|
||||
# Find the user name on the local machine.
|
||||
user=`id -u -n 2>/dev/null`
|
||||
if test -z "$user"; then
|
||||
user="$USER"
|
||||
if test -z "$user"; then
|
||||
user="$LOGNAME"
|
||||
if test -z "$user"; then
|
||||
user=unknown
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# Find the hostname.
|
||||
# hostname on some systems (SVR3.2, old Linux) returns a bogus exit status,
|
||||
# so uname gets run too, so we keep only the first line of output.
|
||||
#host=`(hostname || uname -n) 2>/dev/null | sed 1q`
|
||||
host=`"$libdir"/gettext/hostname --short 2>/dev/null | sed 1q`
|
||||
|
||||
# Find the hostname.
|
||||
hostfqdn=`"$libdir"/gettext/hostname --fqdn 2>/dev/null | sed 1q`
|
||||
|
||||
# Find a list of email addresses from various mailer configuration files.
|
||||
# All mailers use configuration files under $HOME. We handle them in a
|
||||
# last-modified - first-priority order.
|
||||
cd $HOME
|
||||
files=""
|
||||
|
||||
# ----------------------- BEGIN MAILER SPECIFIC CODE -----------------------
|
||||
|
||||
# Mozilla Thunderbird addresses
|
||||
files="$files .thunderbird/*/prefs.js"
|
||||
|
||||
# Mozilla addresses
|
||||
files="$files .mozilla/*/prefs.js"
|
||||
|
||||
# Netscape 4 addresses
|
||||
files="$files .netscape/liprefs.js .netscape/preferences.js"
|
||||
|
||||
# Netscape 3 addresses
|
||||
files="$files .netscape/preferences"
|
||||
|
||||
# Emacs/XEmacs rmail, Emacs/XEmacs gnus, XEmacs vm addresses
|
||||
# XEmacs mew addresses
|
||||
files="$files .emacs .emacs.el"
|
||||
|
||||
# KDE2 addresses
|
||||
files="$files .kde2/share/config/emaildefaults"
|
||||
|
||||
# KDE kmail addresses
|
||||
files="$files .kde2/share/config/kmailrc"
|
||||
|
||||
# GNOME evolution 2 addresses
|
||||
files="$files .gconf/apps/evolution/mail/%gconf.xml"
|
||||
|
||||
# GNOME evolution 1 addresses
|
||||
files="$files evolution/config.xmldb"
|
||||
|
||||
# GNOME balsa addresses
|
||||
files="$files .gnome/balsa"
|
||||
|
||||
# StarOffice and OpenOffice addresses
|
||||
sed_dos2unix='s/\r$//'
|
||||
sed_soffice51='s,StarOffice 5\.1=\(.*\)$,\1/sofficerc,p'
|
||||
sed_soffice52='s,StarOffice 5\.2=\(.*\)$,\1/user/sofficerc,p'
|
||||
sed_ooffice='s,^OpenOffice[^=]*=\(.*\)$,\1/user/config/registry/instance/org/openoffice/UserProfile.xml,p'
|
||||
files="$files Office51/sofficerc Office52/user/sofficerc "`sed -n -e "$sed_dos2unix" -e "$sed_soffice51" -e "$sed_soffice52" -e "$sed_ooffice" .sversionrc 2>/dev/null | sed -e 's,^file://*,/,'`
|
||||
|
||||
# mutt addresses
|
||||
files="$files .muttrc"
|
||||
|
||||
# pine addresses
|
||||
files="$files .pinerc"
|
||||
|
||||
# xfmail addresses
|
||||
files="$files .xfmail/.xfmailrc"
|
||||
|
||||
# tkrat addresses
|
||||
files="$files .ratatosk/ratatoskrc"
|
||||
|
||||
# ----------------------- END MAILER SPECIFIC CODE -----------------------
|
||||
|
||||
# Expand wildcards and remove nonexistent files from the list.
|
||||
nfiles=""
|
||||
for file in $files; do
|
||||
if test -r "$file" && test ! -d "$file"; then
|
||||
nfiles="$nfiles $file"
|
||||
fi
|
||||
done
|
||||
files="$nfiles"
|
||||
|
||||
addresses=""
|
||||
|
||||
if test -n "$files"; then
|
||||
|
||||
for file in `ls -t $files`; do
|
||||
|
||||
case "$file" in
|
||||
|
||||
# ----------------------- BEGIN MAILER SPECIFIC CODE -----------------------
|
||||
|
||||
# Mozilla and Mozilla Thunderbird addresses
|
||||
.mozilla/*/prefs.js | .thunderbird/*/prefs.js)
|
||||
addresses="$addresses "`grep -h '^user_pref("mail\.identity\..*\.useremail", ".*");$' $file 2>/dev/null | sed -e 's/^user_pref("mail\.identity\..*\.useremail", "\(.*\)");$/\1/'`
|
||||
;;
|
||||
|
||||
# Netscape 4 addresses
|
||||
.netscape/liprefs.js | .netscape/preferences.js)
|
||||
addresses="$addresses "`grep -h '^user_pref("mail\.identity\.useremail", ".*");$' $file 2>/dev/null | sed -e 's/^user_pref("mail\.identity\.useremail", "\(.*\)");$/\1/'`
|
||||
;;
|
||||
|
||||
# Netscape 3 addresses
|
||||
.netscape/preferences)
|
||||
addresses="$addresses "`grep -h '^EMAIL_ADDRESS:' $file 2>/dev/null | sed -e 's/^EMAIL_ADDRESS:[ ]*//'`
|
||||
;;
|
||||
|
||||
.emacs | .emacs.el)
|
||||
# Emacs/XEmacs rmail, Emacs/XEmacs gnus, XEmacs vm addresses
|
||||
addresses="$addresses "`grep -h '[ (]user-mail-address "[^"]*"' $file 2>/dev/null | sed -e 's/^.*[ (]user-mail-address "\([^"]*\)".*$/\1/'`
|
||||
# XEmacs mew addresses
|
||||
domains=`grep -h '[ (]mew-mail-domain "[^"]*"' $file 2>/dev/null | sed -e 's/^.*[ (]mew-mail-domain "\([^"]*\)".*$/\1/'`
|
||||
if test -n "$domains"; then
|
||||
for domain in $domains; do
|
||||
addresses="$addresses ${user}@$domain"
|
||||
done
|
||||
fi
|
||||
;;
|
||||
|
||||
# KDE2 addresses
|
||||
.kde2/share/config/emaildefaults)
|
||||
addresses="$addresses "`grep -h '^EmailAddress=' $file 2>/dev/null | sed -e 's/^EmailAddress=//'`
|
||||
;;
|
||||
|
||||
# KDE kmail addresses
|
||||
.kde2/share/config/kmailrc)
|
||||
addresses="$addresses "`grep -h '^Email Address=' $file 2>/dev/null | sed -e 's/^Email Address=//'`
|
||||
;;
|
||||
|
||||
# GNOME evolution 2 addresses
|
||||
.gconf/apps/evolution/mail/%gconf.xml)
|
||||
sedexpr0='s,^.*<addr-spec>\(.*\)</addr-spec>.*$,\1,p'
|
||||
addresses="$addresses "`sed -n -e "$sedexpr0" < $file`
|
||||
;;
|
||||
|
||||
# GNOME evolution 1 addresses
|
||||
evolution/config.xmldb)
|
||||
sedexpr0='s/^.*<entry name="identity_address_[0-9]*" type="string" value="\([^"]*\)".*$/\1/p'
|
||||
sedexpr1='s/\(..\)/\\x\1/g'
|
||||
sedexpr2='s,$,\\n,'
|
||||
addresses="$addresses "`sed -n -e "$sedexpr0" < $file | while read hexstring; do printf \`echo "$hexstring" | sed -e "$sedexpr1" -e "$sedexpr2"\`; done`
|
||||
;;
|
||||
|
||||
# GNOME balsa addresses
|
||||
.gnome/balsa)
|
||||
addresses="$addresses "`grep -h '^Address=' $file 2>/dev/null | sed -e 's/^Address=//'`
|
||||
;;
|
||||
|
||||
# OpenOffice addresses
|
||||
*/UserProfile.xml)
|
||||
addresses="$addresses "`sed -n -e 's,^.*<mail cfg:type="string">\(.*\)</mail>.*$,\1,p' $file 2>/dev/null`
|
||||
;;
|
||||
|
||||
# StarOffice addresses
|
||||
# Not a typo. They really write "Adress" with a single d.
|
||||
# German orthography...
|
||||
*/sofficerc)
|
||||
addresses="$addresses "`grep -h '^User-Adress=' $file 2>/dev/null | sed -e 's/#[^#]*$//' -e 's/^.*#//'`
|
||||
;;
|
||||
|
||||
# mutt addresses
|
||||
.muttrc)
|
||||
mutt_addresses=`grep -h '^set from="[^"]*"[ ]*$' $file 2>/dev/null | sed -e 's/^set from="\([^"]*\)"[ ]*$/\1/'`
|
||||
if test -n "$mutt_addresses"; then
|
||||
addresses="$addresses $mutt_addresses"
|
||||
else
|
||||
# mutt uses $EMAIL as fallback.
|
||||
if test -n "$EMAIL"; then
|
||||
addresses="$addresses $EMAIL"
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
|
||||
# pine addresses
|
||||
.pinerc)
|
||||
domains=`grep -h '^user-domain=' $file 2>/dev/null | sed -e 's/^user-domain=//'`
|
||||
if test -n "$domains"; then
|
||||
for domain in $domains; do
|
||||
addresses="$addresses ${user}@$domain"
|
||||
done
|
||||
else
|
||||
# The use-only-domain-name option is only used if the user-domain option is not present.
|
||||
domains=`grep -h '^use-only-domain-name=' $file 2>/dev/null | sed -e 's/^use-only-domain-name=//'`
|
||||
if test "Yes" = "$domains"; then
|
||||
addresses="$addresses ${user}@"`echo "$hostfqdn" | sed -e 's/^[^.]*\.//'`
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
|
||||
# xfmail addresses
|
||||
.xfmail/.xfmailrc)
|
||||
addresses="$addresses "`grep -h '^from=.*<.*>' $file 2>/dev/null | sed -e 's/^.*<\([^<>]*\)>.*$/\1/'`
|
||||
;;
|
||||
|
||||
# tkrat addresses
|
||||
.ratatosk/ratatoskrc)
|
||||
domains=`grep -h '^set option(masquerade_as) ' $file 2>/dev/null | sed -e 's/^set option(masquerade_as) //'`
|
||||
if test -n "$domains"; then
|
||||
for domain in $domains; do
|
||||
addresses="$addresses ${user}@$domain"
|
||||
done
|
||||
else
|
||||
# The domain option is used only if the masquerade_as option is not present.
|
||||
domains=`grep -h '^set option(domain) ' $file 2>/dev/null | sed -e 's/^set option(domain) //'`
|
||||
if test -n "$domains"; then
|
||||
for domain in $domains; do
|
||||
addresses="$addresses ${user}@${host}.$domain"
|
||||
done
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
|
||||
# ----------------------- END MAILER SPECIFIC CODE -----------------------
|
||||
|
||||
esac
|
||||
|
||||
done
|
||||
|
||||
fi
|
||||
|
||||
# Some Debian systems have a file /etc/mailname.
|
||||
if test -r /etc/mailname; then
|
||||
hostmailname=`cat /etc/mailname`
|
||||
if test -n "$hostmailname"; then
|
||||
addresses="$addresses ${user}@$hostmailname"
|
||||
fi
|
||||
fi
|
||||
|
||||
# SuSE Linux >= 8.0 systems have a file /etc/sysconfig/mail.
|
||||
if test -r /etc/sysconfig/mail; then
|
||||
hostmailname=`. /etc/sysconfig/mail && echo "$FROM_HEADER"`
|
||||
if test -n "$hostmailname"; then
|
||||
addresses="$addresses ${user}@$hostmailname"
|
||||
fi
|
||||
fi
|
||||
|
||||
# elm has no user-defined addresses.
|
||||
# mailx has no user-defined addresses.
|
||||
# mh has no user-defined addresses.
|
||||
# They use the system default.
|
||||
addresses="$addresses ${user}@$hostfqdn"
|
||||
|
||||
# Normalize addresses: remove addresses without @, lowercase the part after @,
|
||||
# and remove duplicates.
|
||||
lowercase_sed='{
|
||||
h
|
||||
s/^[^@]*@\(.*\)$/\1/
|
||||
y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
|
||||
x
|
||||
s/^\([^@]*\)@.*/\1@/
|
||||
G
|
||||
s/\
|
||||
//
|
||||
p
|
||||
}'
|
||||
naddresses=""
|
||||
for addr in $addresses; do
|
||||
case "$addr" in
|
||||
"<"*">") addr=`echo "$addr" | sed -e 's/^<//' -e 's/>$//'` ;;
|
||||
esac
|
||||
case "$addr" in
|
||||
*@*)
|
||||
addr=`echo "$addr" | sed -n -e "$lowercase_sed"`
|
||||
case " $naddresses " in
|
||||
*" $addr "*) ;;
|
||||
*) naddresses="$naddresses $addr" ;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
done
|
||||
addresses="$naddresses"
|
||||
|
||||
# Now it's time to ask the user.
|
||||
case "$addresses" in
|
||||
" "*" "*)
|
||||
# At least two addresses.
|
||||
lines=""
|
||||
i=0
|
||||
for addr in $addresses; do
|
||||
i=`expr $i + 1`
|
||||
lines="${lines}${i} ${addr}
|
||||
"
|
||||
done
|
||||
while true; do
|
||||
{ gettext "Which is your email address?"; echo; } 1>&3
|
||||
echo "$lines" 1>&3
|
||||
{ gettext "Please choose the number, or enter your email address."; echo; } 1>&3
|
||||
read answer < /dev/tty
|
||||
case "$answer" in
|
||||
*@*) ;;
|
||||
[0-9]*)
|
||||
i=0
|
||||
for addr in $addresses; do
|
||||
i=`expr $i + 1`
|
||||
if test "$i" = "$answer"; then
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
;;
|
||||
esac
|
||||
case "$answer" in
|
||||
"<"*">") answer=`echo "$answer" | sed -e 's/^<//' -e 's/>$//'` ;;
|
||||
esac
|
||||
case "$answer" in
|
||||
*" "*) { gettext "Invalid email address: invalid character."; echo; echo; } 1>&3 ; continue ;;
|
||||
*@*.*) ;;
|
||||
*@*) { gettext "Invalid email address: need a fully qualified host name or domain name."; echo; echo; } 1>&3 ; continue ;;
|
||||
*) { gettext "Invalid email address: missing @"; echo; echo; } 1>&3 ; continue ;;
|
||||
esac
|
||||
addr=`echo "$answer" | sed -n -e "$lowercase_sed"`
|
||||
break
|
||||
done
|
||||
;;
|
||||
" "*)
|
||||
# One address.
|
||||
while true; do
|
||||
{ gettext "Is the following your email address?"; echo; } 1>&3
|
||||
echo " $addresses" 1>&3
|
||||
{ gettext "Please confirm by pressing Return, or enter your email address."; echo; } 1>&3
|
||||
read answer < /dev/tty
|
||||
if test -z "$answer"; then
|
||||
addr=`echo "$addresses" | sed -e 's/^ //'`
|
||||
break
|
||||
fi
|
||||
case "$answer" in
|
||||
"<"*">") answer=`echo "$answer" | sed -e 's/^<//' -e 's/>$//'` ;;
|
||||
esac
|
||||
case "$answer" in
|
||||
*" "*) { gettext "Invalid email address: invalid character."; echo; echo; } 1>&3 ; continue ;;
|
||||
*@*.*) ;;
|
||||
*@*) { gettext "Invalid email address: need a fully qualified host name or domain name."; echo; echo; } 1>&3 ; continue ;;
|
||||
*) { gettext "Invalid email address: missing @"; echo; echo; } 1>&3 ; continue ;;
|
||||
esac
|
||||
addr=`echo "$answer" | sed -n -e "$lowercase_sed"`
|
||||
break
|
||||
done
|
||||
;;
|
||||
"")
|
||||
# No address.
|
||||
{ gettext "Couldn't find out about your email address."; echo; } 1>&3
|
||||
while true; do
|
||||
{ gettext "Please enter your email address."; echo; } 1>&3
|
||||
read answer < /dev/tty
|
||||
case "$answer" in
|
||||
"<"*">") answer=`echo "$answer" | sed -e 's/^<//' -e 's/>$//'` ;;
|
||||
esac
|
||||
case "$answer" in
|
||||
*" "*) { gettext "Invalid email address: invalid character."; echo; echo; } 1>&3 ; continue ;;
|
||||
*@*.*) ;;
|
||||
*@*) { gettext "Invalid email address: need a fully qualified host name or domain name."; echo; echo; } 1>&3 ; continue ;;
|
||||
*) { gettext "Invalid email address: missing @"; echo; echo; } 1>&3 ; continue ;;
|
||||
esac
|
||||
addr=`echo "$answer" | sed -n -e "$lowercase_sed"`
|
||||
break
|
||||
done
|
||||
;;
|
||||
*) echo "internal error" 1>&3 ; exit 1 ;;
|
||||
esac
|
||||
|
||||
# Print to standard output.
|
||||
echo "$addr"
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,86 +0,0 @@
|
||||
#!/bin/sh
|
||||
# Prints a package's identification PACKAGE VERSION or PACKAGE.
|
||||
#
|
||||
# Copyright (C) 2001-2003, 2005 Free Software Foundation, Inc.
|
||||
#
|
||||
# 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
want_version="$1"
|
||||
|
||||
# NLS nuisances: Letter ranges are different in the Estonian locale.
|
||||
LC_ALL=C
|
||||
|
||||
while true; do
|
||||
if test -f configure; then
|
||||
package=`(grep '^PACKAGE_NAME=' configure; grep '^ *PACKAGE=' configure) | grep -v '=[ ]*$' | sed -e '1q' | sed -e 's/^[^=]*=//' | sed -e "s/^'//" -e "s/'$//"`
|
||||
case "$package" in
|
||||
*[\"\$\`\{\}]*)
|
||||
# Some packages (gcal) retrieve the package name dynamically.
|
||||
package=
|
||||
;;
|
||||
esac
|
||||
if test -n "$package"; then
|
||||
is_gnu=`LC_ALL=C grep "GNU $package" * 2>/dev/null | grep -v '^libtool:'`
|
||||
if test -n "$is_gnu"; then
|
||||
package="GNU $package"
|
||||
fi
|
||||
if test -n "$want_version"; then
|
||||
version=`(grep '^PACKAGE_VERSION=' configure; grep '^ *VERSION=' configure) | grep -v '=[ ]*$' | sed -e '1q' | sed -e 's/^[^=]*=//' | sed -e "s/^'//" -e "s/'$//"`
|
||||
case "$version" in
|
||||
*[\"\$\`\{\}]*)
|
||||
# Some packages (gcal, gcc, clisp) retrieve the version dynamically.
|
||||
version=
|
||||
;;
|
||||
esac
|
||||
if test -n "$version"; then
|
||||
echo "$package $version"
|
||||
else
|
||||
echo "$package"
|
||||
fi
|
||||
else
|
||||
echo "$package"
|
||||
fi
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
dir=`basename \`pwd\``
|
||||
case "$dir" in
|
||||
i18n)
|
||||
# This directory name, used in GNU make, is not the top level directory.
|
||||
;;
|
||||
*[A-Za-z]*[0-9]*)
|
||||
package=`echo "$dir" | sed -e 's/^\([^0-9]*\)[0-9].*$/\1/' -e 's/[-_]$//'`
|
||||
if test -n "$want_version"; then
|
||||
version=`echo "$dir" | sed -e 's/^[^0-9]*\([0-9].*\)$/\1/'`
|
||||
echo "$package $version"
|
||||
else
|
||||
echo "$package"
|
||||
fi
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
# Go to parent directory
|
||||
last=`/bin/pwd`
|
||||
cd ..
|
||||
curr=`/bin/pwd`
|
||||
if test "$last" = "$curr"; then
|
||||
# Oops, didn't find the package name.
|
||||
if test -n "$want_version"; then
|
||||
echo "PACKAGE VERSION"
|
||||
else
|
||||
echo "PACKAGE"
|
||||
fi
|
||||
exit 0
|
||||
fi
|
||||
done
|
||||
Binary file not shown.
@@ -1,436 +0,0 @@
|
||||
#!/bin/sh
|
||||
# Prints the user's email address, with confirmation from the user.
|
||||
#
|
||||
# Copyright (C) 2001-2003, 2005 Free Software Foundation, Inc.
|
||||
#
|
||||
# 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Prerequisites for using ${exec_prefix}/lib and ${datarootdir}/locale.
|
||||
prefix="/usr/local/x86_64-w64-mingw32/stow/gettext-0.18.1.1"
|
||||
exec_prefix="${prefix}"
|
||||
datarootdir="${prefix}/share"
|
||||
datadir="${datarootdir}"
|
||||
# Set variables libdir, localedir.
|
||||
libdir="${exec_prefix}/lib"
|
||||
localedir="${datarootdir}/locale"
|
||||
|
||||
# Support for relocatability.
|
||||
if test "no" = yes; then
|
||||
orig_installdir="$libdir"/gettext # see Makefile.am's install rule
|
||||
# Determine curr_installdir without caring for symlinked callers.
|
||||
curr_installdir=`echo "$0" | sed -e 's,/[^/]*$,,'`
|
||||
curr_installdir=`cd "$curr_installdir" && pwd`
|
||||
# Compute the original/current installation prefixes by stripping the
|
||||
# trailing directories off the original/current installation directories.
|
||||
while true; do
|
||||
orig_last=`echo "$orig_installdir" | sed -n -e 's,^.*/\([^/]*\)$,\1,p'`
|
||||
curr_last=`echo "$curr_installdir" | sed -n -e 's,^.*/\([^/]*\)$,\1,p'`
|
||||
if test -z "$orig_last" || test -z "$curr_last"; then
|
||||
break
|
||||
fi
|
||||
if test "$orig_last" != "$curr_last"; then
|
||||
break
|
||||
fi
|
||||
orig_installdir=`echo "$orig_installdir" | sed -e 's,/[^/]*$,,'`
|
||||
curr_installdir=`echo "$curr_installdir" | sed -e 's,/[^/]*$,,'`
|
||||
done
|
||||
# Now relocate the directory variables that we use.
|
||||
libdir=`echo "$libdir/" | sed -e "s%^${orig_installdir}/%${curr_installdir}/%" | sed -e 's,/$,,'`
|
||||
localedir=`echo "$localedir/" | sed -e "s%^${orig_installdir}/%${curr_installdir}/%" | sed -e 's,/$,,'`
|
||||
fi
|
||||
|
||||
# Internationalization.
|
||||
. gettext.sh
|
||||
TEXTDOMAIN=gettext-tools
|
||||
export TEXTDOMAIN
|
||||
TEXTDOMAINDIR="$localedir"
|
||||
export TEXTDOMAINDIR
|
||||
|
||||
# Redirect fileno 3 to interactive I/O.
|
||||
exec 3>/dev/tty
|
||||
|
||||
# Output a prompt.
|
||||
if test $# != 0; then
|
||||
echo "$1" 1>&3
|
||||
fi
|
||||
|
||||
# Find the user name on the local machine.
|
||||
user=`id -u -n 2>/dev/null`
|
||||
if test -z "$user"; then
|
||||
user="$USER"
|
||||
if test -z "$user"; then
|
||||
user="$LOGNAME"
|
||||
if test -z "$user"; then
|
||||
user=unknown
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# Find the hostname.
|
||||
# hostname on some systems (SVR3.2, old Linux) returns a bogus exit status,
|
||||
# so uname gets run too, so we keep only the first line of output.
|
||||
#host=`(hostname || uname -n) 2>/dev/null | sed 1q`
|
||||
host=`"$libdir"/gettext/hostname --short 2>/dev/null | sed 1q`
|
||||
|
||||
# Find the hostname.
|
||||
hostfqdn=`"$libdir"/gettext/hostname --fqdn 2>/dev/null | sed 1q`
|
||||
|
||||
# Find a list of email addresses from various mailer configuration files.
|
||||
# All mailers use configuration files under $HOME. We handle them in a
|
||||
# last-modified - first-priority order.
|
||||
cd $HOME
|
||||
files=""
|
||||
|
||||
# ----------------------- BEGIN MAILER SPECIFIC CODE -----------------------
|
||||
|
||||
# Mozilla Thunderbird addresses
|
||||
files="$files .thunderbird/*/prefs.js"
|
||||
|
||||
# Mozilla addresses
|
||||
files="$files .mozilla/*/prefs.js"
|
||||
|
||||
# Netscape 4 addresses
|
||||
files="$files .netscape/liprefs.js .netscape/preferences.js"
|
||||
|
||||
# Netscape 3 addresses
|
||||
files="$files .netscape/preferences"
|
||||
|
||||
# Emacs/XEmacs rmail, Emacs/XEmacs gnus, XEmacs vm addresses
|
||||
# XEmacs mew addresses
|
||||
files="$files .emacs .emacs.el"
|
||||
|
||||
# KDE2 addresses
|
||||
files="$files .kde2/share/config/emaildefaults"
|
||||
|
||||
# KDE kmail addresses
|
||||
files="$files .kde2/share/config/kmailrc"
|
||||
|
||||
# GNOME evolution 2 addresses
|
||||
files="$files .gconf/apps/evolution/mail/%gconf.xml"
|
||||
|
||||
# GNOME evolution 1 addresses
|
||||
files="$files evolution/config.xmldb"
|
||||
|
||||
# GNOME balsa addresses
|
||||
files="$files .gnome/balsa"
|
||||
|
||||
# StarOffice and OpenOffice addresses
|
||||
sed_dos2unix='s/\r$//'
|
||||
sed_soffice51='s,StarOffice 5\.1=\(.*\)$,\1/sofficerc,p'
|
||||
sed_soffice52='s,StarOffice 5\.2=\(.*\)$,\1/user/sofficerc,p'
|
||||
sed_ooffice='s,^OpenOffice[^=]*=\(.*\)$,\1/user/config/registry/instance/org/openoffice/UserProfile.xml,p'
|
||||
files="$files Office51/sofficerc Office52/user/sofficerc "`sed -n -e "$sed_dos2unix" -e "$sed_soffice51" -e "$sed_soffice52" -e "$sed_ooffice" .sversionrc 2>/dev/null | sed -e 's,^file://*,/,'`
|
||||
|
||||
# mutt addresses
|
||||
files="$files .muttrc"
|
||||
|
||||
# pine addresses
|
||||
files="$files .pinerc"
|
||||
|
||||
# xfmail addresses
|
||||
files="$files .xfmail/.xfmailrc"
|
||||
|
||||
# tkrat addresses
|
||||
files="$files .ratatosk/ratatoskrc"
|
||||
|
||||
# ----------------------- END MAILER SPECIFIC CODE -----------------------
|
||||
|
||||
# Expand wildcards and remove nonexistent files from the list.
|
||||
nfiles=""
|
||||
for file in $files; do
|
||||
if test -r "$file" && test ! -d "$file"; then
|
||||
nfiles="$nfiles $file"
|
||||
fi
|
||||
done
|
||||
files="$nfiles"
|
||||
|
||||
addresses=""
|
||||
|
||||
if test -n "$files"; then
|
||||
|
||||
for file in `ls -t $files`; do
|
||||
|
||||
case "$file" in
|
||||
|
||||
# ----------------------- BEGIN MAILER SPECIFIC CODE -----------------------
|
||||
|
||||
# Mozilla and Mozilla Thunderbird addresses
|
||||
.mozilla/*/prefs.js | .thunderbird/*/prefs.js)
|
||||
addresses="$addresses "`grep -h '^user_pref("mail\.identity\..*\.useremail", ".*");$' $file 2>/dev/null | sed -e 's/^user_pref("mail\.identity\..*\.useremail", "\(.*\)");$/\1/'`
|
||||
;;
|
||||
|
||||
# Netscape 4 addresses
|
||||
.netscape/liprefs.js | .netscape/preferences.js)
|
||||
addresses="$addresses "`grep -h '^user_pref("mail\.identity\.useremail", ".*");$' $file 2>/dev/null | sed -e 's/^user_pref("mail\.identity\.useremail", "\(.*\)");$/\1/'`
|
||||
;;
|
||||
|
||||
# Netscape 3 addresses
|
||||
.netscape/preferences)
|
||||
addresses="$addresses "`grep -h '^EMAIL_ADDRESS:' $file 2>/dev/null | sed -e 's/^EMAIL_ADDRESS:[ ]*//'`
|
||||
;;
|
||||
|
||||
.emacs | .emacs.el)
|
||||
# Emacs/XEmacs rmail, Emacs/XEmacs gnus, XEmacs vm addresses
|
||||
addresses="$addresses "`grep -h '[ (]user-mail-address "[^"]*"' $file 2>/dev/null | sed -e 's/^.*[ (]user-mail-address "\([^"]*\)".*$/\1/'`
|
||||
# XEmacs mew addresses
|
||||
domains=`grep -h '[ (]mew-mail-domain "[^"]*"' $file 2>/dev/null | sed -e 's/^.*[ (]mew-mail-domain "\([^"]*\)".*$/\1/'`
|
||||
if test -n "$domains"; then
|
||||
for domain in $domains; do
|
||||
addresses="$addresses ${user}@$domain"
|
||||
done
|
||||
fi
|
||||
;;
|
||||
|
||||
# KDE2 addresses
|
||||
.kde2/share/config/emaildefaults)
|
||||
addresses="$addresses "`grep -h '^EmailAddress=' $file 2>/dev/null | sed -e 's/^EmailAddress=//'`
|
||||
;;
|
||||
|
||||
# KDE kmail addresses
|
||||
.kde2/share/config/kmailrc)
|
||||
addresses="$addresses "`grep -h '^Email Address=' $file 2>/dev/null | sed -e 's/^Email Address=//'`
|
||||
;;
|
||||
|
||||
# GNOME evolution 2 addresses
|
||||
.gconf/apps/evolution/mail/%gconf.xml)
|
||||
sedexpr0='s,^.*<addr-spec>\(.*\)</addr-spec>.*$,\1,p'
|
||||
addresses="$addresses "`sed -n -e "$sedexpr0" < $file`
|
||||
;;
|
||||
|
||||
# GNOME evolution 1 addresses
|
||||
evolution/config.xmldb)
|
||||
sedexpr0='s/^.*<entry name="identity_address_[0-9]*" type="string" value="\([^"]*\)".*$/\1/p'
|
||||
sedexpr1='s/\(..\)/\\x\1/g'
|
||||
sedexpr2='s,$,\\n,'
|
||||
addresses="$addresses "`sed -n -e "$sedexpr0" < $file | while read hexstring; do printf \`echo "$hexstring" | sed -e "$sedexpr1" -e "$sedexpr2"\`; done`
|
||||
;;
|
||||
|
||||
# GNOME balsa addresses
|
||||
.gnome/balsa)
|
||||
addresses="$addresses "`grep -h '^Address=' $file 2>/dev/null | sed -e 's/^Address=//'`
|
||||
;;
|
||||
|
||||
# OpenOffice addresses
|
||||
*/UserProfile.xml)
|
||||
addresses="$addresses "`sed -n -e 's,^.*<mail cfg:type="string">\(.*\)</mail>.*$,\1,p' $file 2>/dev/null`
|
||||
;;
|
||||
|
||||
# StarOffice addresses
|
||||
# Not a typo. They really write "Adress" with a single d.
|
||||
# German orthography...
|
||||
*/sofficerc)
|
||||
addresses="$addresses "`grep -h '^User-Adress=' $file 2>/dev/null | sed -e 's/#[^#]*$//' -e 's/^.*#//'`
|
||||
;;
|
||||
|
||||
# mutt addresses
|
||||
.muttrc)
|
||||
mutt_addresses=`grep -h '^set from="[^"]*"[ ]*$' $file 2>/dev/null | sed -e 's/^set from="\([^"]*\)"[ ]*$/\1/'`
|
||||
if test -n "$mutt_addresses"; then
|
||||
addresses="$addresses $mutt_addresses"
|
||||
else
|
||||
# mutt uses $EMAIL as fallback.
|
||||
if test -n "$EMAIL"; then
|
||||
addresses="$addresses $EMAIL"
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
|
||||
# pine addresses
|
||||
.pinerc)
|
||||
domains=`grep -h '^user-domain=' $file 2>/dev/null | sed -e 's/^user-domain=//'`
|
||||
if test -n "$domains"; then
|
||||
for domain in $domains; do
|
||||
addresses="$addresses ${user}@$domain"
|
||||
done
|
||||
else
|
||||
# The use-only-domain-name option is only used if the user-domain option is not present.
|
||||
domains=`grep -h '^use-only-domain-name=' $file 2>/dev/null | sed -e 's/^use-only-domain-name=//'`
|
||||
if test "Yes" = "$domains"; then
|
||||
addresses="$addresses ${user}@"`echo "$hostfqdn" | sed -e 's/^[^.]*\.//'`
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
|
||||
# xfmail addresses
|
||||
.xfmail/.xfmailrc)
|
||||
addresses="$addresses "`grep -h '^from=.*<.*>' $file 2>/dev/null | sed -e 's/^.*<\([^<>]*\)>.*$/\1/'`
|
||||
;;
|
||||
|
||||
# tkrat addresses
|
||||
.ratatosk/ratatoskrc)
|
||||
domains=`grep -h '^set option(masquerade_as) ' $file 2>/dev/null | sed -e 's/^set option(masquerade_as) //'`
|
||||
if test -n "$domains"; then
|
||||
for domain in $domains; do
|
||||
addresses="$addresses ${user}@$domain"
|
||||
done
|
||||
else
|
||||
# The domain option is used only if the masquerade_as option is not present.
|
||||
domains=`grep -h '^set option(domain) ' $file 2>/dev/null | sed -e 's/^set option(domain) //'`
|
||||
if test -n "$domains"; then
|
||||
for domain in $domains; do
|
||||
addresses="$addresses ${user}@${host}.$domain"
|
||||
done
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
|
||||
# ----------------------- END MAILER SPECIFIC CODE -----------------------
|
||||
|
||||
esac
|
||||
|
||||
done
|
||||
|
||||
fi
|
||||
|
||||
# Some Debian systems have a file /etc/mailname.
|
||||
if test -r /etc/mailname; then
|
||||
hostmailname=`cat /etc/mailname`
|
||||
if test -n "$hostmailname"; then
|
||||
addresses="$addresses ${user}@$hostmailname"
|
||||
fi
|
||||
fi
|
||||
|
||||
# SuSE Linux >= 8.0 systems have a file /etc/sysconfig/mail.
|
||||
if test -r /etc/sysconfig/mail; then
|
||||
hostmailname=`. /etc/sysconfig/mail && echo "$FROM_HEADER"`
|
||||
if test -n "$hostmailname"; then
|
||||
addresses="$addresses ${user}@$hostmailname"
|
||||
fi
|
||||
fi
|
||||
|
||||
# elm has no user-defined addresses.
|
||||
# mailx has no user-defined addresses.
|
||||
# mh has no user-defined addresses.
|
||||
# They use the system default.
|
||||
addresses="$addresses ${user}@$hostfqdn"
|
||||
|
||||
# Normalize addresses: remove addresses without @, lowercase the part after @,
|
||||
# and remove duplicates.
|
||||
lowercase_sed='{
|
||||
h
|
||||
s/^[^@]*@\(.*\)$/\1/
|
||||
y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
|
||||
x
|
||||
s/^\([^@]*\)@.*/\1@/
|
||||
G
|
||||
s/\
|
||||
//
|
||||
p
|
||||
}'
|
||||
naddresses=""
|
||||
for addr in $addresses; do
|
||||
case "$addr" in
|
||||
"<"*">") addr=`echo "$addr" | sed -e 's/^<//' -e 's/>$//'` ;;
|
||||
esac
|
||||
case "$addr" in
|
||||
*@*)
|
||||
addr=`echo "$addr" | sed -n -e "$lowercase_sed"`
|
||||
case " $naddresses " in
|
||||
*" $addr "*) ;;
|
||||
*) naddresses="$naddresses $addr" ;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
done
|
||||
addresses="$naddresses"
|
||||
|
||||
# Now it's time to ask the user.
|
||||
case "$addresses" in
|
||||
" "*" "*)
|
||||
# At least two addresses.
|
||||
lines=""
|
||||
i=0
|
||||
for addr in $addresses; do
|
||||
i=`expr $i + 1`
|
||||
lines="${lines}${i} ${addr}
|
||||
"
|
||||
done
|
||||
while true; do
|
||||
{ gettext "Which is your email address?"; echo; } 1>&3
|
||||
echo "$lines" 1>&3
|
||||
{ gettext "Please choose the number, or enter your email address."; echo; } 1>&3
|
||||
read answer < /dev/tty
|
||||
case "$answer" in
|
||||
*@*) ;;
|
||||
[0-9]*)
|
||||
i=0
|
||||
for addr in $addresses; do
|
||||
i=`expr $i + 1`
|
||||
if test "$i" = "$answer"; then
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
;;
|
||||
esac
|
||||
case "$answer" in
|
||||
"<"*">") answer=`echo "$answer" | sed -e 's/^<//' -e 's/>$//'` ;;
|
||||
esac
|
||||
case "$answer" in
|
||||
*" "*) { gettext "Invalid email address: invalid character."; echo; echo; } 1>&3 ; continue ;;
|
||||
*@*.*) ;;
|
||||
*@*) { gettext "Invalid email address: need a fully qualified host name or domain name."; echo; echo; } 1>&3 ; continue ;;
|
||||
*) { gettext "Invalid email address: missing @"; echo; echo; } 1>&3 ; continue ;;
|
||||
esac
|
||||
addr=`echo "$answer" | sed -n -e "$lowercase_sed"`
|
||||
break
|
||||
done
|
||||
;;
|
||||
" "*)
|
||||
# One address.
|
||||
while true; do
|
||||
{ gettext "Is the following your email address?"; echo; } 1>&3
|
||||
echo " $addresses" 1>&3
|
||||
{ gettext "Please confirm by pressing Return, or enter your email address."; echo; } 1>&3
|
||||
read answer < /dev/tty
|
||||
if test -z "$answer"; then
|
||||
addr=`echo "$addresses" | sed -e 's/^ //'`
|
||||
break
|
||||
fi
|
||||
case "$answer" in
|
||||
"<"*">") answer=`echo "$answer" | sed -e 's/^<//' -e 's/>$//'` ;;
|
||||
esac
|
||||
case "$answer" in
|
||||
*" "*) { gettext "Invalid email address: invalid character."; echo; echo; } 1>&3 ; continue ;;
|
||||
*@*.*) ;;
|
||||
*@*) { gettext "Invalid email address: need a fully qualified host name or domain name."; echo; echo; } 1>&3 ; continue ;;
|
||||
*) { gettext "Invalid email address: missing @"; echo; echo; } 1>&3 ; continue ;;
|
||||
esac
|
||||
addr=`echo "$answer" | sed -n -e "$lowercase_sed"`
|
||||
break
|
||||
done
|
||||
;;
|
||||
"")
|
||||
# No address.
|
||||
{ gettext "Couldn't find out about your email address."; echo; } 1>&3
|
||||
while true; do
|
||||
{ gettext "Please enter your email address."; echo; } 1>&3
|
||||
read answer < /dev/tty
|
||||
case "$answer" in
|
||||
"<"*">") answer=`echo "$answer" | sed -e 's/^<//' -e 's/>$//'` ;;
|
||||
esac
|
||||
case "$answer" in
|
||||
*" "*) { gettext "Invalid email address: invalid character."; echo; echo; } 1>&3 ; continue ;;
|
||||
*@*.*) ;;
|
||||
*@*) { gettext "Invalid email address: need a fully qualified host name or domain name."; echo; echo; } 1>&3 ; continue ;;
|
||||
*) { gettext "Invalid email address: missing @"; echo; echo; } 1>&3 ; continue ;;
|
||||
esac
|
||||
addr=`echo "$answer" | sed -n -e "$lowercase_sed"`
|
||||
break
|
||||
done
|
||||
;;
|
||||
*) echo "internal error" 1>&3 ; exit 1 ;;
|
||||
esac
|
||||
|
||||
# Print to standard output.
|
||||
echo "$addr"
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,27 @@
|
||||
codecov:
|
||||
max_report_age: off
|
||||
notify:
|
||||
wait_for_ci: false
|
||||
require_ci_to_pass: false
|
||||
comment:
|
||||
require_base: false
|
||||
require_head: false
|
||||
coverage:
|
||||
status:
|
||||
project:
|
||||
default:
|
||||
threshold: 0.07
|
||||
fixes:
|
||||
- '/home/actions-runner/_work/zlib-ng/zlib-ng::'
|
||||
- '/home/actions-runner/_work/zlib-ng/zlib-ng/build/::'
|
||||
ignore:
|
||||
- usr/include/.*
|
||||
- /usr/include/.*
|
||||
- /build/usr/include/.*
|
||||
- usr/lib/.*
|
||||
- /usr/lib/.*
|
||||
- /build/usr/lib/.*
|
||||
- usr/lib64/.*
|
||||
- /usr/lib64/.*
|
||||
- /build/usr/lib64/.*
|
||||
- _deps/**/*
|
||||
@@ -0,0 +1 @@
|
||||
disable=SC2140,SC2086,SC2046,SC2015,SC1097,SC1035,SC1036,SC1007,SC2154,SC2155,SC2000,SC2034,SC2016,SC1091,SC1090,SC2212,SC2143,SC2129,SC2102,SC2069,SC1041,SC1042,SC1044,SC1046,SC1119,SC1110,SC1111,SC1112,SC1102,SC1105,SC1101,SC1004,SC1003,SC1012,SC2068,SC2065,SC2064,SC2063,SC2059,SC2053,SC2048,SC2044,SC2032,SC2031,SC2030,SC2029,SC2025,SC2024,SC2022,SC2018,SC2019,SC2017,SC2014,SC2013,SC2012,SC2009,SC2001,SC2098,SC2096,SC2094,SC2091,SC2092,SC2088,SC2087,SC2076,SC2072,SC2071,SC2223,SC2221,SC2222,SC2217,SC2207,SC2206,SC2205,SC2190,SC2188,SC2187,SC2185,SC2179,SC2178,SC2174,SC2168,SC2167,SC2163,SC2161,SC2160,SC2153,SC2150,SC2148,SC2147,SC2146,SC2142,SC2139,SC2126,SC2123,SC2120,SC2119,SC2117,SC2114,SC1117,SC2164,SC1083,SC2004,SC2125,SC2128,SC2011,SC1008,SC1019,SC2093,SC1132,SC1129,SC2236,SC2237,SC2231,SC2230,SC2229,SC2106,SC2102,SC2243,SC2244,SC2245,SC2247,SC2248,SC2249,SC2250,SC2251,SC2252,SC2181
|
||||
+1414
-125
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,373 @@
|
||||
##
|
||||
# THIS IS AN UNMAINTAINED COPY OF THE ORIGINAL FILE DISTRIBUTED WITH ZLIB 1.2.11
|
||||
##
|
||||
|
||||
|
||||
|
||||
|
||||
Frequently Asked Questions about zlib
|
||||
|
||||
|
||||
If your question is not there, please check the zlib home page
|
||||
https://zlib.net/ which may have more recent information.
|
||||
The latest zlib FAQ is at https://zlib.net/zlib_faq.html
|
||||
|
||||
|
||||
1. Is zlib Y2K-compliant?
|
||||
|
||||
Yes. zlib doesn't handle dates.
|
||||
|
||||
2. Where can I get a Windows DLL version?
|
||||
|
||||
The zlib sources can be compiled without change to produce a DLL. See the
|
||||
file win32/DLL_FAQ.txt in the zlib distribution.
|
||||
|
||||
3. Where can I get a Visual Basic interface to zlib?
|
||||
|
||||
See
|
||||
* https://marknelson.us/1997/01/01/zlib-engine/
|
||||
* win32/DLL_FAQ.txt in the zlib distribution
|
||||
|
||||
4. compress() returns Z_BUF_ERROR.
|
||||
|
||||
Make sure that before the call of compress(), the length of the compressed
|
||||
buffer is equal to the available size of the compressed buffer and not
|
||||
zero. For Visual Basic, check that this parameter is passed by reference
|
||||
("as any"), not by value ("as long").
|
||||
|
||||
5. deflate() or inflate() returns Z_BUF_ERROR.
|
||||
|
||||
Before making the call, make sure that avail_in and avail_out are not zero.
|
||||
When setting the parameter flush equal to Z_FINISH, also make sure that
|
||||
avail_out is big enough to allow processing all pending input. Note that a
|
||||
Z_BUF_ERROR is not fatal--another call to deflate() or inflate() can be
|
||||
made with more input or output space. A Z_BUF_ERROR may in fact be
|
||||
unavoidable depending on how the functions are used, since it is not
|
||||
possible to tell whether or not there is more output pending when
|
||||
strm.avail_out returns with zero. See https://zlib.net/zlib_how.html for a
|
||||
heavily annotated example.
|
||||
|
||||
6. Where's the zlib documentation (man pages, etc.)?
|
||||
|
||||
It's in zlib.h . Examples of zlib usage are in the files test/example.c
|
||||
and test/minigzip.c, with more in examples/ .
|
||||
|
||||
7. Why don't you use GNU autoconf or libtool or ...?
|
||||
|
||||
Because we would like to keep zlib as a very small and simple package.
|
||||
zlib is rather portable and doesn't need much configuration.
|
||||
|
||||
8. I found a bug in zlib.
|
||||
|
||||
Most of the time, such problems are due to an incorrect usage of zlib.
|
||||
Please try to reproduce the problem with a small program and send the
|
||||
corresponding source to us at zlib@gzip.org . Do not send multi-megabyte
|
||||
data files without prior agreement.
|
||||
|
||||
9. Why do I get "undefined reference to gzputc"?
|
||||
|
||||
If "make test" produces something like
|
||||
|
||||
example.o(.text+0x154): undefined reference to `gzputc'
|
||||
|
||||
check that you don't have old files libz.* in /usr/lib, /usr/local/lib or
|
||||
/usr/X11R6/lib. Remove any old versions, then do "make install".
|
||||
|
||||
10. I need a Delphi interface to zlib.
|
||||
|
||||
See the contrib/delphi directory in the zlib distribution.
|
||||
|
||||
11. Can zlib handle .zip archives?
|
||||
|
||||
Not by itself, no. See the directory contrib/minizip in the zlib
|
||||
distribution.
|
||||
|
||||
12. Can zlib handle .Z files?
|
||||
|
||||
No, sorry. You have to spawn an uncompress or gunzip subprocess, or adapt
|
||||
the code of uncompress on your own.
|
||||
|
||||
13. How can I make a Unix shared library?
|
||||
|
||||
By default a shared (and a static) library is built for Unix. So:
|
||||
|
||||
make distclean
|
||||
./configure
|
||||
make
|
||||
|
||||
14. How do I install a shared zlib library on Unix?
|
||||
|
||||
After the above, then:
|
||||
|
||||
make install
|
||||
|
||||
However, many flavors of Unix come with a shared zlib already installed.
|
||||
Before going to the trouble of compiling a shared version of zlib and
|
||||
trying to install it, you may want to check if it's already there! If you
|
||||
can #include <zlib.h>, it's there. The -lz option will probably link to
|
||||
it. You can check the version at the top of zlib.h or with the
|
||||
ZLIB_VERSION symbol defined in zlib.h .
|
||||
|
||||
15. I have a question about OttoPDF.
|
||||
|
||||
We are not the authors of OttoPDF. The real author is on the OttoPDF web
|
||||
site: Joel Hainley, jhainley@myndkryme.com.
|
||||
|
||||
16. Can zlib decode Flate data in an Adobe PDF file?
|
||||
|
||||
Yes. See https://www.pdflib.com/ . To modify PDF forms, see
|
||||
https://sourceforge.net/projects/acroformtool/ .
|
||||
|
||||
17. Why am I getting this "register_frame_info not found" error on Solaris?
|
||||
|
||||
After installing zlib 1.1.4 on Solaris 2.6, running applications using zlib
|
||||
generates an error such as:
|
||||
|
||||
ld.so.1: rpm: fatal: relocation error: file /usr/local/lib/libz.so:
|
||||
symbol __register_frame_info: referenced symbol not found
|
||||
|
||||
The symbol __register_frame_info is not part of zlib, it is generated by
|
||||
the C compiler (cc or gcc). You must recompile applications using zlib
|
||||
which have this problem. This problem is specific to Solaris. See
|
||||
http://www.sunfreeware.com/ for Solaris versions of zlib and applications
|
||||
using zlib.
|
||||
|
||||
18. Why does gzip give an error on a file I make with compress/deflate?
|
||||
|
||||
The compress and deflate functions produce data in the zlib format, which
|
||||
is different and incompatible with the gzip format. The gz* functions in
|
||||
zlib on the other hand use the gzip format. Both the zlib and gzip formats
|
||||
use the same compressed data format internally, but have different headers
|
||||
and trailers around the compressed data.
|
||||
|
||||
19. Ok, so why are there two different formats?
|
||||
|
||||
The gzip format was designed to retain the directory information about a
|
||||
single file, such as the name and last modification date. The zlib format
|
||||
on the other hand was designed for in-memory and communication channel
|
||||
applications, and has a much more compact header and trailer and uses a
|
||||
faster integrity check than gzip.
|
||||
|
||||
20. Well that's nice, but how do I make a gzip file in memory?
|
||||
|
||||
You can request that deflate write the gzip format instead of the zlib
|
||||
format using deflateInit2(). You can also request that inflate decode the
|
||||
gzip format using inflateInit2(). Read zlib.h for more details.
|
||||
|
||||
21. Is zlib thread-safe?
|
||||
|
||||
Yes. However any library routines that zlib uses and any application-
|
||||
provided memory allocation routines must also be thread-safe. zlib's gz*
|
||||
functions use stdio library routines, and most of zlib's functions use the
|
||||
library memory allocation routines by default. zlib's *Init* functions
|
||||
allow for the application to provide custom memory allocation routines.
|
||||
|
||||
Of course, you should only operate on any given zlib or gzip stream from a
|
||||
single thread at a time.
|
||||
|
||||
22. Can I use zlib in my commercial application?
|
||||
|
||||
Yes. Please read the license in zlib.h.
|
||||
|
||||
23. Is zlib under the GNU license?
|
||||
|
||||
No. Please read the license in zlib.h.
|
||||
|
||||
24. The license says that altered source versions must be "plainly marked". So
|
||||
what exactly do I need to do to meet that requirement?
|
||||
|
||||
You need to change the ZLIB_VERSION and ZLIB_VERNUM #defines in zlib.h. In
|
||||
particular, the final version number needs to be changed to "f", and an
|
||||
identification string should be appended to ZLIB_VERSION. Version numbers
|
||||
x.x.x.f are reserved for modifications to zlib by others than the zlib
|
||||
maintainers. For example, if the version of the base zlib you are altering
|
||||
is "1.2.3.4", then in zlib.h you should change ZLIB_VERNUM to 0x123f, and
|
||||
ZLIB_VERSION to something like "1.2.3.f-zachary-mods-v3". You can also
|
||||
update the version strings in deflate.c and inftrees.c.
|
||||
|
||||
For altered source distributions, you should also note the origin and
|
||||
nature of the changes in zlib.h, as well as in ChangeLog and README, along
|
||||
with the dates of the alterations. The origin should include at least your
|
||||
name (or your company's name), and an email address to contact for help or
|
||||
issues with the library.
|
||||
|
||||
Note that distributing a compiled zlib library along with zlib.h and
|
||||
zconf.h is also a source distribution, and so you should change
|
||||
ZLIB_VERSION and ZLIB_VERNUM and note the origin and nature of the changes
|
||||
in zlib.h as you would for a full source distribution.
|
||||
|
||||
25. Will zlib work on a big-endian or little-endian architecture, and can I
|
||||
exchange compressed data between them?
|
||||
|
||||
Yes and yes.
|
||||
|
||||
26. Will zlib work on a 64-bit machine?
|
||||
|
||||
Yes. It has been tested on 64-bit machines, and has no dependence on any
|
||||
data types being limited to 32-bits in length. If you have any
|
||||
difficulties, please provide a complete problem report to zlib@gzip.org
|
||||
|
||||
27. Will zlib decompress data from the PKWare Data Compression Library?
|
||||
|
||||
No. The PKWare DCL uses a completely different compressed data format than
|
||||
does PKZIP and zlib. However, you can look in zlib's contrib/blast
|
||||
directory for a possible solution to your problem.
|
||||
|
||||
28. Can I access data randomly in a compressed stream?
|
||||
|
||||
No, not without some preparation. If when compressing you periodically use
|
||||
Z_FULL_FLUSH, carefully write all the pending data at those points, and
|
||||
keep an index of those locations, then you can start decompression at those
|
||||
points. You have to be careful to not use Z_FULL_FLUSH too often, since it
|
||||
can significantly degrade compression. Alternatively, you can scan a
|
||||
deflate stream once to generate an index, and then use that index for
|
||||
random access. See examples/zran.c .
|
||||
|
||||
29. Does zlib work on MVS, OS/390, CICS, etc.?
|
||||
|
||||
It has in the past, but we have not heard of any recent evidence. There
|
||||
were working ports of zlib 1.1.4 to MVS, but those links no longer work.
|
||||
If you know of recent, successful applications of zlib on these operating
|
||||
systems, please let us know. Thanks.
|
||||
|
||||
30. Is there some simpler, easier to read version of inflate I can look at to
|
||||
understand the deflate format?
|
||||
|
||||
First off, you should read RFC 1951. Second, yes. Look in zlib's
|
||||
contrib/puff directory.
|
||||
|
||||
31. Does zlib infringe on any patents?
|
||||
|
||||
As far as we know, no. In fact, that was originally the whole point behind
|
||||
zlib. Look here for some more information:
|
||||
|
||||
https://www.gzip.org/#faq11
|
||||
|
||||
32. Can zlib work with greater than 4 GB of data?
|
||||
|
||||
Yes. inflate() and deflate() will process any amount of data correctly.
|
||||
Each call of inflate() or deflate() is limited to input and output chunks
|
||||
of the maximum value that can be stored in the compiler's "unsigned int"
|
||||
type, but there is no limit to the number of chunks. Note however that the
|
||||
strm.total_in and strm_total_out counters may be limited to 4 GB. These
|
||||
counters are provided as a convenience and are not used internally by
|
||||
inflate() or deflate(). The application can easily set up its own counters
|
||||
updated after each call of inflate() or deflate() to count beyond 4 GB.
|
||||
compress() and uncompress() may be limited to 4 GB, since they operate in a
|
||||
single call. gzseek() and gztell() may be limited to 4 GB depending on how
|
||||
zlib is compiled. See the zlibCompileFlags() function in zlib.h.
|
||||
|
||||
The word "may" appears several times above since there is a 4 GB limit only
|
||||
if the compiler's "long" type is 32 bits. If the compiler's "long" type is
|
||||
64 bits, then the limit is 16 exabytes.
|
||||
|
||||
33. Does zlib have any security vulnerabilities?
|
||||
|
||||
The only one that we are aware of is potentially in gzprintf(). If zlib is
|
||||
compiled to use sprintf() or vsprintf(), then there is no protection
|
||||
against a buffer overflow of an 8K string space (or other value as set by
|
||||
gzbuffer()), other than the caller of gzprintf() assuring that the output
|
||||
will not exceed 8K. On the other hand, if zlib is compiled to use
|
||||
snprintf() or vsnprintf(), which should normally be the case, then there is
|
||||
no vulnerability. The ./configure script will display warnings if an
|
||||
insecure variation of sprintf() will be used by gzprintf(). Also the
|
||||
zlibCompileFlags() function will return information on what variant of
|
||||
sprintf() is used by gzprintf().
|
||||
|
||||
If you don't have snprintf() or vsnprintf() and would like one, you can
|
||||
find a portable implementation here:
|
||||
|
||||
https://www.ijs.si/software/snprintf/
|
||||
|
||||
Note that you should be using the most recent version of zlib. Versions
|
||||
1.1.3 and before were subject to a double-free vulnerability, and versions
|
||||
1.2.1 and 1.2.2 were subject to an access exception when decompressing
|
||||
invalid compressed data.
|
||||
|
||||
34. Is there a Java version of zlib?
|
||||
|
||||
Probably what you want is to use zlib in Java. zlib is already included
|
||||
as part of the Java SDK in the java.util.zip package. If you really want
|
||||
a version of zlib written in the Java language, look on the zlib home
|
||||
page for links: https://zlib.net/ .
|
||||
|
||||
35. I get this or that compiler or source-code scanner warning when I crank it
|
||||
up to maximally-pedantic. Can't you guys write proper code?
|
||||
|
||||
Many years ago, we gave up attempting to avoid warnings on every compiler
|
||||
in the universe. It just got to be a waste of time, and some compilers
|
||||
were downright silly as well as contradicted each other. So now, we simply
|
||||
make sure that the code always works.
|
||||
|
||||
36. Valgrind (or some similar memory access checker) says that deflate is
|
||||
performing a conditional jump that depends on an uninitialized value.
|
||||
Isn't that a bug?
|
||||
|
||||
No. That is intentional for performance reasons, and the output of deflate
|
||||
is not affected. This only started showing up recently since zlib 1.2.x
|
||||
uses malloc() by default for allocations, whereas earlier versions used
|
||||
calloc(), which zeros out the allocated memory. Even though the code was
|
||||
correct, versions 1.2.4 and later was changed to not stimulate these
|
||||
checkers.
|
||||
|
||||
37. Will zlib read the (insert any ancient or arcane format here) compressed
|
||||
data format?
|
||||
|
||||
Probably not. Look in the comp.compression FAQ for pointers to various
|
||||
formats and associated software.
|
||||
|
||||
38. How can I encrypt/decrypt zip files with zlib?
|
||||
|
||||
zlib doesn't support encryption. The original PKZIP encryption is very
|
||||
weak and can be broken with freely available programs. To get strong
|
||||
encryption, use GnuPG, https://www.gnupg.org/ , which already includes zlib
|
||||
compression. For PKZIP compatible "encryption", look at
|
||||
http://infozip.sourceforge.net/
|
||||
|
||||
39. What's the difference between the "gzip" and "deflate" HTTP 1.1 encodings?
|
||||
|
||||
"gzip" is the gzip format, and "deflate" is the zlib format. They should
|
||||
probably have called the second one "zlib" instead to avoid confusion with
|
||||
the raw deflate compressed data format. While the HTTP 1.1 RFC 2616
|
||||
correctly points to the zlib specification in RFC 1950 for the "deflate"
|
||||
transfer encoding, there have been reports of servers and browsers that
|
||||
incorrectly produce or expect raw deflate data per the deflate
|
||||
specification in RFC 1951, most notably Microsoft. So even though the
|
||||
"deflate" transfer encoding using the zlib format would be the more
|
||||
efficient approach (and in fact exactly what the zlib format was designed
|
||||
for), using the "gzip" transfer encoding is probably more reliable due to
|
||||
an unfortunate choice of name on the part of the HTTP 1.1 authors.
|
||||
|
||||
Bottom line: use the gzip format for HTTP 1.1 encoding.
|
||||
|
||||
40. Does zlib support the new "Deflate64" format introduced by PKWare?
|
||||
|
||||
No. PKWare has apparently decided to keep that format proprietary, since
|
||||
they have not documented it as they have previous compression formats. In
|
||||
any case, the compression improvements are so modest compared to other more
|
||||
modern approaches, that it's not worth the effort to implement.
|
||||
|
||||
41. I'm having a problem with the zip functions in zlib, can you help?
|
||||
|
||||
There are no zip functions in zlib. You are probably using minizip by
|
||||
Giles Vollant, which is found in the contrib directory of zlib. It is not
|
||||
part of zlib. In fact none of the stuff in contrib is part of zlib. The
|
||||
files in there are not supported by the zlib authors. You need to contact
|
||||
the authors of the respective contribution for help.
|
||||
|
||||
42. The match.asm code in contrib is under the GNU General Public License.
|
||||
Since it's part of zlib, doesn't that mean that all of zlib falls under the
|
||||
GNU GPL?
|
||||
|
||||
No. The files in contrib are not part of zlib. They were contributed by
|
||||
other authors and are provided as a convenience to the user within the zlib
|
||||
distribution. Each item in contrib has its own license.
|
||||
|
||||
43. Is zlib subject to export controls? What is its ECCN?
|
||||
|
||||
zlib is not subject to export controls, and so is classified as EAR99.
|
||||
|
||||
44. Can you please sign these lengthy legal documents and fax them back to us
|
||||
so that we can use your software in our product?
|
||||
|
||||
No. Go away. Shoo.
|
||||
@@ -0,0 +1,36 @@
|
||||
Contents
|
||||
--------
|
||||
|
||||
| Name | Description |
|
||||
|:-----------------|:---------------------------------------------------------------|
|
||||
| arch/ | Architecture-specific code |
|
||||
| doc/ | Documentation for formats and algorithms |
|
||||
| test/example.c | Zlib usages examples for build testing |
|
||||
| test/minigzip.c | Minimal gzip-like functionality for build testing |
|
||||
| test/infcover.c | Inflate code coverage for build testing |
|
||||
| win32/ | Shared library version resources for Windows |
|
||||
| CMakeLists.txt | Cmake build script |
|
||||
| configure | Bash configure/build script |
|
||||
| adler32.c | Compute the Adler-32 checksum of a data stream |
|
||||
| chunkset.* | Inline functions to copy small data chunks |
|
||||
| compress.c | Compress a memory buffer |
|
||||
| deflate.* | Compress data using the deflate algorithm |
|
||||
| deflate_fast.c | Compress data using the deflate algorithm with fast strategy |
|
||||
| deflate_medium.c | Compress data using the deflate algorithm with medium strategy |
|
||||
| deflate_slow.c | Compress data using the deflate algorithm with slow strategy |
|
||||
| functable.* | Struct containing function pointers to optimized functions |
|
||||
| gzguts.h | Internal definitions for gzip operations |
|
||||
| gzlib.c | Functions common to reading and writing gzip files |
|
||||
| gzread.c | Read gzip files |
|
||||
| gzwrite.c | Write gzip files |
|
||||
| infback.* | Inflate using a callback interface |
|
||||
| inflate.* | Decompress data |
|
||||
| inffast.* | Decompress data with speed optimizations |
|
||||
| inffixed_tbl.h | Table for decoding fixed codes |
|
||||
| inftrees.h | Generate Huffman trees for efficient decoding |
|
||||
| trees.* | Output deflated data using Huffman coding |
|
||||
| uncompr.c | Decompress a memory buffer |
|
||||
| zconf.h.cmakein | zconf.h template for cmake |
|
||||
| zendian.h | BYTE_ORDER for endian tests |
|
||||
| zlib.map | Linux symbol information |
|
||||
| zlib.pc.in | Pkg-config template |
|
||||
@@ -0,0 +1,19 @@
|
||||
(C) 1995-2024 Jean-loup Gailly and Mark Adler
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
@@ -0,0 +1,411 @@
|
||||
# Makefile for zlib
|
||||
# Copyright (C) 1995-2024 Jean-loup Gailly, Mark Adler
|
||||
# For conditions of distribution and use, see copyright notice in zlib.h
|
||||
|
||||
# To compile and test, type:
|
||||
# ./configure; make test
|
||||
# Normally configure builds both a static and a shared library.
|
||||
# If you want to build just a static library, use: ./configure --static
|
||||
|
||||
# To install /usr/local/lib/libz.* and /usr/local/include/zlib.h, type:
|
||||
# make install
|
||||
# To install in $HOME instead of /usr/local, use:
|
||||
# make install prefix=$HOME
|
||||
|
||||
CC=cc
|
||||
|
||||
CFLAGS=-O
|
||||
#CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7
|
||||
#CFLAGS=-g -DZLIB_DEBUG
|
||||
#CFLAGS=-O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \
|
||||
# -Wstrict-prototypes -Wmissing-prototypes
|
||||
|
||||
SFLAGS=-O
|
||||
LDFLAGS=-L.
|
||||
LIBNAME1=libz-ng
|
||||
LIBNAME2=zlib-ng
|
||||
SUFFIX=-ng
|
||||
TEST_LIBS=$(LIBNAME1).a
|
||||
LDSHARED=$(CC)
|
||||
LDSHAREDFLAGS=-shared
|
||||
LDVERSIONSCRIPT=
|
||||
|
||||
VER=2.2.4
|
||||
VER1=2
|
||||
|
||||
STATICLIB=$(LIBNAME1).a
|
||||
SHAREDLIB=$(LIBNAME1).so
|
||||
SHAREDLIBV=$(LIBNAME1).so.$(VER)
|
||||
SHAREDLIBM=$(LIBNAME1).so.$(VER1)
|
||||
IMPORTLIB=
|
||||
SHAREDTARGET=$(LIBNAME1).so.$(VER)
|
||||
PKGFILE=$(LIBNAME2).pc
|
||||
|
||||
LIBS=$(STATICLIB) $(SHAREDTARGET)
|
||||
|
||||
AR=ar
|
||||
ARFLAGS=rc
|
||||
DEFFILE=
|
||||
RC=
|
||||
RCFLAGS=
|
||||
RCOBJS=
|
||||
STRIP=
|
||||
RANLIB=ranlib
|
||||
LDCONFIG=ldconfig
|
||||
LDSHAREDLIBC=
|
||||
EXE=
|
||||
|
||||
SRCDIR=.
|
||||
INCLUDES=-I$(SRCDIR)
|
||||
|
||||
BUILDDIR=.
|
||||
|
||||
ARCHDIR=arch/generic
|
||||
ARCH_STATIC_OBJS=
|
||||
ARCH_SHARED_OBJS=
|
||||
|
||||
prefix = /usr/local
|
||||
exec_prefix = ${prefix}
|
||||
bindir = ${exec_prefix}/bin
|
||||
libdir = ${exec_prefix}/lib
|
||||
sharedlibdir = ${libdir}
|
||||
includedir = ${prefix}/include
|
||||
mandir = ${prefix}/share/man
|
||||
man3dir = ${mandir}/man3
|
||||
pkgconfigdir = ${libdir}/pkgconfig
|
||||
|
||||
OBJZ = \
|
||||
arch/generic/adler32_c.o \
|
||||
arch/generic/adler32_fold_c.o \
|
||||
arch/generic/chunkset_c.o \
|
||||
arch/generic/compare256_c.o \
|
||||
arch/generic/crc32_braid_c.o \
|
||||
arch/generic/crc32_c.o \
|
||||
arch/generic/crc32_fold_c.o \
|
||||
arch/generic/slide_hash_c.o \
|
||||
adler32.o \
|
||||
compress.o \
|
||||
crc32.o \
|
||||
crc32_braid_comb.o \
|
||||
deflate.o \
|
||||
deflate_fast.o \
|
||||
deflate_huff.o \
|
||||
deflate_medium.o \
|
||||
deflate_quick.o \
|
||||
deflate_rle.o \
|
||||
deflate_slow.o \
|
||||
deflate_stored.o \
|
||||
functable.o \
|
||||
infback.o \
|
||||
inflate.o \
|
||||
inftrees.o \
|
||||
insert_string.o \
|
||||
insert_string_roll.o \
|
||||
trees.o \
|
||||
uncompr.o \
|
||||
zutil.o \
|
||||
arch/generic/crc32_chorba_c.o \
|
||||
cpu_features.o \
|
||||
$(ARCH_STATIC_OBJS)
|
||||
|
||||
OBJG = \
|
||||
gzlib.o \
|
||||
gzread.o \
|
||||
gzwrite.o
|
||||
|
||||
TESTOBJG =
|
||||
OBJC = $(OBJZ) $(OBJG)
|
||||
|
||||
PIC_OBJZ = \
|
||||
arch/generic/adler32_c.lo \
|
||||
arch/generic/adler32_fold_c.lo \
|
||||
arch/generic/chunkset_c.lo \
|
||||
arch/generic/compare256_c.lo \
|
||||
arch/generic/crc32_braid_c.lo \
|
||||
arch/generic/crc32_c.lo \
|
||||
arch/generic/crc32_fold_c.lo \
|
||||
arch/generic/slide_hash_c.lo \
|
||||
adler32.lo \
|
||||
compress.lo \
|
||||
crc32.lo \
|
||||
crc32_braid_comb.lo \
|
||||
deflate.lo \
|
||||
deflate_fast.lo \
|
||||
deflate_huff.lo \
|
||||
deflate_medium.lo \
|
||||
deflate_quick.lo \
|
||||
deflate_rle.lo \
|
||||
deflate_slow.lo \
|
||||
deflate_stored.lo \
|
||||
functable.lo \
|
||||
infback.lo \
|
||||
inflate.lo \
|
||||
inftrees.lo \
|
||||
insert_string.lo \
|
||||
insert_string_roll.lo \
|
||||
trees.lo \
|
||||
uncompr.lo \
|
||||
zutil.lo \
|
||||
arch/generic/crc32_chorba_c.lo \
|
||||
cpu_features.lo \
|
||||
$(ARCH_SHARED_OBJS)
|
||||
|
||||
PIC_OBJG = \
|
||||
gzlib.lo \
|
||||
gzread.lo \
|
||||
gzwrite.lo
|
||||
|
||||
PIC_TESTOBJG =
|
||||
PIC_OBJC = $(PIC_OBJZ) $(PIC_OBJG)
|
||||
|
||||
OBJS = $(OBJC)
|
||||
|
||||
PIC_OBJS = $(PIC_OBJC)
|
||||
|
||||
all: static shared
|
||||
|
||||
static: example$(EXE) minigzip$(EXE) makefixed$(EXE) maketrees$(EXE) makecrct$(EXE)
|
||||
|
||||
shared: examplesh$(EXE) minigzipsh$(EXE)
|
||||
|
||||
check: test
|
||||
|
||||
.SECONDARY:
|
||||
|
||||
$(ARCHDIR)/%.o: $(SRCDIR)/$(ARCHDIR)/%.c
|
||||
$(MAKE) -C $(ARCHDIR) $(notdir $@)
|
||||
|
||||
$(ARCHDIR)/%.lo: $(SRCDIR)/$(ARCHDIR)/%.c
|
||||
$(MAKE) -C $(ARCHDIR) $(notdir $@)
|
||||
|
||||
arch/generic/%.o: $(SRCDIR)/arch/generic/%.c
|
||||
$(MAKE) -C arch/generic $(notdir $@)
|
||||
|
||||
arch/generic/%.lo: $(SRCDIR)/arch/generic/%.c
|
||||
$(MAKE) -C arch/generic $(notdir $@)
|
||||
|
||||
%.o: $(ARCHDIR)/%.o
|
||||
-cp $< $@
|
||||
|
||||
%.lo: $(ARCHDIR)/%.lo
|
||||
-cp $< $@
|
||||
|
||||
test: all
|
||||
$(MAKE) -C test
|
||||
|
||||
infcover.o: $(SRCDIR)/test/infcover.c zlib$(SUFFIX).h zconf$(SUFFIX).h zlib_name_mangling$(SUFFIX).h
|
||||
$(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $(SRCDIR)/test/infcover.c
|
||||
|
||||
infcover$(EXE): infcover.o $(STATICLIB)
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ infcover.o $(STATICLIB)
|
||||
ifneq ($(STRIP),)
|
||||
$(STRIP) $@
|
||||
endif
|
||||
|
||||
cover: infcover$(EXE)
|
||||
rm -f *.gcda
|
||||
./infcover
|
||||
gcov inf*.c
|
||||
|
||||
$(STATICLIB): $(OBJS)
|
||||
$(AR) $(ARFLAGS) $@ $(OBJS)
|
||||
-@ ($(RANLIB) $@ || true) >/dev/null 2>&1
|
||||
|
||||
example.o:
|
||||
$(CC) $(CFLAGS) -DWITH_GZFILEOP $(INCLUDES) -c -o $@ $(SRCDIR)/test/example.c
|
||||
|
||||
minigzip.o:
|
||||
$(CC) $(CFLAGS) -DWITH_GZFILEOP $(INCLUDES) -c -o $@ $(SRCDIR)/test/minigzip.c
|
||||
|
||||
makefixed.o:
|
||||
$(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $(SRCDIR)/tools/makefixed.c
|
||||
|
||||
maketrees.o:
|
||||
$(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $(SRCDIR)/tools/maketrees.c
|
||||
|
||||
makecrct.o:
|
||||
$(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $(SRCDIR)/tools/makecrct.c
|
||||
|
||||
zlibrc.o: $(SRCDIR)/win32/zlib$(SUFFIX)1.rc
|
||||
$(RC) $(RCFLAGS) -o $@ $(SRCDIR)/win32/zlib$(SUFFIX)1.rc
|
||||
|
||||
.SUFFIXES: .lo
|
||||
|
||||
%.o: $(SRCDIR)/%.c
|
||||
$(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $<
|
||||
|
||||
%.lo: $(SRCDIR)/%.c
|
||||
$(CC) $(SFLAGS) -DPIC $(INCLUDES) -c -o $@ $<
|
||||
|
||||
gzlib.o: $(SRCDIR)/gzlib.c
|
||||
$(CC) $(CFLAGS) -DWITH_GZFILEOP $(INCLUDES) -c -o $@ $<
|
||||
|
||||
gzlib.lo: $(SRCDIR)/gzlib.c
|
||||
$(CC) $(SFLAGS) -DPIC -DWITH_GZFILEOP $(INCLUDES) -c -o $@ $<
|
||||
|
||||
gzread.o: gzread.c
|
||||
$(CC) $(CFLAGS) -DWITH_GZFILEOP $(INCLUDES) -c -o $@ $<
|
||||
|
||||
gzread.lo: gzread.c
|
||||
$(CC) $(SFLAGS) -DPIC -DWITH_GZFILEOP $(INCLUDES) -c -o $@ $<
|
||||
|
||||
gzwrite.o: $(SRCDIR)/gzwrite.c
|
||||
$(CC) $(CFLAGS) -DWITH_GZFILEOP $(INCLUDES) -c -o $@ $<
|
||||
|
||||
gzwrite.lo: $(SRCDIR)/gzwrite.c
|
||||
$(CC) $(SFLAGS) -DPIC -DWITH_GZFILEOP $(INCLUDES) -c -o $@ $<
|
||||
|
||||
$(SHAREDTARGET): $(PIC_OBJS) $(DEFFILE) $(RCOBJS)
|
||||
ifneq ($(SHAREDTARGET),)
|
||||
$(LDSHARED) $(CFLAGS) $(LDSHAREDFLAGS) $(LDVERSIONSCRIPT) $(LDFLAGS) -o $@ $(DEFFILE) $(PIC_OBJS) $(RCOBJS) $(LDSHAREDLIBC)
|
||||
ifneq ($(STRIP),)
|
||||
$(STRIP) $@
|
||||
endif
|
||||
ifneq ($(SHAREDLIB),$(SHAREDTARGET))
|
||||
rm -f $(SHAREDLIB) $(SHAREDLIBM)
|
||||
ln -s $@ $(SHAREDLIB)
|
||||
ln -s $@ $(SHAREDLIBM)
|
||||
endif
|
||||
endif
|
||||
|
||||
example$(EXE): example.o $(TESTOBJG) $(STATICLIB)
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ example.o $(TESTOBJG) $(TEST_LIBS) $(LDSHAREDLIBC)
|
||||
ifneq ($(STRIP),)
|
||||
$(STRIP) $@
|
||||
endif
|
||||
|
||||
minigzip$(EXE): minigzip.o $(TESTOBJG) $(STATICLIB)
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ minigzip.o $(TESTOBJG) $(TEST_LIBS) $(LDSHAREDLIBC)
|
||||
ifneq ($(STRIP),)
|
||||
$(STRIP) $@
|
||||
endif
|
||||
|
||||
minigzipsh$(EXE): minigzip.o $(PIC_TESTOBJG) $(SHAREDTARGET)
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ minigzip.o $(PIC_TESTOBJG) $(SHAREDLIB) $(LDSHAREDLIBC)
|
||||
ifneq ($(STRIP),)
|
||||
$(STRIP) $@
|
||||
endif
|
||||
|
||||
|
||||
examplesh$(EXE): example.o $(PIC_TESTOBJG) $(SHAREDTARGET)
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ example.o $(PIC_TESTOBJG) $(SHAREDLIB) $(LDSHAREDLIBC)
|
||||
ifneq ($(STRIP),)
|
||||
$(STRIP) $@
|
||||
endif
|
||||
|
||||
makefixed$(EXE): makefixed.o $(STATICLIB)
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ makefixed.o $(TEST_LIBS) $(LDSHAREDLIBC)
|
||||
ifneq ($(STRIP),)
|
||||
$(STRIP) $@
|
||||
endif
|
||||
|
||||
maketrees$(EXE): maketrees.o $(STATICLIB)
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ maketrees.o $(TEST_LIBS) $(LDSHAREDLIBC)
|
||||
ifneq ($(STRIP),)
|
||||
$(STRIP) $@
|
||||
endif
|
||||
|
||||
makecrct$(EXE): makecrct.o $(STATICLIB)
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ makecrct.o $(TEST_LIBS) $(LDSHAREDLIBC)
|
||||
ifneq ($(STRIP),)
|
||||
$(STRIP) $@
|
||||
endif
|
||||
|
||||
install-shared: $(SHAREDTARGET)
|
||||
ifneq ($(SHAREDTARGET),)
|
||||
-@if [ ! -d $(DESTDIR)$(sharedlibdir) ]; then mkdir -p $(DESTDIR)$(sharedlibdir); fi
|
||||
rm -f $(DESTDIR)$(sharedlibdir)/$(SHAREDTARGET)
|
||||
cp $(SHAREDTARGET) $(DESTDIR)$(sharedlibdir)
|
||||
chmod 755 $(DESTDIR)$(sharedlibdir)/$(SHAREDTARGET)
|
||||
ifneq ($(SHAREDLIB),$(SHAREDTARGET))
|
||||
rm -f $(DESTDIR)$(sharedlibdir)/$(SHAREDLIB) $(DESTDIR)$(sharedlibdir)/$(SHAREDLIBM)
|
||||
ln -s $(SHAREDLIBV) $(DESTDIR)$(sharedlibdir)/$(SHAREDLIB)
|
||||
ln -s $(SHAREDLIBV) $(DESTDIR)$(sharedlibdir)/$(SHAREDLIBM)
|
||||
($(LDCONFIG) || true) >/dev/null 2>&1
|
||||
# ldconfig is for Linux
|
||||
endif
|
||||
ifneq ($(IMPORTLIB),)
|
||||
cp $(IMPORTLIB) $(DESTDIR)$(sharedlibdir)
|
||||
chmod 644 $(DESTDIR)$(sharedlibdir)/$(IMPORTLIB)
|
||||
endif
|
||||
endif
|
||||
|
||||
install-static: $(STATICLIB)
|
||||
-@if [ ! -d $(DESTDIR)$(libdir) ]; then mkdir -p $(DESTDIR)$(libdir); fi
|
||||
rm -f $(DESTDIR)$(libdir)/$(STATICLIB)
|
||||
cp $(STATICLIB) $(DESTDIR)$(libdir)
|
||||
chmod 644 $(DESTDIR)$(libdir)/$(STATICLIB)
|
||||
-@($(RANLIB) $(DESTDIR)$(libdir)/$(STATICLIB) || true) >/dev/null 2>&1
|
||||
# The ranlib in install-static is needed on NeXTSTEP which checks file times
|
||||
|
||||
install-libs: install-shared install-static
|
||||
-@if [ ! -d $(DESTDIR)$(man3dir) ]; then mkdir -p $(DESTDIR)$(man3dir); fi
|
||||
-@if [ ! -d $(DESTDIR)$(pkgconfigdir) ]; then mkdir -p $(DESTDIR)$(pkgconfigdir); fi
|
||||
rm -f $(DESTDIR)$(pkgconfigdir)/$(PKGFILE)
|
||||
cp $(PKGFILE) $(DESTDIR)$(pkgconfigdir)
|
||||
chmod 644 $(DESTDIR)$(pkgconfigdir)/$(PKGFILE)
|
||||
|
||||
install: install-libs
|
||||
-@if [ ! -d $(DESTDIR)$(includedir) ]; then mkdir -p $(DESTDIR)$(includedir); fi
|
||||
rm -f $(DESTDIR)$(includedir)/zlib$(SUFFIX).h $(DESTDIR)$(includedir)/zconf$(SUFFIX).h $(DESTDIR)$(includedir)/zlib_name_mangling$(SUFFIX).h
|
||||
cp zlib$(SUFFIX).h $(DESTDIR)$(includedir)/zlib$(SUFFIX).h
|
||||
cp zconf$(SUFFIX).h $(DESTDIR)$(includedir)/zconf$(SUFFIX).h
|
||||
cp zlib_name_mangling$(SUFFIX).h $(DESTDIR)$(includedir)/zlib_name_mangling$(SUFFIX).h
|
||||
chmod 644 $(DESTDIR)$(includedir)/zlib$(SUFFIX).h $(DESTDIR)$(includedir)/zconf$(SUFFIX).h $(DESTDIR)$(includedir)/zlib_name_mangling$(SUFFIX).h
|
||||
|
||||
uninstall-static:
|
||||
cd $(DESTDIR)$(libdir) && rm -f $(STATICLIB)
|
||||
|
||||
uninstall-shared:
|
||||
ifneq ($(SHAREDLIB),)
|
||||
cd $(DESTDIR)$(sharedlibdir) && rm -f $(SHAREDLIBV) $(SHAREDLIB) $(SHAREDLIBM)
|
||||
endif
|
||||
ifneq ($(IMPORTLIB),)
|
||||
cd $(DESTDIR)$(sharedlibdir) && rm -f $(IMPORTLIB)
|
||||
endif
|
||||
|
||||
uninstall: uninstall-static uninstall-shared
|
||||
cd $(DESTDIR)$(includedir) && rm -f zlib$(SUFFIX).h zconf$(SUFFIX).h zlib_name_mangling$(SUFFIX).h
|
||||
cd $(DESTDIR)$(pkgconfigdir) && rm -f $(PKGFILE)
|
||||
|
||||
mostlyclean: clean
|
||||
clean:
|
||||
@if [ -f $(ARCHDIR)/Makefile ]; then $(MAKE) -C $(ARCHDIR) clean; fi
|
||||
@if [ -f arch/generic/Makefile ]; then $(MAKE) -C arch/generic clean; fi
|
||||
@if [ -f test/Makefile ]; then $(MAKE) -C test clean; fi
|
||||
rm -f *.o *.lo *~ \
|
||||
example$(EXE) minigzip$(EXE) minigzipsh$(EXE) \
|
||||
infcover makefixed$(EXE) maketrees$(EXE) makecrct$(EXE) \
|
||||
$(STATICLIB) $(IMPORTLIB) $(SHAREDLIB) $(SHAREDLIBV) $(SHAREDLIBM) \
|
||||
foo.gz so_locations \
|
||||
_match.s maketree
|
||||
rm -rf objs
|
||||
rm -f *.gcda *.gcno *.gcov
|
||||
rm -f a.out a.exe
|
||||
rm -f *._h
|
||||
rm -rf btmp1 btmp2 pkgtmp1 pkgtmp2
|
||||
|
||||
maintainer-clean: distclean
|
||||
distclean: clean
|
||||
@if [ -f $(ARCHDIR)/Makefile ]; then $(MAKE) -C $(ARCHDIR) distclean; fi
|
||||
@if [ -f test/Makefile ]; then $(MAKE) -C test distclean; fi
|
||||
rm -f $(PKGFILE) configure.log zconf.h zconf.h.cmakein zlib$(SUFFIX).h zlib_name_mangling$(SUFFIX).h *.pc gzread.c
|
||||
-@rm -f .DS_Store
|
||||
# Reset Makefile if building inside source tree
|
||||
@if [ -f Makefile.in ]; then \
|
||||
printf 'all:\n\t-@echo "Please use ./configure first. Thank you."\n' > Makefile ; \
|
||||
printf '\ndistclean:\n\t$(MAKE) -f Makefile.in distclean\n' >> Makefile ; \
|
||||
touch -r $(SRCDIR)/Makefile.in Makefile ; fi
|
||||
# Reset zconf.h and zconf.h.cmakein if building inside source tree
|
||||
@if [ -f zconf.h.in ]; then \
|
||||
cp -p $(SRCDIR)/zconf.h.in zconf.h ; \
|
||||
grep -v '^#cmakedefine' $(SRCDIR)/zconf.h.in > zconf.h.cmakein &&\
|
||||
touch -r $(SRCDIR)/zconf.h.in zconf.h.cmakein ; fi
|
||||
# Cleanup these files if building outside source tree
|
||||
@if [ ! -f README.md ]; then rm -f Makefile; fi
|
||||
# Remove arch and test directory if building outside source tree
|
||||
@if [ ! -f $(ARCHDIR)/Makefile.in ]; then rm -rf arch; fi
|
||||
@if [ ! -f test/Makefile.in ]; then rm -rf test; fi
|
||||
|
||||
tags:
|
||||
etags $(SRCDIR)/*.[ch]
|
||||
@@ -0,0 +1,111 @@
|
||||
Porting applications to use zlib-ng
|
||||
===================================
|
||||
|
||||
Zlib-ng can be used/compiled in two different modes, that require some
|
||||
consideration by the application developer.
|
||||
|
||||
Changes from zlib affecting native and compat modes
|
||||
---------------------------------------------------
|
||||
Zlib-ng is not as conservative with memory allocation as Zlib is.
|
||||
|
||||
Where Zlib's inflate will allocate a lower amount of memory depending on
|
||||
compression level and window size, zlib-ng will always allocate the maximum
|
||||
amount of memory and possibly leave parts of it unused.
|
||||
Zlib-ng's deflate will however allocate a lower amount of memory depending
|
||||
on compression level and window size.
|
||||
|
||||
Zlib-ng also allocates one "big" buffer instead of doing multiple smaller
|
||||
allocations. This is faster, can lead to better cache locality and reduces
|
||||
space lost to alignment padding.
|
||||
|
||||
At the time of writing, by default zlib-ng allocates the following amounts
|
||||
of memory on a 64-bit system (except on S390x that requires ~4KiB more):
|
||||
- Deflate: 350.272 Bytes
|
||||
- Inflate: 42.112 Bytes
|
||||
|
||||
**Advantages:**
|
||||
- All memory is allocated during DeflateInit or InflateInit functions,
|
||||
leaving the actual deflate/inflate functions free from allocations.
|
||||
- Zlib-ng can only fail from memory allocation errors during init.
|
||||
- Time spent doing memory allocation systemcalls is all done during init,
|
||||
allowing applications to do prepare this before doing latency-sensitive
|
||||
deflate/inflate later.
|
||||
- Can reduce wasted memory due to buffer alignment padding both by OS and zlib-ng.
|
||||
- Potentially improved memory locality.
|
||||
|
||||
**Disadvantages:**
|
||||
- Zlib-ng allocates a little more memory than zlib does.
|
||||
|
||||
zlib-compat mode
|
||||
----------------
|
||||
Zlib-ng can be compiled in zlib-compat mode, suitable for zlib-replacement
|
||||
in a single application or system-wide.
|
||||
|
||||
Please note that zlib-ng in zlib-compat mode tries to maintain both API and
|
||||
ABI compatibility with the original zlib. Any issues regarding compatibility
|
||||
can be reported as bugs.
|
||||
|
||||
In certain instances you may not be able to simply replace the zlib library/dll
|
||||
files and expect the application to work. The application may need to be
|
||||
recompiled against the zlib-ng headers and libs to ensure full compatibility.
|
||||
|
||||
It is also possible for the deflate output stream to differ from the original
|
||||
zlib due to algorithmic differences between the two libraries. Any tests or
|
||||
applications that depend on the exact length of the deflate stream being a
|
||||
certain value will need to be updated.
|
||||
|
||||
**Advantages:**
|
||||
- Easy to port to, since it only requires a recompile of the application and
|
||||
no changes to the application code.
|
||||
|
||||
**Disadvantages:**
|
||||
- Can conflict with a system-installed zlib, as that can often be linked in
|
||||
by another library you are linking into your application. This can cause
|
||||
crashes or incorrect output.
|
||||
- If your application is pre-allocating a memory buffer and you are providing
|
||||
deflate/inflate init with your own allocator that allocates from that buffer
|
||||
(looking at you nginx), you should be aware that zlib-ng needs to allocate
|
||||
more memory than stock zlib needs. The same problem exists with Intel’s and
|
||||
Cloudflare’s zlib forks. Doing this is not recommended since it makes it
|
||||
very hard to maintain compatibility over time.
|
||||
|
||||
**Build Considerations:**
|
||||
- Compile against the *zlib.h* provided by zlib-ng
|
||||
- Configuration header is named *zconf.h*
|
||||
- Static library is *libz.a* on Unix and macOS, or *zlib.lib* on Windows
|
||||
- Shared library is *libz.so* on Unix, *libz.dylib* on macOS, or *zlib1.dll*
|
||||
on Windows
|
||||
- Type `z_size_t` is *unsigned __int64* on 64-bit Windows, and *unsigned long* on 32-bit Windows, Unix and macOS
|
||||
- Type `z_uintmax_t` is *unsigned long* in zlib-compat mode, and *size_t* with zlib-ng API
|
||||
|
||||
zlib-ng native mode
|
||||
-------------------
|
||||
Zlib-ng in native mode is suitable for co-existing with the standard zlib
|
||||
library, allowing applications to implement support and testing separately.
|
||||
|
||||
The zlib-ng native has implemented some modernization and simplifications
|
||||
in its API, intended to make life easier for application developers.
|
||||
|
||||
**Advantages:**
|
||||
- Does not conflict with other zlib implementations, and can co-exist as a
|
||||
system library along with zlib.
|
||||
- In certain places zlib-ng native uses more appropriate data types, removing
|
||||
the need for some workarounds in the API compared to zlib.
|
||||
|
||||
**Disadvantages:**
|
||||
- Requires minor changes to applications to use the prefixed zlib-ng
|
||||
function calls and structs. Usually this means a small prefix `zng_` has to be added.
|
||||
|
||||
**Build Considerations:**
|
||||
- Compile against *zlib-ng.h*
|
||||
- Configuration header is named *zconf-ng.h*
|
||||
- Static library is *libz-ng.a* on Unix and macOS, or *zlib-ng.lib* on Windows
|
||||
- Shared library is *libz-ng.so* on Unix, *libz-ng.dylib* on macOS, or
|
||||
*zlib-ng2.dll* on Windows
|
||||
- Type `z_size_t` is *size_t*
|
||||
|
||||
zlib-ng compile-time detection
|
||||
------------------------------
|
||||
|
||||
To distinguish zlib-ng from other zlib implementations at compile-time check for the
|
||||
existence of `ZLIBNG_VERSION` defined in the zlib header.
|
||||
@@ -0,0 +1,228 @@
|
||||
| CI | Stable | Develop |
|
||||
|:---|:-------|:--------|
|
||||
| GitHub Actions | [](https://github.com/zlib-ng/zlib-ng/actions/workflows/cmake.yml?query=branch%3Astable) <br> [](https://github.com/zlib-ng/zlib-ng/actions/workflows/configure.yml?query=branch%3Astable) <br> [](https://github.com/zlib-ng/zlib-ng/actions/workflows/nmake.yml?query=branch%3Astable) | [](https://github.com/zlib-ng/zlib-ng/actions/workflows/cmake.yml?query=branch%3Adevelop) <br> [](https://github.com/zlib-ng/zlib-ng/actions/workflows/configure.yml?query=branch%3Adevelop) <br> [](https://github.com/zlib-ng/zlib-ng/actions/workflows/nmake.yml?query=branch%3Adevelop) |
|
||||
| CodeFactor | [](https://www.codefactor.io/repository/github/zlib-ng/zlib-ng/overview/stable) | [](https://www.codefactor.io/repository/github/zlib-ng/zlib-ng/overview/develop) |
|
||||
| OSS-Fuzz | [](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:zlib-ng) | [](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:zlib-ng) |
|
||||
| Codecov | [](https://codecov.io/github/zlib-ng/zlib-ng/tree/stable) | [](https://codecov.io/github/zlib-ng/zlib-ng/tree/develop) |
|
||||
|
||||
## zlib-ng
|
||||
*zlib data compression library for the next generation systems*
|
||||
|
||||
Maintained by Hans Kristian Rosbach
|
||||
aka Dead2 (zlib-ng àt circlestorm dót org)
|
||||
|
||||
Features
|
||||
--------
|
||||
|
||||
* Zlib compatible API with support for dual-linking
|
||||
* Modernized native API based on zlib API for ease of porting
|
||||
* Modern C11 syntax and a clean code layout
|
||||
* Deflate medium and quick algorithms based on Intel’s zlib fork
|
||||
* Support for CPU intrinsics when available
|
||||
* Adler32 implementation using SSSE3, AVX2, AVX512, AVX512-VNNI, Neon, VMX & VSX
|
||||
* CRC32-B implementation using PCLMULQDQ, VPCLMULQDQ, ARMv8, & IBM Z
|
||||
* Slide hash implementations using SSE2, AVX2, ARMv6, Neon, VMX & VSX
|
||||
* Compare256 implementations using SSE2, AVX2, Neon, POWER9 & RVV
|
||||
* Inflate chunk copying using SSE2, SSSE3, AVX, Neon & VSX
|
||||
* Support for hardware-accelerated deflate using IBM Z DFLTCC
|
||||
* Safe unaligned memory read/writes and large bit buffer improvements
|
||||
* Includes improvements from Cloudflare and Intel forks
|
||||
* Configure, CMake, and NMake build system support
|
||||
* Comprehensive set of CMake unit tests
|
||||
* Code sanitizers, fuzzing, and coverage
|
||||
* GitHub Actions continuous integration on Windows, macOS, and Linux
|
||||
* Emulated CI for ARM, AARCH64, PPC, PPC64, RISCV, SPARC64, S390x using qemu
|
||||
|
||||
|
||||
History
|
||||
-------
|
||||
|
||||
The motivation for this fork was seeing several 3rd party contributions with new optimizations not getting
|
||||
implemented into the official zlib repository.
|
||||
|
||||
Mark Adler has been maintaining zlib for a very long time, and he has done a great job and hopefully he will continue
|
||||
for a long time yet. The idea of zlib-ng is not to replace zlib, but to co-exist as a drop-in replacement with a
|
||||
lower threshold for code change.
|
||||
|
||||
zlib has a long history and is incredibly portable, even supporting many systems that predate the Internet.<br>
|
||||
That is great, but it can complicate further development and maintainability. The zlib code contains many workarounds
|
||||
for really old compilers or to accommodate systems with limitations such as operating in a 16-bit environment.
|
||||
|
||||
Many of these workarounds are only maintenance burdens, some of them are pretty huge code-wise. With many workarounds
|
||||
cluttered throughout the code, it makes it harder for new programmers with an idea/interest for zlib to contribute.
|
||||
|
||||
I decided to make a fork, merge all the Intel optimizations, some of the Cloudflare optimizations, plus a couple other
|
||||
smaller patches. Then started cleaning out workarounds, various dead code, all contrib and example code.<br>
|
||||
The result is a better performing and easier to maintain zlib-ng.
|
||||
|
||||
A lot of improvements have gone into zlib-ng since its start, and numerous people and companies have contributed both
|
||||
small and big improvements, or valuable testing.
|
||||
|
||||
|
||||
Build
|
||||
-----
|
||||
<sup>Please read LICENSE.md, it is very simple and very liberal.</sup>
|
||||
|
||||
There are two ways to build zlib-ng:
|
||||
|
||||
### Cmake
|
||||
|
||||
To build zlib-ng using the cross-platform makefile generator cmake.
|
||||
|
||||
```
|
||||
cmake .
|
||||
cmake --build . --config Release
|
||||
ctest --verbose -C Release
|
||||
```
|
||||
|
||||
Alternatively, you can use the cmake configuration GUI tool ccmake:
|
||||
|
||||
```
|
||||
ccmake .
|
||||
```
|
||||
|
||||
### Configure
|
||||
|
||||
To build zlib-ng using the bash configure script:
|
||||
|
||||
```
|
||||
./configure
|
||||
make
|
||||
make test
|
||||
```
|
||||
|
||||
Build Options
|
||||
-------------
|
||||
|
||||
| CMake | configure | Description | Default |
|
||||
|:---------------------------|:-------------------------|:------------------------------------------------------------------------------------|---------|
|
||||
| ZLIB_COMPAT | --zlib-compat | Compile with zlib compatible API | OFF |
|
||||
| ZLIB_ENABLE_TESTS | | Build test binaries | ON |
|
||||
| WITH_GZFILEOP | --without-gzfileops | Compile with support for gzFile related functions | ON |
|
||||
| WITH_OPTIM | --without-optimizations | Build with optimisations | ON |
|
||||
| WITH_NEW_STRATEGIES | --without-new-strategies | Use new strategies | ON |
|
||||
| WITH_NATIVE_INSTRUCTIONS | | Compiles with full instruction set supported on this host (gcc/clang -march=native) | OFF |
|
||||
| WITH_RUNTIME_CPU_DETECTION | | Compiles with runtime CPU detection | ON |
|
||||
| WITH_SANITIZER | | Build with sanitizer (memory, address, undefined) | OFF |
|
||||
| WITH_GTEST | | Build gtest_zlib | ON |
|
||||
| WITH_FUZZERS | | Build test/fuzz | OFF |
|
||||
| WITH_BENCHMARKS | | Build test/benchmarks | OFF |
|
||||
| WITH_MAINTAINER_WARNINGS | | Build with project maintainer warnings | OFF |
|
||||
| WITH_CODE_COVERAGE | | Enable code coverage reporting | OFF |
|
||||
|
||||
|
||||
Install
|
||||
-------
|
||||
|
||||
WARNING: We do not recommend manually installing unless you really know what you are doing, because this can
|
||||
potentially override the system default zlib library, and any incompatibility or wrong configuration of zlib-ng
|
||||
can make the whole system unusable, requiring recovery or reinstall.
|
||||
If you still want a manual install, we recommend using the /opt/ path prefix.
|
||||
|
||||
For Linux distros, an alternative way to use zlib-ng (if compiled in zlib-compat mode) instead of zlib, is through
|
||||
the use of the _LD_PRELOAD_ environment variable. If the program is dynamically linked with zlib, then the program
|
||||
will temporarily attempt to use zlib-ng instead, without risking system-wide instability.
|
||||
|
||||
```
|
||||
LD_PRELOAD=/opt/zlib-ng/libz.so.1.2.13.zlib-ng /usr/bin/program
|
||||
```
|
||||
|
||||
### Cmake
|
||||
|
||||
To install zlib-ng system-wide using cmake:
|
||||
|
||||
```sh or powershell
|
||||
cmake --build . --target install
|
||||
```
|
||||
|
||||
### Configure
|
||||
|
||||
To install zlib-ng system-wide using the configure script:
|
||||
|
||||
```sh
|
||||
make install
|
||||
```
|
||||
|
||||
### CPack
|
||||
|
||||
After building with cmake, an installation package can be created using cpack. By default a tgz package is created,
|
||||
but you can append `-G <format>` to each command to generate alternative packages types (TGZ, ZIP, RPM, DEB). To easily
|
||||
create a rpm or deb package, you would use `-G RPM` or `-G DEB` respectively.
|
||||
|
||||
```sh or powershell
|
||||
cd build
|
||||
cpack --config CPackConfig.cmake
|
||||
cpack --config CPackSourceConfig.cmake
|
||||
```
|
||||
|
||||
### Vcpkg
|
||||
|
||||
Alternatively, you can build and install zlib-ng using the [vcpkg](https://github.com/Microsoft/vcpkg/) dependency manager:
|
||||
|
||||
```sh or powershell
|
||||
git clone https://github.com/Microsoft/vcpkg.git
|
||||
cd vcpkg
|
||||
./bootstrap-vcpkg.sh # "./bootstrap-vcpkg.bat" for powershell
|
||||
./vcpkg integrate install
|
||||
./vcpkg install zlib-ng
|
||||
```
|
||||
|
||||
The zlib-ng port in vcpkg is kept up to date by Microsoft team members and community contributors.
|
||||
If the version is out of date, please [create an issue or pull request](https://github.com/Microsoft/vcpkg) on the vcpkg repository.
|
||||
|
||||
Contributing
|
||||
------------
|
||||
|
||||
Zlib-ng is aiming to be open to contributions, and we would be delighted to receive pull requests on github.
|
||||
Help with testing and reviewing pull requests etc is also very much appreciated.
|
||||
|
||||
Please check the Wiki for more info: [Contributing](https://github.com/zlib-ng/zlib-ng/wiki/Contributing)
|
||||
|
||||
Acknowledgments
|
||||
----------------
|
||||
|
||||
Thanks go out to all the people and companies who have taken the time to contribute
|
||||
code reviews, testing and/or patches. Zlib-ng would not have been nearly as good without you.
|
||||
|
||||
The deflate format used by zlib was defined by Phil Katz.<br>
|
||||
The deflate and zlib specifications were written by L. Peter Deutsch.
|
||||
|
||||
zlib was originally created by Jean-loup Gailly (compression) and Mark Adler (decompression).
|
||||
|
||||
|
||||
Advanced Build Options
|
||||
----------------------
|
||||
|
||||
| CMake | configure | Description | Default |
|
||||
|:--------------------------------|:----------------------|:--------------------------------------------------------------------|------------------------|
|
||||
| FORCE_SSE2 | --force-sse2 | Skip runtime check for SSE2 instructions (Always on for x86_64) | OFF (x86) |
|
||||
| WITH_AVX2 | | Build with AVX2 intrinsics | ON |
|
||||
| WITH_AVX512 | | Build with AVX512 intrinsics | ON |
|
||||
| WITH_AVX512VNNI | | Build with AVX512VNNI intrinsics | ON |
|
||||
| WITH_SSE2 | | Build with SSE2 intrinsics | ON |
|
||||
| WITH_SSSE3 | | Build with SSSE3 intrinsics | ON |
|
||||
| WITH_SSE42 | | Build with SSE42 intrinsics | ON |
|
||||
| WITH_PCLMULQDQ | | Build with PCLMULQDQ intrinsics | ON |
|
||||
| WITH_VPCLMULQDQ | --without-vpclmulqdq | Build with VPCLMULQDQ intrinsics | ON |
|
||||
| WITH_ARMV8 | --without-armv8 | Build with ARMv8 intrinsics | ON |
|
||||
| WITH_NEON | --without-neon | Build with NEON intrinsics | ON |
|
||||
| WITH_ARMV6 | --without-armv6 | Build with ARMv6 intrinsics | ON |
|
||||
| WITH_ALTIVEC | --without-altivec | Build with AltiVec (VMX) intrinsics | ON |
|
||||
| WITH_POWER8 | --without-power8 | Build with POWER8 optimisations | ON |
|
||||
| WITH_RVV | | Build with RVV intrinsics | ON |
|
||||
| WITH_CRC32_VX | --without-crc32-vx | Build with vectorized CRC32 on IBM Z | ON |
|
||||
| WITH_DFLTCC_DEFLATE | --with-dfltcc-deflate | Build with DFLTCC intrinsics for compression on IBM Z | OFF |
|
||||
| WITH_DFLTCC_INFLATE | --with-dfltcc-inflate | Build with DFLTCC intrinsics for decompression on IBM Z | OFF |
|
||||
| WITH_INFLATE_STRICT | | Build with strict inflate distance checking | OFF |
|
||||
| WITH_INFLATE_ALLOW_INVALID_DIST | | Build with zero fill for inflate invalid distances | OFF |
|
||||
| INSTALL_UTILS | | Copy minigzip and minideflate during install | OFF |
|
||||
| ZLIBNG_ENABLE_TESTS | | Test zlib-ng specific API | ON |
|
||||
|
||||
|
||||
Related Projects
|
||||
----------------
|
||||
|
||||
* Fork of the popular minizip https://github.com/zlib-ng/minizip-ng
|
||||
* Python tool to benchmark minigzip/minideflate https://github.com/zlib-ng/deflatebench
|
||||
* Python tool to benchmark pigz https://github.com/zlib-ng/pigzbench
|
||||
* 3rd party patches for zlib-ng compatibility https://github.com/zlib-ng/patches
|
||||
+33
-128
@@ -3,148 +3,47 @@
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
||||
/* @(#) $Id$ */
|
||||
#include "zbuild.h"
|
||||
#include "functable.h"
|
||||
#include "adler32_p.h"
|
||||
|
||||
#include "zutil.h"
|
||||
|
||||
#define BASE 65521U /* largest prime smaller than 65536 */
|
||||
#define NMAX 5552
|
||||
/* NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1 */
|
||||
|
||||
#define DO1(buf,i) {adler += (buf)[i]; sum2 += adler;}
|
||||
#define DO2(buf,i) DO1(buf,i); DO1(buf,i+1);
|
||||
#define DO4(buf,i) DO2(buf,i); DO2(buf,i+2);
|
||||
#define DO8(buf,i) DO4(buf,i); DO4(buf,i+4);
|
||||
#define DO16(buf) DO8(buf,0); DO8(buf,8);
|
||||
|
||||
/* use NO_DIVIDE if your processor does not do division in hardware --
|
||||
try it both ways to see which is faster */
|
||||
#ifdef NO_DIVIDE
|
||||
/* note that this assumes BASE is 65521, where 65536 % 65521 == 15
|
||||
(thank you to John Reiser for pointing this out) */
|
||||
# define CHOP(a) \
|
||||
do { \
|
||||
unsigned long tmp = a >> 16; \
|
||||
a &= 0xffffUL; \
|
||||
a += (tmp << 4) - tmp; \
|
||||
} while (0)
|
||||
# define MOD28(a) \
|
||||
do { \
|
||||
CHOP(a); \
|
||||
if (a >= BASE) a -= BASE; \
|
||||
} while (0)
|
||||
# define MOD(a) \
|
||||
do { \
|
||||
CHOP(a); \
|
||||
MOD28(a); \
|
||||
} while (0)
|
||||
# define MOD63(a) \
|
||||
do { /* this assumes a is not negative */ \
|
||||
z_off64_t tmp = a >> 32; \
|
||||
a &= 0xffffffffL; \
|
||||
a += (tmp << 8) - (tmp << 5) + tmp; \
|
||||
tmp = a >> 16; \
|
||||
a &= 0xffffL; \
|
||||
a += (tmp << 4) - tmp; \
|
||||
tmp = a >> 16; \
|
||||
a &= 0xffffL; \
|
||||
a += (tmp << 4) - tmp; \
|
||||
if (a >= BASE) a -= BASE; \
|
||||
} while (0)
|
||||
#ifdef ZLIB_COMPAT
|
||||
unsigned long Z_EXPORT PREFIX(adler32_z)(unsigned long adler, const unsigned char *buf, size_t len) {
|
||||
return (unsigned long)FUNCTABLE_CALL(adler32)((uint32_t)adler, buf, len);
|
||||
}
|
||||
#else
|
||||
# define MOD(a) a %= BASE
|
||||
# define MOD28(a) a %= BASE
|
||||
# define MOD63(a) a %= BASE
|
||||
uint32_t Z_EXPORT PREFIX(adler32_z)(uint32_t adler, const unsigned char *buf, size_t len) {
|
||||
return FUNCTABLE_CALL(adler32)(adler, buf, len);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* ========================================================================= */
|
||||
uLong ZEXPORT adler32_z(uLong adler, const Bytef *buf, z_size_t len) {
|
||||
unsigned long sum2;
|
||||
unsigned n;
|
||||
|
||||
/* split Adler-32 into component sums */
|
||||
sum2 = (adler >> 16) & 0xffff;
|
||||
adler &= 0xffff;
|
||||
|
||||
/* in case user likes doing a byte at a time, keep it fast */
|
||||
if (len == 1) {
|
||||
adler += buf[0];
|
||||
if (adler >= BASE)
|
||||
adler -= BASE;
|
||||
sum2 += adler;
|
||||
if (sum2 >= BASE)
|
||||
sum2 -= BASE;
|
||||
return adler | (sum2 << 16);
|
||||
}
|
||||
|
||||
/* initial Adler-32 value (deferred check for len == 1 speed) */
|
||||
if (buf == Z_NULL)
|
||||
return 1L;
|
||||
|
||||
/* in case short lengths are provided, keep it somewhat fast */
|
||||
if (len < 16) {
|
||||
while (len--) {
|
||||
adler += *buf++;
|
||||
sum2 += adler;
|
||||
}
|
||||
if (adler >= BASE)
|
||||
adler -= BASE;
|
||||
MOD28(sum2); /* only added so many BASE's */
|
||||
return adler | (sum2 << 16);
|
||||
}
|
||||
|
||||
/* do length NMAX blocks -- requires just one modulo operation */
|
||||
while (len >= NMAX) {
|
||||
len -= NMAX;
|
||||
n = NMAX / 16; /* NMAX is divisible by 16 */
|
||||
do {
|
||||
DO16(buf); /* 16 sums unrolled */
|
||||
buf += 16;
|
||||
} while (--n);
|
||||
MOD(adler);
|
||||
MOD(sum2);
|
||||
}
|
||||
|
||||
/* do remaining bytes (less than NMAX, still just one modulo) */
|
||||
if (len) { /* avoid modulos if none remaining */
|
||||
while (len >= 16) {
|
||||
len -= 16;
|
||||
DO16(buf);
|
||||
buf += 16;
|
||||
}
|
||||
while (len--) {
|
||||
adler += *buf++;
|
||||
sum2 += adler;
|
||||
}
|
||||
MOD(adler);
|
||||
MOD(sum2);
|
||||
}
|
||||
|
||||
/* return recombined sums */
|
||||
return adler | (sum2 << 16);
|
||||
#ifdef ZLIB_COMPAT
|
||||
unsigned long Z_EXPORT PREFIX(adler32)(unsigned long adler, const unsigned char *buf, unsigned int len) {
|
||||
return (unsigned long)FUNCTABLE_CALL(adler32)((uint32_t)adler, buf, len);
|
||||
}
|
||||
#else
|
||||
uint32_t Z_EXPORT PREFIX(adler32)(uint32_t adler, const unsigned char *buf, uint32_t len) {
|
||||
return FUNCTABLE_CALL(adler32)(adler, buf, len);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* ========================================================================= */
|
||||
uLong ZEXPORT adler32(uLong adler, const Bytef *buf, uInt len) {
|
||||
return adler32_z(adler, buf, len);
|
||||
}
|
||||
|
||||
/* ========================================================================= */
|
||||
local uLong adler32_combine_(uLong adler1, uLong adler2, z_off64_t len2) {
|
||||
unsigned long sum1;
|
||||
unsigned long sum2;
|
||||
static uint32_t adler32_combine_(uint32_t adler1, uint32_t adler2, z_off64_t len2) {
|
||||
uint32_t sum1;
|
||||
uint32_t sum2;
|
||||
unsigned rem;
|
||||
|
||||
/* for negative len, return invalid adler32 as a clue for debugging */
|
||||
if (len2 < 0)
|
||||
return 0xffffffffUL;
|
||||
return 0xffffffff;
|
||||
|
||||
/* the derivation of this formula is left as an exercise for the reader */
|
||||
MOD63(len2); /* assumes len2 >= 0 */
|
||||
len2 %= BASE; /* assumes len2 >= 0 */
|
||||
rem = (unsigned)len2;
|
||||
sum1 = adler1 & 0xffff;
|
||||
sum2 = rem * sum1;
|
||||
MOD(sum2);
|
||||
sum2 %= BASE;
|
||||
sum1 += (adler2 & 0xffff) + BASE - 1;
|
||||
sum2 += ((adler1 >> 16) & 0xffff) + ((adler2 >> 16) & 0xffff) + BASE - rem;
|
||||
if (sum1 >= BASE) sum1 -= BASE;
|
||||
@@ -155,10 +54,16 @@ local uLong adler32_combine_(uLong adler1, uLong adler2, z_off64_t len2) {
|
||||
}
|
||||
|
||||
/* ========================================================================= */
|
||||
uLong ZEXPORT adler32_combine(uLong adler1, uLong adler2, z_off_t len2) {
|
||||
return adler32_combine_(adler1, adler2, len2);
|
||||
#ifdef ZLIB_COMPAT
|
||||
unsigned long Z_EXPORT PREFIX(adler32_combine)(unsigned long adler1, unsigned long adler2, z_off_t len2) {
|
||||
return (unsigned long)adler32_combine_((uint32_t)adler1, (uint32_t)adler2, len2);
|
||||
}
|
||||
|
||||
uLong ZEXPORT adler32_combine64(uLong adler1, uLong adler2, z_off64_t len2) {
|
||||
unsigned long Z_EXPORT PREFIX4(adler32_combine)(unsigned long adler1, unsigned long adler2, z_off64_t len2) {
|
||||
return (unsigned long)adler32_combine_((uint32_t)adler1, (uint32_t)adler2, len2);
|
||||
}
|
||||
#else
|
||||
uint32_t Z_EXPORT PREFIX4(adler32_combine)(uint32_t adler1, uint32_t adler2, z_off64_t len2) {
|
||||
return adler32_combine_(adler1, adler2, len2);
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,70 @@
|
||||
/* adler32_p.h -- Private inline functions and macros shared with
|
||||
* different computation of the Adler-32 checksum
|
||||
* of a data stream.
|
||||
* Copyright (C) 1995-2011, 2016 Mark Adler
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
||||
#ifndef ADLER32_P_H
|
||||
#define ADLER32_P_H
|
||||
|
||||
#define BASE 65521U /* largest prime smaller than 65536 */
|
||||
#define NMAX 5552
|
||||
/* NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1 */
|
||||
|
||||
#define ADLER_DO1(sum1, sum2, buf, i) {(sum1) += buf[(i)]; (sum2) += (sum1);}
|
||||
#define ADLER_DO2(sum1, sum2, buf, i) {ADLER_DO1(sum1, sum2, buf, i); ADLER_DO1(sum1, sum2, buf, i+1);}
|
||||
#define ADLER_DO4(sum1, sum2, buf, i) {ADLER_DO2(sum1, sum2, buf, i); ADLER_DO2(sum1, sum2, buf, i+2);}
|
||||
#define ADLER_DO8(sum1, sum2, buf, i) {ADLER_DO4(sum1, sum2, buf, i); ADLER_DO4(sum1, sum2, buf, i+4);}
|
||||
#define ADLER_DO16(sum1, sum2, buf) {ADLER_DO8(sum1, sum2, buf, 0); ADLER_DO8(sum1, sum2, buf, 8);}
|
||||
|
||||
static inline uint32_t adler32_len_1(uint32_t adler, const uint8_t *buf, uint32_t sum2) {
|
||||
adler += buf[0];
|
||||
adler %= BASE;
|
||||
sum2 += adler;
|
||||
sum2 %= BASE;
|
||||
return adler | (sum2 << 16);
|
||||
}
|
||||
|
||||
static inline uint32_t adler32_len_16(uint32_t adler, const uint8_t *buf, size_t len, uint32_t sum2) {
|
||||
while (len) {
|
||||
--len;
|
||||
adler += *buf++;
|
||||
sum2 += adler;
|
||||
}
|
||||
adler %= BASE;
|
||||
sum2 %= BASE; /* only added so many BASE's */
|
||||
/* return recombined sums */
|
||||
return adler | (sum2 << 16);
|
||||
}
|
||||
|
||||
static inline uint32_t adler32_copy_len_16(uint32_t adler, const uint8_t *buf, uint8_t *dst, size_t len, uint32_t sum2) {
|
||||
while (len--) {
|
||||
*dst = *buf++;
|
||||
adler += *dst++;
|
||||
sum2 += adler;
|
||||
}
|
||||
adler %= BASE;
|
||||
sum2 %= BASE; /* only added so many BASE's */
|
||||
/* return recombined sums */
|
||||
return adler | (sum2 << 16);
|
||||
}
|
||||
|
||||
static inline uint32_t adler32_len_64(uint32_t adler, const uint8_t *buf, size_t len, uint32_t sum2) {
|
||||
#ifdef UNROLL_MORE
|
||||
while (len >= 16) {
|
||||
len -= 16;
|
||||
ADLER_DO16(adler, sum2, buf);
|
||||
buf += 16;
|
||||
#else
|
||||
while (len >= 8) {
|
||||
len -= 8;
|
||||
ADLER_DO8(adler, sum2, buf, 0);
|
||||
buf += 8;
|
||||
#endif
|
||||
}
|
||||
/* Process tail (len < 16). */
|
||||
return adler32_len_16(adler, buf, len, sum2);
|
||||
}
|
||||
|
||||
#endif /* ADLER32_P_H */
|
||||
@@ -0,0 +1,29 @@
|
||||
/* arch_functions.h -- Arch-specific function prototypes.
|
||||
* Copyright (C) 2017 Hans Kristian Rosbach
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
||||
#ifndef CPU_FUNCTIONS_H_
|
||||
#define CPU_FUNCTIONS_H_
|
||||
|
||||
#include "zbuild.h"
|
||||
#include "zutil.h"
|
||||
#include "crc32.h"
|
||||
#include "deflate.h"
|
||||
#include "fallback_builtins.h"
|
||||
|
||||
#include "arch/generic/generic_functions.h"
|
||||
|
||||
#if defined(X86_FEATURES)
|
||||
# include "arch/x86/x86_functions.h"
|
||||
#elif defined(ARM_FEATURES)
|
||||
# include "arch/arm/arm_functions.h"
|
||||
#elif defined(PPC_FEATURES) || defined(POWER_FEATURES)
|
||||
# include "arch/power/power_functions.h"
|
||||
#elif defined(S390_FEATURES)
|
||||
# include "arch/s390/s390_functions.h"
|
||||
#elif defined(RISCV_FEATURES)
|
||||
# include "arch/riscv/riscv_functions.h"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,283 @@
|
||||
/* chunkset_tpl.h -- inline functions to copy small data chunks.
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
||||
#include "zbuild.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
/* Returns the chunk size */
|
||||
Z_INTERNAL uint32_t CHUNKSIZE(void) {
|
||||
return sizeof(chunk_t);
|
||||
}
|
||||
|
||||
/* Behave like memcpy, but assume that it's OK to overwrite at least
|
||||
chunk_t bytes of output even if the length is shorter than this,
|
||||
that the length is non-zero, and that `from` lags `out` by at least
|
||||
sizeof chunk_t bytes (or that they don't overlap at all or simply that
|
||||
the distance is less than the length of the copy).
|
||||
|
||||
Aside from better memory bus utilisation, this means that short copies
|
||||
(chunk_t bytes or fewer) will fall straight through the loop
|
||||
without iteration, which will hopefully make the branch prediction more
|
||||
reliable. */
|
||||
#ifndef HAVE_CHUNKCOPY
|
||||
static inline uint8_t* CHUNKCOPY(uint8_t *out, uint8_t const *from, unsigned len) {
|
||||
Assert(len > 0, "chunkcopy should never have a length 0");
|
||||
chunk_t chunk;
|
||||
int32_t align = ((len - 1) % sizeof(chunk_t)) + 1;
|
||||
loadchunk(from, &chunk);
|
||||
storechunk(out, &chunk);
|
||||
out += align;
|
||||
from += align;
|
||||
len -= align;
|
||||
while (len > 0) {
|
||||
loadchunk(from, &chunk);
|
||||
storechunk(out, &chunk);
|
||||
out += sizeof(chunk_t);
|
||||
from += sizeof(chunk_t);
|
||||
len -= sizeof(chunk_t);
|
||||
}
|
||||
return out;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Perform short copies until distance can be rewritten as being at least
|
||||
sizeof chunk_t.
|
||||
|
||||
This assumes that it's OK to overwrite at least the first
|
||||
2*sizeof(chunk_t) bytes of output even if the copy is shorter than this.
|
||||
This assumption holds because inflate_fast() starts every iteration with at
|
||||
least 258 bytes of output space available (258 being the maximum length
|
||||
output from a single token; see inflate_fast()'s assumptions below). */
|
||||
#ifndef HAVE_CHUNKUNROLL
|
||||
static inline uint8_t* CHUNKUNROLL(uint8_t *out, unsigned *dist, unsigned *len) {
|
||||
unsigned char const *from = out - *dist;
|
||||
chunk_t chunk;
|
||||
while (*dist < *len && *dist < sizeof(chunk_t)) {
|
||||
loadchunk(from, &chunk);
|
||||
storechunk(out, &chunk);
|
||||
out += *dist;
|
||||
*len -= *dist;
|
||||
*dist += *dist;
|
||||
}
|
||||
return out;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_CHUNK_MAG
|
||||
/* Loads a magazine to feed into memory of the pattern */
|
||||
static inline chunk_t GET_CHUNK_MAG(uint8_t *buf, uint32_t *chunk_rem, uint32_t dist) {
|
||||
/* This code takes string of length dist from "from" and repeats
|
||||
* it for as many times as can fit in a chunk_t (vector register) */
|
||||
uint64_t cpy_dist;
|
||||
uint64_t bytes_remaining = sizeof(chunk_t);
|
||||
chunk_t chunk_load;
|
||||
uint8_t *cur_chunk = (uint8_t *)&chunk_load;
|
||||
while (bytes_remaining) {
|
||||
cpy_dist = MIN(dist, bytes_remaining);
|
||||
memcpy(cur_chunk, buf, (size_t)cpy_dist);
|
||||
bytes_remaining -= cpy_dist;
|
||||
cur_chunk += cpy_dist;
|
||||
/* This allows us to bypass an expensive integer division since we're effectively
|
||||
* counting in this loop, anyway */
|
||||
*chunk_rem = (uint32_t)cpy_dist;
|
||||
}
|
||||
|
||||
return chunk_load;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_HALF_CHUNK) && !defined(HAVE_HALFCHUNKCOPY)
|
||||
static inline uint8_t* HALFCHUNKCOPY(uint8_t *out, uint8_t const *from, unsigned len) {
|
||||
halfchunk_t chunk;
|
||||
int32_t align = ((len - 1) % sizeof(halfchunk_t)) + 1;
|
||||
loadhalfchunk(from, &chunk);
|
||||
storehalfchunk(out, &chunk);
|
||||
out += align;
|
||||
from += align;
|
||||
len -= align;
|
||||
while (len > 0) {
|
||||
loadhalfchunk(from, &chunk);
|
||||
storehalfchunk(out, &chunk);
|
||||
out += sizeof(halfchunk_t);
|
||||
from += sizeof(halfchunk_t);
|
||||
len -= sizeof(halfchunk_t);
|
||||
}
|
||||
return out;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Copy DIST bytes from OUT - DIST into OUT + DIST * k, for 0 <= k < LEN/DIST.
|
||||
Return OUT + LEN. */
|
||||
static inline uint8_t* CHUNKMEMSET(uint8_t *out, uint8_t *from, unsigned len) {
|
||||
/* Debug performance related issues when len < sizeof(uint64_t):
|
||||
Assert(len >= sizeof(uint64_t), "chunkmemset should be called on larger chunks"); */
|
||||
Assert(from != out, "chunkmemset cannot have a distance 0");
|
||||
|
||||
chunk_t chunk_load;
|
||||
uint32_t chunk_mod = 0;
|
||||
uint32_t adv_amount;
|
||||
int64_t sdist = out - from;
|
||||
uint64_t dist = llabs(sdist);
|
||||
|
||||
/* We are supporting the case for when we are reading bytes from ahead in the buffer.
|
||||
* We now have to handle this, though it wasn't _quite_ clear if this rare circumstance
|
||||
* always needed to be handled here or if we're just now seeing it because we are
|
||||
* dispatching to this function, more */
|
||||
if (sdist < 0 && dist < len) {
|
||||
#ifdef HAVE_MASKED_READWRITE
|
||||
/* We can still handle this case if we can mitigate over writing _and_ we
|
||||
* fit the entirety of the copy length with one load */
|
||||
if (len <= sizeof(chunk_t)) {
|
||||
/* Tempting to add a goto to the block below but hopefully most compilers
|
||||
* collapse these identical code segments as one label to jump to */
|
||||
return CHUNKCOPY(out, from, len);
|
||||
}
|
||||
#endif
|
||||
/* Here the memmove semantics match perfectly, as when this happens we are
|
||||
* effectively sliding down the contents of memory by dist bytes */
|
||||
memmove(out, from, len);
|
||||
return out + len;
|
||||
}
|
||||
|
||||
if (dist == 1) {
|
||||
memset(out, *from, len);
|
||||
return out + len;
|
||||
} else if (dist >= sizeof(chunk_t)) {
|
||||
return CHUNKCOPY(out, from, len);
|
||||
}
|
||||
|
||||
/* Only AVX2+ as there's 128 bit vectors and 256 bit. We allow for shorter vector
|
||||
* lengths because they serve to allow more cases to fall into chunkcopy, as the
|
||||
* distance of the shorter length is still deemed a safe distance. We rewrite this
|
||||
* here rather than calling the ssse3 variant directly now because doing so required
|
||||
* dispatching to another function and broke inlining for this function entirely. We
|
||||
* also can merge an assert and some remainder peeling behavior into the same code blocks,
|
||||
* making the code a little smaller. */
|
||||
#ifdef HAVE_HALF_CHUNK
|
||||
if (len <= sizeof(halfchunk_t)) {
|
||||
if (dist >= sizeof(halfchunk_t))
|
||||
return HALFCHUNKCOPY(out, from, len);
|
||||
|
||||
if ((dist % 2) != 0 || dist == 6) {
|
||||
halfchunk_t halfchunk_load = GET_HALFCHUNK_MAG(from, &chunk_mod, (unsigned)dist);
|
||||
|
||||
if (len == sizeof(halfchunk_t)) {
|
||||
storehalfchunk(out, &halfchunk_load);
|
||||
len -= sizeof(halfchunk_t);
|
||||
out += sizeof(halfchunk_t);
|
||||
}
|
||||
|
||||
chunk_load = halfchunk2whole(&halfchunk_load);
|
||||
goto rem_bytes;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CHUNKMEMSET_2
|
||||
if (dist == 2) {
|
||||
chunkmemset_2(from, &chunk_load);
|
||||
} else
|
||||
#endif
|
||||
#ifdef HAVE_CHUNKMEMSET_4
|
||||
if (dist == 4) {
|
||||
chunkmemset_4(from, &chunk_load);
|
||||
} else
|
||||
#endif
|
||||
#ifdef HAVE_CHUNKMEMSET_8
|
||||
if (dist == 8) {
|
||||
chunkmemset_8(from, &chunk_load);
|
||||
} else
|
||||
#endif
|
||||
#ifdef HAVE_CHUNKMEMSET_16
|
||||
if (dist == 16) {
|
||||
chunkmemset_16(from, &chunk_load);
|
||||
} else
|
||||
#endif
|
||||
chunk_load = GET_CHUNK_MAG(from, &chunk_mod, (unsigned)dist);
|
||||
|
||||
adv_amount = sizeof(chunk_t) - chunk_mod;
|
||||
|
||||
while (len >= (2 * sizeof(chunk_t))) {
|
||||
storechunk(out, &chunk_load);
|
||||
storechunk(out + adv_amount, &chunk_load);
|
||||
out += 2 * adv_amount;
|
||||
len -= 2 * adv_amount;
|
||||
}
|
||||
|
||||
/* If we don't have a "dist" length that divides evenly into a vector
|
||||
* register, we can write the whole vector register but we need only
|
||||
* advance by the amount of the whole string that fits in our chunk_t.
|
||||
* If we do divide evenly into the vector length, adv_amount = chunk_t size*/
|
||||
while (len >= sizeof(chunk_t)) {
|
||||
storechunk(out, &chunk_load);
|
||||
len -= adv_amount;
|
||||
out += adv_amount;
|
||||
}
|
||||
|
||||
#ifdef HAVE_HALF_CHUNK
|
||||
rem_bytes:
|
||||
#endif
|
||||
if (len) {
|
||||
memcpy(out, &chunk_load, len);
|
||||
out += len;
|
||||
}
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
Z_INTERNAL uint8_t* CHUNKMEMSET_SAFE(uint8_t *out, uint8_t *from, unsigned len, unsigned left) {
|
||||
#if OPTIMAL_CMP < 32
|
||||
static const uint32_t align_mask = 7;
|
||||
#elif OPTIMAL_CMP == 32
|
||||
static const uint32_t align_mask = 3;
|
||||
#endif
|
||||
|
||||
len = MIN(len, left);
|
||||
|
||||
#if OPTIMAL_CMP < 64
|
||||
while (((uintptr_t)out & align_mask) && (len > 0)) {
|
||||
*out++ = *from++;
|
||||
--len;
|
||||
--left;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_MASKED_READWRITE
|
||||
if (UNLIKELY(left < sizeof(chunk_t))) {
|
||||
while (len > 0) {
|
||||
*out++ = *from++;
|
||||
--len;
|
||||
}
|
||||
|
||||
return out;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (len)
|
||||
out = CHUNKMEMSET(out, from, len);
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
static inline uint8_t *CHUNKCOPY_SAFE(uint8_t *out, uint8_t *from, uint64_t len, uint8_t *safe)
|
||||
{
|
||||
if (out == from)
|
||||
return out + len;
|
||||
|
||||
uint64_t safelen = (safe - out);
|
||||
len = MIN(len, safelen);
|
||||
|
||||
#ifndef HAVE_MASKED_READWRITE
|
||||
uint64_t from_dist = (uint64_t)llabs(safe - from);
|
||||
if (UNLIKELY(from_dist < sizeof(chunk_t) || safelen < sizeof(chunk_t))) {
|
||||
while (len--) {
|
||||
*out++ = *from++;
|
||||
}
|
||||
|
||||
return out;
|
||||
}
|
||||
#endif
|
||||
|
||||
return CHUNKMEMSET(out, from, (unsigned)len);
|
||||
}
|
||||
@@ -0,0 +1,133 @@
|
||||
/* compare256_rle.h -- 256 byte run-length encoding comparison
|
||||
* Copyright (C) 2022 Nathan Moinvaziri
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
||||
#include "zbuild.h"
|
||||
#include "zmemory.h"
|
||||
#include "fallback_builtins.h"
|
||||
|
||||
typedef uint32_t (*compare256_rle_func)(const uint8_t* src0, const uint8_t* src1);
|
||||
|
||||
/* 8-bit integer comparison */
|
||||
static inline uint32_t compare256_rle_8(const uint8_t *src0, const uint8_t *src1) {
|
||||
uint32_t len = 0;
|
||||
|
||||
do {
|
||||
if (*src0 != *src1)
|
||||
return len;
|
||||
src1 += 1, len += 1;
|
||||
if (*src0 != *src1)
|
||||
return len;
|
||||
src1 += 1, len += 1;
|
||||
if (*src0 != *src1)
|
||||
return len;
|
||||
src1 += 1, len += 1;
|
||||
if (*src0 != *src1)
|
||||
return len;
|
||||
src1 += 1, len += 1;
|
||||
if (*src0 != *src1)
|
||||
return len;
|
||||
src1 += 1, len += 1;
|
||||
if (*src0 != *src1)
|
||||
return len;
|
||||
src1 += 1, len += 1;
|
||||
if (*src0 != *src1)
|
||||
return len;
|
||||
src1 += 1, len += 1;
|
||||
if (*src0 != *src1)
|
||||
return len;
|
||||
src1 += 1, len += 1;
|
||||
} while (len < 256);
|
||||
|
||||
return 256;
|
||||
}
|
||||
|
||||
/* 16-bit integer comparison */
|
||||
static inline uint32_t compare256_rle_16(const uint8_t *src0, const uint8_t *src1) {
|
||||
uint32_t len = 0;
|
||||
uint16_t src0_cmp;
|
||||
|
||||
src0_cmp = zng_memread_2(src0);
|
||||
|
||||
do {
|
||||
if (src0_cmp != zng_memread_2(src1))
|
||||
return len + (*src0 == *src1);
|
||||
src1 += 2, len += 2;
|
||||
if (src0_cmp != zng_memread_2(src1))
|
||||
return len + (*src0 == *src1);
|
||||
src1 += 2, len += 2;
|
||||
if (src0_cmp != zng_memread_2(src1))
|
||||
return len + (*src0 == *src1);
|
||||
src1 += 2, len += 2;
|
||||
if (src0_cmp != zng_memread_2(src1))
|
||||
return len + (*src0 == *src1);
|
||||
src1 += 2, len += 2;
|
||||
} while (len < 256);
|
||||
|
||||
return 256;
|
||||
}
|
||||
|
||||
#ifdef HAVE_BUILTIN_CTZ
|
||||
/* 32-bit integer comparison */
|
||||
static inline uint32_t compare256_rle_32(const uint8_t *src0, const uint8_t *src1) {
|
||||
uint32_t sv, len = 0;
|
||||
uint16_t src0_cmp;
|
||||
|
||||
src0_cmp = zng_memread_2(src0);
|
||||
sv = ((uint32_t)src0_cmp << 16) | src0_cmp;
|
||||
|
||||
do {
|
||||
uint32_t mv, diff;
|
||||
|
||||
mv = zng_memread_4(src1);
|
||||
|
||||
diff = sv ^ mv;
|
||||
if (diff) {
|
||||
#if BYTE_ORDER == LITTLE_ENDIAN
|
||||
uint32_t match_byte = __builtin_ctz(diff) / 8;
|
||||
#else
|
||||
uint32_t match_byte = __builtin_clz(diff) / 8;
|
||||
#endif
|
||||
return len + match_byte;
|
||||
}
|
||||
|
||||
src1 += 4, len += 4;
|
||||
} while (len < 256);
|
||||
|
||||
return 256;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_BUILTIN_CTZLL
|
||||
/* 64-bit integer comparison */
|
||||
static inline uint32_t compare256_rle_64(const uint8_t *src0, const uint8_t *src1) {
|
||||
uint32_t src0_cmp32, len = 0;
|
||||
uint16_t src0_cmp;
|
||||
uint64_t sv;
|
||||
|
||||
src0_cmp = zng_memread_2(src0);
|
||||
src0_cmp32 = ((uint32_t)src0_cmp << 16) | src0_cmp;
|
||||
sv = ((uint64_t)src0_cmp32 << 32) | src0_cmp32;
|
||||
|
||||
do {
|
||||
uint64_t mv, diff;
|
||||
|
||||
mv = zng_memread_8(src1);
|
||||
|
||||
diff = sv ^ mv;
|
||||
if (diff) {
|
||||
#if BYTE_ORDER == LITTLE_ENDIAN
|
||||
uint64_t match_byte = __builtin_ctzll(diff) / 8;
|
||||
#else
|
||||
uint64_t match_byte = __builtin_clzll(diff) / 8;
|
||||
#endif
|
||||
return len + (uint32_t)match_byte;
|
||||
}
|
||||
|
||||
src1 += 8, len += 8;
|
||||
} while (len < 256);
|
||||
|
||||
return 256;
|
||||
}
|
||||
#endif
|
||||
+48
-25
@@ -3,10 +3,19 @@
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
||||
/* @(#) $Id$ */
|
||||
#include "zbuild.h"
|
||||
#include "zutil.h"
|
||||
|
||||
#define ZLIB_INTERNAL
|
||||
#include "zlib.h"
|
||||
/* ===========================================================================
|
||||
* Architecture-specific hooks.
|
||||
*/
|
||||
#ifdef S390_DFLTCC_DEFLATE
|
||||
# include "arch/s390/dfltcc_common.h"
|
||||
#else
|
||||
/* Returns the upper bound on compressed data length based on uncompressed data length, assuming default settings.
|
||||
* Zero means that arch-specific deflation code behaves identically to the regular zlib-ng algorithms. */
|
||||
# define DEFLATE_BOUND_COMPLEN(source_len) 0
|
||||
#endif
|
||||
|
||||
/* ===========================================================================
|
||||
Compresses the source buffer into the destination buffer. The level
|
||||
@@ -19,57 +28,71 @@
|
||||
memory, Z_BUF_ERROR if there was not enough room in the output buffer,
|
||||
Z_STREAM_ERROR if the level parameter is invalid.
|
||||
*/
|
||||
int ZEXPORT compress2(Bytef *dest, uLongf *destLen, const Bytef *source,
|
||||
uLong sourceLen, int level) {
|
||||
z_stream stream;
|
||||
int Z_EXPORT PREFIX(compress2)(unsigned char *dest, z_uintmax_t *destLen, const unsigned char *source,
|
||||
z_uintmax_t sourceLen, int level) {
|
||||
PREFIX3(stream) stream;
|
||||
int err;
|
||||
const uInt max = (uInt)-1;
|
||||
uLong left;
|
||||
const unsigned int max = (unsigned int)-1;
|
||||
z_size_t left;
|
||||
|
||||
left = *destLen;
|
||||
*destLen = 0;
|
||||
|
||||
stream.zalloc = (alloc_func)0;
|
||||
stream.zfree = (free_func)0;
|
||||
stream.opaque = (voidpf)0;
|
||||
stream.zalloc = NULL;
|
||||
stream.zfree = NULL;
|
||||
stream.opaque = NULL;
|
||||
|
||||
err = deflateInit(&stream, level);
|
||||
if (err != Z_OK) return err;
|
||||
err = PREFIX(deflateInit)(&stream, level);
|
||||
if (err != Z_OK)
|
||||
return err;
|
||||
|
||||
stream.next_out = dest;
|
||||
stream.avail_out = 0;
|
||||
stream.next_in = (z_const Bytef *)source;
|
||||
stream.next_in = (z_const unsigned char *)source;
|
||||
stream.avail_in = 0;
|
||||
|
||||
do {
|
||||
if (stream.avail_out == 0) {
|
||||
stream.avail_out = left > (uLong)max ? max : (uInt)left;
|
||||
stream.avail_out = left > (unsigned long)max ? max : (unsigned int)left;
|
||||
left -= stream.avail_out;
|
||||
}
|
||||
if (stream.avail_in == 0) {
|
||||
stream.avail_in = sourceLen > (uLong)max ? max : (uInt)sourceLen;
|
||||
stream.avail_in = sourceLen > (unsigned long)max ? max : (unsigned int)sourceLen;
|
||||
sourceLen -= stream.avail_in;
|
||||
}
|
||||
err = deflate(&stream, sourceLen ? Z_NO_FLUSH : Z_FINISH);
|
||||
err = PREFIX(deflate)(&stream, sourceLen ? Z_NO_FLUSH : Z_FINISH);
|
||||
} while (err == Z_OK);
|
||||
|
||||
*destLen = stream.total_out;
|
||||
deflateEnd(&stream);
|
||||
PREFIX(deflateEnd)(&stream);
|
||||
return err == Z_STREAM_END ? Z_OK : err;
|
||||
}
|
||||
|
||||
/* ===========================================================================
|
||||
*/
|
||||
int ZEXPORT compress(Bytef *dest, uLongf *destLen, const Bytef *source,
|
||||
uLong sourceLen) {
|
||||
return compress2(dest, destLen, source, sourceLen, Z_DEFAULT_COMPRESSION);
|
||||
int Z_EXPORT PREFIX(compress)(unsigned char *dest, z_uintmax_t *destLen, const unsigned char *source, z_uintmax_t sourceLen) {
|
||||
return PREFIX(compress2)(dest, destLen, source, sourceLen, Z_DEFAULT_COMPRESSION);
|
||||
}
|
||||
|
||||
/* ===========================================================================
|
||||
If the default memLevel or windowBits for deflateInit() is changed, then
|
||||
If the default memLevel or windowBits for deflateInit() is changed, then
|
||||
this function needs to be updated.
|
||||
*/
|
||||
uLong ZEXPORT compressBound(uLong sourceLen) {
|
||||
return sourceLen + (sourceLen >> 12) + (sourceLen >> 14) +
|
||||
(sourceLen >> 25) + 13;
|
||||
z_uintmax_t Z_EXPORT PREFIX(compressBound)(z_uintmax_t sourceLen) {
|
||||
z_uintmax_t complen = DEFLATE_BOUND_COMPLEN(sourceLen);
|
||||
|
||||
if (complen > 0)
|
||||
/* Architecture-specific code provided an upper bound. */
|
||||
return complen + ZLIB_WRAPLEN;
|
||||
|
||||
#ifndef NO_QUICK_STRATEGY
|
||||
return sourceLen /* The source size itself */
|
||||
+ (sourceLen == 0 ? 1 : 0) /* Always at least one byte for any input */
|
||||
+ (sourceLen < 9 ? 1 : 0) /* One extra byte for lengths less than 9 */
|
||||
+ DEFLATE_QUICK_OVERHEAD(sourceLen) /* Source encoding overhead, padded to next full byte */
|
||||
+ DEFLATE_BLOCK_OVERHEAD /* Deflate block overhead bytes */
|
||||
+ ZLIB_WRAPLEN; /* zlib wrapper */
|
||||
#else
|
||||
return sourceLen + (sourceLen >> 4) + 7 + ZLIB_WRAPLEN;
|
||||
#endif
|
||||
}
|
||||
+1921
-511
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,23 @@
|
||||
/* cpu_features.c -- CPU architecture feature check
|
||||
* Copyright (C) 2017 Hans Kristian Rosbach
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
||||
#include "zbuild.h"
|
||||
#include "cpu_features.h"
|
||||
#include <string.h>
|
||||
|
||||
Z_INTERNAL void cpu_check_features(struct cpu_features *features) {
|
||||
memset(features, 0, sizeof(struct cpu_features));
|
||||
#if defined(X86_FEATURES)
|
||||
x86_check_features(&features->x86);
|
||||
#elif defined(ARM_FEATURES)
|
||||
arm_check_features(&features->arm);
|
||||
#elif defined(PPC_FEATURES) || defined(POWER_FEATURES)
|
||||
power_check_features(&features->power);
|
||||
#elif defined(S390_FEATURES)
|
||||
s390_check_features(&features->s390);
|
||||
#elif defined(RISCV_FEATURES)
|
||||
riscv_check_features(&features->riscv);
|
||||
#endif
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
/* cpu_features.h -- CPU architecture feature check
|
||||
* Copyright (C) 2017 Hans Kristian Rosbach
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
||||
#ifndef CPU_FEATURES_H_
|
||||
#define CPU_FEATURES_H_
|
||||
|
||||
#ifndef DISABLE_RUNTIME_CPU_DETECTION
|
||||
|
||||
#if defined(X86_FEATURES)
|
||||
# include "arch/x86/x86_features.h"
|
||||
#elif defined(ARM_FEATURES)
|
||||
# include "arch/arm/arm_features.h"
|
||||
#elif defined(PPC_FEATURES) || defined(POWER_FEATURES)
|
||||
# include "arch/power/power_features.h"
|
||||
#elif defined(S390_FEATURES)
|
||||
# include "arch/s390/s390_features.h"
|
||||
#elif defined(RISCV_FEATURES)
|
||||
# include "arch/riscv/riscv_features.h"
|
||||
#endif
|
||||
|
||||
struct cpu_features {
|
||||
#if defined(X86_FEATURES)
|
||||
struct x86_cpu_features x86;
|
||||
#elif defined(ARM_FEATURES)
|
||||
struct arm_cpu_features arm;
|
||||
#elif defined(PPC_FEATURES) || defined(POWER_FEATURES)
|
||||
struct power_cpu_features power;
|
||||
#elif defined(S390_FEATURES)
|
||||
struct s390_cpu_features s390;
|
||||
#elif defined(RISCV_FEATURES)
|
||||
struct riscv_cpu_features riscv;
|
||||
#else
|
||||
char empty;
|
||||
#endif
|
||||
};
|
||||
|
||||
void cpu_check_features(struct cpu_features *features);
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
+23
-1030
File diff suppressed because it is too large.
Load diff
+17
-9440
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,56 @@
|
||||
/* crc32_braid_comb.c -- compute the CRC-32 of a data stream
|
||||
* Copyright (C) 1995-2022 Mark Adler
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*
|
||||
* This interleaved implementation of a CRC makes use of pipelined multiple
|
||||
* arithmetic-logic units, commonly found in modern CPU cores. It is due to
|
||||
* Kadatch and Jenkins (2010). See doc/crc-doc.1.0.pdf in this distribution.
|
||||
*/
|
||||
|
||||
#include "zutil.h"
|
||||
#include "crc32_braid_p.h"
|
||||
#include "crc32_braid_tbl.h"
|
||||
#include "crc32_braid_comb_p.h"
|
||||
|
||||
/* ========================================================================= */
|
||||
static uint32_t crc32_combine_(uint32_t crc1, uint32_t crc2, z_off64_t len2) {
|
||||
return multmodp(x2nmodp(len2, 3), crc1) ^ crc2;
|
||||
}
|
||||
static uint32_t crc32_combine_gen_(z_off64_t len2) {
|
||||
return x2nmodp(len2, 3);
|
||||
}
|
||||
static uint32_t crc32_combine_op_(uint32_t crc1, uint32_t crc2, const uint32_t op) {
|
||||
return multmodp(op, crc1) ^ crc2;
|
||||
}
|
||||
|
||||
/* ========================================================================= */
|
||||
|
||||
#ifdef ZLIB_COMPAT
|
||||
unsigned long Z_EXPORT PREFIX(crc32_combine)(unsigned long crc1, unsigned long crc2, z_off_t len2) {
|
||||
return (unsigned long)crc32_combine_((uint32_t)crc1, (uint32_t)crc2, len2);
|
||||
}
|
||||
unsigned long Z_EXPORT PREFIX4(crc32_combine)(unsigned long crc1, unsigned long crc2, z_off64_t len2) {
|
||||
return (unsigned long)crc32_combine_((uint32_t)crc1, (uint32_t)crc2, len2);
|
||||
}
|
||||
unsigned long Z_EXPORT PREFIX(crc32_combine_gen)(z_off_t len2) {
|
||||
return crc32_combine_gen_(len2);
|
||||
}
|
||||
unsigned long Z_EXPORT PREFIX4(crc32_combine_gen)(z_off64_t len2) {
|
||||
return crc32_combine_gen_(len2);
|
||||
}
|
||||
unsigned long Z_EXPORT PREFIX(crc32_combine_op)(unsigned long crc1, unsigned long crc2, const unsigned long op) {
|
||||
return (unsigned long)crc32_combine_op_((uint32_t)crc1, (uint32_t)crc2, (uint32_t)op);
|
||||
}
|
||||
#else
|
||||
uint32_t Z_EXPORT PREFIX4(crc32_combine)(uint32_t crc1, uint32_t crc2, z_off64_t len2) {
|
||||
return crc32_combine_(crc1, crc2, len2);
|
||||
}
|
||||
uint32_t Z_EXPORT PREFIX(crc32_combine_gen)(z_off64_t len2) {
|
||||
return crc32_combine_gen_(len2);
|
||||
}
|
||||
uint32_t Z_EXPORT PREFIX(crc32_combine_op)(uint32_t crc1, uint32_t crc2, const uint32_t op) {
|
||||
return crc32_combine_op_(crc1, crc2, op);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* ========================================================================= */
|
||||
@@ -0,0 +1,42 @@
|
||||
#ifndef CRC32_BRAID_COMB_P_H_
|
||||
#define CRC32_BRAID_COMB_P_H_
|
||||
|
||||
/*
|
||||
Return a(x) multiplied by b(x) modulo p(x), where p(x) is the CRC polynomial,
|
||||
reflected. For speed, this requires that a not be zero.
|
||||
*/
|
||||
static uint32_t multmodp(uint32_t a, uint32_t b) {
|
||||
uint32_t m, p;
|
||||
|
||||
m = (uint32_t)1 << 31;
|
||||
p = 0;
|
||||
for (;;) {
|
||||
if (a & m) {
|
||||
p ^= b;
|
||||
if ((a & (m - 1)) == 0)
|
||||
break;
|
||||
}
|
||||
m >>= 1;
|
||||
b = b & 1 ? (b >> 1) ^ POLY : b >> 1;
|
||||
}
|
||||
return p;
|
||||
}
|
||||
|
||||
/*
|
||||
Return x^(n * 2^k) modulo p(x). Requires that x2n_table[] has been
|
||||
initialized.
|
||||
*/
|
||||
static uint32_t x2nmodp(z_off64_t n, unsigned k) {
|
||||
uint32_t p;
|
||||
|
||||
p = (uint32_t)1 << 31; /* x^0 == 1 */
|
||||
while (n) {
|
||||
if (n & 1)
|
||||
p = multmodp(x2n_table[k & 31], p);
|
||||
n >>= 1;
|
||||
k++;
|
||||
}
|
||||
return p;
|
||||
}
|
||||
|
||||
#endif /* CRC32_BRAID_COMB_P_H_ */
|
||||
@@ -0,0 +1,40 @@
|
||||
#ifndef CRC32_BRAID_P_H_
|
||||
#define CRC32_BRAID_P_H_
|
||||
|
||||
#include "zendian.h"
|
||||
|
||||
/* Define BRAID_N, valid range is 1..6 */
|
||||
#define BRAID_N 5
|
||||
|
||||
/* Define BRAID_W and the associated z_word_t type. If BRAID_W is not defined, then a braided
|
||||
calculation is not used, and the associated tables and code are not compiled.
|
||||
*/
|
||||
#if defined(__x86_64__) || defined(_M_AMD64) || defined(__aarch64__) || defined(_M_ARM64) || defined(__powerpc64__)
|
||||
# define BRAID_W 8
|
||||
typedef uint64_t z_word_t;
|
||||
#else
|
||||
# define BRAID_W 4
|
||||
typedef uint32_t z_word_t;
|
||||
#endif
|
||||
|
||||
#if BYTE_ORDER == LITTLE_ENDIAN
|
||||
# define ZSWAPWORD(word) (word)
|
||||
# define BRAID_TABLE crc_braid_table
|
||||
#elif BYTE_ORDER == BIG_ENDIAN
|
||||
# if BRAID_W == 8
|
||||
# define ZSWAPWORD(word) ZSWAP64(word)
|
||||
# elif BRAID_W == 4
|
||||
# define ZSWAPWORD(word) ZSWAP32(word)
|
||||
# endif
|
||||
# define BRAID_TABLE crc_braid_big_table
|
||||
#else
|
||||
# error "No endian defined"
|
||||
#endif
|
||||
|
||||
#define CRC_DO1 c = crc_table[(c ^ *buf++) & 0xff] ^ (c >> 8)
|
||||
#define CRC_DO8 CRC_DO1; CRC_DO1; CRC_DO1; CRC_DO1; CRC_DO1; CRC_DO1; CRC_DO1; CRC_DO1
|
||||
|
||||
/* CRC polynomial. */
|
||||
#define POLY 0xedb88320 /* p(x) reflected, with x^32 implied */
|
||||
|
||||
#endif /* CRC32_BRAID_P_H_ */
|
||||
File diff suppressed because it is too large.
Load diff
Loaded 100 of 368 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user