Comparar commits
781 Commits
| Autor | SHA1 | Data | |
|---|---|---|---|
| 354aadbe34 | |||
| d9f356c545 | |||
| f13db65e41 | |||
| 5a4c3fcf03 | |||
| cd1a83eac8 | |||
| 8ddb0f601e | |||
| 788d7a15c5 | |||
| f7c7eff771 | |||
| ac7c59abca | |||
| d71488ecdd | |||
| 8be431f216 | |||
| c7d89253a0 | |||
| 4ce9510966 | |||
| 3e679a2968 | |||
| c585706d00 | |||
| 4db7fceecf | |||
| 46385a1a17 | |||
| 830cfed95a | |||
| 95ece0cb8d | |||
| 724f2615e5 | |||
| 1ae693e31e | |||
| 7ae00c352c | |||
| 3b43301028 | |||
| 34a63bd98a | |||
| 83f1674e70 | |||
| d649be59fe | |||
| 549fc0f192 | |||
| 85df117dd8 | |||
| f07c012184 | |||
| f76916f6e3 | |||
| 14fa491e7a | |||
| 2dd940185b | |||
| 3517cb2348 | |||
| f3d8ceb685 | |||
| 3e6c46ea77 | |||
| 3867aed599 | |||
| 23abf279d8 | |||
| 79d3cd17cc | |||
| 6d7669cc0a | |||
| a6a4a2f5b6 | |||
| 4a78452e73 | |||
| a8db9df8b3 | |||
| 6c49fde65c | |||
| 684d1464e6 | |||
| 6e5a57e8af | |||
| e7f4e0e9c0 | |||
| d5cc05c96d | |||
| 8935a80bd0 | |||
| 966773c540 | |||
| f787e1e3ff | |||
| 7f2dc952e0 | |||
| 634c6c927d | |||
| c47d48694a | |||
| 3ce45fb70a | |||
| 5ae9fbb3dd | |||
| 71a78e2fe4 | |||
| 7dc6f91d5e | |||
| 9924fab816 | |||
| dd1360c1fe | |||
| 8719e9dbf5 | |||
| c1bc6894eb | |||
| 044af446cd | |||
| 28af862a1c | |||
| be939dc257 | |||
| eb93498a8c | |||
| e0a0bd781b | |||
| db3b30894c | |||
| 40e7858e19 | |||
| 1b01c393d2 | |||
| 5947e9d5ad | |||
| ffe3267303 | |||
| 546400fd70 | |||
| c26ceab084 | |||
| fcad603269 | |||
| d8a60ef8de | |||
| 992d991815 | |||
| b9ce33c5b0 | |||
| 40150539e8 | |||
| 1b6c727889 | |||
| 59189c00d2 | |||
| 3a555a4f30 | |||
| fd5ce3a47b | |||
| a4708bb06c | |||
| f94d4e7f01 | |||
| 34c67f13d6 | |||
| 96a9a53ee3 | |||
| 58e9f2680f | |||
| f433237632 | |||
| 3c0659cd0f | |||
| 1261ca01ce | |||
| 2a0197fe83 | |||
| e67e2f9e9f | |||
| 29d379ccb6 | |||
| f024f448c0 | |||
| 89b7fd552d | |||
| a07bfaea4e | |||
| dd37b5bcf9 | |||
| 1a8ca4fab2 | |||
| 499aa6cd12 | |||
| f81d652010 | |||
| 1c5f75579f | |||
| d0e96b4a79 | |||
| 7385c337ac | |||
| 3f93806957 | |||
| a906a73123 | |||
| f495e905dd | |||
| 0b2b24c558 | |||
| fbfee7a844 | |||
| 6a638e3289 | |||
| 44ee459098 | |||
| 55516fd3bc | |||
| 5315d269f0 | |||
| dd3fdd2c59 | |||
| ff455bc67f | |||
| e87a99684f | |||
| 7470f0c7dc | |||
| 71d1039982 | |||
| 6922317779 | |||
| 3647435025 | |||
| 63efa61613 | |||
| 7fd8cbfadb | |||
| 9610a474e2 | |||
| 88da9d7351 | |||
| bd3e2e22b9 | |||
| 15a9714c6c | |||
| 591b26322a | |||
| e6330e6da1 | |||
| ea99768e29 | |||
| 183552bee5 | |||
| 3fc450cdce | |||
| fac77c5b2d | |||
| c1de66f911 | |||
| 1ade8dd9b0 | |||
| 7c91f59a7f | |||
| bbbdd14100 | |||
| 4b9daaf451 | |||
| 149e8707cf | |||
| f1ebe30e92 | |||
| 7530b13a2e | |||
| 08b1b9ba47 | |||
| f91fdb4275 | |||
| 36ac4374ed | |||
| db7d774183 | |||
| cdd90b5ce3 | |||
| 6fe0e36094 | |||
| 4bdf6dfacf | |||
| 845cd48759 | |||
| 8ef06c795f | |||
| 5252fc7ae2 | |||
| 67fe5048b9 | |||
| 71936a32a1 | |||
| 945bef5290 | |||
| 0d53bff197 | |||
| 286755bd68 | |||
| 6d3a75901c | |||
| 93d3b4feef | |||
| 911cdc0da8 | |||
| 3b20f9f50c | |||
| f7c0e88013 | |||
| a5425f93fa | |||
| d9564ec707 | |||
| 590e44a4d3 | |||
| e87e23e76e | |||
| 7b61970288 | |||
| f97ae2c64e | |||
| 5a08320a77 | |||
| 08f269f9b9 | |||
| 03e56bef25 | |||
| d4aaf2e540 | |||
| 0d1174843a | |||
| 1134a63299 | |||
| 22ba99842c | |||
| 59fd9df986 | |||
| 763a0aed16 | |||
| 5e6c3df7c0 | |||
| c59e07c674 | |||
| ebaf274807 | |||
| 87f8ade3e3 | |||
| 370e42d343 | |||
| a990ad13c7 | |||
| 42dccd4272 | |||
| a1797929b6 | |||
| 47ddc81271 | |||
| 0dc4a6bf8c | |||
| 5e7464ec5e | |||
| 45bfe940ea | |||
| d1db56d49c | |||
| 89665c51ed | |||
| 4ea83fb2e4 | |||
| 4492316e9c | |||
| de3edeba17 | |||
| 72aa7cb4b5 | |||
| 9514a192a5 | |||
| 9b4bd602fb | |||
| 520fe1dee4 | |||
| 315db3ecd6 | |||
| 9b5440d8a9 | |||
| cab9f682cd | |||
| f0cd6a7ce2 | |||
| 8e333c29c6 | |||
| bfa448ff84 | |||
| 838bcb9292 | |||
| 58796d4932 | |||
| bdc4056cff | |||
| b37d45d9ed | |||
| ee6226a5cb | |||
| 3bb5973159 | |||
| b81c7a3272 | |||
| b2250eaa0b | |||
| 88da3fd755 | |||
| 3363e7596f | |||
| fb9d90d672 | |||
| 72b9a3131a | |||
| 79a3732626 | |||
| d25e43cfbe | |||
| f64b32d934 | |||
| 560634d338 | |||
| fab4b71e38 | |||
| d4cda727d5 | |||
| 6d8021f4bd | |||
| dc991142c4 | |||
| ea614873ca | |||
| bb00c43fcc | |||
| 2906719433 | |||
| c130ea1d81 | |||
| 33076d249b | |||
| d2df9aeddb | |||
| 61c9d9f825 | |||
| d201ec2b11 | |||
| d2ff46225c | |||
| 3606a6d61f | |||
| 367377293a | |||
| c8fdb00125 | |||
| cbf9404a5a | |||
| 50752acba9 | |||
| 8326c12921 | |||
| f8e5a7b498 | |||
| 94d5dc4814 | |||
| f8f7636ed6 | |||
| c4496252d6 | |||
| 77b80b0d76 | |||
| fd40cbc4d1 | |||
| ea72cf2b56 | |||
| 6ee8dca8b5 | |||
| fe750b8658 | |||
| 5629a813c4 | |||
| 0907c437d2 | |||
| fb458c34bf | |||
| fb2d54701f | |||
| fffed08915 | |||
| 8bd1a2e1ef | |||
| d9fc71e456 | |||
| 14537a4db8 | |||
| e3138ca407 | |||
| 4463881125 | |||
| 8e732f4a20 | |||
| 974ad7dfd4 | |||
| 64dda3963f | |||
| 543507bea2 | |||
| 2cf627f029 | |||
| a21c36fa82 | |||
| 1ec50c42bd | |||
| e83646d5c2 | |||
| eb92c2e74b | |||
| 3abb875b96 | |||
| eb098ba20b | |||
| 08c7d54404 | |||
| df9bc0b7f8 | |||
| cefc2beec5 | |||
| a7616fe837 | |||
| a6534de898 | |||
| ba7900a529 | |||
| e9f9e650da | |||
| c07e5e20f8 | |||
| f775e78ae9 | |||
| 3644808db7 | |||
| 726429cbd4 | |||
| 12f009bb47 | |||
| 62bd8d9187 | |||
| 4eff94092d | |||
| 0940626b54 | |||
| eb5c9ea320 | |||
| f099325eb2 | |||
| 07eca067cf | |||
| 4c97c06fa1 | |||
| 222753d9fb | |||
| 79d7d84abf | |||
| 20529d535e | |||
| 6e6611efe9 | |||
| 69889dcff4 | |||
| c178ac6149 | |||
| 3ae465e71c | |||
| 352d5a7db5 | |||
| 6884f8da96 | |||
| a112444032 | |||
| ef14694020 | |||
| f25ce75f36 | |||
| da5f55b560 | |||
| 6f260d7d72 | |||
| 8f8d5cd468 | |||
| e0f0a3d5c7 | |||
| f70e9f2c35 | |||
| 35a242864a | |||
| e7061482c0 | |||
| 6015e919ce | |||
| 95dd887665 | |||
| a891ff4cc9 | |||
| 00d3a9af03 | |||
| 37d9646b92 | |||
| 237b42e933 | |||
| a33b4a6cc1 | |||
| 1d58a957e3 | |||
| 3b5b1841db | |||
| c4a1d4a533 | |||
| 5e1504aa1e | |||
| 12f1eda99b | |||
| 2274af3819 | |||
| ce7d367df7 | |||
| cf1d728186 | |||
| ce861325f4 | |||
| aac48e5f50 | |||
| 341efe62ec | |||
| cadceea851 | |||
| 52958fdb98 | |||
| 4f2935a856 | |||
| c70c356152 | |||
| e10c6901cd | |||
| 758c3b305b | |||
| abcf164745 | |||
| 0a15691ae7 | |||
| 0c124a183a | |||
| 22ebb7d0ba | |||
| e0646a95d8 | |||
| 770f94bc2d | |||
| 8d5b58f632 | |||
| 56138cae8a | |||
| 765bf3beb5 | |||
| 426184cbf4 | |||
| 95fcd65c91 | |||
| c5f27b8891 | |||
| 20aa0765bd | |||
| 51e07447b2 | |||
| 19ba687883 | |||
| c989e789ea | |||
| a27984635c | |||
| caff6dbab1 | |||
| b2656447ce | |||
| 6028693e0d | |||
| 93a5da07d5 | |||
| 938816b84c | |||
| 73174bb3ba | |||
| a0e8382185 | |||
| 242b936ad7 | |||
| 1b3b9aa995 | |||
| 108f75052d | |||
| bb80072ca4 | |||
| d627bfa00d | |||
| 5513588c77 | |||
| 49c81c17e3 | |||
| 3d2fdf3863 | |||
| ed26f50fbb | |||
| 4978eed9c0 | |||
| bf766888c7 | |||
| cae3816ebe | |||
| af38c1b354 | |||
| 451d5797fa | |||
| 241474b0d9 | |||
| 9b9c3de281 | |||
| 0627e8695c | |||
| c9c515e478 | |||
| 5c460b65dc | |||
| 63aefcd517 | |||
| 84245a8a38 | |||
| d65637395c | |||
| 3315fb2d4e | |||
| f28a1eafa2 | |||
| 2c69d4628c | |||
| 92ee0d7c02 | |||
| fab9a59a3b | |||
| c7aa86b042 | |||
| 91f22d1157 | |||
| 1960468b6b | |||
| 159df568e1 | |||
| 270f2d4279 | |||
| e2f8e83152 | |||
| 388b2b4d83 | |||
| e49523c508 | |||
| 075b444be3 | |||
| 2711d8657a | |||
| 9e8e57a558 | |||
| ebb24a07bb | |||
| 484798d807 | |||
| 6e6adc4fa3 | |||
| 9aed20a59e | |||
| da720f3b9a | |||
| b32e625662 | |||
| 12f73e6f2b | |||
| 1deb86fdaf | |||
| 1b6d468c9a | |||
| 3c08d65244 | |||
| 015214aada | |||
| 1e564ac849 | |||
| 193013f909 | |||
| 6ca7b7a8e7 | |||
| f098fcf0ff | |||
| c6cc3553c8 | |||
| 20104c4c13 | |||
| 83ce8172d2 | |||
| f9f18a7425 | |||
| e7312eb40a | |||
| 7d5824d6a8 | |||
| 3bc376ee94 | |||
| 9483577ff8 | |||
| b972ab5a76 | |||
| 276762cd09 | |||
| 0e4445e91b | |||
| fe202ff462 | |||
| 8288bfd0d9 | |||
| 04f71e64cf | |||
| 952fa13df6 | |||
| a5a8d71629 | |||
| 112fc3c0bd | |||
| 1252ae2760 | |||
| 4403acbb9f | |||
| 404dde30f1 | |||
| a654c79d10 | |||
| ff6403d63d | |||
| 55fb2687e9 | |||
| abcaca5754 | |||
| 59aa494417 | |||
| 8e8d3a7117 | |||
| dd47aa7db8 | |||
| 10ff1f8852 | |||
| e3a57e0be3 | |||
| 0b5ce83f88 | |||
| 27347f86a5 | |||
| 4a83808817 | |||
| e1f19878c6 | |||
| 58fce51f9f | |||
| c2c30ebc03 | |||
| 2cadf0f454 | |||
| 92df50e696 | |||
| 82d1ebb9c6 | |||
| dc69e13abd | |||
| 117466cd93 | |||
| c297995574 | |||
| dd32079c83 | |||
| d95bd167bc | |||
| 240214ef23 | |||
| c034d390f2 | |||
| eb4b1b5696 | |||
| f16ea703e1 | |||
| eec1fbc36f | |||
| 2a8db0cddf | |||
| 23c665995a | |||
| 053939b362 | |||
| 2e667a52c6 | |||
| 9e92ab1978 | |||
| 13713f49a4 | |||
| a2751f30e7 | |||
| 26435c51e6 | |||
| 81827f7547 | |||
| 74ac5fe799 | |||
| 52770f63a2 | |||
| 9041146f32 | |||
| 17eecbf1d8 | |||
| e32497ad0c | |||
| adad9dd69b | |||
| d777d26d19 | |||
| 195c1f2d5e | |||
| 6abe9327bf | |||
| 6c2b2b1944 | |||
| 9870d12b8f | |||
| 4128527fd1 | |||
| 33c9220c0a | |||
| 95d03f3375 | |||
| 2ece34a9f8 | |||
| bdc8d1ad53 | |||
| 1b1b177663 | |||
| 2875da6cee | |||
| ff82e16936 | |||
| 005f7f1f4c | |||
| f79731e7b3 | |||
| fba14c7f86 | |||
| 77d314e60f | |||
| d0facf4886 | |||
| f3211b6d64 | |||
| 8db75d57ea | |||
| abdd2bb172 | |||
| 36618f454d | |||
| f93b32b62c | |||
| a94fe6cf47 | |||
| d367062cea | |||
| ca979496f3 | |||
| a15960a192 | |||
| f394e0f7c8 | |||
| 172bdf5d74 | |||
| fb3777ccd1 | |||
| 2adbc9df5c | |||
| bde350ea9e | |||
| f5f2e19e88 | |||
| b0206260c7 | |||
| 84465c7c28 | |||
| 08bb59b417 | |||
| 8a986d2738 | |||
| 175bc7986c | |||
| 6e4925fbe6 | |||
| 99328a65fc | |||
| 52f7b14a1a | |||
| 1d8db48d90 | |||
| 546e096b26 | |||
| b8f01dbcf4 | |||
| 5f1456afb4 | |||
| b960a3cf9b | |||
| 96be8b6c6e | |||
| b4a8492a63 | |||
| 53480915ef | |||
| 27e0d6f8ec | |||
| 6e12033b28 | |||
| cfa19b58e6 | |||
| 0d1da748db | |||
| bf1bc4c6d3 | |||
| 25d0c3feab | |||
| 8ac5fc54a8 | |||
| ce0ddeb244 | |||
| 6b2419da85 | |||
| cffefbacf1 | |||
| 93e3d3f5aa | |||
| 5a58240905 | |||
| e94cac038d | |||
| c4b264d40b | |||
| 8757020d7a | |||
| 995b120a06 | |||
| 85cbdbc74a | |||
| ddf95fe678 | |||
| 554aa7b749 | |||
| cf3d4dd6dc | |||
| e639770bd4 | |||
| eceee985ef | |||
| 6a87b7d7ea | |||
| 104fd4ae9f | |||
| ae26bf708c | |||
| 0033909448 | |||
| 9fcdd2507f | |||
| 5b69e934ac | |||
| 4cecbbe836 | |||
| 8441e27ce4 | |||
| a19c48e0d0 | |||
| b4f46ff54c | |||
| 67dde2ccb9 | |||
| 88a9886677 | |||
| 651e0a226e | |||
| d3d824a355 | |||
| 82bf228397 | |||
| 38a68cfbee | |||
| 291e472758 | |||
| f51f3773d1 | |||
| 524c65e662 | |||
| 355ddf4188 | |||
| 7d58a105fb | |||
| e13ce0be7a | |||
| 88f1e9c8ca | |||
| 2573136055 | |||
| c52d341f7e | |||
| 3c218cf569 | |||
| d489df6a97 | |||
| 376d7c6937 | |||
| 6be126d133 | |||
| c3ebc4c673 | |||
| 9653cfdfbb | |||
| 2dabbdab04 | |||
| f9988e18ec | |||
| da51650158 | |||
| d2001a49cc | |||
| c390f212cb | |||
| 7131e2853a | |||
| 6b13fa61b6 | |||
| 9498f97a9c | |||
| be76a9737d | |||
| 698fa0aa4a | |||
| 2909c66c50 | |||
| bfbd0197bd | |||
| c9dcc485c5 | |||
| f2a31e2181 | |||
| 0a393e6a40 | |||
| 1dd965f62b | |||
| 3b94e1e1cd | |||
| f387542e11 | |||
| e066087949 | |||
| a99f5c6a05 | |||
| 969af9354e | |||
| 84987361cb | |||
| ef66db4b1b | |||
| d7484965df | |||
| b5b025cf56 | |||
| ca6b43fc04 | |||
| cfeac714b4 | |||
| 1e9586e168 | |||
| 6347efdfb6 | |||
| 7cad9d0f81 | |||
| 654051c554 | |||
| ad6f549048 | |||
| 60bc88e136 | |||
| 42404685b7 | |||
| 343276df2e | |||
| ab428cc05e | |||
| a10bb5f65f | |||
| 1b30cc97ab | |||
| f463b80ca2 | |||
| 071b290622 | |||
| 8c29c8906c | |||
| 5950e7bd5e | |||
| e7f455a5b3 | |||
| 5d62953211 | |||
| db6ac61559 | |||
| 1720786e61 | |||
| f2b8078bd6 | |||
| 9ca6ba8fcb | |||
| 4745f485c4 | |||
| c12b983aa4 | |||
| 3f4342fa09 | |||
| fa84ca4b57 | |||
| ebd5991b0f | |||
| 4db417411a | |||
| 6daf363669 | |||
| 9ee955fecb | |||
| f627443d1b | |||
| fa17c11e8a | |||
| c51dcb4892 | |||
| c277f98cbc | |||
| b846cf0155 | |||
| 0e53e7d1bd | |||
| 96964950c6 | |||
| d9183105e4 | |||
| 6e83de0532 | |||
| 8a6466eba5 | |||
| 80693400b1 | |||
| e54d62b280 | |||
| 3b3a130ad9 | |||
| 9fb65b8971 | |||
| 951665081c | |||
| 21459fa1fa | |||
| e7dc514dc6 | |||
| 8e67b75b88 | |||
| d309dce32a | |||
| 4c6277cc72 | |||
| 3a43047f18 | |||
| 8dd318e55b | |||
| 6539a0afd5 | |||
| 0cf0c416ec | |||
| bb0a112b94 | |||
| 209cc9b629 | |||
| 5353e5ee00 | |||
| 7b466f29e8 | |||
| 1216300668 | |||
| 2644cfc5f2 | |||
| d6ea1b93c5 | |||
| ffb3d9d39f | |||
| d423d83d10 | |||
| a27a134a70 | |||
| 777e09f895 | |||
| e26851264d | |||
| 5e787d6f9c | |||
| 7364ba24ec | |||
| bcc4b65596 | |||
| df0f06aec1 | |||
| 5096353d12 | |||
| 076239869a | |||
| 02f3db8a51 | |||
| 392aa79d2d | |||
| ea77c0117d | |||
| 3e4dcdb951 | |||
| 28c194b081 | |||
| 5a757074a3 | |||
| 8fe0183a71 | |||
| 8f787fcac9 | |||
| e3adfc1f0f | |||
| c82f05eadb | |||
| 7e86f2f686 | |||
| b1564baed9 | |||
| 95d1f98299 | |||
| b2b9911d6d | |||
| 739a2093b0 | |||
| 8aaeeaa9eb | |||
| 5bc8ea6613 | |||
| 27d0ed525f | |||
| 46cc8b817f | |||
| c2b391f776 | |||
| 4541d836ce | |||
| b933058eb6 | |||
| e9dd00a00d | |||
| e584c0683d | |||
| 84ec3a8445 | |||
| f2a7bf2a93 | |||
| eb383c319d | |||
| 878389c8cd | |||
| 83bc2aac57 | |||
| a80b2360c9 | |||
| ebeb3268e4 | |||
| c913d72625 | |||
| eb66bc71be | |||
| bfb0ab1327 | |||
| 8a4b51bb6c | |||
| ebc0869ce2 | |||
| 2eefda5ea5 | |||
| 41e0907c48 | |||
| c0459938a5 | |||
| 097488cff0 | |||
| 3af9ac9e69 | |||
| cd3614ae67 | |||
| 5a1adc8db8 | |||
| f4047845ec | |||
| dafebafde5 | |||
| 0042c0d7c2 | |||
| 72d05bc912 | |||
| 23ee1efa40 | |||
| 380e29d55c | |||
| 2bf2b8e94a | |||
| 724e1819b1 | |||
| 59ac438c6b | |||
| 3aec6cf0fe | |||
| e3dfbe13b3 | |||
| 1e3e80bb39 | |||
| 581dae2da0 | |||
| a866043016 | |||
| 4f2b0ae1c9 | |||
| 79a784c4d6 | |||
| dd3326384f | |||
| 462b6e746c | |||
| 93aa5239a0 | |||
| 7f5ce42e30 | |||
| 7d6442889d | |||
| 72f5017073 | |||
| da00323434 | |||
| d726db79c5 | |||
| 148d36993e | |||
| e12bb97dc5 | |||
| ff2b08f99c | |||
| d226322162 | |||
| 3463c27a30 | |||
| 13e6b94700 | |||
| dfc45c1b97 | |||
| e52a144303 | |||
| 43dcaf3bb6 | |||
| b0f269389e | |||
| 0d40cb1e4d | |||
| 5a1d7a1769 | |||
| 7855ab5635 | |||
| d3d894744d | |||
| 2c85b75239 | |||
| 87e9839293 | |||
| a73ca01e07 | |||
| e200616a7b | |||
| d21dc0ed72 | |||
| 48bd1142c9 | |||
| 5ec1fd3d9e | |||
| e6b1a6a976 | |||
| 996acce876 | |||
| 5f8f4499da | |||
| f7e3306ab0 | |||
| 28a463e028 | |||
| 928b43f75e | |||
| c6fc9716eb | |||
| 9d66195840 | |||
| 61893d0b8e | |||
| ebaac3df80 | |||
| 982069db84 | |||
| 9c47743020 | |||
| 91123e2c82 | |||
| 81441dd34a | |||
| 6ee54c0729 | |||
| 2c3f586529 | |||
| e1578ed9a4 | |||
| cccd10cb5b | |||
| a552bd55af | |||
| 75c167a25a | |||
| 41e6c1f1fd | |||
| 38bb3cf454 | |||
| 9d94692945 | |||
| 1763b7e380 | |||
| 621ca63a7b |
+142
@@ -0,0 +1,142 @@
|
||||
autom4te.cache
|
||||
config.h
|
||||
config.log
|
||||
config.status
|
||||
cups-config
|
||||
Makedefs
|
||||
*.a
|
||||
*.cgi
|
||||
*.dylib
|
||||
*.gz
|
||||
*.o
|
||||
*.so
|
||||
*.so.*
|
||||
backend/dnssd
|
||||
backend/http
|
||||
backend/ipp
|
||||
backend/lpd
|
||||
backend/mdns
|
||||
backend/snmp
|
||||
backend/socket
|
||||
backend/test1284
|
||||
backend/testbackend
|
||||
backend/testsupplies
|
||||
backend/usb
|
||||
berkeley/lpc
|
||||
berkeley/lpq
|
||||
berkeley/lpr
|
||||
berkeley/lprm
|
||||
cgi-bin/testcgi
|
||||
cgi-bin/testhi
|
||||
cgi-bin/testhi.index
|
||||
cgi-bin/testtemplate
|
||||
conf/cups-files.conf
|
||||
conf/cupsd.conf
|
||||
conf/mime.convs
|
||||
conf/pam.std
|
||||
conf/snmp.conf
|
||||
cups/locale/
|
||||
cups/test.pwg
|
||||
cups/testadmin
|
||||
cups/testarray
|
||||
cups/testcache
|
||||
cups/testconflicts
|
||||
cups/testcups
|
||||
cups/testdest
|
||||
cups/testfile
|
||||
cups/testhttp
|
||||
cups/testi18n
|
||||
cups/testipp
|
||||
cups/testlang
|
||||
cups/testoptions
|
||||
cups/testppd
|
||||
cups/testpwg
|
||||
cups/testsnmp
|
||||
cups/tlscheck
|
||||
desktop/cups.desktop
|
||||
doc/index.html
|
||||
filter/commandtops
|
||||
filter/gziptoany
|
||||
filter/pstops
|
||||
filter/rasterbench
|
||||
filter/rastertoepson
|
||||
filter/rastertohp
|
||||
filter/rastertolabel
|
||||
filter/rastertopwg
|
||||
filter/test.raster
|
||||
filter/testraster
|
||||
locale/checkpo
|
||||
locale/po2strings
|
||||
locale/strings2po
|
||||
man/client.conf.man
|
||||
man/cups-files.conf.man
|
||||
man/cups-lpd.man
|
||||
man/cups-snmp.man
|
||||
man/cupsaddsmb.man
|
||||
man/cupsd.conf.man
|
||||
man/cupsd.man
|
||||
man/lpoptions.man
|
||||
man/mantohtml
|
||||
monitor/bcp
|
||||
monitor/tbcp
|
||||
notifier/mailto
|
||||
notifier/rss
|
||||
notifier/testnotify
|
||||
packaging/cups.list
|
||||
ppdc/genstrings
|
||||
ppdc/ppd/
|
||||
ppdc/ppd2/
|
||||
ppdc/ppdc
|
||||
ppdc/ppdc-static
|
||||
ppdc/ppdhtml
|
||||
ppdc/ppdi
|
||||
ppdc/ppdi-static
|
||||
ppdc/ppdmerge
|
||||
ppdc/ppdpo
|
||||
ppdc/sample-import.drv
|
||||
ppdc/sample.c
|
||||
ppdc/testcatalog
|
||||
scheduler/convert
|
||||
scheduler/cups-deviced
|
||||
scheduler/cups-driverd
|
||||
scheduler/cups-exec
|
||||
scheduler/cups-lpd
|
||||
scheduler/cups-lpd.xinetd
|
||||
scheduler/cups.sh
|
||||
scheduler/cups.xml
|
||||
scheduler/cupsd
|
||||
scheduler/cupsfilter
|
||||
scheduler/org.cups.cups-lpd.plist
|
||||
scheduler/org.cups.cups-lpdAT.service
|
||||
scheduler/org.cups.cupsd.path
|
||||
scheduler/org.cups.cupsd.service
|
||||
scheduler/org.cups.cupsd.socket
|
||||
scheduler/testlpd
|
||||
scheduler/testmime
|
||||
scheduler/testspeed
|
||||
scheduler/testsub
|
||||
systemv/accept
|
||||
systemv/cancel
|
||||
systemv/cupsaccept
|
||||
systemv/cupsaddsmb
|
||||
systemv/cupsctl
|
||||
systemv/cupsdisable
|
||||
systemv/cupsenable
|
||||
systemv/cupsreject
|
||||
systemv/cupstestdsc
|
||||
systemv/cupstestppd
|
||||
systemv/lp
|
||||
systemv/lpadmin
|
||||
systemv/lpinfo
|
||||
systemv/lpmove
|
||||
systemv/lpoptions
|
||||
systemv/lpstat
|
||||
systemv/reject
|
||||
templates/header.tmpl
|
||||
test/cups-str-*.html
|
||||
test/error_log-*
|
||||
test/ippfind
|
||||
test/ippfind-static
|
||||
test/ippserver
|
||||
test/ipptool
|
||||
test/ipptool-static
|
||||
@@ -0,0 +1,215 @@
|
||||
CHANGES-2.0.txt
|
||||
---------------
|
||||
|
||||
CHANGES IN CUPS V2.0.4
|
||||
|
||||
- Fixed a bug in cupsRasterWritePixels (STR #4650)
|
||||
- Fixed redirection in the web interface (STR #4538)
|
||||
- The IPP backend did not respond to side-channel requests (STR #4645)
|
||||
- The scheduler did not start all pending jobs at once (STR #4646)
|
||||
- The web search incorrectly searched time-at-xxx values (STR #4652)
|
||||
- Fixed an RPM spec file issue (STR #4657)
|
||||
- The scheduler incorrectly started jobs while canceling multiple jobs
|
||||
(STR #4648)
|
||||
- Fixed processing of server overrides without port numbers (STR #4675)
|
||||
- Documentation changes (STR #4651, STR #4674)
|
||||
|
||||
|
||||
CHANGES IN CUPS V2.0.3
|
||||
|
||||
- Security: Fixed CERT VU #810572 exploiting the dynamic linker
|
||||
(STR #4609)
|
||||
- Security: The scheduler could hang with malformed gzip data
|
||||
(STR #4602)
|
||||
- Restored missing generic printer icon file (STR #4587)
|
||||
- Fixed logging of configuration errors to show up as errors (STR #4582)
|
||||
- Fixed potential buffer overflows in raster code and filters
|
||||
(STR #4598, STR #4599, STR #4600, STR #4601)
|
||||
- Fixed a gzip processing bug (#4602)
|
||||
- Fixed <Limit> inside <Location> (STR #4575)
|
||||
- Fixed lpadmin when both -m and -o are used (STR #4578)
|
||||
- The web interface always showed support for 2-sided printing
|
||||
(STR #4595)
|
||||
- cupsRasterReadHeader did not fully validate the raster header
|
||||
(STR #4596)
|
||||
- The rastertopwg filter did not check for truncated input (STR #4597)
|
||||
- The cups-lpd mini-daemon did not check for request parameters
|
||||
(STR #4603)
|
||||
- The scheduler could get caught in a busy loop (STR #4605)
|
||||
- The sample Epson driver could crash (STR #4616)
|
||||
- The IPP backend now correctly monitors jobs
|
||||
(<rdar://problem/20495955>)
|
||||
- The ppdhtml and ppdpo utilities crashed when the -D option was used
|
||||
before a driver information file (STR #4627)
|
||||
- ippfind incorrectly substituted "=port" for service_port.
|
||||
- The IPP/1.1 test file did not handle the initial print job
|
||||
completing early (STR #4576)
|
||||
- Fixed a memory leak in cupsConnectDest (STR #4634)
|
||||
- PWG Raster Format output contained invalid ImageBox values
|
||||
(<rdar://problem/21144309>)
|
||||
- Added Russian translation (STR #4577)
|
||||
- Added German translation (STR #4635)
|
||||
|
||||
|
||||
CHANGES IN CUPS V2.0.2
|
||||
|
||||
- Security: cupsRasterReadPixels buffer overflow with invalid page
|
||||
header and compressed raster data (STR #4551)
|
||||
- Command-line programs were not localized on Mac OS X
|
||||
(<rdar://problem/14546232>)
|
||||
- The scheduler incorrectly cleared the MakeModel string in the
|
||||
printers.conf file after a restart (<rdar://problem/16827518>)
|
||||
- CUPS did not compile with older versions of GNU TLS (STR #4527)
|
||||
- CUPS did not compile without Avahi or mDNSResponder (STR #4523)
|
||||
- ippLength() did not return the correct length for IPP_TAG_CONST
|
||||
string values.
|
||||
- The scheduler incorrectly aborted jobs after a job was restarted
|
||||
(<rdar://problem/19129387>)
|
||||
- The cups-files.conf file contained the old ServerCertificate/Key
|
||||
directives instead of ServerKeychain.
|
||||
- Fixed builds when no SSL/TLS library is available, or when explicitly
|
||||
disabled (STR #4531)
|
||||
- Fixed an OpenBSD charset transcoding issue.
|
||||
- Fixed USB printing on OpenBSD (STR #4525)
|
||||
- The --without-xinetd configure option did not work (STR #4542)
|
||||
- Backends needing to load OS X kernel extensions did not work
|
||||
(<rdar://problem/19015679>)
|
||||
- Mapping of PPD keywords to IPP keywords did not work if the PPD
|
||||
keyword was already an IPP keyword (<rdar://problem/19121005>)
|
||||
- cupsGetPPD* sent bad requests (STR #4567)
|
||||
- ippserver used the wrong temporary directory on Windows (STR #4547)
|
||||
- ippserver did not handle Bonjour registrations properly (STR #4548)
|
||||
- The scheduler could crash during shutdown if Avahi was shutdown
|
||||
first (STR #4550)
|
||||
- Added a USB quirk rule for Intermec printers (STR #4553)
|
||||
- The scheduler did not always log which configuration file had the
|
||||
error (STR #4559)
|
||||
- The ippfind and ipptool programs now correctly match hostnames with
|
||||
trailing dots (STR #4563)
|
||||
- The ipptool timeout option did not work (STR #4515)
|
||||
- Fixed several issues with client.conf, CUPS_SERVER, and the "-h"
|
||||
option of most commands (STR #4528)
|
||||
- Another change for OpenBSD (STR #4526)
|
||||
- Added Japanese localization (STR #4524)
|
||||
- Documentation changes (STR #4569)
|
||||
|
||||
|
||||
CHANGES IN CUPS V2.0.1
|
||||
|
||||
- Security: SSLv3 is now disabled by default to protect against the
|
||||
POODLE attack (STR #4476)
|
||||
- Printer sharing did not work when systemd was being used (STR #4497)
|
||||
- cupsGetPPD* would return a symlink to the PPD in /etc/cups/ppd even if
|
||||
it was not readable by the user (STR #4500)
|
||||
- The web interface now protects against frame "click-jacking" attacks
|
||||
(STR #4492)
|
||||
- Fixed a crash in ippAttributeString (<rdar://problem/17903871>)
|
||||
- Fixed a crash in the scheduler on Linux/*BSD if colord was not running
|
||||
(STR #4496)
|
||||
- Fixed a random crash in the scheduler when not using systemd
|
||||
(STR #4484)
|
||||
- Added systemd support for cups-lpd (STR #4493)
|
||||
- The scheduler did not honor the FatalErrors directive for mis-
|
||||
configured Group and SystemGroup values (STR #4495)
|
||||
- The network backends no longer report waste-receptacle conditions when
|
||||
using SNMP (STR #4499)
|
||||
- The IPP backend did not work with some configurations of Windows
|
||||
(STR #4503)
|
||||
- RPMs did not build (STR #4490)
|
||||
- Added a USB quirk rule for the Brother HL-1250 (STR #4519)
|
||||
- Fixed compiles on unsupported platforms (STR #4510)
|
||||
- "cancel -a" did not cancel all jobs on all destinations (STR #4513)
|
||||
- The web interface did not work on OpenBSD (STR #4496)
|
||||
|
||||
|
||||
CHANGES IN CUPS V2.0.0
|
||||
|
||||
- The scheduler did not preserve listener sockets from launchd or
|
||||
systemd after a restart (<rdar://problem/18112848>)
|
||||
- Added some USB quirk rules for the libusb-based USB backend
|
||||
(STR #4482)
|
||||
- Spanish localization update (STR #4487)
|
||||
- Updated documentation for 2.0.0 release.
|
||||
|
||||
|
||||
CHANGES IN CUPS V2.0rc1
|
||||
|
||||
- Documentation updates (STR #4464)
|
||||
- The scheduler now monitors the AC power status on OS X, allowing for
|
||||
"sleep printing" when sharing printers (<rdar://problem/17325852>)
|
||||
- The scheduler incorrectly called launch_activate_socket multiple times
|
||||
on OS X (<rdar://problem/17523218>)
|
||||
- The ippserver test program now passes the IPP Everywhere self-
|
||||
certification tests (STR #4101)
|
||||
- Relaxed the new OS X filter sandbox slightly (STR #4471,
|
||||
<rdar://problem/17483959>)
|
||||
- Dropped the old Epson Stylus Color/Photo sample drivers since they
|
||||
don't work with any current printers and there are free alternatives
|
||||
that produce much better output (<rdar://problem/18036889>)
|
||||
- Log and configuration files that are not world-readable are again
|
||||
accessible via the web interface (STR #4461)
|
||||
- PPD files are now created using the permissions specified by the
|
||||
ConfigFilePerm directive.
|
||||
- Fixed RPM build issues (STR #4459)
|
||||
- Fixed the spinner image and restart page when reconfiguring the
|
||||
scheduler through the web interface (STR #4475)
|
||||
|
||||
|
||||
CHANGES IN CUPS V2.0b1
|
||||
|
||||
- Added a "--list-filters" option to the cupsfilter command (STR #4325)
|
||||
- Added systemd support (STR #3917)
|
||||
- Added support for re-sending a job as a raster file if a higher-level
|
||||
format such as PDF fails (<rdar://problem/15583721>)
|
||||
- Added support for regular expression matching in the MIME type rules
|
||||
(<rdar://problem/11131245>)
|
||||
- Added support for TLS certificate validation and policy enforcement
|
||||
(STR #1616)
|
||||
- Added support for simultaneous XML and test output from ipptool.
|
||||
- Added support for PAUSE directive in ipptool test files.
|
||||
- Added support for auto-typing of TIFF files by ipptool (STR #4418)
|
||||
- The scheduler now returns completed jobs in the correct newest-to-
|
||||
oldest order (STR #4396)
|
||||
- The configure script now supports target-specific tools for pkg-config
|
||||
and others (STR #4423)
|
||||
- The ipptool program now supports EXPECT statements for collection
|
||||
member attributes (<rdar://problem/15355218>)
|
||||
- The ipptool program now supports collection attributes with multiple
|
||||
values (<rdar://problem/15355124>)
|
||||
- The sample drivers now include all of the installed localizations by
|
||||
default (<rdar://problem/14756625>)
|
||||
- Adopted Linux man page conventions and updated all man pages
|
||||
(STR #4372, STR #4329)
|
||||
- The scheduler now supports the "first-index" operation attribute for
|
||||
the Get-Jobs operation (STR #2913)
|
||||
- Changed the default AccessLogLevel and PageLogFormat to disable the
|
||||
access_log and page_log files by default (<rdar://problem/16495000>)
|
||||
- cupsRasterInterpretPPD now supports the Orientation header in order to
|
||||
support long-edge feed raster printers (<rdar://problem/15837926>)
|
||||
- The scheduler now allows run-as-root backends to have group read and
|
||||
execute permissions (STR #2935)
|
||||
- The ippFindAttribute and ippFindNextAttribute functions now support
|
||||
hierarchical searches (STR #4395)
|
||||
- Dropped OpenSSL support in favor of GNU TLS.
|
||||
- Dropped "dark wake" support on OS X, which was preventing portables
|
||||
from going to sleep when there was a stuck job. We now use a variation
|
||||
of the CUPS 1.4 sleep support to do a cleaner sleep
|
||||
(<rdar://problem/14323704>)
|
||||
- Dropped support for AIX, HP-UX, and OSF/1 (aka Digital UNIX)
|
||||
- Dropped lppasswd and support for Digest authentication in in the
|
||||
scheduler (STR #4321)
|
||||
- The cupsGetClasses, cupsGetPrinters, and cupsTempFile functions are no
|
||||
longer supported.
|
||||
- The scheduler now caches more job history data and limits the number
|
||||
of completed jobs returned by Get-Jobs as needed in order to prevent a
|
||||
denial-of-service on busy servers (STR #2913)
|
||||
- The filter/backend sandbox on OS X now defaults to a more strict
|
||||
whitelist (<rdar://problem/15939788>)
|
||||
- Increased the default idle exit timeout to 60 seconds on OS X
|
||||
(<rdar://problem/16041820>)
|
||||
- Printer classes were not accessible on OS X
|
||||
(<rdar://problem/16385643>)
|
||||
- The scheduler now uses </DefaultPrinter> to close the default printer
|
||||
definition in printers.conf (STR #4153)
|
||||
- Canceling all jobs in the web interface now just cancels the jobs
|
||||
(STR #1914)
|
||||
@@ -0,0 +1,139 @@
|
||||
CHANGES-2.1.txt
|
||||
---------------
|
||||
|
||||
CHANGES IN CUPS V2.1.4
|
||||
|
||||
- Documentation update (STR #4772)
|
||||
|
||||
|
||||
CHANGES IN CUPS V2.1.3
|
||||
|
||||
- The default password function did not work on some platforms
|
||||
(STR #4750)
|
||||
- The scheduler should not exit under memory pressure
|
||||
(<rdar://problem/23255001>)
|
||||
- The EPL2 and ZPL sample drivers did not properly support the CutMedia
|
||||
option.
|
||||
- Pending subscriptions would prevent the scheduler from idle exiting
|
||||
(STR #4754)
|
||||
- Fixed some issues in ipptool for skipped tests
|
||||
(<rdar://problem/24137160>)
|
||||
- The "lp -H resume" command did not reset the "job-state-reasons"
|
||||
attribute value (STR #4752)
|
||||
- cupsEncodeOptions2 incorrectly handled escaped values
|
||||
(<rdar://problem/19736672>)
|
||||
- The scheduler did not allow access to resource files (icons, etc.)
|
||||
when the web interface was disabled (STR #4755)
|
||||
- Localization fix (STR #4756)
|
||||
|
||||
|
||||
CHANGES IN CUPS V2.1.2
|
||||
|
||||
- Re-release of CUPS 2.1.1 as CUPS 2.1.2 due to error in tagging of the
|
||||
2.1.1 release (pulled content from the 2.2.x tree instead)
|
||||
|
||||
|
||||
CHANGES IN CUPS V2.1.1
|
||||
|
||||
- Security hardening fixes (<rdar://problem/23131948>,
|
||||
<rdar://problem/23132108>, <rdar://problem/23132353>,
|
||||
<rdar://problem/23132803>, <rdar://problem/23133230>,
|
||||
<rdar://problem/23133393>, <rdar://problem/23133466>,
|
||||
<rdar://problem/23133833>, <rdar://problem/23133998>,
|
||||
<rdar://problem/23134228>, <rdar://problem/23134299>,
|
||||
<rdar://problem/23134356>, <rdar://problem/23134415>,
|
||||
<rdar://problem/23134506>, <rdar://problem/23135066>,
|
||||
<rdar://problem/23135122>, <rdar://problem/23135207>,
|
||||
<rdar://problem/23144290>, <rdar://problem/23144358>,
|
||||
<rdar://problem/23144461>)
|
||||
- The cupsGetPPD* functions did not work with IPP printers (STR #4725)
|
||||
- Some older HP LaserJet printers need a delayed close when printing
|
||||
using the libusb-based USB backend (STR #4549)
|
||||
- The libusb-based USB backend did not unload the kernel usblp module
|
||||
if it was preventing the backend from accessing the printer
|
||||
(STR #4707)
|
||||
- Current Primera printers were incorrectly reported as Fargo printers
|
||||
(STR #4708)
|
||||
- The IPP backend did not always handle jobs getting canceled at the
|
||||
printer (<rdar://problem/22716820>)
|
||||
- Scheduler logging change (STR #4728)
|
||||
- Added USB quirk for Canon MP530 (STR #4730)
|
||||
- The scheduler did not deliver job notifications for jobs submitted to
|
||||
classes (STR #4733)
|
||||
- Changing the printer-is-shared value for a remote queue did not
|
||||
produce an error (STR #4738)
|
||||
- The IPP backend incorrectly included the job-password attribute in
|
||||
Validate-Job requests (<rdar://problem/23531939>)
|
||||
- Updated localizations (STR #4709)
|
||||
|
||||
|
||||
CHANGES IN CUPS V2.1.0
|
||||
|
||||
- Fixed more scheduler crash bugs in the new logging code (STR #4687,
|
||||
STR #4690)
|
||||
- The scheduler did not use the ConfigFilePerm setting when copying PPD
|
||||
files or interface scripts attached to a request (STR #4703)
|
||||
- Now support new Chinese locale IDs and their correct fallback locales
|
||||
(<rdar://problem/22086642>, <rdar://problem/22130168>)
|
||||
- "make check" incorrectly reported an expectation of 18 warning
|
||||
messages when 8 were expected (STR #4684)
|
||||
- The new PDF file type rule did not work (STR #4692)
|
||||
- The scheduler did not update the jobs.cache file when job files were
|
||||
expired (STR #4706)
|
||||
- Fixed some configure script issues (STR #4694, STR #4695, STR #4698)
|
||||
- Documentation updates (STR #4691, STR #4693)
|
||||
|
||||
|
||||
CHANGES IN CUPS V2.1rc1
|
||||
|
||||
- Added support for 3D printers (basic types only, no built-in filters)
|
||||
based on PWG white paper.
|
||||
- Fixed bugs in the new journald support (STR #4655, STR #4658,
|
||||
STR #4661)
|
||||
- Fixed domain socket support on Linux (STR #4679)
|
||||
- Fixed signal handlers in the dnssd and usb backends (STR #4671)
|
||||
- <Limit All> in <Policy> sections now applies to all operations when
|
||||
used by itself (STR #4659)
|
||||
- Configure script changes for systemd support (STR #4669)
|
||||
- Updated autoconf sources to use newer form of AC_INIT (STR #4664)
|
||||
|
||||
|
||||
CHANGES IN CUPS V2.1b1
|
||||
|
||||
- Improved speed of ppdMarkDefaults for complex/large PPDs
|
||||
(<rdar://problem/15146999>)
|
||||
- The IPP backend now stops sending print data if the printer indicates
|
||||
the job has been aborted or canceled (<rdar://problem/17837631>)
|
||||
- The IPP backend now sends the job-pages-per-set attribute when
|
||||
printing multiple copy jobs with finishings
|
||||
(<rdar://problem/16792757>)
|
||||
- The IPP backend now updates the cupsMandatory values when the printer
|
||||
configuration changes (<rdar://problem/18126570>)
|
||||
- No longer install banner files since third-party banner filters now
|
||||
supply their own (STR #4518)
|
||||
- Added support for EXPECT-ALL directive in ipptool test files
|
||||
(STR #4469)
|
||||
- Added support for WITH-VALUE-FROM predicate in ipptool test files
|
||||
(STR #4470)
|
||||
- The scheduler no longer listens on the loopback interface unless the
|
||||
web interface or printer sharing are enabled
|
||||
(<rdar://problem/9136448>)
|
||||
- Added a PPD generator for IPP Everywhere printers (STR #4258)
|
||||
- Now install "default" versions of more configuration files
|
||||
(<rdar://problem/19024491>)
|
||||
- The cupstestppd program did not handle "maxsize(nnn)" entries in
|
||||
cupsFilter/cupsFilter2 values (<rdar://problem/18974858>)
|
||||
- The scheduler now checks the return value of rename() calls
|
||||
(STR #4589)
|
||||
- The scheduler now validates ErrorPolicy values in config files
|
||||
(STR #4591)
|
||||
- Long cookies caused the web interface to stop working (STR #4619)
|
||||
- Added SSLOptions values to allow Diffie-Hellman key exchange and
|
||||
disable TLS/1.0 support.
|
||||
- Updated the scheduler to support more IPP Everywhere attributes
|
||||
(STR #4630)
|
||||
- The scheduler now supports advanced ASL and journald logging when
|
||||
"syslog" output is configured (STR #4474)
|
||||
- The scheduler now supports logging to stderr when running in the
|
||||
foreground (STR #4505)
|
||||
|
||||
+19
-198
@@ -1,201 +1,22 @@
|
||||
CHANGES.txt - 2.0.3 - 2015-06-08
|
||||
CHANGES.txt - 2.2b1 - 2016-03-10
|
||||
--------------------------------
|
||||
|
||||
CHANGES IN CUPS V2.0.3
|
||||
CHANGES IN CUPS V2.2b1
|
||||
|
||||
- Security: Fixed CERT VU #810572 exploiting the dynamic linker
|
||||
(STR #4609)
|
||||
- Security: The scheduler could hang with malformed gzip data
|
||||
(STR #4602)
|
||||
- Restored missing generic printer icon file (STR #4587)
|
||||
- Fixed logging of configuration errors to show up as errors (STR #4582)
|
||||
- Fixed potential buffer overflows in raster code and filters
|
||||
(STR #4598, STR #4599, STR #4600, STR #4601)
|
||||
- Fixed a gzip processing bug (#4602)
|
||||
- Fixed <Limit> inside <Location> (STR #4575)
|
||||
- Fixed lpadmin when both -m and -o are used (STR #4578)
|
||||
- The web interface always showed support for 2-sided printing
|
||||
(STR #4595)
|
||||
- cupsRasterReadHeader did not fully validate the raster header
|
||||
(STR #4596)
|
||||
- The rastertopwg filter did not check for truncated input (STR #4597)
|
||||
- The cups-lpd mini-daemon did not check for request parameters
|
||||
(STR #4603)
|
||||
- The scheduler could get caught in a busy loop (STR #4605)
|
||||
- The sample Epson driver could crash (STR #4616)
|
||||
- The IPP backend now correctly monitors jobs
|
||||
(<rdar://problem/20495955>)
|
||||
- The ppdhtml and ppdpo utilities crashed when the -D option was used
|
||||
before a driver information file (STR #4627)
|
||||
- ippfind incorrectly substituted "=port" for service_port.
|
||||
- The IPP/1.1 test file did not handle the initial print job
|
||||
completing early (STR #4576)
|
||||
- Fixed a memory leak in cupsConnectDest (STR #4634)
|
||||
- PWG Raster Format output contained invalid ImageBox values
|
||||
(<rdar://problem/21144309>)
|
||||
- Added Russian translation (STR #4577)
|
||||
- Added German translation (STR #4635)
|
||||
|
||||
|
||||
CHANGES IN CUPS V2.0.2
|
||||
|
||||
- Security: cupsRasterReadPixels buffer overflow with invalid page
|
||||
header and compressed raster data (STR #4551)
|
||||
- Command-line programs were not localized on Mac OS X
|
||||
(<rdar://problem/14546232>)
|
||||
- The scheduler incorrectly cleared the MakeModel string in the
|
||||
printers.conf file after a restart (<rdar://problem/16827518>)
|
||||
- CUPS did not compile with older versions of GNU TLS (STR #4527)
|
||||
- CUPS did not compile without Avahi or mDNSResponder (STR #4523)
|
||||
- ippLength() did not return the correct length for IPP_TAG_CONST
|
||||
string values.
|
||||
- The scheduler incorrectly aborted jobs after a job was restarted
|
||||
(<rdar://problem/19129387>)
|
||||
- The cups-files.conf file contained the old ServerCertificate/Key
|
||||
directives instead of ServerKeychain.
|
||||
- Fixed builds when no SSL/TLS library is available, or when explicitly
|
||||
disabled (STR #4531)
|
||||
- Fixed an OpenBSD charset transcoding issue.
|
||||
- Fixed USB printing on OpenBSD (STR #4525)
|
||||
- The --without-xinetd configure option did not work (STR #4542)
|
||||
- Backends needing to load OS X kernel extensions did not work
|
||||
(<rdar://problem/19015679>)
|
||||
- Mapping of PPD keywords to IPP keywords did not work if the PPD
|
||||
keyword was already an IPP keyword (<rdar://problem/19121005>)
|
||||
- cupsGetPPD* sent bad requests (STR #4567)
|
||||
- ippserver used the wrong temporary directory on Windows (STR #4547)
|
||||
- ippserver did not handle Bonjour registrations properly (STR #4548)
|
||||
- The scheduler could crash during shutdown if Avahi was shutdown
|
||||
first (STR #4550)
|
||||
- Added a USB quirk rule for Intermec printers (STR #4553)
|
||||
- The scheduler did not always log which configuration file had the
|
||||
error (STR #4559)
|
||||
- The ippfind and ipptool programs now correctly match hostnames with
|
||||
trailing dots (STR #4563)
|
||||
- The ipptool timeout option did not work (STR #4515)
|
||||
- Fixed several issues with client.conf, CUPS_SERVER, and the "-h"
|
||||
option of most commands (STR #4528)
|
||||
- Another change for OpenBSD (STR #4526)
|
||||
- Added Japanese localization (STR #4524)
|
||||
- Documentation changes (STR #4569)
|
||||
|
||||
|
||||
CHANGES IN CUPS V2.0.1
|
||||
|
||||
- Security: SSLv3 is now disabled by default to protect against the
|
||||
POODLE attack (STR #4476)
|
||||
- Printer sharing did not work when systemd was being used (STR #4497)
|
||||
- cupsGetPPD* would return a symlink to the PPD in /etc/cups/ppd even if
|
||||
it was not readable by the user (STR #4500)
|
||||
- The web interface now protects against frame "click-jacking" attacks
|
||||
(STR #4492)
|
||||
- Fixed a crash in ippAttributeString (<rdar://problem/17903871>)
|
||||
- Fixed a crash in the scheduler on Linux/*BSD if colord was not running
|
||||
(STR #4496)
|
||||
- Fixed a random crash in the scheduler when not using systemd
|
||||
(STR #4484)
|
||||
- Added systemd support for cups-lpd (STR #4493)
|
||||
- The scheduler did not honor the FatalErrors directive for mis-
|
||||
configured Group and SystemGroup values (STR #4495)
|
||||
- The network backends no longer report waste-receptacle conditions when
|
||||
using SNMP (STR #4499)
|
||||
- The IPP backend did not work with some configurations of Windows
|
||||
(STR #4503)
|
||||
- RPMs did not build (STR #4490)
|
||||
- Added a USB quirk rule for the Brother HL-1250 (STR #4519)
|
||||
- Fixed compiles on unsupported platforms (STR #4510)
|
||||
- "cancel -a" did not cancel all jobs on all destinations (STR #4513)
|
||||
- The web interface did not work on OpenBSD (STR #4496)
|
||||
|
||||
|
||||
CHANGES IN CUPS V2.0.0
|
||||
|
||||
- The scheduler did not preserve listener sockets from launchd or
|
||||
systemd after a restart (<rdar://problem/18112848>)
|
||||
- Added some USB quirk rules for the libusb-based USB backend
|
||||
(STR #4482)
|
||||
- Spanish localization update (STR #4487)
|
||||
- Updated documentation for 2.0.0 release.
|
||||
|
||||
|
||||
CHANGES IN CUPS V2.0rc1
|
||||
|
||||
- Documentation updates (STR #4464)
|
||||
- The scheduler now monitors the AC power status on OS X, allowing for
|
||||
"sleep printing" when sharing printers (<rdar://problem/17325852>)
|
||||
- The scheduler incorrectly called launch_activate_socket multiple times
|
||||
on OS X (<rdar://problem/17523218>)
|
||||
- The ippserver test program now passes the IPP Everywhere self-
|
||||
certification tests (STR #4101)
|
||||
- Relaxed the new OS X filter sandbox slightly (STR #4471,
|
||||
<rdar://problem/17483959>)
|
||||
- Dropped the old Epson Stylus Color/Photo sample drivers since they
|
||||
don't work with any current printers and there are free alternatives
|
||||
that produce much better output (<rdar://problem/18036889>)
|
||||
- Log and configuration files that are not world-readable are again
|
||||
accessible via the web interface (STR #4461)
|
||||
- PPD files are now created using the permissions specified by the
|
||||
ConfigFilePerm directive.
|
||||
- Fixed RPM build issues (STR #4459)
|
||||
- Fixed the spinner image and restart page when reconfiguring the
|
||||
scheduler through the web interface (STR #4475)
|
||||
|
||||
|
||||
CHANGES IN CUPS V2.0b1
|
||||
|
||||
- Added a "--list-filters" option to the cupsfilter command (STR #4325)
|
||||
- Added systemd support (STR #3917)
|
||||
- Added support for re-sending a job as a raster file if a higher-level
|
||||
format such as PDF fails (<rdar://problem/15583721>)
|
||||
- Added support for regular expression matching in the MIME type rules
|
||||
(<rdar://problem/11131245>)
|
||||
- Added support for TLS certificate validation and policy enforcement
|
||||
(STR #1616)
|
||||
- Added support for simultaneous XML and test output from ipptool.
|
||||
- Added support for PAUSE directive in ipptool test files.
|
||||
- Added support for auto-typing of TIFF files by ipptool (STR #4418)
|
||||
- The scheduler now returns completed jobs in the correct newest-to-
|
||||
oldest order (STR #4396)
|
||||
- The configure script now supports target-specific tools for pkg-config
|
||||
and others (STR #4423)
|
||||
- The ipptool program now supports EXPECT statements for collection
|
||||
member attributes (<rdar://problem/15355218>)
|
||||
- The ipptool program now supports collection attributes with multiple
|
||||
values (<rdar://problem/15355124>)
|
||||
- The sample drivers now include all of the installed localizations by
|
||||
default (<rdar://problem/14756625>)
|
||||
- Adopted Linux man page conventions and updated all man pages
|
||||
(STR #4372, STR #4329)
|
||||
- The scheduler now supports the "first-index" operation attribute for
|
||||
the Get-Jobs operation (STR #2913)
|
||||
- Changed the default AccessLogLevel and PageLogFormat to disable the
|
||||
access_log and page_log files by default (<rdar://problem/16495000>)
|
||||
- cupsRasterInterpretPPD now supports the Orientation header in order to
|
||||
support long-edge feed raster printers (<rdar://problem/15837926>)
|
||||
- The scheduler now allows run-as-root backends to have group read and
|
||||
execute permissions (STR #2935)
|
||||
- The ippFindAttribute and ippFindNextAttribute functions now support
|
||||
hierarchical searches (STR #4395)
|
||||
- Dropped OpenSSL support in favor of GNU TLS.
|
||||
- Dropped "dark wake" support on OS X, which was preventing portables
|
||||
from going to sleep when there was a stuck job. We now use a variation
|
||||
of the CUPS 1.4 sleep support to do a cleaner sleep
|
||||
(<rdar://problem/14323704>)
|
||||
- Dropped support for AIX, HP-UX, and OSF/1 (aka Digital UNIX)
|
||||
- Dropped lppasswd and support for Digest authentication in in the
|
||||
scheduler (STR #4321)
|
||||
- The cupsGetClasses, cupsGetPrinters, and cupsTempFile functions are no
|
||||
longer supported.
|
||||
- The scheduler now caches more job history data and limits the number
|
||||
of completed jobs returned by Get-Jobs as needed in order to prevent a
|
||||
denial-of-service on busy servers (STR #2913)
|
||||
- The filter/backend sandbox on OS X now defaults to a more strict
|
||||
whitelist (<rdar://problem/15939788>)
|
||||
- Increased the default idle exit timeout to 60 seconds on OS X
|
||||
(<rdar://problem/16041820>)
|
||||
- Printer classes were not accessible on OS X
|
||||
(<rdar://problem/16385643>)
|
||||
- The scheduler now uses </DefaultPrinter> to close the default printer
|
||||
definition in printers.conf (STR #4153)
|
||||
- Canceling all jobs in the web interface now just cancels the jobs
|
||||
(STR #1914)
|
||||
- The IPP backend now continues on to the next job when the remote
|
||||
server/printer puts the job on hold (<rdar://problem/24858548>)
|
||||
- The scheduler did not cancel multi-document jobs immediately
|
||||
(<rdar://problem/24854834>)
|
||||
- The scheduler did not return non-shared printers to local clients
|
||||
unless they connected to the domain socket (<rdar://problem/24566996>)
|
||||
- The scheduler now reads the spool directory if one or more job cache
|
||||
entries point to deleted jobs (<rdar://problem/24048846>)
|
||||
- Added support for disc media sizes (<rdar://problem/20219536>)
|
||||
- The httpAddrConnect and httpConnect* APIs now try connecting to
|
||||
multiple addresses in parallel (<rdar://problem/20643153>)
|
||||
- The cupsd domain socket is no longer world-accessible on OS X
|
||||
(<rdar://problem/7542560>)
|
||||
- Interface scripts are no longer supported for security reasons
|
||||
(<rdar://problem/23135640>)
|
||||
- Added a new cupsHashData API and support for hashed job passwords
|
||||
(<rdar://problem/20221502>)
|
||||
|
||||
@@ -0,0 +1,636 @@
|
||||
CONTRIBUTING.txt - 2016/01/28
|
||||
-----------------------------
|
||||
|
||||
CUPS is developed by Apple Inc. and distributed as open source software under a
|
||||
combination of GNU GPL2 and GNU LGPL2 licenses with exceptions to allow
|
||||
developers on Apple's operating systems to develop CUPS-based software under
|
||||
alternate license terms. Significant contributions to CUPS must be licensed to
|
||||
Apple using the Apple Contributor Agreement:
|
||||
|
||||
https://www.cups.org/AppleContributorAgreement_2011-03-10.pdf
|
||||
|
||||
Contributions should be submitted as attachments to bug reports on the CUPS web
|
||||
site. Changes to existing source files should be submitted as unified diffs
|
||||
(both Subversion and Git produce this format by default) while new source files
|
||||
should be provided as-is or in an archive.
|
||||
|
||||
|
||||
HOW TO CONTACT THE DEVELOPERS
|
||||
|
||||
The CUPS mailing lists are the primary means of asking questions and informally
|
||||
discussing issues and feature requests with the CUPS developers and other
|
||||
experienced CUPS users and developers. The "cups" mailing list is intended for
|
||||
CUPS usage questions and new software announcements while the "cups-devel"
|
||||
mailing list provides a forum for CUPS developers and monitoring new bugs.
|
||||
|
||||
|
||||
INTERFACES
|
||||
|
||||
CUPS interfaces, including the C APIs and command-line arguments, environment
|
||||
variables, configuration files, and output format, are stable across patch
|
||||
versions and are generally backwards-compatible with interfaces used in prior
|
||||
major and minor versions. However, program interfaces such as those used by
|
||||
the scheduler to run filter, port monitor, and backend processes for job
|
||||
processing should only be considered stable from the point of view of a
|
||||
filter, port monitor, or backend. Software that simulates the scheduler in
|
||||
order to run those programs outside of CUPS must necessarily be updated when
|
||||
the corresponding interface is changed in a subsequent CUPS release, otherwise
|
||||
undefined behavior can occur.
|
||||
|
||||
CUPS C APIs starting with an underscore (_) are considered to be private to
|
||||
CUPS and are not subject to the normal guarantees of stability between CUPS
|
||||
releases and must never be used in non-CUPS source code. Similarly,
|
||||
configuration and state files written by CUPS are considered private if a
|
||||
corresponding man page is not provided with the CUPS release. Never rely on
|
||||
undocumented files or formats when developing software for CUPS. Always use a
|
||||
published C API to access data stored in a file to avoid compatibility problems
|
||||
in the future.
|
||||
|
||||
|
||||
BUILD SYSTEM
|
||||
|
||||
The CUPS build system uses GNU autoconf to tailor the library to the local
|
||||
operating system. Project files for the current release of Microsoft Visual
|
||||
Studio are also provided for Microsoft Windows®. To improve portability,
|
||||
makefiles must not make use of features unique to GNU make. See the MAKEFILE
|
||||
GUIDELINES section for a description of the allowed make features and makefile
|
||||
guidelines.
|
||||
|
||||
Additional GNU build programs such as GNU automake and GNU libtool must not be
|
||||
used. GNU automake produces non-portable makefiles which depend on GNU-
|
||||
specific extensions, and GNU libtool is not portable or reliable enough for
|
||||
CUPS.
|
||||
|
||||
|
||||
VERSION NUMBERING
|
||||
|
||||
CUPS uses a three-part version number separated by periods to represent the
|
||||
major, minor, and patch release numbers. Major release numbers indicate large
|
||||
design changes or backwards-incompatible changes to the CUPS API or CUPS
|
||||
Imaging API. Minor release numbers indicate new features and other smaller
|
||||
changes which are backwards-compatible with previous CUPS releases. Patch
|
||||
numbers indicate bug fixes to the previous feature or patch release.
|
||||
|
||||
Note:
|
||||
|
||||
When we talk about compatibility, we are talking about binary compatibility
|
||||
for public APIs and output format compatibility for program interfaces.
|
||||
Changes to configuration file formats or the default behavior of programs
|
||||
are not generally considered incompatible as the upgrade process can
|
||||
normally address such changes gracefully.
|
||||
|
||||
Production releases use the plain version numbers:
|
||||
|
||||
MAJOR.MINOR.PATCH
|
||||
1.0.0
|
||||
...
|
||||
1.1.0
|
||||
...
|
||||
1.1.23
|
||||
...
|
||||
2.0.0
|
||||
...
|
||||
2.1.0
|
||||
2.1.1
|
||||
2.1.2
|
||||
2.1.3
|
||||
|
||||
The first production release in a MAJOR.MINOR series (MAJOR.MINOR.0) is called
|
||||
a feature release. Feature releases are the only releases that may contain new
|
||||
features. Subsequent production releases in a MAJOR.MINOR series may only
|
||||
contain bug fixes.
|
||||
|
||||
Beta-test releases are identified by appending the letter B to the major and
|
||||
minor version numbers followed by the beta release number:
|
||||
|
||||
MAJOR.MINORbNUMBER
|
||||
2.2b1
|
||||
|
||||
Release candidates are identified by appending the letters RC to the major and
|
||||
minor version numbers followed by the release candidate number:
|
||||
|
||||
MAJOR.MINORrcNUMBER
|
||||
2.2rc1
|
||||
|
||||
|
||||
CODING GUIDELINES
|
||||
|
||||
Contributed source code must follow the guidelines below. While the examples
|
||||
are for C and C++ source files, source code for other languages should conform
|
||||
to the same guidelines as allowed by the language.
|
||||
|
||||
|
||||
SOURCE FILES
|
||||
|
||||
All source files names must be 16 characters or less in length to ensure
|
||||
compatibility with older UNIX filesystems. Source files containing functions
|
||||
have an extension of ".c" for C and ".cxx" for C++ source files. All other
|
||||
"include" files have an extension of ".h". Tabs are set to 8 characters or
|
||||
columns.
|
||||
|
||||
Note:
|
||||
|
||||
The ".cxx" extension is used because it is the only common C++ extension
|
||||
between Linux, OS X, UNIX, and Windows.
|
||||
|
||||
The top of each source file contains a header giving the purpose or nature of
|
||||
the source file and the copyright and licensing notice:
|
||||
|
||||
/*
|
||||
* Description of file contents.
|
||||
*
|
||||
* Copyright 2016 by Apple Inc.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
* which should have been included with this file. If this file is
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
*/
|
||||
|
||||
For source files that are subject to the Apple OS-Developed Software exception,
|
||||
the following additional comment appears after the contact information:
|
||||
|
||||
* This file is subject to the Apple OS-Developed Software exception.
|
||||
|
||||
|
||||
HEADER FILES
|
||||
|
||||
All public header files must include the "versioning.h" header file, or a header
|
||||
that does so. Function declarations are then "decorated" with the correct
|
||||
_CUPS_API_major_minor macro to define its availability based on the build
|
||||
environment, for example:
|
||||
|
||||
extern int cupsDoThis(int foo, int bar) _CUPS_API_2_2;
|
||||
|
||||
Private API header files must be named with the suffix "-private", for example
|
||||
the "cups.h" header file defines all of the public CUPS APIs while the
|
||||
"cups-private.h" header file defines all of the private CUPS APIs as well.
|
||||
Typically a private API header file will include the corresponding public API
|
||||
header file.
|
||||
|
||||
|
||||
COMMENTS
|
||||
|
||||
All source code utilizes block comments within functions to describe the
|
||||
operations being performed by a group of statements; avoid putting a comment
|
||||
per line unless absolutely necessary, and then consider refactoring the code
|
||||
so that it is not necessary. C source files use the block comment format
|
||||
("/* comment */") since many vendor C compilers still do not support C99/C++
|
||||
comments ("// comment"):
|
||||
|
||||
/*
|
||||
* Clear the state array before we begin...
|
||||
*/
|
||||
|
||||
for (i = 0; i < (sizeof(array) / sizeof(sizeof(array[0])); i ++)
|
||||
array[i] = CUPS_STATE_IDLE;
|
||||
|
||||
/*
|
||||
* Wait for state changes on another thread...
|
||||
*/
|
||||
|
||||
do
|
||||
{
|
||||
for (i = 0; i < (sizeof(array) / sizeof(sizeof(array[0])); i ++)
|
||||
if (array[i] != CUPS_STATE_IDLE)
|
||||
break;
|
||||
|
||||
if (i == (sizeof(array) / sizeof(array[0])))
|
||||
sleep(1);
|
||||
} while (i == (sizeof(array) / sizeof(array[0])));
|
||||
|
||||
|
||||
INDENTATION
|
||||
|
||||
All code blocks enclosed by brackets begin with the opening brace on a new
|
||||
line. The code then follows starting on a new line after the brace and is
|
||||
indented 2 spaces. The closing brace is then placed on a new line following
|
||||
the code at the original indentation:
|
||||
|
||||
{
|
||||
int i; /* Looping var */
|
||||
|
||||
|
||||
/*
|
||||
* Process foobar values from 0 to 999...
|
||||
*/
|
||||
|
||||
for (i = 0; i < 1000; i ++)
|
||||
{
|
||||
do_this(i);
|
||||
do_that(i);
|
||||
}
|
||||
}
|
||||
|
||||
Single-line statements following "do", "else", "for", "if", and "while" are
|
||||
indented 2 spaces as well. Blocks of code in a "switch" block are indented 4
|
||||
spaces after each "case" and "default" case:
|
||||
|
||||
switch (array[i])
|
||||
{
|
||||
case CUPS_STATE_IDLE :
|
||||
do_this(i);
|
||||
do_that(i);
|
||||
break;
|
||||
|
||||
default :
|
||||
do_nothing(i);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
SPACING
|
||||
|
||||
A space follows each reserved word such as "if", "while", etc. Spaces are not
|
||||
inserted between a function name and the arguments in parenthesis.
|
||||
|
||||
|
||||
RETURN VALUES
|
||||
|
||||
Parenthesis surround values returned from a function:
|
||||
|
||||
return (CUPS_STATE_IDLE);
|
||||
|
||||
|
||||
FUNCTIONS
|
||||
|
||||
Functions with a global scope have a lowercase prefix followed by capitalized
|
||||
words, e.g., "cupsDoThis", "cupsDoThat", "cupsDoSomethingElse", etc. Private
|
||||
global functions begin with a leading underscore, e.g., "_cupsDoThis",
|
||||
"_cupsDoThat", etc.
|
||||
|
||||
Functions with a local scope are declared "static" with lowercase names and
|
||||
underscores between words, e.g., "do_this", "do_that", "do_something_else", etc.
|
||||
|
||||
Each function begins with a comment header describing what the function does,
|
||||
the possible input limits (if any), the possible output values (if any), and
|
||||
any special information needed:
|
||||
|
||||
/*
|
||||
* 'do_this()' - Compute y = this(x).
|
||||
*
|
||||
* Notes: none.
|
||||
*/
|
||||
|
||||
static float /* O - Inverse power value, 0.0 <= y <= 1.1 */
|
||||
do_this(float x) /* I - Power value (0.0 <= x <= 1.1) */
|
||||
{
|
||||
...
|
||||
return (y);
|
||||
}
|
||||
|
||||
Return/output values are indicated using an "O" prefix, input values are
|
||||
indicated using the "I" prefix, and values that are both input and output use
|
||||
the "IO" prefix for the corresponding in-line comment.
|
||||
|
||||
The Mini-XML documentation generator also understands the following special
|
||||
text in the function description comment:
|
||||
|
||||
@deprecated@ - Marks the function as deprecated (not recommended
|
||||
for new development and scheduled for removal)
|
||||
@since CUPS version@ - Marks the function as new in the specified version
|
||||
of CUPS.
|
||||
@private@ - Marks the function as private (same as starting the
|
||||
function name with an underscore)
|
||||
|
||||
|
||||
VARIABLES
|
||||
|
||||
Variables with a global scope are capitalized, e.g., "ThisVariable",
|
||||
"ThatVariable", "ThisStateVariable", etc. Globals in CUPS libraries are either
|
||||
part of the per-thread global values managed by the "_cupsGlobals()" function
|
||||
or are suitably protected for concurrent access. Global variables should be
|
||||
replaced by function arguments whenever possible.
|
||||
|
||||
Variables with a local scope are lowercase with underscores between words,
|
||||
e.g., "this_variable", "that_variable", etc. Any "local global" variables
|
||||
shared by functions within a source file are declared "static". As for global
|
||||
variables, local static variables are suitably protected for concurrent access.
|
||||
|
||||
Each variable is declared on a separate line and is immediately followed by a
|
||||
comment block describing the variable:
|
||||
|
||||
int ThisVariable; /* The current state of this */
|
||||
static int that_variable; /* The current state of that */
|
||||
|
||||
|
||||
TYPES
|
||||
|
||||
All type names are lowercase with underscores between words and "_t" appended
|
||||
to the end of the name, e.g., "cups_this_type_t", "cups_that_type_t", etc.
|
||||
Type names start with a prefix, typically "cups" or the name of the program,
|
||||
to avoid conflicts with system types. Private type names start with an
|
||||
underscore, e.g., "_cups_this_t", "_cups_that_t", etc.
|
||||
|
||||
Each type has a comment block immediately after the typedef:
|
||||
|
||||
typedef int cups_this_type_t; /* This type is for CUPS foobar options. */
|
||||
|
||||
|
||||
STRUCTURES
|
||||
|
||||
All structure names are lowercase with underscores between words and "_s"
|
||||
appended to the end of the name, e.g., "cups_this_s", "cups_that_s", etc.
|
||||
Structure names start with a prefix, typically "cups" or the name of the
|
||||
program, to avoid conflicts with system types. Private structure names start
|
||||
with an underscore, e.g., "_cups_this_s", "_cups_that_s", etc.
|
||||
|
||||
Each structure has a comment block immediately after the struct and each member
|
||||
is documented similar to the variable naming policy above:
|
||||
|
||||
struct cups_this_struct_s /* This structure is for CUPS foobar options. */
|
||||
{
|
||||
int this_member; /* Current state for this */
|
||||
int that_member; /* Current state for that */
|
||||
};
|
||||
|
||||
|
||||
CONSTANTS
|
||||
|
||||
All constant names are uppercase with underscores between words, e.g.,
|
||||
"CUPS_THIS_CONSTANT", "CUPS_THAT_CONSTANT", etc. Constants begin with an
|
||||
uppercase prefix, typically "CUPS" or the program name. Private constants
|
||||
start with an underscore, e.g., "_CUPS_THIS_CONSTANT", "_CUPS_THAT_CONSTANT",
|
||||
etc.
|
||||
|
||||
Typed enumerations should be used whenever possible to allow for type checking
|
||||
by the compiler.
|
||||
|
||||
Comment blocks immediately follow each constant:
|
||||
|
||||
typedef enum cups_tray_e /* Tray enumerations */
|
||||
{
|
||||
CUPS_TRAY_THIS, /* This tray */
|
||||
CUPS_TRAY_THAT /* That tray */
|
||||
} cups_tray_t;
|
||||
|
||||
|
||||
MAKEFILE GUIDELINES
|
||||
|
||||
The following is a guide to the makefile-based build system used by CUPS.
|
||||
These standards have been developed over the years to allow CUPS to be built on
|
||||
as many systems and environments as possible.
|
||||
|
||||
|
||||
GENERAL ORGANIZATION
|
||||
|
||||
The CUPS source code is organized functionally into a top-level makefile,
|
||||
include file, and subdirectories each with their own makefile and dependencies
|
||||
files. The ".in" files are template files for the autoconf software and are
|
||||
used to generate a static version of the corresponding file.
|
||||
|
||||
|
||||
MAKEFILE DOCUMENTATION
|
||||
|
||||
Each makefile starts with the standard CUPS header containing the description
|
||||
of the file, and CUPS copyright and license notice:
|
||||
|
||||
#
|
||||
# Makefile for ...
|
||||
#
|
||||
# Copyright 2016 by Apple Inc.
|
||||
#
|
||||
# These coded instructions, statements, and computer programs are the
|
||||
# property of Apple Inc. and are protected by Federal copyright
|
||||
# law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
# which should have been included with this file. If this file is
|
||||
# file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
#
|
||||
|
||||
|
||||
PORTABLE MAKEFILE CONSTRUCTION
|
||||
|
||||
CUPS uses a common subset of make program syntax to ensure that the software
|
||||
can be compiled "out of the box" on as many systems as possible. The following
|
||||
is a list of assumptions we follow when constructing makefiles:
|
||||
|
||||
- Targets; we assume that the make program supports the notion of simple
|
||||
targets of the form "name:" that perform tab-indented commands that follow
|
||||
the target, e.g.:
|
||||
|
||||
target:
|
||||
<tab> target commands
|
||||
|
||||
- Dependencies; we assume that the make program supports recursive dependencies
|
||||
on targets, e.g.:
|
||||
|
||||
target: foo bar
|
||||
<tab> target commands
|
||||
|
||||
foo: bla
|
||||
<tab> foo commands
|
||||
|
||||
bar:
|
||||
<tab> bar commands
|
||||
|
||||
bla:
|
||||
<tab> bla commands
|
||||
|
||||
- Variable Definition; we assume that the make program supports variable
|
||||
definition on the command-line or in the makefile using the following form:
|
||||
|
||||
name=value
|
||||
|
||||
- Variable Substitution; we assume that the make program supports variable
|
||||
substitution using the following forms:
|
||||
|
||||
- $(name); substitutes the value of "name",
|
||||
- $(name:.old=.new); substitutes the value of "name" with the filename
|
||||
extension ".old" changed to ".new",
|
||||
- $(MAKEFLAGS); substitutes the command-line options passed to the
|
||||
program without the leading hyphen (-),
|
||||
- $$; substitutes a single $ character,
|
||||
- $<; substitutes the current source file or dependency, and
|
||||
- $@; substitutes the current target name.
|
||||
|
||||
- Suffixes; we assume that the make program supports filename suffixes with
|
||||
assumed dependencies, e.g.:
|
||||
|
||||
.SUFFIXES: .c .o
|
||||
.c.o:
|
||||
<tab> $(CC) $(CFLAGS) -o $@ -c $<
|
||||
|
||||
- Include Files; we assume that the make program supports the include
|
||||
directive, e.g.:
|
||||
|
||||
include ../Makedefs
|
||||
include Dependencies
|
||||
|
||||
- Comments; we assume that comments begin with a # character and proceed to the
|
||||
end of the current line.
|
||||
|
||||
- Line Length; we assume that there is no practical limit to the length of
|
||||
lines.
|
||||
|
||||
- Continuation of long lines; we assume that the \ character may be placed at
|
||||
the end of a line to concatenate two or more lines in a makefile to form a
|
||||
single long line.
|
||||
|
||||
- Shell; we assume a POSIX-compatible shell is present on the build system.
|
||||
|
||||
|
||||
STANDARD VARIABLES
|
||||
|
||||
The following variables are defined in the "Makedefs" file generated by the
|
||||
autoconf software:
|
||||
|
||||
- ALL_CFLAGS; the combined C compiler options,
|
||||
- ALL_CXXFLAGS; the combined C++ compiler options,
|
||||
- AMANDIR; the administrative man page installation directory (section 8/1m
|
||||
depending on the platform),
|
||||
- AR; the library archiver command,
|
||||
- ARFLAGS; options for the library archiver command,
|
||||
- AWK; the local awk command,
|
||||
- BINDIR; the binary installation directory,
|
||||
- BUILDROOT; optional installation prefix (defaults to DSTROOT),
|
||||
- CC; the C compiler command,
|
||||
- CFLAGS; options for the C compiler command,
|
||||
- CHMOD; the chmod command,
|
||||
- CXX; the C++ compiler command,
|
||||
- CXXFLAGS; options for the C++ compiler command,
|
||||
- DATADIR; the data file installation directory,
|
||||
- DSO; the C shared library building command,
|
||||
- DSOXX; the C++ shared library building command,
|
||||
- DSOFLAGS; options for the shared library building command,
|
||||
- INCLUDEDIR; the public header file installation directory,
|
||||
- INSTALL; the install command,
|
||||
- INSTALL_BIN; the program installation command,
|
||||
- INSTALL_COMPDATA; the compressed data file installation command,
|
||||
- INSTALL_CONFIG; the configuration file installation command,
|
||||
- INSTALL_DATA; the data file installation command,
|
||||
- INSTALL_DIR; the directory installation command,
|
||||
- INSTALL_LIB; the library installation command,
|
||||
- INSTALL_MAN; the documentation installation command,
|
||||
- INSTALL_SCRIPT; the shell script installation command,
|
||||
- LD; the linker command,
|
||||
- LDFLAGS; options for the linker,
|
||||
- LIBDIR; the library installation directory,
|
||||
- LIBS; libraries for all programs,
|
||||
- LN; the ln command,
|
||||
- MAN1EXT; extension for man pages in section 1,
|
||||
- MAN3EXT; extension for man pages in section 3,
|
||||
- MAN5EXT; extension for man pages in section 5,
|
||||
- MAN7EXT; extension for man pages in section 7,
|
||||
- MAN8DIR; subdirectory for man pages in section 8,
|
||||
- MAN8EXT; extension for man pages in section 8,
|
||||
- MANDIR; the man page installation directory,
|
||||
- OPTIM; common compiler optimization options,
|
||||
- PRIVATEINCLUDE; the private header file installation directory,
|
||||
- RM; the rm command,
|
||||
- SHELL; the sh (POSIX shell) command,
|
||||
- STRIP; the strip command,
|
||||
- srcdir; the source directory.
|
||||
|
||||
|
||||
STANDARD TARGETS
|
||||
|
||||
The following standard targets are defined in each makefile:
|
||||
|
||||
- all; creates all target programs, libraries, and documentation files,
|
||||
- clean; removes all target programs libraries, documentation files, and object
|
||||
files,
|
||||
- depend; generates automatic dependencies for any C or C++ source files (also
|
||||
see "DEPENDENCIES"),
|
||||
- distclean; removes autoconf-generated files in addition to those removed by
|
||||
the "clean" target,
|
||||
- install; installs all distribution files in their corresponding locations
|
||||
(also see "INSTALL/UNINSTALL SUPPORT"),
|
||||
- install-data; installs all data files in their corresponding locations (also
|
||||
see "INSTALL/UNINSTALL SUPPORT"),
|
||||
- install-exec; installs all executable files in their corresponding locations
|
||||
(also see "INSTALL/UNINSTALL SUPPORT"),
|
||||
- install-headers; installs all include files in their corresponding locations
|
||||
(also see "INSTALL/UNINSTALL SUPPORT"),
|
||||
- install-libs; installs all library files in their corresponding locations
|
||||
(also see "INSTALL/UNINSTALL SUPPORT"), and
|
||||
- uninstall; removes all distribution files from their corresponding locations
|
||||
(also see "INSTALL/UNINSTALL SUPPORT").
|
||||
|
||||
|
||||
OBJECT FILES
|
||||
|
||||
Object files (the result of compiling a C or C++ source file) have the
|
||||
extension ".o".
|
||||
|
||||
|
||||
PROGRAMS
|
||||
|
||||
Program files are the result of linking object files and libraries together to
|
||||
form an executable file. A typical program target looks like:
|
||||
|
||||
program: $(OBJS)
|
||||
<tab> echo Linking $@...
|
||||
<tab> $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
|
||||
|
||||
STATIC LIBRARIES
|
||||
|
||||
Static libraries have a prefix of "lib" and the extension ".a". A typical
|
||||
static library target looks like:
|
||||
|
||||
libname.a: $(OBJECTS)
|
||||
<tab> echo Creating $@...
|
||||
<tab> $(RM) $@
|
||||
<tab> $(AR) $(ARFLAGS) $@ $(OBJECTS)
|
||||
<tab> $(RANLIB) $@
|
||||
|
||||
SHARED LIBRARIES
|
||||
|
||||
Shared libraries have a prefix of "lib" and the extension ".dylib" or ".so"
|
||||
depending on the operating system. A typical shared library is composed of
|
||||
several targets that look like:
|
||||
|
||||
libname.so: $(OBJECTS)
|
||||
<tab> echo $(DSOCOMMAND) libname.so.$(DSOVERSION) ...
|
||||
<tab> $(DSOCOMMAND) libname.so.$(DSOVERSION) $(OBJECTS)
|
||||
<tab> $(RM) libname.so libname.so.$(DSOMAJOR)
|
||||
<tab> $(LN) libname.so.$(DSOVERSION) libname.so.$(DSOMAJOR)
|
||||
<tab> $(LN) libname.so.$(DSOVERSION) libname.so
|
||||
|
||||
libname.dylib: $(OBJECTS)
|
||||
<tab> echo $(DSOCOMMAND) libname.$(DSOVERSION).dylib ...
|
||||
<tab> $(DSOCOMMAND) libname.$(DSOVERSION).dylib \
|
||||
<tab> <tab> -install_name $(libdir)/libname.$(DSOMAJOR).dylib \
|
||||
<tab> <tab> -current_version libname.$(DSOVERSION).dylib \
|
||||
<tab> <tab> -compatibility_version $(DSOMAJOR).0 \
|
||||
<tab> <tab> $(OBJECTS) $(LIBS)
|
||||
<tab> $(RM) libname.dylib
|
||||
<tab> $(RM) libname.$(DSOMAJOR).dylib
|
||||
<tab> $(LN) libname.$(DSOVERSION).dylib libname.$(DSOMAJOR).dylib
|
||||
<tab> $(LN) libname.$(DSOVERSION).dylib libname.dylib
|
||||
|
||||
DEPENDENCIES
|
||||
|
||||
Static dependencies are expressed in each makefile following the target, for
|
||||
example:
|
||||
|
||||
foo: bar
|
||||
|
||||
Static dependencies are only used when it is not possible to automatically
|
||||
generate them. Automatic dependencies are stored in a file named
|
||||
"Dependencies" and included at the end of the makefile. The following "depend"
|
||||
target rule is used to create the automatic dependencies:
|
||||
|
||||
depend:
|
||||
<tab> $(CC) -MM $(ALL_CFLAGS) $(OBJS:.o=.c) >Dependencies
|
||||
|
||||
We regenerate the automatic dependencies on an OS X system and express any
|
||||
non-OS X dependencies statically in the makefile.
|
||||
|
||||
|
||||
INSTALL/UNINSTALL SUPPORT
|
||||
|
||||
All makefiles contains install and uninstall rules which install or remove the
|
||||
corresponding software. These rules must use the $(BUILDROOT) variable as a
|
||||
prefix to any installation directory so that CUPS can be installed in a
|
||||
temporary location for packaging by programs like rpmbuild.
|
||||
|
||||
The $(INSTALL_BIN), $(INSTALL_COMPDATA), $(INSTALL_CONFIG), $(INSTALL_DATA),
|
||||
$(INSTALL_DIR), $(INSTALL_LIB), $(INSTALL_MAN), and $(INSTALL_SCRIPT) variables
|
||||
must be used when installing files so that the proper ownership and permissions
|
||||
are set on the installed files.
|
||||
|
||||
The $(RANLIB) command must be run on any static libraries after installation
|
||||
since the symbol table is invalidated when the library is copied on some
|
||||
platforms.
|
||||
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
HTTP/2.0 Implementation Notes - 2013-11-07
|
||||
------------------------------------------
|
||||
|
||||
OVERVIEW
|
||||
|
||||
HTTP/2.0 allows clients to send multiple, simultaneous requests over a
|
||||
single connection, as well as supporting server-side push delivery of
|
||||
content. In the context of IPP, this would allow a single connection to
|
||||
support simultaneous job submission and monitoring.
|
||||
|
||||
This will require changes to the HTTP API used in CUPS, and to cupsd and
|
||||
other CUPS-based servers. This branch tracks that development.
|
||||
|
||||
|
||||
DESIGN
|
||||
|
||||
http_t will be updated to be accessible from multiple threads and track the
|
||||
HTTP state in a thread ID to stream ID/state table. Applications can
|
||||
discover whether a Printer supports HTTP/2.0 with a new httpSupportsVersion
|
||||
API and upgrade to HTTP/2.0 with httpUpgradeToVersion.
|
||||
|
||||
Calling httpPost in HTTP/1.1 mode will serialize requests between threads.
|
||||
Calling httpPost in HTTP/2.0 mode will create a new stream ID and issue
|
||||
requests in parallel.
|
||||
|
||||
Q: How to handle incoming 2.0 requests? New httpServerRunLoop with
|
||||
callback that creates a new thread for all incoming requests and associates
|
||||
the thread with the stream ID. httpWriteResponse is then tied to the stream
|
||||
ID. For 1.1 mode the callback gets called on the current thread (no new
|
||||
threads created).
|
||||
|
||||
Q: How to handle PUSH_PROMISE? New httpPushPromise API that creates a new
|
||||
thread and stream ID?
|
||||
|
||||
|
||||
REFERENCES
|
||||
|
||||
HTTPbis WG web site: http://tools.ietf.org/wg/httpbis
|
||||
|
||||
Main spec: http://tools.ietf.org/html/draft-ietf-httpbis-http2
|
||||
|
||||
Header compression spec:
|
||||
http://tools.ietf.org/html/draft-ietf-httpbis-header-compression
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
INSTALL - CUPS v2.0.3 - 2015-06-08
|
||||
INSTALL - CUPS v2.2b1 - 2015-09-14
|
||||
----------------------------------
|
||||
|
||||
This file describes how to compile and install CUPS from source code. For more
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# "$Id: Makedefs.in 11716 2014-03-21 14:50:24Z msweet $"
|
||||
# "$Id: Makedefs.in 11984 2014-07-02 13:16:59Z msweet $"
|
||||
#
|
||||
# Common makefile definitions for CUPS.
|
||||
#
|
||||
@@ -264,5 +264,5 @@ USBQUIRKS = @USBQUIRKS@
|
||||
|
||||
|
||||
#
|
||||
# End of "$Id: Makedefs.in 11716 2014-03-21 14:50:24Z msweet $"
|
||||
# End of "$Id: Makedefs.in 11984 2014-07-02 13:16:59Z msweet $"
|
||||
#
|
||||
|
||||
+5
-2
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# "$Id: Makefile 12415 2015-01-21 00:03:08Z msweet $"
|
||||
# "$Id: Makefile 13138 2016-03-15 14:59:54Z msweet $"
|
||||
#
|
||||
# Top-level Makefile for CUPS.
|
||||
#
|
||||
@@ -130,6 +130,9 @@ depend:
|
||||
#
|
||||
# At least checker-231 is required.
|
||||
#
|
||||
# Alternatively, use "--analyze -Xanalyzer -analyzer-output=text" for OPTIM (text
|
||||
# output instead of HTML...)
|
||||
#
|
||||
|
||||
.PHONY: clang clang-changes
|
||||
clang:
|
||||
@@ -348,5 +351,5 @@ dist: all
|
||||
|
||||
|
||||
#
|
||||
# End of "$Id: Makefile 12415 2015-01-21 00:03:08Z msweet $".
|
||||
# End of "$Id: Makefile 13138 2016-03-15 14:59:54Z msweet $".
|
||||
#
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
README - CUPS v2.0.3 - 2015-06-08
|
||||
README - CUPS v2.2b1 - 2015-09-14
|
||||
---------------------------------
|
||||
|
||||
Looking for compile instructions? Read the file "INSTALL.txt" instead...
|
||||
|
||||
+20
-25
@@ -4,54 +4,50 @@ ipp.o: ipp.c backend-private.h ../cups/cups-private.h \
|
||||
../cups/ipp-private.h ../cups/ipp.h ../cups/http.h \
|
||||
../cups/http-private.h ../cups/language.h ../cups/md5-private.h \
|
||||
../cups/language-private.h ../cups/transcode.h ../cups/pwg-private.h \
|
||||
../cups/cups.h ../cups/file.h ../cups/pwg.h ../cups/ppd-private.h \
|
||||
../cups/ppd.h ../cups/thread-private.h ../cups/snmp-private.h \
|
||||
../cups/backend.h ../cups/sidechannel.h
|
||||
../cups/cups.h ../cups/file.h ../cups/pwg.h ../cups/thread-private.h \
|
||||
../cups/snmp-private.h ../cups/backend.h ../cups/sidechannel.h \
|
||||
../cups/ppd-private.h ../cups/ppd.h ../cups/raster.h
|
||||
lpd.o: lpd.c ../cups/http-private.h ../config.h ../cups/language.h \
|
||||
../cups/array.h ../cups/versioning.h ../cups/http.h \
|
||||
../cups/md5-private.h ../cups/ipp-private.h ../cups/ipp.h \
|
||||
backend-private.h ../cups/cups-private.h ../cups/string-private.h \
|
||||
../cups/debug-private.h ../cups/array-private.h \
|
||||
../cups/language-private.h ../cups/transcode.h ../cups/pwg-private.h \
|
||||
../cups/cups.h ../cups/file.h ../cups/pwg.h ../cups/ppd-private.h \
|
||||
../cups/ppd.h ../cups/thread-private.h ../cups/snmp-private.h \
|
||||
../cups/backend.h ../cups/sidechannel.h
|
||||
../cups/cups.h ../cups/file.h ../cups/pwg.h ../cups/thread-private.h \
|
||||
../cups/snmp-private.h ../cups/backend.h ../cups/sidechannel.h
|
||||
dnssd.o: dnssd.c backend-private.h ../cups/cups-private.h \
|
||||
../cups/string-private.h ../config.h ../cups/debug-private.h \
|
||||
../cups/versioning.h ../cups/array-private.h ../cups/array.h \
|
||||
../cups/ipp-private.h ../cups/ipp.h ../cups/http.h \
|
||||
../cups/http-private.h ../cups/language.h ../cups/md5-private.h \
|
||||
../cups/language-private.h ../cups/transcode.h ../cups/pwg-private.h \
|
||||
../cups/cups.h ../cups/file.h ../cups/pwg.h ../cups/ppd-private.h \
|
||||
../cups/ppd.h ../cups/thread-private.h ../cups/snmp-private.h \
|
||||
../cups/backend.h ../cups/sidechannel.h
|
||||
../cups/cups.h ../cups/file.h ../cups/pwg.h ../cups/thread-private.h \
|
||||
../cups/snmp-private.h ../cups/backend.h ../cups/sidechannel.h
|
||||
snmp.o: snmp.c backend-private.h ../cups/cups-private.h \
|
||||
../cups/string-private.h ../config.h ../cups/debug-private.h \
|
||||
../cups/versioning.h ../cups/array-private.h ../cups/array.h \
|
||||
../cups/ipp-private.h ../cups/ipp.h ../cups/http.h \
|
||||
../cups/http-private.h ../cups/language.h ../cups/md5-private.h \
|
||||
../cups/language-private.h ../cups/transcode.h ../cups/pwg-private.h \
|
||||
../cups/cups.h ../cups/file.h ../cups/pwg.h ../cups/ppd-private.h \
|
||||
../cups/ppd.h ../cups/thread-private.h ../cups/snmp-private.h \
|
||||
../cups/backend.h ../cups/sidechannel.h
|
||||
../cups/cups.h ../cups/file.h ../cups/pwg.h ../cups/thread-private.h \
|
||||
../cups/snmp-private.h ../cups/backend.h ../cups/sidechannel.h
|
||||
socket.o: socket.c ../cups/http-private.h ../config.h ../cups/language.h \
|
||||
../cups/array.h ../cups/versioning.h ../cups/http.h \
|
||||
../cups/md5-private.h ../cups/ipp-private.h ../cups/ipp.h \
|
||||
backend-private.h ../cups/cups-private.h ../cups/string-private.h \
|
||||
../cups/debug-private.h ../cups/array-private.h \
|
||||
../cups/language-private.h ../cups/transcode.h ../cups/pwg-private.h \
|
||||
../cups/cups.h ../cups/file.h ../cups/pwg.h ../cups/ppd-private.h \
|
||||
../cups/ppd.h ../cups/thread-private.h ../cups/snmp-private.h \
|
||||
../cups/backend.h ../cups/sidechannel.h
|
||||
../cups/cups.h ../cups/file.h ../cups/pwg.h ../cups/thread-private.h \
|
||||
../cups/snmp-private.h ../cups/backend.h ../cups/sidechannel.h
|
||||
test1284.o: test1284.c ../cups/string-private.h ../config.h ieee1284.c \
|
||||
backend-private.h ../cups/cups-private.h ../cups/debug-private.h \
|
||||
../cups/versioning.h ../cups/array-private.h ../cups/array.h \
|
||||
../cups/ipp-private.h ../cups/ipp.h ../cups/http.h \
|
||||
../cups/http-private.h ../cups/language.h ../cups/md5-private.h \
|
||||
../cups/language-private.h ../cups/transcode.h ../cups/pwg-private.h \
|
||||
../cups/cups.h ../cups/file.h ../cups/pwg.h ../cups/ppd-private.h \
|
||||
../cups/ppd.h ../cups/thread-private.h ../cups/snmp-private.h \
|
||||
../cups/backend.h ../cups/sidechannel.h
|
||||
../cups/cups.h ../cups/file.h ../cups/pwg.h ../cups/thread-private.h \
|
||||
../cups/snmp-private.h ../cups/backend.h ../cups/sidechannel.h \
|
||||
../cups/ppd-private.h ../cups/ppd.h ../cups/raster.h
|
||||
testbackend.o: testbackend.c ../cups/string-private.h ../config.h \
|
||||
../cups/cups.h ../cups/file.h ../cups/versioning.h ../cups/ipp.h \
|
||||
../cups/http.h ../cups/array.h ../cups/language.h ../cups/pwg.h \
|
||||
@@ -62,16 +58,15 @@ testsupplies.o: testsupplies.c backend-private.h ../cups/cups-private.h \
|
||||
../cups/ipp-private.h ../cups/ipp.h ../cups/http.h \
|
||||
../cups/http-private.h ../cups/language.h ../cups/md5-private.h \
|
||||
../cups/language-private.h ../cups/transcode.h ../cups/pwg-private.h \
|
||||
../cups/cups.h ../cups/file.h ../cups/pwg.h ../cups/ppd-private.h \
|
||||
../cups/ppd.h ../cups/thread-private.h ../cups/snmp-private.h \
|
||||
../cups/backend.h ../cups/sidechannel.h
|
||||
../cups/cups.h ../cups/file.h ../cups/pwg.h ../cups/thread-private.h \
|
||||
../cups/snmp-private.h ../cups/backend.h ../cups/sidechannel.h
|
||||
usb.o: usb.c backend-private.h ../cups/cups-private.h \
|
||||
../cups/string-private.h ../config.h ../cups/debug-private.h \
|
||||
../cups/versioning.h ../cups/array-private.h ../cups/array.h \
|
||||
../cups/ipp-private.h ../cups/ipp.h ../cups/http.h \
|
||||
../cups/http-private.h ../cups/language.h ../cups/md5-private.h \
|
||||
../cups/language-private.h ../cups/transcode.h ../cups/pwg-private.h \
|
||||
../cups/cups.h ../cups/file.h ../cups/pwg.h ../cups/ppd-private.h \
|
||||
../cups/ppd.h ../cups/thread-private.h ../cups/snmp-private.h \
|
||||
../cups/backend.h ../cups/sidechannel.h usb-darwin.c \
|
||||
../cups/file-private.h
|
||||
../cups/cups.h ../cups/file.h ../cups/pwg.h ../cups/thread-private.h \
|
||||
../cups/snmp-private.h ../cups/backend.h ../cups/sidechannel.h \
|
||||
usb-darwin.c ../cups/file-private.h ../cups/ppd-private.h \
|
||||
../cups/ppd.h ../cups/raster.h
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# "$Id: Makefile 11859 2014-05-08 22:42:44Z msweet $"
|
||||
# "$Id: Makefile 11984 2014-07-02 13:16:59Z msweet $"
|
||||
#
|
||||
# Backend makefile for CUPS.
|
||||
#
|
||||
@@ -315,5 +315,5 @@ include Dependencies
|
||||
|
||||
|
||||
#
|
||||
# End of "$Id: Makefile 11859 2014-05-08 22:42:44Z msweet $".
|
||||
# End of "$Id: Makefile 11984 2014-07-02 13:16:59Z msweet $".
|
||||
#
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: backend-private.h 11558 2014-02-06 18:33:34Z msweet $"
|
||||
* "$Id: backend-private.h 11984 2014-07-02 13:16:59Z msweet $"
|
||||
*
|
||||
* Backend support definitions for CUPS.
|
||||
*
|
||||
@@ -334,5 +334,5 @@ extern int backendWaitLoop(int snmp_fd, http_addr_t *addr,
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: backend-private.h 11558 2014-02-06 18:33:34Z msweet $".
|
||||
* End of "$Id: backend-private.h 11984 2014-07-02 13:16:59Z msweet $".
|
||||
*/
|
||||
|
||||
+6
-18
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: dnssd.c 12660 2015-05-22 19:09:57Z msweet $"
|
||||
* "$Id: dnssd.c 13138 2016-03-15 14:59:54Z msweet $"
|
||||
*
|
||||
* DNS-SD discovery backend for CUPS.
|
||||
*
|
||||
@@ -921,13 +921,6 @@ get_device(cups_array_t *devices, /* I - Device array */
|
||||
* Yes, add the device...
|
||||
*/
|
||||
|
||||
#ifdef HAVE_DNSSD
|
||||
DNSServiceConstructFullName(fullName, serviceName, regtype, replyDomain);
|
||||
#else /* HAVE_AVAHI */
|
||||
avahi_service_name_join(fullName, kDNSServiceMaxDomainName,
|
||||
serviceName, regtype, replyDomain);
|
||||
#endif /* HAVE_DNSSD */
|
||||
|
||||
device = calloc(sizeof(cups_device_t), 1);
|
||||
device->name = strdup(serviceName);
|
||||
device->domain = strdup(replyDomain);
|
||||
@@ -943,8 +936,7 @@ get_device(cups_array_t *devices, /* I - Device array */
|
||||
#ifdef HAVE_DNSSD
|
||||
DNSServiceConstructFullName(fullName, serviceName, regtype, replyDomain);
|
||||
#else /* HAVE_AVAHI */
|
||||
avahi_service_name_join(fullName, kDNSServiceMaxDomainName,
|
||||
serviceName, regtype, replyDomain);
|
||||
avahi_service_name_join(fullName, kDNSServiceMaxDomainName, serviceName, regtype, replyDomain);
|
||||
#endif /* HAVE_DNSSD */
|
||||
|
||||
device->fullName = strdup(fullName);
|
||||
@@ -1050,9 +1042,7 @@ query_callback(
|
||||
"interfaceIndex=%d, errorCode=%d, fullName=\"%s\", "
|
||||
"rrtype=%u, rrclass=%u, rdlen=%u, rdata=%p, ttl=%u, "
|
||||
"context=%p)\n",
|
||||
sdRef, flags, interfaceIndex, errorCode,
|
||||
fullName ? fullName : "(null)", rrtype, rrclass, rdlen, rdata, ttl,
|
||||
context);
|
||||
sdRef, flags, interfaceIndex, errorCode, fullName, rrtype, rrclass, rdlen, rdata, ttl, context);
|
||||
|
||||
/*
|
||||
* Only process "add" data...
|
||||
@@ -1065,9 +1055,7 @@ query_callback(
|
||||
fprintf(stderr, "DEBUG2: query_callback(browser=%p, interfaceIndex=%d, "
|
||||
"protocol=%d, event=%d, fullName=\"%s\", rrclass=%u, "
|
||||
"rrtype=%u, rdata=%p, rdlen=%u, flags=%x, context=%p)\n",
|
||||
browser, interfaceIndex, protocol, event,
|
||||
fullName ? fullName : "(null)", rrclass, rrtype, rdata,
|
||||
(unsigned)rdlen, flags, context);
|
||||
browser, interfaceIndex, protocol, event, fullName, rrclass, rrtype, rdata, (unsigned)rdlen, flags, context);
|
||||
|
||||
/*
|
||||
* Only process "add" data...
|
||||
@@ -1289,7 +1277,7 @@ sigterm_handler(int sig) /* I - Signal number (unused) */
|
||||
(void)sig;
|
||||
|
||||
if (job_canceled)
|
||||
exit(CUPS_BACKEND_OK);
|
||||
_exit(CUPS_BACKEND_OK);
|
||||
else
|
||||
job_canceled = 1;
|
||||
}
|
||||
@@ -1330,5 +1318,5 @@ unquote(char *dst, /* I - Destination buffer */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: dnssd.c 12660 2015-05-22 19:09:57Z msweet $".
|
||||
* End of "$Id: dnssd.c 13138 2016-03-15 14:59:54Z msweet $".
|
||||
*/
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: ieee1284.c 11594 2014-02-14 20:09:01Z msweet $"
|
||||
* "$Id: ieee1284.c 13138 2016-03-15 14:59:54Z msweet $"
|
||||
*
|
||||
* IEEE-1284 support functions for CUPS.
|
||||
*
|
||||
* Copyright 2007-2014 by Apple Inc.
|
||||
* Copyright 2007-2015 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -20,6 +20,7 @@
|
||||
*/
|
||||
|
||||
#include "backend-private.h"
|
||||
#include <cups/ppd-private.h>
|
||||
|
||||
|
||||
/*
|
||||
@@ -475,5 +476,5 @@ backendGetMakeModel(
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: ieee1284.c 11594 2014-02-14 20:09:01Z msweet $".
|
||||
* End of "$Id: ieee1284.c 13138 2016-03-15 14:59:54Z msweet $".
|
||||
*/
|
||||
|
||||
+110
-340
@@ -1,9 +1,7 @@
|
||||
/*
|
||||
* "$Id: ipp.c 12624 2015-05-06 23:50:20Z msweet $"
|
||||
*
|
||||
* IPP backend for CUPS.
|
||||
*
|
||||
* Copyright 2007-2014 by Apple Inc.
|
||||
* Copyright 2007-2016 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -20,6 +18,7 @@
|
||||
*/
|
||||
|
||||
#include "backend-private.h"
|
||||
#include <cups/ppd-private.h>
|
||||
#include <cups/array-private.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
@@ -108,6 +107,7 @@ static const char * const pattrs[] = /* Printer attributes we want */
|
||||
"copies-supported",
|
||||
"cups-version",
|
||||
"document-format-supported",
|
||||
"job-password-encryption-supported",
|
||||
"marker-colors",
|
||||
"marker-high-levels",
|
||||
"marker-levels",
|
||||
@@ -122,6 +122,7 @@ static const char * const pattrs[] = /* Printer attributes we want */
|
||||
"printer-alert",
|
||||
"printer-alert-description",
|
||||
"printer-is-accepting-jobs",
|
||||
"printer-mandatory-job-attributes",
|
||||
"printer-state",
|
||||
"printer-state-message",
|
||||
"printer-state-reasons"
|
||||
@@ -145,6 +146,8 @@ static cups_option_t *attr_cache = NULL;
|
||||
static cups_array_t *state_reasons; /* Array of printe-state-reasons keywords */
|
||||
static char tmpfilename[1024] = "";
|
||||
/* Temporary spool file name */
|
||||
static char mandatory_attrs[1024] = "";
|
||||
/* cupsMandatory value */
|
||||
|
||||
|
||||
/*
|
||||
@@ -233,9 +236,10 @@ main(int argc, /* I - Number of command-line args */
|
||||
int delay, /* Delay for retries */
|
||||
prev_delay; /* Previous delay */
|
||||
const char *compression; /* Compression mode */
|
||||
int waitjob, /* Wait for job complete? */
|
||||
int waitjob, /* Wait for job complete? */
|
||||
waitjob_tries = 0, /* Number of times we've waited */
|
||||
waitprinter; /* Wait for printer ready? */
|
||||
time_t waittime; /* Wait time for held jobs */
|
||||
_cups_monitor_t monitor; /* Monitoring data */
|
||||
ipp_attribute_t *job_id_attr; /* job-id attribute */
|
||||
int job_id; /* job-id value */
|
||||
@@ -246,6 +250,7 @@ main(int argc, /* I - Number of command-line args */
|
||||
#endif /* HAVE_LIBZ */
|
||||
ipp_attribute_t *copies_sup; /* copies-supported */
|
||||
ipp_attribute_t *cups_version; /* cups-version */
|
||||
ipp_attribute_t *encryption_sup; /* job-password-encryption-supported */
|
||||
ipp_attribute_t *format_sup; /* document-format-supported */
|
||||
ipp_attribute_t *job_auth; /* job-authorization-uri */
|
||||
ipp_attribute_t *media_col_sup; /* media-col-supported */
|
||||
@@ -877,6 +882,7 @@ main(int argc, /* I - Number of command-line args */
|
||||
#endif /* HAVE_LIBZ */
|
||||
copies_sup = NULL;
|
||||
cups_version = NULL;
|
||||
encryption_sup = NULL;
|
||||
format_sup = NULL;
|
||||
media_col_sup = NULL;
|
||||
supported = NULL;
|
||||
@@ -1122,6 +1128,8 @@ main(int argc, /* I - Number of command-line args */
|
||||
|
||||
cups_version = ippFindAttribute(supported, "cups-version", IPP_TAG_TEXT);
|
||||
|
||||
encryption_sup = ippFindAttribute(supported, "job-password-encryption-supported", IPP_TAG_KEYWORD);
|
||||
|
||||
if ((format_sup = ippFindAttribute(supported, "document-format-supported",
|
||||
IPP_TAG_MIMETYPE)) != NULL)
|
||||
{
|
||||
@@ -1295,11 +1303,51 @@ main(int argc, /* I - Number of command-line args */
|
||||
* Load the PPD file and generate PWG attribute mapping information...
|
||||
*/
|
||||
|
||||
ppd_attr_t *mandatory; /* cupsMandatory value */
|
||||
|
||||
ppd = ppdOpenFile(getenv("PPD"));
|
||||
pc = _ppdCacheCreateWithPPD(ppd);
|
||||
|
||||
ppdMarkDefaults(ppd);
|
||||
cupsMarkOptions(ppd, num_options, options);
|
||||
|
||||
if ((mandatory = ppdFindAttr(ppd, "cupsMandatory", NULL)) != NULL)
|
||||
strlcpy(mandatory_attrs, mandatory->value, sizeof(mandatory_attrs));
|
||||
}
|
||||
|
||||
/*
|
||||
* Validate job-password/-encryption...
|
||||
*/
|
||||
|
||||
if (cupsGetOption("job-password", num_options, options))
|
||||
{
|
||||
const char *keyword; /* job-password-encryption value */
|
||||
static const char * const hashes[] =
|
||||
{ /* List of supported hash algorithms, in order of preference */
|
||||
"sha-512",
|
||||
"sha-384",
|
||||
"sha-512_256",
|
||||
"sha-512-224",
|
||||
"sha-256",
|
||||
"sha-224",
|
||||
"sha",
|
||||
"none"
|
||||
};
|
||||
|
||||
if ((keyword = cupsGetOption("job-password-encryption", num_options, options)) == NULL || !ippContainsString(encryption_sup, keyword))
|
||||
{
|
||||
/*
|
||||
* Either no job-password-encryption or the value isn't supported by
|
||||
* the printer...
|
||||
*/
|
||||
|
||||
for (i = 0; i < (int)(sizeof(hashes) / sizeof(hashes[0])); i ++)
|
||||
if (ippContainsString(encryption_sup, hashes[i]))
|
||||
break;
|
||||
|
||||
if (i < (int)(sizeof(hashes) / sizeof(hashes[0])))
|
||||
num_options = cupsAddOption("job-password-encryption", hashes[i], num_options, &options);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -1459,6 +1507,7 @@ main(int argc, /* I - Number of command-line args */
|
||||
ipp_status == IPP_STATUS_ERROR_CUPS_ACCOUNT_AUTHORIZATION_FAILED)
|
||||
goto cleanup;
|
||||
else if (ipp_status == IPP_STATUS_ERROR_FORBIDDEN ||
|
||||
ipp_status == IPP_STATUS_ERROR_NOT_AUTHORIZED ||
|
||||
ipp_status == IPP_STATUS_ERROR_CUPS_AUTHENTICATION_CANCELED)
|
||||
{
|
||||
const char *www_auth = httpGetField(http, HTTP_FIELD_WWW_AUTHENTICATE);
|
||||
@@ -1562,6 +1611,7 @@ main(int argc, /* I - Number of command-line args */
|
||||
FD_ZERO(&input);
|
||||
FD_SET(fd, &input);
|
||||
FD_SET(snmp_fd, &input);
|
||||
FD_SET(CUPS_SC_FD, &input);
|
||||
|
||||
while (select(fd > snmp_fd ? fd + 1 : snmp_fd + 1, &input, NULL, NULL,
|
||||
NULL) <= 0 && !job_canceled);
|
||||
@@ -1790,7 +1840,7 @@ main(int argc, /* I - Number of command-line args */
|
||||
fprintf(stderr, "DEBUG: Send-Document: %s (%s)\n",
|
||||
ippErrorString(cupsLastError()), cupsLastErrorString());
|
||||
|
||||
if (cupsLastError() > IPP_OK_CONFLICT)
|
||||
if (cupsLastError() > IPP_OK_CONFLICT && !job_canceled)
|
||||
{
|
||||
ipp_status = cupsLastError();
|
||||
|
||||
@@ -1808,6 +1858,9 @@ main(int argc, /* I - Number of command-line args */
|
||||
}
|
||||
}
|
||||
|
||||
if (job_canceled)
|
||||
break;
|
||||
|
||||
if (ipp_status <= IPP_OK_CONFLICT && argc > 6)
|
||||
{
|
||||
fprintf(stderr, "PAGE: 1 %d\n", copies_sup ? atoi(argv[4]) : 1);
|
||||
@@ -1914,7 +1967,7 @@ main(int argc, /* I - Number of command-line args */
|
||||
|
||||
_cupsLangPrintFilter(stderr, "INFO", _("Waiting for job to complete."));
|
||||
|
||||
for (delay = _cupsNextDelay(0, &prev_delay); !job_canceled;)
|
||||
for (delay = _cupsNextDelay(0, &prev_delay), waittime = time(NULL) + 30; !job_canceled;)
|
||||
{
|
||||
/*
|
||||
* Check for side-channel requests...
|
||||
@@ -2017,22 +2070,19 @@ main(int argc, /* I - Number of command-line args */
|
||||
remote_job_states[job_state->values[0].integer -
|
||||
IPP_JOB_PENDING]);
|
||||
|
||||
if ((job_sheets = ippFindAttribute(response,
|
||||
"job-media-sheets-completed",
|
||||
IPP_TAG_INTEGER)) == NULL)
|
||||
job_sheets = ippFindAttribute(response,
|
||||
"job-impressions-completed",
|
||||
IPP_TAG_INTEGER);
|
||||
if ((job_sheets = ippFindAttribute(response, "job-impressions-completed", IPP_TAG_INTEGER)) == NULL)
|
||||
job_sheets = ippFindAttribute(response, "job-media-sheets-completed", IPP_TAG_INTEGER);
|
||||
|
||||
if (job_sheets)
|
||||
fprintf(stderr, "PAGE: total %d\n",
|
||||
job_sheets->values[0].integer);
|
||||
|
||||
/*
|
||||
* Stop polling if the job is finished or pending-held...
|
||||
* Stop polling if the job is finished or pending-held for 30 seconds...
|
||||
*/
|
||||
|
||||
if (job_state->values[0].integer > IPP_JOB_STOPPED)
|
||||
if (job_state->values[0].integer > IPP_JSTATE_STOPPED ||
|
||||
(job_state->values[0].integer == IPP_JSTATE_HELD && time(NULL) > waittime))
|
||||
{
|
||||
ippDelete(response);
|
||||
break;
|
||||
@@ -2438,6 +2488,17 @@ monitor_printer(
|
||||
}
|
||||
}
|
||||
|
||||
fprintf(stderr, "DEBUG: (monitor) job-state = %s\n",
|
||||
ippEnumString("job-state", monitor->job_state));
|
||||
|
||||
if (!job_canceled &&
|
||||
(monitor->job_state == IPP_JOB_CANCELED ||
|
||||
monitor->job_state == IPP_JOB_ABORTED))
|
||||
{
|
||||
job_canceled = -1;
|
||||
fprintf(stderr, "DEBUG: (monitor) job_canceled = -1\n");
|
||||
}
|
||||
|
||||
if ((attr = ippFindAttribute(response, "job-state-reasons",
|
||||
IPP_TAG_KEYWORD)) != NULL)
|
||||
{
|
||||
@@ -2459,6 +2520,9 @@ monitor_printer(
|
||||
new_reasons |= _CUPS_JSR_JOB_PASSWORD_WAIT;
|
||||
else if (!strcmp(attr->values[i].string.text, "job-release-wait"))
|
||||
new_reasons |= _CUPS_JSR_JOB_RELEASE_WAIT;
|
||||
if (!job_canceled &&
|
||||
(!strncmp(attr->values[i].string.text, "job-canceled-", 13) || !strcmp(attr->values[i].string.text, "aborted-by-system")))
|
||||
job_canceled = 1;
|
||||
}
|
||||
|
||||
if (new_reasons != monitor->job_reasons)
|
||||
@@ -2484,7 +2548,7 @@ monitor_printer(
|
||||
|
||||
ippDelete(response);
|
||||
|
||||
fprintf(stderr, "DEBUG: (monitor) job-state=%s\n",
|
||||
fprintf(stderr, "DEBUG: (monitor) job-state = %s\n",
|
||||
ippEnumString("job-state", monitor->job_state));
|
||||
|
||||
if (!job_canceled &&
|
||||
@@ -2522,7 +2586,10 @@ monitor_printer(
|
||||
monitor->user, monitor->version);
|
||||
|
||||
if (cupsLastError() > IPP_OK_CONFLICT)
|
||||
{
|
||||
fprintf(stderr, "DEBUG: (monitor) cancel_job() = %s\n", cupsLastErrorString());
|
||||
_cupsLangPrintFilter(stderr, "ERROR", _("Unable to cancel print job."));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2559,19 +2626,10 @@ new_request(
|
||||
ipp_attribute_t *print_color_mode_sup)
|
||||
/* I - Printer supports print-color-mode */
|
||||
{
|
||||
int i; /* Looping var */
|
||||
ipp_t *request; /* Request data */
|
||||
const char *keyword; /* PWG keyword */
|
||||
_pwg_size_t *size; /* PWG media size */
|
||||
ipp_t *media_col, /* media-col value */
|
||||
*media_size; /* media-size value */
|
||||
const char *media_source, /* media-source value */
|
||||
*media_type, /* media-type value */
|
||||
*collate_str, /* multiple-document-handling value */
|
||||
*mandatory; /* Mandatory attributes */
|
||||
ipp_tag_t group; /* Current group */
|
||||
ipp_attribute_t *attr; /* Current attribute */
|
||||
const char *color_attr_name; /* Supported color attribute */
|
||||
char buffer[1024]; /* Value buffer */
|
||||
|
||||
|
||||
@@ -2591,36 +2649,31 @@ new_request(
|
||||
* Add standard attributes...
|
||||
*/
|
||||
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri",
|
||||
NULL, uri);
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, uri);
|
||||
fprintf(stderr, "DEBUG: printer-uri=\"%s\"\n", uri);
|
||||
|
||||
if (user && *user)
|
||||
{
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
|
||||
"requesting-user-name", NULL, user);
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "requesting-user-name", NULL, user);
|
||||
fprintf(stderr, "DEBUG: requesting-user-name=\"%s\"\n", user);
|
||||
}
|
||||
|
||||
if (title && *title)
|
||||
{
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "job-name", NULL,
|
||||
title);
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "job-name", NULL, title);
|
||||
fprintf(stderr, "DEBUG: job-name=\"%s\"\n", title);
|
||||
}
|
||||
|
||||
if (format && op != IPP_CREATE_JOB)
|
||||
{
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_MIMETYPE,
|
||||
"document-format", NULL, format);
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_MIMETYPE, "document-format", NULL, format);
|
||||
fprintf(stderr, "DEBUG: document-format=\"%s\"\n", format);
|
||||
}
|
||||
|
||||
#ifdef HAVE_LIBZ
|
||||
if (compression && op != IPP_OP_CREATE_JOB && op != IPP_OP_VALIDATE_JOB)
|
||||
{
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD,
|
||||
"compression", NULL, compression);
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD, "compression", NULL, compression);
|
||||
fprintf(stderr, "DEBUG: compression=\"%s\"\n", compression);
|
||||
}
|
||||
#endif /* HAVE_LIBZ */
|
||||
@@ -2633,313 +2686,13 @@ new_request(
|
||||
{
|
||||
if (pc)
|
||||
{
|
||||
int num_finishings = 0, /* Number of finishing values */
|
||||
finishings[10]; /* Finishing enum values */
|
||||
ppd_choice_t *choice; /* Marked choice */
|
||||
|
||||
/*
|
||||
* Send standard IPP attributes...
|
||||
*/
|
||||
|
||||
fputs("DEBUG: Adding standard IPP operation/job attributes.\n", stderr);
|
||||
|
||||
if (pc->password &&
|
||||
(keyword = cupsGetOption("job-password", num_options,
|
||||
options)) != NULL)
|
||||
{
|
||||
ippAddOctetString(request, IPP_TAG_OPERATION, "job-password", keyword, (int)strlen(keyword));
|
||||
|
||||
if ((keyword = cupsGetOption("job-password-encryption", num_options,
|
||||
options)) == NULL)
|
||||
keyword = "none";
|
||||
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD,
|
||||
"job-password-encryption", NULL, keyword);
|
||||
}
|
||||
|
||||
if (pc->account_id)
|
||||
{
|
||||
if ((keyword = cupsGetOption("job-account-id", num_options,
|
||||
options)) == NULL)
|
||||
keyword = cupsGetOption("job-billing", num_options, options);
|
||||
|
||||
if (keyword)
|
||||
ippAddString(request, IPP_TAG_JOB, IPP_TAG_NAME, "job-account-id",
|
||||
NULL, keyword);
|
||||
}
|
||||
|
||||
if (pc->accounting_user_id)
|
||||
{
|
||||
if ((keyword = cupsGetOption("job-accounting-user-id", num_options,
|
||||
options)) == NULL)
|
||||
keyword = user;
|
||||
|
||||
if (keyword)
|
||||
ippAddString(request, IPP_TAG_JOB, IPP_TAG_NAME,
|
||||
"job-accounting-user-id", NULL, keyword);
|
||||
}
|
||||
|
||||
for (mandatory = (char *)cupsArrayFirst(pc->mandatory);
|
||||
mandatory;
|
||||
mandatory = (char *)cupsArrayNext(pc->mandatory))
|
||||
{
|
||||
if (strcmp(mandatory, "copies") &&
|
||||
strcmp(mandatory, "destination-uris") &&
|
||||
strcmp(mandatory, "finishings") &&
|
||||
strcmp(mandatory, "job-account-id") &&
|
||||
strcmp(mandatory, "job-accounting-user-id") &&
|
||||
strcmp(mandatory, "job-password") &&
|
||||
strcmp(mandatory, "job-password-encryption") &&
|
||||
strcmp(mandatory, "media") &&
|
||||
strncmp(mandatory, "media-col", 9) &&
|
||||
strcmp(mandatory, "multiple-document-handling") &&
|
||||
strcmp(mandatory, "output-bin") &&
|
||||
strcmp(mandatory, "print-color-mode") &&
|
||||
strcmp(mandatory, "print-quality") &&
|
||||
strcmp(mandatory, "sides") &&
|
||||
(keyword = cupsGetOption(mandatory, num_options, options)) != NULL)
|
||||
{
|
||||
_ipp_option_t *opt = _ippFindOption(mandatory);
|
||||
/* Option type */
|
||||
ipp_tag_t value_tag = opt ? opt->value_tag : IPP_TAG_NAME;
|
||||
/* Value type */
|
||||
|
||||
switch (value_tag)
|
||||
{
|
||||
case IPP_TAG_INTEGER :
|
||||
case IPP_TAG_ENUM :
|
||||
ippAddInteger(request, IPP_TAG_JOB, value_tag, mandatory,
|
||||
atoi(keyword));
|
||||
break;
|
||||
case IPP_TAG_BOOLEAN :
|
||||
ippAddBoolean(request, IPP_TAG_JOB, mandatory,
|
||||
!_cups_strcasecmp(keyword, "true"));
|
||||
break;
|
||||
case IPP_TAG_RANGE :
|
||||
{
|
||||
int lower, upper; /* Range */
|
||||
|
||||
if (sscanf(keyword, "%d-%d", &lower, &upper) != 2)
|
||||
lower = upper = atoi(keyword);
|
||||
|
||||
ippAddRange(request, IPP_TAG_JOB, mandatory, lower, upper);
|
||||
}
|
||||
break;
|
||||
case IPP_TAG_STRING :
|
||||
ippAddOctetString(request, IPP_TAG_JOB, mandatory, keyword, (int)strlen(keyword));
|
||||
break;
|
||||
default :
|
||||
if (!strcmp(mandatory, "print-color-mode") && !strcmp(keyword, "monochrome"))
|
||||
{
|
||||
if (ippContainsString(print_color_mode_sup, "auto-monochrome"))
|
||||
keyword = "auto-monochrome";
|
||||
else if (ippContainsString(print_color_mode_sup, "process-monochrome") && !ippContainsString(print_color_mode_sup, "monochrome"))
|
||||
keyword = "process-monochrome";
|
||||
}
|
||||
|
||||
ippAddString(request, IPP_TAG_JOB, value_tag, mandatory,
|
||||
NULL, keyword);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ((keyword = cupsGetOption("PageSize", num_options, options)) == NULL)
|
||||
keyword = cupsGetOption("media", num_options, options);
|
||||
|
||||
if ((size = _ppdCacheGetSize(pc, keyword)) != NULL)
|
||||
{
|
||||
/*
|
||||
* Add a media-col value...
|
||||
*/
|
||||
|
||||
media_size = ippNew();
|
||||
ippAddInteger(media_size, IPP_TAG_ZERO, IPP_TAG_INTEGER,
|
||||
"x-dimension", size->width);
|
||||
ippAddInteger(media_size, IPP_TAG_ZERO, IPP_TAG_INTEGER,
|
||||
"y-dimension", size->length);
|
||||
|
||||
media_col = ippNew();
|
||||
ippAddCollection(media_col, IPP_TAG_ZERO, "media-size", media_size);
|
||||
|
||||
media_source = _ppdCacheGetSource(pc, cupsGetOption("InputSlot",
|
||||
num_options,
|
||||
options));
|
||||
media_type = _ppdCacheGetType(pc, cupsGetOption("MediaType",
|
||||
num_options,
|
||||
options));
|
||||
|
||||
for (i = 0; i < media_col_sup->num_values; i ++)
|
||||
{
|
||||
if (!strcmp(media_col_sup->values[i].string.text,
|
||||
"media-left-margin"))
|
||||
ippAddInteger(media_col, IPP_TAG_ZERO, IPP_TAG_INTEGER,
|
||||
"media-left-margin", size->left);
|
||||
else if (!strcmp(media_col_sup->values[i].string.text,
|
||||
"media-bottom-margin"))
|
||||
ippAddInteger(media_col, IPP_TAG_ZERO, IPP_TAG_INTEGER,
|
||||
"media-bottom-margin", size->bottom);
|
||||
else if (!strcmp(media_col_sup->values[i].string.text,
|
||||
"media-right-margin"))
|
||||
ippAddInteger(media_col, IPP_TAG_ZERO, IPP_TAG_INTEGER,
|
||||
"media-right-margin", size->right);
|
||||
else if (!strcmp(media_col_sup->values[i].string.text,
|
||||
"media-top-margin"))
|
||||
ippAddInteger(media_col, IPP_TAG_ZERO, IPP_TAG_INTEGER,
|
||||
"media-top-margin", size->top);
|
||||
else if (!strcmp(media_col_sup->values[i].string.text,
|
||||
"media-source") && media_source)
|
||||
ippAddString(media_col, IPP_TAG_ZERO, IPP_TAG_KEYWORD,
|
||||
"media-source", NULL, media_source);
|
||||
else if (!strcmp(media_col_sup->values[i].string.text,
|
||||
"media-type") && media_type)
|
||||
ippAddString(media_col, IPP_TAG_ZERO, IPP_TAG_KEYWORD,
|
||||
"media-type", NULL, media_type);
|
||||
}
|
||||
|
||||
ippAddCollection(request, IPP_TAG_JOB, "media-col", media_col);
|
||||
}
|
||||
|
||||
if ((keyword = cupsGetOption("output-bin", num_options,
|
||||
options)) == NULL)
|
||||
{
|
||||
if ((choice = ppdFindMarkedChoice(ppd, "OutputBin")) != NULL)
|
||||
keyword = _ppdCacheGetBin(pc, choice->choice);
|
||||
}
|
||||
|
||||
if (keyword)
|
||||
ippAddString(request, IPP_TAG_JOB, IPP_TAG_KEYWORD, "output-bin",
|
||||
NULL, keyword);
|
||||
|
||||
color_attr_name = print_color_mode_sup ? "print-color-mode" : "output-mode";
|
||||
|
||||
if ((keyword = cupsGetOption("print-color-mode", num_options,
|
||||
options)) == NULL)
|
||||
{
|
||||
if ((choice = ppdFindMarkedChoice(ppd, "ColorModel")) != NULL)
|
||||
{
|
||||
if (!_cups_strcasecmp(choice->choice, "Gray"))
|
||||
keyword = "monochrome";
|
||||
else
|
||||
keyword = "color";
|
||||
}
|
||||
}
|
||||
|
||||
if (keyword && !strcmp(keyword, "monochrome"))
|
||||
{
|
||||
if (ippContainsString(print_color_mode_sup, "auto-monochrome"))
|
||||
keyword = "auto-monochrome";
|
||||
else if (ippContainsString(print_color_mode_sup, "process-monochrome") && !ippContainsString(print_color_mode_sup, "monochrome"))
|
||||
keyword = "process-monochrome";
|
||||
}
|
||||
|
||||
if (keyword)
|
||||
ippAddString(request, IPP_TAG_JOB, IPP_TAG_KEYWORD, color_attr_name,
|
||||
NULL, keyword);
|
||||
|
||||
if ((keyword = cupsGetOption("print-quality", num_options,
|
||||
options)) != NULL)
|
||||
ippAddInteger(request, IPP_TAG_JOB, IPP_TAG_ENUM, "print-quality",
|
||||
atoi(keyword));
|
||||
else if ((choice = ppdFindMarkedChoice(ppd, "cupsPrintQuality")) != NULL)
|
||||
{
|
||||
if (!_cups_strcasecmp(choice->choice, "draft"))
|
||||
ippAddInteger(request, IPP_TAG_JOB, IPP_TAG_ENUM, "print-quality",
|
||||
IPP_QUALITY_DRAFT);
|
||||
else if (!_cups_strcasecmp(choice->choice, "normal"))
|
||||
ippAddInteger(request, IPP_TAG_JOB, IPP_TAG_ENUM, "print-quality",
|
||||
IPP_QUALITY_NORMAL);
|
||||
else if (!_cups_strcasecmp(choice->choice, "high"))
|
||||
ippAddInteger(request, IPP_TAG_JOB, IPP_TAG_ENUM, "print-quality",
|
||||
IPP_QUALITY_HIGH);
|
||||
}
|
||||
|
||||
if ((keyword = cupsGetOption("sides", num_options, options)) != NULL)
|
||||
ippAddString(request, IPP_TAG_JOB, IPP_TAG_KEYWORD, "sides",
|
||||
NULL, keyword);
|
||||
else if (pc->sides_option &&
|
||||
(choice = ppdFindMarkedChoice(ppd, pc->sides_option)) != NULL)
|
||||
{
|
||||
if (!_cups_strcasecmp(choice->choice, pc->sides_1sided))
|
||||
ippAddString(request, IPP_TAG_JOB, IPP_TAG_KEYWORD, "sides",
|
||||
NULL, "one-sided");
|
||||
else if (!_cups_strcasecmp(choice->choice, pc->sides_2sided_long))
|
||||
ippAddString(request, IPP_TAG_JOB, IPP_TAG_KEYWORD, "sides",
|
||||
NULL, "two-sided-long-edge");
|
||||
if (!_cups_strcasecmp(choice->choice, pc->sides_2sided_short))
|
||||
ippAddString(request, IPP_TAG_JOB, IPP_TAG_KEYWORD, "sides",
|
||||
NULL, "two-sided-short-edge");
|
||||
}
|
||||
|
||||
if ((keyword = cupsGetOption("multiple-document-handling",
|
||||
num_options, options)) != NULL)
|
||||
{
|
||||
if (strstr(keyword, "uncollated"))
|
||||
keyword = "false";
|
||||
else
|
||||
keyword = "true";
|
||||
}
|
||||
else if ((keyword = cupsGetOption("collate", num_options,
|
||||
options)) == NULL)
|
||||
keyword = "true";
|
||||
|
||||
if (format)
|
||||
{
|
||||
if (!_cups_strcasecmp(format, "image/gif") ||
|
||||
!_cups_strcasecmp(format, "image/jp2") ||
|
||||
!_cups_strcasecmp(format, "image/jpeg") ||
|
||||
!_cups_strcasecmp(format, "image/png") ||
|
||||
!_cups_strcasecmp(format, "image/tiff") ||
|
||||
!_cups_strncasecmp(format, "image/x-", 8))
|
||||
{
|
||||
/*
|
||||
* Collation makes no sense for single page image formats...
|
||||
*/
|
||||
|
||||
keyword = "false";
|
||||
}
|
||||
else if (!_cups_strncasecmp(format, "image/", 6) ||
|
||||
!_cups_strcasecmp(format, "application/vnd.cups-raster"))
|
||||
{
|
||||
/*
|
||||
* Multi-page image formats will have copies applied by the upstream
|
||||
* filters...
|
||||
*/
|
||||
|
||||
copies = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (doc_handling_sup)
|
||||
{
|
||||
if (!_cups_strcasecmp(keyword, "true"))
|
||||
collate_str = "separate-documents-collated-copies";
|
||||
else
|
||||
collate_str = "separate-documents-uncollated-copies";
|
||||
|
||||
for (i = 0; i < doc_handling_sup->num_values; i ++)
|
||||
if (!strcmp(doc_handling_sup->values[i].string.text, collate_str))
|
||||
{
|
||||
ippAddString(request, IPP_TAG_JOB, IPP_TAG_KEYWORD,
|
||||
"multiple-document-handling", NULL, collate_str);
|
||||
break;
|
||||
}
|
||||
|
||||
if (i >= doc_handling_sup->num_values)
|
||||
copies = 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Map finishing options...
|
||||
*/
|
||||
|
||||
num_finishings = _ppdCacheGetFinishingValues(pc, num_options, options,
|
||||
(int)(sizeof(finishings) /
|
||||
sizeof(finishings[0])),
|
||||
finishings);
|
||||
if (num_finishings > 0)
|
||||
ippAddIntegers(request, IPP_TAG_JOB, IPP_TAG_ENUM, "finishings",
|
||||
num_finishings, finishings);
|
||||
copies = _cupsConvertOptions(request, ppd, pc, media_col_sup, doc_handling_sup, print_color_mode_sup, user, format, copies, num_options, options);
|
||||
|
||||
/*
|
||||
* Map FaxOut options...
|
||||
@@ -3221,6 +2974,7 @@ report_printer_state(ipp_t *ipp) /* I - IPP response */
|
||||
{
|
||||
ipp_attribute_t *pa, /* printer-alert */
|
||||
*pam, /* printer-alert-message */
|
||||
*pmja, /* printer-mandatory-job-attributes */
|
||||
*psm, /* printer-state-message */
|
||||
*reasons, /* printer-state-reasons */
|
||||
*marker; /* marker-* attributes */
|
||||
@@ -3241,6 +2995,26 @@ report_printer_state(ipp_t *ipp) /* I - IPP response */
|
||||
IPP_TAG_TEXT)) != NULL)
|
||||
report_attr(pam);
|
||||
|
||||
if ((pmja = ippFindAttribute(ipp, "printer-mandatory-job-attributes", IPP_TAG_KEYWORD)) != NULL)
|
||||
{
|
||||
int i, /* Looping var */
|
||||
count = ippGetCount(pmja); /* Number of values */
|
||||
|
||||
for (i = 0, valptr = value; i < count; i ++, valptr += strlen(valptr))
|
||||
{
|
||||
if (i)
|
||||
snprintf(valptr, sizeof(value) - (size_t)(valptr - value), " %s", ippGetString(pmja, i, NULL));
|
||||
else
|
||||
strlcpy(value, ippGetString(pmja, i, NULL), sizeof(value));
|
||||
}
|
||||
|
||||
if (strcmp(value, mandatory_attrs))
|
||||
{
|
||||
strlcpy(mandatory_attrs, value, sizeof(mandatory_attrs));
|
||||
fprintf(stderr, "PPD: cupsMandatory=\"%s\"\n", value);
|
||||
}
|
||||
}
|
||||
|
||||
if ((psm = ippFindAttribute(ipp, "printer-state-message",
|
||||
IPP_TAG_TEXT)) != NULL)
|
||||
{
|
||||
@@ -3543,7 +3317,7 @@ sigterm_handler(int sig) /* I - Signal */
|
||||
* Flag that the job should be canceled...
|
||||
*/
|
||||
|
||||
write(2, "DEBUG: job_canceled = 1.\n", 25);
|
||||
write(2, "DEBUG: sigterm_handler: job_canceled = 1.\n", 25);
|
||||
|
||||
job_canceled = 1;
|
||||
return;
|
||||
@@ -3767,7 +3541,3 @@ update_reasons(ipp_attribute_t *attr, /* I - printer-state-reasons or NULL */
|
||||
else if (rem[0])
|
||||
fprintf(stderr, "%s\n", rem);
|
||||
}
|
||||
|
||||
/*
|
||||
* End of "$Id: ipp.c 12624 2015-05-06 23:50:20Z msweet $".
|
||||
*/
|
||||
|
||||
+83
-87
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: lpd.c 12024 2014-07-15 12:58:39Z msweet $"
|
||||
* "$Id: lpd.c 13138 2016-03-15 14:59:54Z msweet $"
|
||||
*
|
||||
* Line Printer Daemon backend for CUPS.
|
||||
*
|
||||
* Copyright 2007-2013 by Apple Inc.
|
||||
* Copyright 2007-2016 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -77,6 +77,7 @@ static int abort_job = 0; /* Non-zero if we get SIGTERM */
|
||||
* Local functions...
|
||||
*/
|
||||
|
||||
static int cups_rresvport(int *port, int family);
|
||||
static int lpd_command(int lpd_fd, char *format, ...);
|
||||
static int lpd_queue(const char *hostname, http_addrlist_t *addrlist,
|
||||
const char *printer, int print_fd, int snmp_fd,
|
||||
@@ -85,9 +86,6 @@ static int lpd_queue(const char *hostname, http_addrlist_t *addrlist,
|
||||
int reserve, int manual_copies, int timeout,
|
||||
int contimeout, const char *orighost);
|
||||
static ssize_t lpd_write(int lpd_fd, char *buffer, size_t length);
|
||||
#ifndef HAVE_RRESVPORT_AF
|
||||
static int rresvport_af(int *port, int family);
|
||||
#endif /* !HAVE_RRESVPORT_AF */
|
||||
static void sigterm_handler(int sig);
|
||||
|
||||
|
||||
@@ -572,6 +570,84 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 'cups_rresvport()' - A simple implementation of rresvport_af().
|
||||
*/
|
||||
|
||||
static int /* O - Socket or -1 on error */
|
||||
cups_rresvport(int *port, /* IO - Port number to bind to */
|
||||
int family) /* I - Address family */
|
||||
{
|
||||
http_addr_t addr; /* Socket address */
|
||||
int fd; /* Socket file descriptor */
|
||||
|
||||
|
||||
/*
|
||||
* Try to create an IPv4 socket...
|
||||
*/
|
||||
|
||||
if ((fd = socket(family, SOCK_STREAM, 0)) < 0)
|
||||
return (-1);
|
||||
|
||||
/*
|
||||
* Initialize the address buffer...
|
||||
*/
|
||||
|
||||
memset(&addr, 0, sizeof(addr));
|
||||
addr.addr.sa_family = (sa_family_t)family;
|
||||
|
||||
/*
|
||||
* Try to bind the socket to a reserved port...
|
||||
*/
|
||||
|
||||
while (*port > 511)
|
||||
{
|
||||
/*
|
||||
* Set the port number...
|
||||
*/
|
||||
|
||||
_httpAddrSetPort(&addr, *port);
|
||||
|
||||
/*
|
||||
* Try binding the port to the socket; return if all is OK...
|
||||
*/
|
||||
|
||||
if (!bind(fd, (struct sockaddr *)&addr, (socklen_t)httpAddrLength(&addr)))
|
||||
return (fd);
|
||||
|
||||
/*
|
||||
* Stop if we have any error other than "address already in use"...
|
||||
*/
|
||||
|
||||
if (errno != EADDRINUSE)
|
||||
{
|
||||
httpAddrClose(NULL, fd);
|
||||
|
||||
return (-1);
|
||||
}
|
||||
|
||||
/*
|
||||
* Try the next port...
|
||||
*/
|
||||
|
||||
(*port)--;
|
||||
}
|
||||
|
||||
/*
|
||||
* Wasn't able to bind to a reserved port, so close the socket and return
|
||||
* -1...
|
||||
*/
|
||||
|
||||
#ifdef WIN32
|
||||
closesocket(fd);
|
||||
#else
|
||||
close(fd);
|
||||
#endif /* WIN32 */
|
||||
|
||||
return (-1);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 'lpd_command()' - Send an LPR command sequence and wait for a reply.
|
||||
*/
|
||||
@@ -753,7 +829,7 @@ lpd_queue(const char *hostname, /* I - Host to connect to */
|
||||
* priviledged lport between 721 and 731...
|
||||
*/
|
||||
|
||||
if ((fd = rresvport_af(&lport, addr->addr.addr.sa_family)) < 0)
|
||||
if ((fd = cups_rresvport(&lport, addr->addr.addr.sa_family)) < 0)
|
||||
{
|
||||
perror("DEBUG: Unable to reserve port");
|
||||
sleep(1);
|
||||
@@ -1226,86 +1302,6 @@ lpd_write(int lpd_fd, /* I - LPD socket */
|
||||
}
|
||||
|
||||
|
||||
#ifndef HAVE_RRESVPORT_AF
|
||||
/*
|
||||
* 'rresvport_af()' - A simple implementation of rresvport_af().
|
||||
*/
|
||||
|
||||
static int /* O - Socket or -1 on error */
|
||||
rresvport_af(int *port, /* IO - Port number to bind to */
|
||||
int family) /* I - Address family */
|
||||
{
|
||||
http_addr_t addr; /* Socket address */
|
||||
int fd; /* Socket file descriptor */
|
||||
|
||||
|
||||
/*
|
||||
* Try to create an IPv4 socket...
|
||||
*/
|
||||
|
||||
if ((fd = socket(family, SOCK_STREAM, 0)) < 0)
|
||||
return (-1);
|
||||
|
||||
/*
|
||||
* Initialize the address buffer...
|
||||
*/
|
||||
|
||||
memset(&addr, 0, sizeof(addr));
|
||||
addr.addr.sa_family = family;
|
||||
|
||||
/*
|
||||
* Try to bind the socket to a reserved port...
|
||||
*/
|
||||
|
||||
while (*port > 511)
|
||||
{
|
||||
/*
|
||||
* Set the port number...
|
||||
*/
|
||||
|
||||
_httpAddrSetPort(&addr, *port);
|
||||
|
||||
/*
|
||||
* Try binding the port to the socket; return if all is OK...
|
||||
*/
|
||||
|
||||
if (!bind(fd, (struct sockaddr *)&addr, httpAddrLength(&addr)))
|
||||
return (fd);
|
||||
|
||||
/*
|
||||
* Stop if we have any error other than "address already in use"...
|
||||
*/
|
||||
|
||||
if (errno != EADDRINUSE)
|
||||
{
|
||||
httpAddrClose(NULL, fd);
|
||||
|
||||
return (-1);
|
||||
}
|
||||
|
||||
/*
|
||||
* Try the next port...
|
||||
*/
|
||||
|
||||
(*port)--;
|
||||
}
|
||||
|
||||
/*
|
||||
* Wasn't able to bind to a reserved port, so close the socket and return
|
||||
* -1...
|
||||
*/
|
||||
|
||||
# ifdef WIN32
|
||||
closesocket(fd);
|
||||
# else
|
||||
close(fd);
|
||||
# endif /* WIN32 */
|
||||
|
||||
return (-1);
|
||||
}
|
||||
#endif /* !HAVE_RRESVPORT_AF */
|
||||
|
||||
|
||||
/*
|
||||
* 'sigterm_handler()' - Handle 'terminate' signals that stop the backend.
|
||||
*/
|
||||
@@ -1320,5 +1316,5 @@ sigterm_handler(int sig) /* I - Signal */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: lpd.c 12024 2014-07-15 12:58:39Z msweet $".
|
||||
* End of "$Id: lpd.c 13138 2016-03-15 14:59:54Z msweet $".
|
||||
*/
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: network.c 12124 2014-08-28 15:37:22Z msweet $"
|
||||
* "$Id: network.c 13138 2016-03-15 14:59:54Z msweet $"
|
||||
*
|
||||
* Common backend network APIs for CUPS.
|
||||
*
|
||||
@@ -304,5 +304,5 @@ backendNetworkSideCB(
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: network.c 12124 2014-08-28 15:37:22Z msweet $".
|
||||
* End of "$Id: network.c 13138 2016-03-15 14:59:54Z msweet $".
|
||||
*/
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
# product ID (omit for all vendor products), and a list of known issues:
|
||||
#
|
||||
# blacklist The printer is not functional with the USB backend.
|
||||
# delay-close Delay close/reset of selected interface
|
||||
# no-reattach Do no re-attach usblp kernel module after printing.
|
||||
# soft-reset Do a soft reset after printing for cleanup.
|
||||
# unidir Only supported unidirectional I/O
|
||||
@@ -227,3 +228,16 @@
|
||||
|
||||
# All Intermec devices (STR #4553)
|
||||
0x067e no-reattach
|
||||
|
||||
# HP LaserJet 1150 (STR #4549)
|
||||
0x03f0 0x0f17 delay-close
|
||||
|
||||
# HP LaserJet 1300 (STR #4549)
|
||||
0x03f0 0x1017 delay-close
|
||||
0x03f0 0x1117 delay-close
|
||||
|
||||
# HP LaserJet 1320 (STR #4549)
|
||||
0x03f0 0x1d17 delay-close
|
||||
|
||||
# Canon, Inc. MP530 Printer
|
||||
0x04a9 0x1712 unidir
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: runloop.c 11558 2014-02-06 18:33:34Z msweet $"
|
||||
* "$Id: runloop.c 11984 2014-07-02 13:16:59Z msweet $"
|
||||
*
|
||||
* Common run loop APIs for CUPS backends.
|
||||
*
|
||||
@@ -528,5 +528,5 @@ backendWaitLoop(
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: runloop.c 11558 2014-02-06 18:33:34Z msweet $".
|
||||
* End of "$Id: runloop.c 11984 2014-07-02 13:16:59Z msweet $".
|
||||
*/
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: snmp-supplies.c 12228 2014-10-21 13:42:05Z msweet $"
|
||||
* "$Id: snmp-supplies.c 13138 2016-03-15 14:59:54Z msweet $"
|
||||
*
|
||||
* SNMP supplies functions for CUPS.
|
||||
*
|
||||
* Copyright 2008-2014 by Apple Inc.
|
||||
* Copyright 2008-2015 by Apple Inc.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
@@ -19,6 +19,7 @@
|
||||
*/
|
||||
|
||||
#include "backend-private.h"
|
||||
#include <cups/ppd-private.h>
|
||||
#include <cups/array.h>
|
||||
|
||||
|
||||
@@ -1098,5 +1099,5 @@ utf16_to_utf8(
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: snmp-supplies.c 12228 2014-10-21 13:42:05Z msweet $".
|
||||
* End of "$Id: snmp-supplies.c 13138 2016-03-15 14:59:54Z msweet $".
|
||||
*/
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: snmp.c 11594 2014-02-14 20:09:01Z msweet $"
|
||||
* "$Id: snmp.c 11984 2014-07-02 13:16:59Z msweet $"
|
||||
*
|
||||
* SNMP discovery backend for CUPS.
|
||||
*
|
||||
@@ -1364,5 +1364,5 @@ update_cache(snmp_cache_t *device, /* I - Device */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: snmp.c 11594 2014-02-14 20:09:01Z msweet $".
|
||||
* End of "$Id: snmp.c 11984 2014-07-02 13:16:59Z msweet $".
|
||||
*/
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: socket.c 11907 2014-06-09 18:35:32Z msweet $"
|
||||
* "$Id: socket.c 11984 2014-07-02 13:16:59Z msweet $"
|
||||
*
|
||||
* AppSocket backend for CUPS.
|
||||
*
|
||||
@@ -517,5 +517,5 @@ wait_bc(int device_fd, /* I - Socket */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: socket.c 11907 2014-06-09 18:35:32Z msweet $".
|
||||
* End of "$Id: socket.c 11984 2014-07-02 13:16:59Z msweet $".
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: testbackend.c 11594 2014-02-14 20:09:01Z msweet $"
|
||||
* "$Id: testbackend.c 11984 2014-07-02 13:16:59Z msweet $"
|
||||
*
|
||||
* Backend test program for CUPS.
|
||||
*
|
||||
@@ -680,5 +680,5 @@ walk_cb(const char *oid, /* I - OID */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: testbackend.c 11594 2014-02-14 20:09:01Z msweet $".
|
||||
* End of "$Id: testbackend.c 11984 2014-07-02 13:16:59Z msweet $".
|
||||
*/
|
||||
|
||||
+131
-90
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* "$Id: usb-darwin.c 12529 2015-02-23 18:57:57Z msweet $"
|
||||
* "$Id: usb-darwin.c 13138 2016-03-15 14:59:54Z msweet $"
|
||||
*
|
||||
* Copyright 2005-2014 Apple Inc. All rights reserved.
|
||||
* Copyright 2005-2015 Apple Inc. All rights reserved.
|
||||
*
|
||||
* IMPORTANT: This Apple software is supplied to you by Apple Computer,
|
||||
* Inc. ("Apple") in consideration of your agreement to the following
|
||||
@@ -63,6 +63,7 @@
|
||||
#include <cups/file-private.h>
|
||||
#include <cups/sidechannel.h>
|
||||
#include <cups/language-private.h>
|
||||
#include <cups/ppd-private.h>
|
||||
#include "backend-private.h"
|
||||
#include <CoreFoundation/CoreFoundation.h>
|
||||
#include <IOKit/usb/IOUSBLib.h>
|
||||
@@ -95,7 +96,7 @@ extern char **environ;
|
||||
#define WAIT_SIDE_DELAY 3
|
||||
#define DEFAULT_TIMEOUT 5000L
|
||||
|
||||
#define USB_INTERFACE_KIND CFUUIDGetUUIDBytes(kIOUSBInterfaceInterfaceID190)
|
||||
#define USB_INTERFACE_KIND CFUUIDGetUUIDBytes(kIOUSBInterfaceInterfaceID245)
|
||||
#define kUSBLanguageEnglish 0x409
|
||||
|
||||
#define PRINTER_POLLING_INTERVAL 5 /* seconds */
|
||||
@@ -140,7 +141,7 @@ struct crashreporter_annotations_t gCRAnnotations
|
||||
#define kUSBPrintingProtocolBidirectional 2
|
||||
#define kUSBPrintingProtocolIPP 4
|
||||
|
||||
typedef IOUSBInterfaceInterface190 **printer_interface_t;
|
||||
typedef IOUSBInterfaceInterface245 **printer_interface_t;
|
||||
|
||||
typedef struct iodevice_request_s /**** Device request ****/
|
||||
{
|
||||
@@ -241,6 +242,7 @@ typedef struct globals_s
|
||||
ssize_t debug_bytes; /* Current bytes to read */
|
||||
#endif /* DEBUG_WRITES */
|
||||
|
||||
Boolean use_generic_class_driver;
|
||||
Boolean wait_eof;
|
||||
int drain_output; /* Drain all pending output */
|
||||
int bidi_flag; /* 0=unidirectional, 1=bidirectional */
|
||||
@@ -300,10 +302,10 @@ static const char *next_line (const char *buffer);
|
||||
static void parse_pserror (char *sockBuffer, int len);
|
||||
#endif /* PARSE_PS_ERRORS */
|
||||
|
||||
static IOUSBInterfaceInterface220 **usb_interface220_for_service(io_service_t usbClass);
|
||||
static printer_interface_t usb_printer_interface_interface(io_service_t usbClass);
|
||||
static IOUSBDeviceInterface **usb_device_interface_for_device(io_service_t usbDevice);
|
||||
static CFStringRef printer_interface_deviceid(IOUSBInterfaceInterface220 **printer, UInt8 alternateSetting);
|
||||
static CFStringRef printer_interface_indexed_description(IOUSBInterfaceInterface220 ** printer, UInt8 index, UInt16 language);
|
||||
static CFStringRef copy_printer_interface_deviceid(printer_interface_t printer, UInt8 alternateSetting);
|
||||
static CFStringRef copy_printer_interface_indexed_description(printer_interface_t printer, UInt8 index, UInt16 language);
|
||||
static CFStringRef deviceIDCopyManufacturer(CFStringRef deviceID);
|
||||
static CFStringRef deviceIDCopyModel(CFStringRef deviceID);
|
||||
static CFStringRef deviceIDCopySerialNumber(CFStringRef deviceID);
|
||||
@@ -957,6 +959,27 @@ static void *read_thread(void *reference)
|
||||
|
||||
} while (g.wait_eof || !g.read_thread_stop); /* Abort from main thread tests error here */
|
||||
|
||||
/* Workaround for usb race condition. <rdar://problem/21882551> */
|
||||
if (!g.wait_eof && g.use_generic_class_driver)
|
||||
{
|
||||
const char *pdl = getenv("FINAL_CONTENT_TYPE");
|
||||
if (pdl && strcmp(pdl, "application/vnd.cups-postscript") == 0)
|
||||
{
|
||||
while (readstatus == kIOReturnSuccess && ((rbytes > 0 && readbuffer[rbytes-1] != 0x4) || rbytes == 0))
|
||||
{
|
||||
start = mach_absolute_time();
|
||||
|
||||
rbytes = sizeof(readbuffer);
|
||||
readstatus = (*g.classdriver)->ReadPipe(g.classdriver, readbuffer, &rbytes);
|
||||
if (readstatus == kIOReturnSuccess && rbytes > 0 && readbuffer[rbytes-1] == 0x4)
|
||||
break;
|
||||
|
||||
/* Make sure this loop executes no more than once every 250 miliseconds... */
|
||||
mach_wait_until(start + delay);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Let the main thread know that we have completed the read thread...
|
||||
*/
|
||||
@@ -1099,17 +1122,17 @@ sidechannel_thread(void *reference)
|
||||
static void iterate_printers(iterator_callback_t callBack, void *userdata)
|
||||
{
|
||||
Iterating = 1;
|
||||
|
||||
|
||||
mach_port_t masterPort = 0x0;
|
||||
kern_return_t kr = IOMasterPort (bootstrap_port, &masterPort);
|
||||
|
||||
|
||||
if (kr == kIOReturnSuccess && masterPort != 0x0)
|
||||
{
|
||||
iterator_reference_t reference = { callBack, userdata, true };
|
||||
|
||||
|
||||
IONotificationPortRef addNotification = IONotificationPortCreate(masterPort);
|
||||
io_iterator_t addIterator = IO_OBJECT_NULL;
|
||||
|
||||
|
||||
kr = IOServiceAddMatchingNotification(addNotification, kIOFirstMatchNotification, IOServiceMatching(kIOUSBDeviceClassName),
|
||||
&device_added, &reference, &addIterator);
|
||||
if (kr == kIOReturnSuccess && addIterator != IO_OBJECT_NULL)
|
||||
@@ -1124,7 +1147,7 @@ static void iterate_printers(iterator_callback_t callBack, void *userdata)
|
||||
}
|
||||
mach_port_deallocate(mach_task_self(), masterPort);
|
||||
}
|
||||
|
||||
|
||||
Iterating = 0;
|
||||
}
|
||||
|
||||
@@ -1138,7 +1161,7 @@ static void device_added(void *userdata, io_iterator_t iterator)
|
||||
{
|
||||
iterator_reference_t *reference = userdata;
|
||||
io_service_t device;
|
||||
|
||||
|
||||
while (reference->keepRunning && (device = IOIteratorNext(iterator)) != 0x0)
|
||||
{
|
||||
UInt32 locationID = 0;
|
||||
@@ -1163,19 +1186,19 @@ static void device_added(void *userdata, io_iterator_t iterator)
|
||||
|
||||
while (reference->keepRunning && (intf = IOIteratorNext(intfIterator)))
|
||||
{
|
||||
IOUSBInterfaceInterface220 **intf220 = usb_interface220_for_service(intf);
|
||||
if (intf220 != NULL)
|
||||
printer_interface_t printerIntf = usb_printer_interface_interface(intf);
|
||||
if (printerIntf != NULL)
|
||||
{
|
||||
UInt8 intfClass = 0, intfSubclass = 0, intfProtocol = 0, intfNumber = 0;
|
||||
|
||||
(*intf220)->GetInterfaceClass(intf220, &intfClass);
|
||||
(*intf220)->GetInterfaceSubClass(intf220, &intfSubclass);
|
||||
(*intf220)->GetInterfaceProtocol(intf220, &intfProtocol);
|
||||
(*intf220)->GetInterfaceNumber(intf220, &intfNumber);
|
||||
(*printerIntf)->GetInterfaceClass(printerIntf, &intfClass);
|
||||
(*printerIntf)->GetInterfaceSubClass(printerIntf, &intfSubclass);
|
||||
(*printerIntf)->GetInterfaceProtocol(printerIntf, &intfProtocol);
|
||||
(*printerIntf)->GetInterfaceNumber(printerIntf, &intfNumber);
|
||||
|
||||
if (IsPrintingInterface(intfClass, intfSubclass, intfProtocol))
|
||||
{
|
||||
CFStringRef deviceIDString = printer_interface_deviceid(intf220, 0);
|
||||
CFStringRef deviceIDString = copy_printer_interface_deviceid(printerIntf, 0);
|
||||
if (deviceIDString != NULL)
|
||||
{
|
||||
reference->keepRunning = reference->callback(userdata, intf, deviceIDString, locationID, intfNumber, 0);
|
||||
@@ -1183,8 +1206,8 @@ static void device_added(void *userdata, io_iterator_t iterator)
|
||||
}
|
||||
}
|
||||
|
||||
IOUSBInterfaceDescriptor *intfDesc = nil;
|
||||
while (reference->keepRunning && (intfDesc = (IOUSBInterfaceDescriptor *)(*intf220)->FindNextAssociatedDescriptor(intf220, intfDesc, kUSBInterfaceDesc)))
|
||||
IOUSBInterfaceDescriptor *intfDesc = NULL;
|
||||
while (reference->keepRunning && (intfDesc = (IOUSBInterfaceDescriptor *)(*printerIntf)->FindNextAssociatedDescriptor(printerIntf, intfDesc, kUSBInterfaceDesc)))
|
||||
{
|
||||
intfClass = intfDesc->bInterfaceClass;
|
||||
intfSubclass = intfDesc->bInterfaceSubClass;
|
||||
@@ -1192,7 +1215,7 @@ static void device_added(void *userdata, io_iterator_t iterator)
|
||||
|
||||
if ((IsPrintingInterface(intfClass, intfSubclass, intfProtocol)))
|
||||
{
|
||||
CFStringRef deviceIDString = printer_interface_deviceid(intf220, intfDesc->bAlternateSetting);
|
||||
CFStringRef deviceIDString = copy_printer_interface_deviceid(printerIntf, intfDesc->bAlternateSetting);
|
||||
if (deviceIDString != NULL)
|
||||
{
|
||||
reference->keepRunning = reference->callback(userdata, intf, deviceIDString, locationID, intfNumber, intfDesc->bAlternateSetting);
|
||||
@@ -1200,8 +1223,9 @@ static void device_added(void *userdata, io_iterator_t iterator)
|
||||
}
|
||||
}
|
||||
}
|
||||
(*intf220)->Release(intf220);
|
||||
(*printerIntf)->Release(printerIntf);
|
||||
}
|
||||
IOObjectRelease(intf);
|
||||
}
|
||||
|
||||
device_added_done:
|
||||
@@ -1210,12 +1234,12 @@ static void device_added(void *userdata, io_iterator_t iterator)
|
||||
|
||||
IOObjectRelease(device);
|
||||
}
|
||||
|
||||
|
||||
/* One last call to the call back now that we are not longer have printers left to iterate...
|
||||
*/
|
||||
if (reference->keepRunning && reference->callback)
|
||||
reference->keepRunning = reference->callback(reference->userdata, IO_OBJECT_NULL, NULL, 0, 0, 0);
|
||||
|
||||
|
||||
if (!reference->keepRunning)
|
||||
CFRunLoopStop(CFRunLoopGetCurrent());
|
||||
}
|
||||
@@ -1226,42 +1250,47 @@ static void device_added(void *userdata, io_iterator_t iterator)
|
||||
|
||||
static Boolean list_device_cb(void *refcon, io_service_t obj, CFStringRef deviceIDString, UInt32 deviceLocation, UInt8 interfaceNum, UInt8 alternateSetting)
|
||||
{
|
||||
(void)refcon;
|
||||
(void)interfaceNum;
|
||||
(void)alternateSetting;
|
||||
|
||||
if (obj != IO_OBJECT_NULL)
|
||||
{
|
||||
CFStringRef make = NULL;
|
||||
CFStringRef model = NULL;
|
||||
CFStringRef serial = NULL;
|
||||
|
||||
CFStringRef make = deviceIDCopyManufacturer(deviceIDString);
|
||||
CFStringRef model = deviceIDCopyModel(deviceIDString);
|
||||
CFStringRef serial = deviceIDCopySerialNumber(deviceIDString);
|
||||
|
||||
char uristr[1024], makestr[1024], modelstr[1024], serialstr[1024];
|
||||
char optionsstr[1024], idstr[1024], make_modelstr[1024];
|
||||
|
||||
|
||||
CFStringGetCString(deviceIDString, idstr, sizeof(idstr), kCFStringEncodingUTF8);
|
||||
backendGetMakeModel(idstr, make_modelstr, sizeof(make_modelstr));
|
||||
|
||||
|
||||
modelstr[0] = '/';
|
||||
|
||||
|
||||
if (make == NULL || !CFStringGetCString(make, makestr, sizeof(makestr), kCFStringEncodingUTF8))
|
||||
strlcpy(makestr, "Unknown", sizeof(makestr));
|
||||
|
||||
|
||||
if (model == NULL || !CFStringGetCString(model, &modelstr[1], sizeof(modelstr)-1, kCFStringEncodingUTF8))
|
||||
strlcpy(modelstr + 1, "Printer", sizeof(modelstr) - 1);
|
||||
|
||||
|
||||
optionsstr[0] = '\0';
|
||||
if (serial != NULL && CFStringGetCString(serial, serialstr, sizeof(serialstr), kCFStringEncodingUTF8))
|
||||
snprintf(optionsstr, sizeof(optionsstr), "?serial=%s", serialstr);
|
||||
else if (deviceLocation != 0)
|
||||
snprintf(optionsstr, sizeof(optionsstr), "?location=%x", (unsigned)deviceLocation);
|
||||
|
||||
|
||||
httpAssembleURI(HTTP_URI_CODING_ALL, uristr, sizeof(uristr), "usb", NULL, makestr, 0, modelstr);
|
||||
strlcat(uristr, optionsstr, sizeof(uristr));
|
||||
|
||||
|
||||
cupsBackendReport("direct", uristr, make_modelstr, make_modelstr, idstr,
|
||||
NULL);
|
||||
|
||||
if (make != NULL) CFRelease(make);
|
||||
if (model != NULL) CFRelease(model);
|
||||
if (serial != NULL) CFRelease(serial);
|
||||
}
|
||||
|
||||
|
||||
return obj != IO_OBJECT_NULL;
|
||||
}
|
||||
|
||||
@@ -1271,13 +1300,13 @@ static Boolean list_device_cb(void *refcon, io_service_t obj, CFStringRef device
|
||||
static Boolean find_device_cb(void *refcon, io_service_t obj, CFStringRef deviceIDString, UInt32 deviceLocation, UInt8 interfaceNum, UInt8 alternateSetting)
|
||||
{
|
||||
Boolean keepLooking = true;
|
||||
|
||||
|
||||
if (obj != IO_OBJECT_NULL)
|
||||
{
|
||||
CFStringRef make = deviceIDCopyManufacturer(deviceIDString);
|
||||
CFStringRef model = deviceIDCopyModel(deviceIDString);
|
||||
CFStringRef serial = deviceIDCopySerialNumber(deviceIDString);
|
||||
|
||||
|
||||
if (make && CFStringCompare(make, g.make, kCFCompareCaseInsensitive) == kCFCompareEqualTo)
|
||||
{
|
||||
if (model && CFStringCompare(model, g.model, kCFCompareCaseInsensitive) == kCFCompareEqualTo)
|
||||
@@ -1288,6 +1317,7 @@ static Boolean find_device_cb(void *refcon, io_service_t obj, CFStringRef device
|
||||
{
|
||||
IOObjectRetain(obj);
|
||||
g.printer_obj = obj;
|
||||
g.location = deviceLocation;
|
||||
g.alternateSetting = alternateSetting;
|
||||
keepLooking = false;
|
||||
}
|
||||
@@ -1296,20 +1326,20 @@ static Boolean find_device_cb(void *refcon, io_service_t obj, CFStringRef device
|
||||
{
|
||||
if (g.printer_obj != 0)
|
||||
IOObjectRelease(g.printer_obj);
|
||||
|
||||
|
||||
g.alternateSetting = alternateSetting;
|
||||
g.printer_obj = obj;
|
||||
IOObjectRetain(obj);
|
||||
|
||||
|
||||
if (g.location == 0 || g.location == deviceLocation)
|
||||
keepLooking = false;
|
||||
}
|
||||
|
||||
|
||||
if ( !keepLooking )
|
||||
g.interfaceNum = interfaceNum;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (make) CFRelease(make);
|
||||
if (model) CFRelease(model);
|
||||
if (serial) CFRelease(serial);
|
||||
@@ -1328,7 +1358,7 @@ static Boolean find_device_cb(void *refcon, io_service_t obj, CFStringRef device
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (!keepLooking && g.status_timer != NULL)
|
||||
{
|
||||
fputs("STATE: -offline-report\n", stderr);
|
||||
@@ -1337,14 +1367,14 @@ static Boolean find_device_cb(void *refcon, io_service_t obj, CFStringRef device
|
||||
CFRelease(g.status_timer);
|
||||
g.status_timer = NULL;
|
||||
}
|
||||
|
||||
|
||||
return keepLooking;
|
||||
}
|
||||
|
||||
static CFStringRef deviceIDCopySerialNumber(CFStringRef deviceID)
|
||||
{
|
||||
CFStringRef serialKeys[] = { CFSTR("SN:"), CFSTR("SERN:"), NULL };
|
||||
|
||||
|
||||
return copy_value_for_key(deviceID, serialKeys);
|
||||
}
|
||||
|
||||
@@ -1512,6 +1542,7 @@ static kern_return_t load_printerdriver(CFStringRef *driverBundlePath)
|
||||
{
|
||||
*driverBundlePath = IORegistryEntryCreateCFProperty(g.printer_obj, kUSBClassDriverProperty, NULL, kNilOptions);
|
||||
|
||||
g.use_generic_class_driver = (*driverBundlePath == NULL || (CFStringCompare(*driverBundlePath, kUSBGenericTOPrinterClassDriver, 0x0) == kCFCompareEqualTo));
|
||||
kr = load_classdriver(*driverBundlePath, interface, &g.classdriver);
|
||||
|
||||
if (kr != kIOReturnSuccess)
|
||||
@@ -1522,15 +1553,15 @@ static kern_return_t load_printerdriver(CFStringRef *driverBundlePath)
|
||||
return kr;
|
||||
}
|
||||
|
||||
static IOUSBInterfaceInterface220 **usb_interface220_for_service(io_service_t usbClass)
|
||||
static printer_interface_t usb_printer_interface_interface(io_service_t usbClass)
|
||||
{
|
||||
IOUSBInterfaceInterface220 ** intf = NULL;
|
||||
printer_interface_t intf = NULL;
|
||||
IOCFPlugInInterface **plugin = NULL;
|
||||
SInt32 score;
|
||||
int kr = IOCreatePlugInInterfaceForService(usbClass, kIOUSBInterfaceUserClientTypeID, kIOCFPlugInInterfaceID, &plugin, &score);
|
||||
if (kr == kIOReturnSuccess)
|
||||
{
|
||||
(*plugin)->QueryInterface(plugin, CFUUIDGetUUIDBytes(kIOUSBInterfaceInterfaceID220), (LPVOID *)&intf);
|
||||
(*plugin)->QueryInterface(plugin, USB_INTERFACE_KIND, (LPVOID *)&intf);
|
||||
IODestroyPlugInInterface(plugin);
|
||||
}
|
||||
|
||||
@@ -1554,7 +1585,7 @@ static IOUSBDeviceInterface **usb_device_interface_for_device(io_service_t usbDe
|
||||
}
|
||||
|
||||
|
||||
static CFStringRef printer_interface_deviceid(IOUSBInterfaceInterface220 **printer, UInt8 alternateSetting)
|
||||
static CFStringRef copy_printer_interface_deviceid(printer_interface_t printer, UInt8 alternateSetting)
|
||||
{
|
||||
// I have tried to make this function as neat as I can, but the possibility of needing to resend
|
||||
// a request to get the entire string makes it hideous...
|
||||
@@ -1568,8 +1599,8 @@ static CFStringRef printer_interface_deviceid(IOUSBInterfaceInterface220 **print
|
||||
#define kDefaultNoDataTimeout 5000L
|
||||
#define pack_device_id_wIndex(intf, alt) ((UInt16)((((UInt16)(intf)) << 8) | ((UInt8)(alt))))
|
||||
|
||||
if (printer == nil)
|
||||
return nil;
|
||||
if (printer == NULL)
|
||||
return NULL;
|
||||
|
||||
|
||||
IOReturn err = kIOReturnError;
|
||||
@@ -1591,15 +1622,15 @@ static CFStringRef printer_interface_deviceid(IOUSBInterfaceInterface220 **print
|
||||
request.pData = NULL;
|
||||
}
|
||||
|
||||
IOReturn err = kIOReturnError;
|
||||
IOReturn berr = kIOReturnError;
|
||||
char *buffer = malloc(size);
|
||||
if (buffer == NULL)
|
||||
return kIOReturnNoMemory;
|
||||
|
||||
request.wLength = HostToUSBWord(size);
|
||||
request.pData = buffer;
|
||||
err = (*printer)->ControlRequestTO(printer, (UInt8)0, &request);
|
||||
return err;
|
||||
berr = (*printer)->ControlRequestTO(printer, (UInt8)0, &request);
|
||||
return berr;
|
||||
};
|
||||
|
||||
/* This request takes the 0 based configuration index. IOKit returns a 1 based configuration index */
|
||||
@@ -1624,7 +1655,7 @@ static CFStringRef printer_interface_deviceid(IOUSBInterfaceInterface220 **print
|
||||
{
|
||||
ret = CFStringCreateWithBytes(NULL, (const UInt8 *) &request.pData[2], actualLength - 2, kCFStringEncodingUTF8, false);
|
||||
}
|
||||
else {
|
||||
else if (actualLength > 2) {
|
||||
err = sendRequest(actualLength);
|
||||
if (err == kIOReturnSuccess && request.wLenDone > 0)
|
||||
{
|
||||
@@ -1639,7 +1670,7 @@ static CFStringRef printer_interface_deviceid(IOUSBInterfaceInterface220 **print
|
||||
}
|
||||
|
||||
CFStringRef manufacturer = deviceIDCopyManufacturer(ret);
|
||||
CFStringRef model = deviceIDCopyManufacturer(ret);
|
||||
CFStringRef model = deviceIDCopyModel(ret);
|
||||
CFStringRef serial = deviceIDCopySerialNumber(ret);
|
||||
|
||||
if (manufacturer == NULL || serial == NULL || model == NULL)
|
||||
@@ -1664,22 +1695,22 @@ static CFStringRef printer_interface_deviceid(IOUSBInterfaceInterface220 **print
|
||||
CFMutableStringRef extras = CFStringCreateMutable(NULL, 0);
|
||||
if (manufacturer == NULL)
|
||||
{
|
||||
manufacturer = printer_interface_indexed_description(printer, desc.iManufacturer, kUSBLanguageEnglish);
|
||||
if (CFStringGetLength(manufacturer) > 0)
|
||||
manufacturer = copy_printer_interface_indexed_description(printer, desc.iManufacturer, kUSBLanguageEnglish);
|
||||
if (manufacturer && CFStringGetLength(manufacturer) > 0)
|
||||
CFStringAppendFormat(extras, NULL, CFSTR("MFG:%@;"), manufacturer);
|
||||
}
|
||||
|
||||
if (model == NULL)
|
||||
{
|
||||
model = printer_interface_indexed_description(printer, desc.iProduct, kUSBLanguageEnglish);
|
||||
if (CFStringGetLength(model) > 0)
|
||||
CFStringAppendFormat(extras, NULL, CFSTR("MDL:%@;"), manufacturer);
|
||||
model = copy_printer_interface_indexed_description(printer, desc.iProduct, kUSBLanguageEnglish);
|
||||
if (model && CFStringGetLength(model) > 0)
|
||||
CFStringAppendFormat(extras, NULL, CFSTR("MDL:%@;"), model);
|
||||
}
|
||||
|
||||
if (serial == NULL && desc.iSerialNumber != 0)
|
||||
{
|
||||
serial = printer_interface_indexed_description(printer, desc.iSerialNumber, kUSBLanguageEnglish);
|
||||
if (CFStringGetLength(serial) > 0)
|
||||
serial = copy_printer_interface_indexed_description(printer, desc.iSerialNumber, kUSBLanguageEnglish);
|
||||
if (serial && CFStringGetLength(serial) > 0)
|
||||
CFStringAppendFormat(extras, NULL, CFSTR("SERN:%@;"), serial);
|
||||
}
|
||||
|
||||
@@ -1697,14 +1728,8 @@ static CFStringRef printer_interface_deviceid(IOUSBInterfaceInterface220 **print
|
||||
}
|
||||
}
|
||||
|
||||
if (manufacturer != NULL)
|
||||
CFRelease(manufacturer);
|
||||
if (model != NULL)
|
||||
CFRelease(model);
|
||||
if (serial != NULL)
|
||||
CFRelease(serial);
|
||||
|
||||
|
||||
if (ret != NULL)
|
||||
{
|
||||
/* Remove special characters from the serial number */
|
||||
CFRange range = (serial != NULL ? CFStringFind(serial, CFSTR("+"), 0) : CFRangeMake(0, 0));
|
||||
if (range.length == 1)
|
||||
@@ -1717,11 +1742,27 @@ static CFStringRef printer_interface_deviceid(IOUSBInterfaceInterface220 **print
|
||||
ret = deviceIDString;
|
||||
CFStringFindAndReplace(deviceIDString, CFSTR("+"), CFSTR(""), range, 0);
|
||||
}
|
||||
}
|
||||
|
||||
return (CFStringGetLength(ret) > 0 ? ret : nil);
|
||||
if (manufacturer != NULL)
|
||||
CFRelease(manufacturer);
|
||||
|
||||
if (model != NULL)
|
||||
CFRelease(model);
|
||||
|
||||
if (serial != NULL)
|
||||
CFRelease(serial);
|
||||
|
||||
if (ret != NULL && CFStringGetLength(ret) == 0)
|
||||
{
|
||||
CFRelease(ret);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static CFStringRef printer_interface_indexed_description(IOUSBInterfaceInterface220 ** printer, UInt8 index, UInt16 language)
|
||||
static CFStringRef copy_printer_interface_indexed_description(printer_interface_t printer, UInt8 index, UInt16 language)
|
||||
{
|
||||
IOReturn err;
|
||||
UInt8 description[256]; // Max possible descriptor length
|
||||
@@ -1759,7 +1800,7 @@ static CFStringRef printer_interface_indexed_description(IOUSBInterfaceInterface
|
||||
|
||||
err = (*printer)->ControlRequestTO(printer, 0, &request);
|
||||
if (err != kIOReturnSuccess && err != kIOReturnUnderrun)
|
||||
return nil;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
unsigned int length = description[0];
|
||||
@@ -1775,17 +1816,17 @@ static CFStringRef printer_interface_indexed_description(IOUSBInterfaceInterface
|
||||
request.wIndex = language;
|
||||
|
||||
bzero(description, length);
|
||||
request.wLength = length;
|
||||
request.wLength = (UInt16)length;
|
||||
request.pData = &description;
|
||||
request.completionTimeout = 0;
|
||||
request.noDataTimeout = 60L;
|
||||
|
||||
err = (*printer)->ControlRequestTO(printer, 0, &request);
|
||||
if (err != kIOReturnSuccess)
|
||||
return nil;
|
||||
return NULL;
|
||||
|
||||
if (description[1] != kUSBStringDesc)
|
||||
return nil;
|
||||
return NULL;
|
||||
|
||||
if ((description[0] & 1) != 0)
|
||||
description[0] &= 0xfe;
|
||||
@@ -1799,7 +1840,7 @@ static CFStringRef printer_interface_indexed_description(IOUSBInterfaceInterface
|
||||
if (length > maxLength - 1)
|
||||
length = maxLength -1;
|
||||
|
||||
for (int i = 0; i < length; i++)
|
||||
for (unsigned i = 0; i < length; i++)
|
||||
buffer[i] = (char) description[2*i+2];
|
||||
|
||||
buffer[length] = 0;
|
||||
@@ -2245,13 +2286,13 @@ sigterm_handler(int sig) /* I - Signal */
|
||||
while (waitpid(child_pid, &status, 0) < 0 && errno == EINTR);
|
||||
|
||||
if (WIFEXITED(status))
|
||||
exit(WEXITSTATUS(status));
|
||||
_exit(WEXITSTATUS(status));
|
||||
else if (status == SIGTERM || status == SIGKILL)
|
||||
exit(0);
|
||||
_exit(0);
|
||||
else
|
||||
{
|
||||
fprintf(stderr, "DEBUG: Child crashed on signal %d\n", status);
|
||||
exit(CUPS_BACKEND_STOP);
|
||||
write(2, "DEBUG: Child crashed.\n", 22);
|
||||
_exit(CUPS_BACKEND_STOP);
|
||||
}
|
||||
}
|
||||
#endif /* __i386__ || __x86_64__ */
|
||||
@@ -2443,11 +2484,11 @@ static void get_device_id(cups_sc_status_t *status,
|
||||
|
||||
if (g.printer_obj != IO_OBJECT_NULL)
|
||||
{
|
||||
IOUSBInterfaceInterface220 **intf220 = usb_interface220_for_service(g.printer_obj);
|
||||
if (intf220)
|
||||
printer_interface_t printerIntf = usb_printer_interface_interface(g.printer_obj);
|
||||
if (printerIntf)
|
||||
{
|
||||
deviceIDString = printer_interface_deviceid(intf220, g.alternateSetting);
|
||||
(*intf220)->Release(intf220);
|
||||
deviceIDString = copy_printer_interface_deviceid(printerIntf, g.alternateSetting);
|
||||
(*printerIntf)->Release(printerIntf);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2458,7 +2499,7 @@ static void get_device_id(cups_sc_status_t *status,
|
||||
*datalen = (int)strlen(data);
|
||||
else
|
||||
*datalen = 0;
|
||||
|
||||
|
||||
CFRelease(deviceIDString);
|
||||
}
|
||||
else
|
||||
@@ -2497,5 +2538,5 @@ log_usb_class_driver(int is_64bit) /* I - Is the USB class driver 64-bit? */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: usb-darwin.c 12529 2015-02-23 18:57:57Z msweet $".
|
||||
* End of "$Id: usb-darwin.c 13138 2016-03-15 14:59:54Z msweet $".
|
||||
*/
|
||||
|
||||
+21
-3
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: usb-libusb.c 12349 2014-12-09 22:10:52Z msweet $"
|
||||
* "$Id: usb-libusb.c 13138 2016-03-15 14:59:54Z msweet $"
|
||||
*
|
||||
* LIBUSB interface code for CUPS.
|
||||
*
|
||||
* Copyright 2007-2014 by Apple Inc.
|
||||
* Copyright 2007-2015 by Apple Inc.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
#include <libusb.h>
|
||||
#include <cups/cups-private.h>
|
||||
#include <cups/ppd-private.h>
|
||||
#include <cups/dir.h>
|
||||
#include <pthread.h>
|
||||
#include <sys/select.h>
|
||||
@@ -103,6 +104,7 @@ typedef struct usb_globals_s /* Global USB printer information */
|
||||
#define USB_QUIRK_USB_INIT 0x0010 /* Needs vendor USB init string */
|
||||
#define USB_QUIRK_VENDOR_CLASS 0x0020 /* Descriptor uses vendor-specific
|
||||
Class or SubClass */
|
||||
#define USB_QUIRK_DELAY_CLOSE 0x0040 /* Delay close */
|
||||
#define USB_QUIRK_WHITELIST 0x0000 /* no quirks */
|
||||
|
||||
|
||||
@@ -641,6 +643,9 @@ print_device(const char *uri, /* I - Device URI */
|
||||
* Close the connection and input file and general clean up...
|
||||
*/
|
||||
|
||||
if (g.printer->quirks & USB_QUIRK_DELAY_CLOSE)
|
||||
sleep(1);
|
||||
|
||||
close_device(g.printer);
|
||||
|
||||
/*
|
||||
@@ -1211,6 +1216,9 @@ load_quirks(void)
|
||||
if (strstr(line, " blacklist"))
|
||||
quirk->quirks |= USB_QUIRK_BLACKLIST;
|
||||
|
||||
if (strstr(line, " delay-close"))
|
||||
quirk->quirks |= USB_QUIRK_DELAY_CLOSE;
|
||||
|
||||
if (strstr(line, " no-reattach"))
|
||||
quirk->quirks |= USB_QUIRK_NO_REATTACH;
|
||||
|
||||
@@ -1522,6 +1530,16 @@ open_device(usb_printer_t *printer, /* I - Printer */
|
||||
|
||||
goto error;
|
||||
}
|
||||
else if ((errcode = libusb_detach_kernel_driver(printer->handle, printer->iface)) < 0)
|
||||
{
|
||||
fprintf(stderr,
|
||||
"DEBUG: Failed to detach \"usblp\" module from %04x:%04x\n",
|
||||
devdesc.idVendor, devdesc.idProduct);
|
||||
|
||||
goto error;
|
||||
}
|
||||
|
||||
sleep (1);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -2004,6 +2022,6 @@ soft_reset_printer(
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: usb-libusb.c 12349 2014-12-09 22:10:52Z msweet $".
|
||||
* End of "$Id: usb-libusb.c 13138 2016-03-15 14:59:54Z msweet $".
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: usb-unix.c 12124 2014-08-28 15:37:22Z msweet $"
|
||||
* "$Id: usb-unix.c 13138 2016-03-15 14:59:54Z msweet $"
|
||||
*
|
||||
* USB port backend for CUPS.
|
||||
*
|
||||
@@ -603,5 +603,5 @@ side_cb(int print_fd, /* I - Print file */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: usb-unix.c 12124 2014-08-28 15:37:22Z msweet $".
|
||||
* End of "$Id: usb-unix.c 13138 2016-03-15 14:59:54Z msweet $".
|
||||
*/
|
||||
|
||||
@@ -3,26 +3,23 @@ lpc.o: lpc.c ../cups/cups-private.h ../cups/string-private.h ../config.h \
|
||||
../cups/array.h ../cups/ipp-private.h ../cups/ipp.h ../cups/http.h \
|
||||
../cups/http-private.h ../cups/language.h ../cups/md5-private.h \
|
||||
../cups/language-private.h ../cups/transcode.h ../cups/pwg-private.h \
|
||||
../cups/cups.h ../cups/file.h ../cups/pwg.h ../cups/ppd-private.h \
|
||||
../cups/ppd.h ../cups/thread-private.h
|
||||
../cups/cups.h ../cups/file.h ../cups/pwg.h ../cups/thread-private.h
|
||||
lpq.o: lpq.c ../cups/cups-private.h ../cups/string-private.h ../config.h \
|
||||
../cups/debug-private.h ../cups/versioning.h ../cups/array-private.h \
|
||||
../cups/array.h ../cups/ipp-private.h ../cups/ipp.h ../cups/http.h \
|
||||
../cups/http-private.h ../cups/language.h ../cups/md5-private.h \
|
||||
../cups/language-private.h ../cups/transcode.h ../cups/pwg-private.h \
|
||||
../cups/cups.h ../cups/file.h ../cups/pwg.h ../cups/ppd-private.h \
|
||||
../cups/ppd.h ../cups/thread-private.h
|
||||
../cups/cups.h ../cups/file.h ../cups/pwg.h ../cups/thread-private.h
|
||||
lpr.o: lpr.c ../cups/cups-private.h ../cups/string-private.h ../config.h \
|
||||
../cups/debug-private.h ../cups/versioning.h ../cups/array-private.h \
|
||||
../cups/array.h ../cups/ipp-private.h ../cups/ipp.h ../cups/http.h \
|
||||
../cups/http-private.h ../cups/language.h ../cups/md5-private.h \
|
||||
../cups/language-private.h ../cups/transcode.h ../cups/pwg-private.h \
|
||||
../cups/cups.h ../cups/file.h ../cups/pwg.h ../cups/ppd-private.h \
|
||||
../cups/ppd.h ../cups/thread-private.h
|
||||
../cups/cups.h ../cups/file.h ../cups/pwg.h ../cups/thread-private.h
|
||||
lprm.o: lprm.c ../cups/cups-private.h ../cups/string-private.h \
|
||||
../config.h ../cups/debug-private.h ../cups/versioning.h \
|
||||
../cups/array-private.h ../cups/array.h ../cups/ipp-private.h \
|
||||
../cups/ipp.h ../cups/http.h ../cups/http-private.h ../cups/language.h \
|
||||
../cups/md5-private.h ../cups/language-private.h ../cups/transcode.h \
|
||||
../cups/pwg-private.h ../cups/cups.h ../cups/file.h ../cups/pwg.h \
|
||||
../cups/ppd-private.h ../cups/ppd.h ../cups/thread-private.h
|
||||
../cups/thread-private.h
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: lpc.c 11558 2014-02-06 18:33:34Z msweet $"
|
||||
* "$Id: lpc.c 11984 2014-07-02 13:16:59Z msweet $"
|
||||
*
|
||||
* "lpc" command for CUPS.
|
||||
*
|
||||
@@ -438,5 +438,5 @@ show_status(http_t *http, /* I - HTTP connection to server */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: lpc.c 11558 2014-02-06 18:33:34Z msweet $".
|
||||
* End of "$Id: lpc.c 11984 2014-07-02 13:16:59Z msweet $".
|
||||
*/
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: lpq.c 11558 2014-02-06 18:33:34Z msweet $"
|
||||
* "$Id: lpq.c 11984 2014-07-02 13:16:59Z msweet $"
|
||||
*
|
||||
* "lpq" command for CUPS.
|
||||
*
|
||||
@@ -641,5 +641,5 @@ usage(void)
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: lpq.c 11558 2014-02-06 18:33:34Z msweet $".
|
||||
* End of "$Id: lpq.c 11984 2014-07-02 13:16:59Z msweet $".
|
||||
*/
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: lpr.c 11558 2014-02-06 18:33:34Z msweet $"
|
||||
* "$Id: lpr.c 11984 2014-07-02 13:16:59Z msweet $"
|
||||
*
|
||||
* "lpr" command for CUPS.
|
||||
*
|
||||
@@ -432,5 +432,5 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: lpr.c 11558 2014-02-06 18:33:34Z msweet $".
|
||||
* End of "$Id: lpr.c 11984 2014-07-02 13:16:59Z msweet $".
|
||||
*/
|
||||
|
||||
@@ -35,7 +35,9 @@ admin.o: admin.c cgi-private.h cgi.h ../cups/cups.h ../cups/file.h \
|
||||
../cups/language.h ../cups/pwg.h help-index.h ../cups/debug-private.h \
|
||||
../cups/language-private.h ../cups/transcode.h \
|
||||
../cups/string-private.h ../config.h ../cups/ipp-private.h \
|
||||
../cups/adminutil.h ../cups/ppd.h
|
||||
../cups/http-private.h ../cups/md5-private.h ../cups/ppd-private.h \
|
||||
../cups/ppd.h ../cups/raster.h ../cups/pwg-private.h \
|
||||
../cups/adminutil.h
|
||||
classes.o: classes.c cgi-private.h cgi.h ../cups/cups.h ../cups/file.h \
|
||||
../cups/versioning.h ../cups/ipp.h ../cups/http.h ../cups/array.h \
|
||||
../cups/language.h ../cups/pwg.h help-index.h ../cups/debug-private.h \
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# "$Id: Makefile 11777 2014-03-28 19:18:10Z msweet $"
|
||||
# "$Id: Makefile 11984 2014-07-02 13:16:59Z msweet $"
|
||||
#
|
||||
# CGI makefile for CUPS.
|
||||
#
|
||||
@@ -353,5 +353,5 @@ include Dependencies
|
||||
|
||||
|
||||
#
|
||||
# End of "$Id: Makefile 11777 2014-03-28 19:18:10Z msweet $".
|
||||
# End of "$Id: Makefile 11984 2014-07-02 13:16:59Z msweet $".
|
||||
#
|
||||
|
||||
+90
-11
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: admin.c 12123 2014-08-28 14:24:45Z msweet $"
|
||||
* "$Id: admin.c 13138 2016-03-15 14:59:54Z msweet $"
|
||||
*
|
||||
* Administration CGI for CUPS.
|
||||
*
|
||||
* Copyright 2007-2014 by Apple Inc.
|
||||
* Copyright 2007-2015 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -18,6 +18,8 @@
|
||||
*/
|
||||
|
||||
#include "cgi-private.h"
|
||||
#include <cups/http-private.h>
|
||||
#include <cups/ppd-private.h>
|
||||
#include <cups/adminutil.h>
|
||||
#include <cups/ppd.h>
|
||||
#include <errno.h>
|
||||
@@ -38,12 +40,7 @@ static int current_device = 0; /* Current device shown */
|
||||
* Local functions...
|
||||
*/
|
||||
|
||||
static void choose_device_cb(const char *device_class,
|
||||
const char *device_id, const char *device_info,
|
||||
const char *device_make_and_model,
|
||||
const char *device_uri,
|
||||
const char *device_location,
|
||||
const char *title);
|
||||
static void choose_device_cb(const char *device_class, const char *device_id, const char *device_info, const char *device_make_and_model, const char *device_uri, const char *device_location, const char *title);
|
||||
static void do_add_rss_subscription(http_t *http);
|
||||
static void do_am_class(http_t *http, int modify);
|
||||
static void do_am_printer(http_t *http, int modify);
|
||||
@@ -61,6 +58,7 @@ static void do_set_sharing(http_t *http);
|
||||
static char *get_option_value(ppd_file_t *ppd, const char *name,
|
||||
char *buffer, size_t bufsize);
|
||||
static double get_points(double number, const char *uval);
|
||||
static char *get_printer_ppd(const char *uri, char *buffer, size_t bufsize);
|
||||
|
||||
|
||||
/*
|
||||
@@ -832,7 +830,8 @@ do_am_printer(http_t *http, /* I - HTTP connection */
|
||||
const cgi_file_t *file; /* Uploaded file, if any */
|
||||
const char *var; /* CGI variable */
|
||||
char uri[HTTP_MAX_URI], /* Device or printer URI */
|
||||
*uriptr; /* Pointer into URI */
|
||||
*uriptr, /* Pointer into URI */
|
||||
evefile[1024] = ""; /* IPP Everywhere PPD file */
|
||||
int maxrate; /* Maximum baud rate */
|
||||
char baudrate[255]; /* Baud rate string */
|
||||
const char *name, /* Pointer to class name */
|
||||
@@ -1331,7 +1330,9 @@ do_am_printer(http_t *http, /* I - HTTP connection */
|
||||
if (!file)
|
||||
{
|
||||
var = cgiGetVariable("PPD_NAME");
|
||||
if (strcmp(var, "__no_change__"))
|
||||
if (!strcmp(var, "everywhere"))
|
||||
get_printer_ppd(cgiGetVariable("DEVICE_URI"), evefile, sizeof(evefile));
|
||||
else if (strcmp(var, "__no_change__"))
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "ppd-name",
|
||||
NULL, var);
|
||||
}
|
||||
@@ -1384,6 +1385,11 @@ do_am_printer(http_t *http, /* I - HTTP connection */
|
||||
|
||||
if (file)
|
||||
ippDelete(cupsDoFileRequest(http, request, "/admin/", file->tempfile));
|
||||
else if (evefile[0])
|
||||
{
|
||||
ippDelete(cupsDoFileRequest(http, request, "/admin/", evefile));
|
||||
unlink(evefile);
|
||||
}
|
||||
else
|
||||
ippDelete(cupsDoRequest(http, request, "/admin/"));
|
||||
|
||||
@@ -4198,5 +4204,78 @@ get_points(double number, /* I - Original number */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: admin.c 12123 2014-08-28 14:24:45Z msweet $".
|
||||
* 'get_printer_ppd()' - Get an IPP Everywhere PPD file for the given URI.
|
||||
*/
|
||||
|
||||
static char * /* O - Filename or NULL */
|
||||
get_printer_ppd(const char *uri, /* I - Printer URI */
|
||||
char *buffer, /* I - Filename buffer */
|
||||
size_t bufsize) /* I - Size of filename buffer */
|
||||
{
|
||||
http_t *http; /* Connection to printer */
|
||||
ipp_t *request, /* Get-Printer-Attributes request */
|
||||
*response; /* Get-Printer-Attributes response */
|
||||
char resolved[1024], /* Resolved URI */
|
||||
scheme[32], /* URI scheme */
|
||||
userpass[256], /* Username:password */
|
||||
host[256], /* Hostname */
|
||||
resource[256]; /* Resource path */
|
||||
int port; /* Port number */
|
||||
|
||||
|
||||
/*
|
||||
* Connect to the printer...
|
||||
*/
|
||||
|
||||
if (strstr(uri, "._tcp"))
|
||||
{
|
||||
/*
|
||||
* Resolve URI...
|
||||
*/
|
||||
|
||||
if (!_httpResolveURI(uri, resolved, sizeof(resolved), _HTTP_RESOLVE_DEFAULT, NULL, NULL))
|
||||
{
|
||||
fprintf(stderr, "ERROR: Unable to resolve \"%s\".\n", uri);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
uri = resolved;
|
||||
}
|
||||
|
||||
if (httpSeparateURI(HTTP_URI_CODING_ALL, uri, scheme, sizeof(scheme), userpass, sizeof(userpass), host, sizeof(host), &port, resource, sizeof(resource)) < HTTP_URI_STATUS_OK)
|
||||
{
|
||||
fprintf(stderr, "ERROR: Bad printer URI \"%s\".\n", uri);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
http = httpConnect2(host, port, NULL, AF_UNSPEC, !strcmp(scheme, "ipps") ? HTTP_ENCRYPTION_ALWAYS : HTTP_ENCRYPTION_IF_REQUESTED, 1, 30000, NULL);
|
||||
if (!http)
|
||||
{
|
||||
fprintf(stderr, "ERROR: Unable to connect to \"%s:%d\": %s\n", host, port, cupsLastErrorString());
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
* Send a Get-Printer-Attributes request...
|
||||
*/
|
||||
|
||||
request = ippNewRequest(IPP_OP_GET_PRINTER_ATTRIBUTES);
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, uri);
|
||||
response = cupsDoRequest(http, request, resource);
|
||||
|
||||
if (!_ppdCreateFromIPP(buffer, bufsize, response))
|
||||
fprintf(stderr, "ERROR: Unable to create PPD file: %s\n", strerror(errno));
|
||||
|
||||
ippDelete(response);
|
||||
httpClose(http);
|
||||
|
||||
if (buffer[0])
|
||||
return (buffer);
|
||||
else
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: admin.c 13138 2016-03-15 14:59:54Z msweet $".
|
||||
*/
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: classes.c 11928 2014-06-13 00:08:32Z msweet $"
|
||||
* "$Id: classes.c 11984 2014-07-02 13:16:59Z msweet $"
|
||||
*
|
||||
* Class status CGI for CUPS.
|
||||
*
|
||||
@@ -546,5 +546,5 @@ show_class(http_t *http, /* I - Connection to server */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: classes.c 11928 2014-06-13 00:08:32Z msweet $".
|
||||
* End of "$Id: classes.c 11984 2014-07-02 13:16:59Z msweet $".
|
||||
*/
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: help-index.c 12344 2014-12-09 21:36:11Z msweet $"
|
||||
* "$Id: help-index.c 13138 2016-03-15 14:59:54Z msweet $"
|
||||
*
|
||||
* Online help index routines for CUPS.
|
||||
*
|
||||
* Copyright 2007-2014 by Apple Inc.
|
||||
* Copyright 2007-2015 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -1220,7 +1220,7 @@ help_new_node(const char *filename, /* I - Filename */
|
||||
|
||||
n->filename = strdup(filename);
|
||||
n->anchor = anchor ? strdup(anchor) : NULL;
|
||||
n->section = (section && *section) ? strdup(section) : NULL;
|
||||
n->section = *section ? strdup(section) : NULL;
|
||||
n->text = strdup(text);
|
||||
n->mtime = mtime;
|
||||
n->offset = offset;
|
||||
@@ -1306,5 +1306,5 @@ help_sort_words(help_word_t *w1, /* I - Second word */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: help-index.c 12344 2014-12-09 21:36:11Z msweet $".
|
||||
* End of "$Id: help-index.c 13138 2016-03-15 14:59:54Z msweet $".
|
||||
*/
|
||||
|
||||
+5
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: ipp-var.c 12701 2015-06-08 18:33:44Z msweet $"
|
||||
* "$Id: ipp-var.c 13138 2016-03-15 14:59:54Z msweet $"
|
||||
*
|
||||
* CGI <-> IPP variable routines for CUPS.
|
||||
*
|
||||
@@ -222,6 +222,9 @@ cgiGetIPPObjects(ipp_t *response, /* I - IPP response */
|
||||
break;
|
||||
|
||||
case IPP_TAG_INTEGER :
|
||||
if (!strncmp(ippGetName(attr), "time-at-", 8))
|
||||
break; /* Ignore time-at-xxx */
|
||||
|
||||
for (i = 0; !add && i < attr->num_values; i ++)
|
||||
{
|
||||
char buf[255]; /* Number buffer */
|
||||
@@ -1547,5 +1550,5 @@ cgiText(const char *message) /* I - Message */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: ipp-var.c 12701 2015-06-08 18:33:44Z msweet $".
|
||||
* End of "$Id: ipp-var.c 13138 2016-03-15 14:59:54Z msweet $".
|
||||
*/
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: jobs.c 11558 2014-02-06 18:33:34Z msweet $"
|
||||
* "$Id: jobs.c 11984 2014-07-02 13:16:59Z msweet $"
|
||||
*
|
||||
* Job status CGI for CUPS.
|
||||
*
|
||||
@@ -204,5 +204,5 @@ do_job_op(http_t *http, /* I - HTTP connection */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: jobs.c 11558 2014-02-06 18:33:34Z msweet $".
|
||||
* End of "$Id: jobs.c 11984 2014-07-02 13:16:59Z msweet $".
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: printers.c 11928 2014-06-13 00:08:32Z msweet $"
|
||||
* "$Id: printers.c 11984 2014-07-02 13:16:59Z msweet $"
|
||||
*
|
||||
* Printer status CGI for CUPS.
|
||||
*
|
||||
@@ -566,5 +566,5 @@ show_printer(http_t *http, /* I - Connection to server */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: printers.c 11928 2014-06-13 00:08:32Z msweet $".
|
||||
* End of "$Id: printers.c 11984 2014-07-02 13:16:59Z msweet $".
|
||||
*/
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: search.c 11558 2014-02-06 18:33:34Z msweet $"
|
||||
* "$Id: search.c 11984 2014-07-02 13:16:59Z msweet $"
|
||||
*
|
||||
* Search routines for CUPS.
|
||||
*
|
||||
@@ -371,5 +371,5 @@ cgiFreeSearch(void *search) /* I - Search context */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: search.c 11558 2014-02-06 18:33:34Z msweet $".
|
||||
* End of "$Id: search.c 11984 2014-07-02 13:16:59Z msweet $".
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: template.c 12701 2015-06-08 18:33:44Z msweet $"
|
||||
* "$Id: template.c 13138 2016-03-15 14:59:54Z msweet $"
|
||||
*
|
||||
* CGI template function.
|
||||
*
|
||||
@@ -686,5 +686,5 @@ cgi_puturi(const char *s, /* I - String to output */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: template.c 12701 2015-06-08 18:33:44Z msweet $".
|
||||
* End of "$Id: template.c 13138 2016-03-15 14:59:54Z msweet $".
|
||||
*/
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: testcgi.c 11558 2014-02-06 18:33:34Z msweet $"
|
||||
* "$Id: testcgi.c 11984 2014-07-02 13:16:59Z msweet $"
|
||||
*
|
||||
* CGI test program for CUPS.
|
||||
*
|
||||
@@ -65,5 +65,5 @@ main(void)
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: testcgi.c 11558 2014-02-06 18:33:34Z msweet $".
|
||||
* End of "$Id: testcgi.c 11984 2014-07-02 13:16:59Z msweet $".
|
||||
*/
|
||||
|
||||
+27
-8
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: var.c 12034 2014-07-16 19:37:34Z msweet $"
|
||||
* "$Id: var.c 13138 2016-03-15 14:59:54Z msweet $"
|
||||
*
|
||||
* CGI form variable and array functions for CUPS.
|
||||
*
|
||||
* Copyright 2007-2014 by Apple Inc.
|
||||
* Copyright 2007-2015 by Apple Inc.
|
||||
* Copyright 1997-2005 by Easy Software Products.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -626,6 +626,8 @@ cgi_initialize_cookies(void)
|
||||
|
||||
while (*cookie)
|
||||
{
|
||||
int skip = 0; /* Skip this cookie? */
|
||||
|
||||
/*
|
||||
* Skip leading whitespace...
|
||||
*/
|
||||
@@ -641,9 +643,14 @@ cgi_initialize_cookies(void)
|
||||
|
||||
for (ptr = name; *cookie && *cookie != '=';)
|
||||
if (ptr < (name + sizeof(name) - 1))
|
||||
{
|
||||
*ptr++ = *cookie++;
|
||||
}
|
||||
else
|
||||
break;
|
||||
{
|
||||
skip = 1;
|
||||
cookie ++;
|
||||
}
|
||||
|
||||
if (*cookie != '=')
|
||||
break;
|
||||
@@ -659,26 +666,38 @@ cgi_initialize_cookies(void)
|
||||
{
|
||||
for (cookie ++, ptr = value; *cookie && *cookie != '\"';)
|
||||
if (ptr < (value + sizeof(value) - 1))
|
||||
{
|
||||
*ptr++ = *cookie++;
|
||||
}
|
||||
else
|
||||
break;
|
||||
{
|
||||
skip = 1;
|
||||
cookie ++;
|
||||
}
|
||||
|
||||
if (*cookie == '\"')
|
||||
cookie ++;
|
||||
else
|
||||
skip = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
for (ptr = value; *cookie && *cookie != ';';)
|
||||
if (ptr < (value + sizeof(value) - 1))
|
||||
{
|
||||
*ptr++ = *cookie++;
|
||||
}
|
||||
else
|
||||
break;
|
||||
{
|
||||
skip = 1;
|
||||
cookie ++;
|
||||
}
|
||||
}
|
||||
|
||||
if (*cookie == ';')
|
||||
cookie ++;
|
||||
else if (*cookie)
|
||||
break;
|
||||
skip = 1;
|
||||
|
||||
*ptr = '\0';
|
||||
|
||||
@@ -687,7 +706,7 @@ cgi_initialize_cookies(void)
|
||||
* "$"...
|
||||
*/
|
||||
|
||||
if (name[0] != '$')
|
||||
if (name[0] != '$' && !skip)
|
||||
num_cookies = cupsAddOption(name, value, num_cookies, &cookies);
|
||||
}
|
||||
}
|
||||
@@ -1278,5 +1297,5 @@ cgi_unlink_file(void)
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: var.c 12034 2014-07-16 19:37:34Z msweet $".
|
||||
* End of "$Id: var.c 13138 2016-03-15 14:59:54Z msweet $".
|
||||
*/
|
||||
|
||||
+4
-4
@@ -1,9 +1,9 @@
|
||||
#
|
||||
# "$Id: Makefile 10996 2013-05-29 11:51:34Z msweet $"
|
||||
# "$Id: Makefile 13138 2016-03-15 14:59:54Z msweet $"
|
||||
#
|
||||
# Configuration file makefile for CUPS.
|
||||
#
|
||||
# Copyright 2007-2012 by Apple Inc.
|
||||
# Copyright 2007-2015 by Apple Inc.
|
||||
# Copyright 1993-2006 by Easy Software Products.
|
||||
#
|
||||
# These coded instructions, statements, and computer programs are the
|
||||
@@ -76,8 +76,8 @@ install-data:
|
||||
else \
|
||||
$(INSTALL_CONFIG) -g $(CUPS_GROUP) $$file $(SERVERROOT) ; \
|
||||
fi ; \
|
||||
$(INSTALL_CONFIG) -g $(CUPS_GROUP) $$file $(SERVERROOT)/$$file.default; \
|
||||
done
|
||||
$(INSTALL_CONFIG) -g $(CUPS_GROUP) cupsd.conf $(SERVERROOT)/cupsd.conf.default
|
||||
$(INSTALL_DIR) -m 755 $(DATADIR)/mime
|
||||
for file in $(REPLACE); do \
|
||||
if test -r $(DATADIR)/mime/$$file ; then \
|
||||
@@ -139,5 +139,5 @@ uninstall:
|
||||
|
||||
|
||||
#
|
||||
# End of "$Id: Makefile 10996 2013-05-29 11:51:34Z msweet $".
|
||||
# End of "$Id: Makefile 13138 2016-03-15 14:59:54Z msweet $".
|
||||
#
|
||||
|
||||
@@ -39,6 +39,13 @@ WebInterface @CUPS_WEBIF@
|
||||
Order allow,deny
|
||||
</Location>
|
||||
|
||||
# Restrict access to log files...
|
||||
<Location /admin/log>
|
||||
AuthType Default
|
||||
Require user @SYSTEM
|
||||
Order allow,deny
|
||||
</Location>
|
||||
|
||||
# Set the default printer/job policies...
|
||||
<Policy default>
|
||||
# Job/subscription privacy...
|
||||
|
||||
+9
-2
@@ -7,7 +7,7 @@
|
||||
# VERSIONS OF CUPS. Instead, create a "local.types" file that
|
||||
# reflects your local configuration changes.
|
||||
#
|
||||
# Copyright 2007-2014 by Apple Inc.
|
||||
# Copyright 2007-2015 by Apple Inc.
|
||||
# Copyright 1997-2007 by Easy Software Products.
|
||||
#
|
||||
# These coded instructions, statements, and computer programs are the
|
||||
@@ -71,7 +71,7 @@
|
||||
#
|
||||
|
||||
#application/msword doc string(0,<D0CF11E0A1B11AE1>)
|
||||
application/pdf pdf regex(0,^[\\n\\r]*%PDF)
|
||||
application/pdf pdf regex(0,^[\n\r]*%PDF)
|
||||
application/postscript ai eps ps string(0,%!) string(0,<04>%!) \
|
||||
contains(0,128,<1B>%-12345X) + \
|
||||
(contains(0,4096,"LANGUAGE=POSTSCRIPT") \
|
||||
@@ -81,6 +81,13 @@ application/postscript ai eps ps string(0,%!) string(0,<04>%!) \
|
||||
(contains(0,4096,<0a>%!) + \
|
||||
!contains(0,4096,"ENTER LANGUAGE")))
|
||||
|
||||
application/g-code gcode
|
||||
application/sla stl string(0,"solid ") + contains(0,4096,"facet") + contains(0,4096,"vertex")
|
||||
application/vnd.makerbot-s3g x3g
|
||||
model/amf amf
|
||||
model/vnd.collada+xml dae
|
||||
|
||||
|
||||
########################################################################
|
||||
#
|
||||
# Image files...
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
dnl
|
||||
dnl "$Id: cups-common.m4 12336 2014-12-09 21:19:52Z msweet $"
|
||||
dnl "$Id: cups-common.m4 13138 2016-03-15 14:59:54Z msweet $"
|
||||
dnl
|
||||
dnl Common configuration stuff for CUPS.
|
||||
dnl
|
||||
dnl Copyright 2007-2014 by Apple Inc.
|
||||
dnl Copyright 2007-2015 by Apple Inc.
|
||||
dnl Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
dnl
|
||||
dnl These coded instructions, statements, and computer programs are the
|
||||
@@ -13,18 +13,26 @@ dnl which should have been included with this file. If this file is
|
||||
dnl file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
dnl
|
||||
|
||||
dnl We need at least autoconf 2.60...
|
||||
AC_PREREQ(2.60)
|
||||
|
||||
dnl Set the name of the config header file...
|
||||
AC_CONFIG_HEADER(config.h)
|
||||
|
||||
dnl Version number information...
|
||||
CUPS_VERSION=2.0.3
|
||||
CUPS_REVISION=
|
||||
#if test -z "$CUPS_REVISION" -a -d .svn; then
|
||||
# CUPS_REVISION="-r`svnversion . | awk -F: '{print $NF}' | sed -e '1,$s/[[a-zA-Z]]*//g'`"
|
||||
#fi
|
||||
CUPS_VERSION="AC_PACKAGE_VERSION"
|
||||
|
||||
case "$CUPS_VERSION" in
|
||||
*svn)
|
||||
if test -z "$CUPS_REVISION" -a -d .svn; then
|
||||
CUPS_REVISION="-r`svnversion . | awk -F: '{print $NF}' | sed -e '1,$s/[[a-zA-Z]]*//g'`"
|
||||
else
|
||||
CUPS_REVISION=""
|
||||
fi
|
||||
;;
|
||||
|
||||
*)
|
||||
CUPS_REVISION=""
|
||||
;;
|
||||
esac
|
||||
|
||||
CUPS_BUILD="cups-$CUPS_VERSION"
|
||||
|
||||
AC_ARG_WITH(cups_build, [ --with-cups-build set "cups-config --build" string ],
|
||||
@@ -33,8 +41,8 @@ AC_ARG_WITH(cups_build, [ --with-cups-build set "cups-config --build" str
|
||||
AC_SUBST(CUPS_VERSION)
|
||||
AC_SUBST(CUPS_REVISION)
|
||||
AC_SUBST(CUPS_BUILD)
|
||||
AC_DEFINE_UNQUOTED(CUPS_SVERSION, "CUPS v$CUPS_VERSION$CUPS_REVISION")
|
||||
AC_DEFINE_UNQUOTED(CUPS_MINIMAL, "CUPS/$CUPS_VERSION$CUPS_REVISION")
|
||||
AC_DEFINE_UNQUOTED(CUPS_SVERSION, "AC_PACKAGE_NAME v$CUPS_VERSION$CUPS_REVISION")
|
||||
AC_DEFINE_UNQUOTED(CUPS_MINIMAL, "AC_PACKAGE_NAME/$CUPS_VERSION$CUPS_REVISION")
|
||||
|
||||
dnl Default compiler flags...
|
||||
CFLAGS="${CFLAGS:=}"
|
||||
@@ -137,6 +145,7 @@ AC_CHECK_HEADER(bstring.h,AC_DEFINE(HAVE_BSTRING_H))
|
||||
AC_CHECK_HEADER(sys/ioctl.h,AC_DEFINE(HAVE_SYS_IOCTL_H))
|
||||
AC_CHECK_HEADER(sys/param.h,AC_DEFINE(HAVE_SYS_PARAM_H))
|
||||
AC_CHECK_HEADER(sys/ucred.h,AC_DEFINE(HAVE_SYS_UCRED_H))
|
||||
AC_CHECK_HEADER(asl.h,AC_DEFINE(HAVE_ASL_H))
|
||||
|
||||
dnl Checks for iconv.h and iconv_open
|
||||
AC_CHECK_HEADER(iconv.h,
|
||||
@@ -318,7 +327,7 @@ DBUSDIR=""
|
||||
DBUS_NOTIFIER=""
|
||||
DBUS_NOTIFIERLIBS=""
|
||||
|
||||
if test "x$enable_dbus" != xno -a "x$PKGCONFIG" != x; then
|
||||
if test "x$enable_dbus" != xno -a "x$PKGCONFIG" != x -a "x$uname" != xDarwin; then
|
||||
AC_MSG_CHECKING(for DBUS)
|
||||
if $PKGCONFIG --exists dbus-1; then
|
||||
AC_MSG_RESULT(yes)
|
||||
@@ -465,5 +474,5 @@ esac
|
||||
AC_SUBST(BUILDDIRS)
|
||||
|
||||
dnl
|
||||
dnl End of "$Id: cups-common.m4 12336 2014-12-09 21:19:52Z msweet $".
|
||||
dnl End of "$Id: cups-common.m4 13138 2016-03-15 14:59:54Z msweet $".
|
||||
dnl
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
dnl
|
||||
dnl "$Id: cups-compiler.m4 12122 2014-08-28 12:55:52Z msweet $"
|
||||
dnl "$Id: cups-compiler.m4 13138 2016-03-15 14:59:54Z msweet $"
|
||||
dnl
|
||||
dnl Compiler stuff for CUPS.
|
||||
dnl
|
||||
@@ -156,6 +156,15 @@ if test -n "$GCC"; then
|
||||
# Add useful warning options for tracking down problems...
|
||||
OPTIM="-Wall -Wno-format-y2k -Wunused $OPTIM"
|
||||
|
||||
AC_MSG_CHECKING(whether compiler supports -Wno-unused-result)
|
||||
OLDCFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -Werror -Wno-unused-result"
|
||||
AC_TRY_COMPILE(,,
|
||||
[OPTIM="$OPTIM -Wno-unused-result"
|
||||
AC_MSG_RESULT(yes)],
|
||||
AC_MSG_RESULT(no))
|
||||
CFLAGS="$OLDCFLAGS"
|
||||
|
||||
AC_MSG_CHECKING(whether compiler supports -Wsign-conversion)
|
||||
OLDCFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -Werror -Wsign-conversion"
|
||||
@@ -237,5 +246,5 @@ case $uname in
|
||||
esac
|
||||
|
||||
dnl
|
||||
dnl End of "$Id: cups-compiler.m4 12122 2014-08-28 12:55:52Z msweet $".
|
||||
dnl End of "$Id: cups-compiler.m4 13138 2016-03-15 14:59:54Z msweet $".
|
||||
dnl
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
dnl
|
||||
dnl "$Id: cups-defaults.m4 11789 2014-04-02 16:52:53Z msweet $"
|
||||
dnl "$Id: cups-defaults.m4 13138 2016-03-15 14:59:54Z msweet $"
|
||||
dnl
|
||||
dnl Default cupsd configuration settings for CUPS.
|
||||
dnl
|
||||
dnl Copyright 2007-2012 by Apple Inc.
|
||||
dnl Copyright 2007-2015 by Apple Inc.
|
||||
dnl Copyright 2006-2007 by Easy Software Products, all rights reserved.
|
||||
dnl
|
||||
dnl These coded instructions, statements, and computer programs are the
|
||||
@@ -85,7 +85,7 @@ AC_SUBST(CUPS_ACCESS_LOG_LEVEL)
|
||||
AC_DEFINE_UNQUOTED(CUPS_DEFAULT_ACCESS_LOG_LEVEL, "$CUPS_ACCESS_LOG_LEVEL")
|
||||
|
||||
dnl Default PageLogFormat
|
||||
AC_ARG_WITH(page_logging, [ --enable-page-logging enable page_log by default])
|
||||
AC_ARG_ENABLE(page_logging, [ --enable-page-logging enable page_log by default])
|
||||
if test "x$enable_page_logging" = xyes; then
|
||||
CUPS_PAGE_LOG_FORMAT=""
|
||||
else
|
||||
@@ -409,5 +409,5 @@ AC_SUBST(CUPS_WEBIF)
|
||||
AC_DEFINE_UNQUOTED(CUPS_DEFAULT_WEBIF, $CUPS_DEFAULT_WEBIF)
|
||||
|
||||
dnl
|
||||
dnl End of "$Id: cups-defaults.m4 11789 2014-04-02 16:52:53Z msweet $".
|
||||
dnl End of "$Id: cups-defaults.m4 13138 2016-03-15 14:59:54Z msweet $".
|
||||
dnl
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
dnl
|
||||
dnl "$Id: cups-directories.m4 11717 2014-03-21 16:42:53Z msweet $"
|
||||
dnl "$Id: cups-directories.m4 11984 2014-07-02 13:16:59Z msweet $"
|
||||
dnl
|
||||
dnl Directory stuff for CUPS.
|
||||
dnl
|
||||
@@ -305,5 +305,5 @@ AC_DEFINE_UNQUOTED(CUPS_STATEDIR, "$CUPS_STATEDIR")
|
||||
AC_SUBST(CUPS_STATEDIR)
|
||||
|
||||
dnl
|
||||
dnl End of "$Id: cups-directories.m4 11717 2014-03-21 16:42:53Z msweet $".
|
||||
dnl End of "$Id: cups-directories.m4 11984 2014-07-02 13:16:59Z msweet $".
|
||||
dnl
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
dnl
|
||||
dnl "$Id: cups-dnssd.m4 11324 2013-10-04 03:11:42Z msweet $"
|
||||
dnl "$Id: cups-dnssd.m4 13138 2016-03-15 14:59:54Z msweet $"
|
||||
dnl
|
||||
dnl DNS Service Discovery (aka Bonjour) stuff for CUPS.
|
||||
dnl
|
||||
dnl Copyright 2007-2012 by Apple Inc.
|
||||
dnl Copyright 2007-2015 by Apple Inc.
|
||||
dnl
|
||||
dnl These coded instructions, statements, and computer programs are the
|
||||
dnl property of Apple Inc. and are protected by Federal copyright
|
||||
@@ -26,7 +26,7 @@ DNSSD_BACKEND=""
|
||||
IPPFIND_BIN=""
|
||||
IPPFIND_MAN=""
|
||||
|
||||
if test "x$PKGCONFIG" != x -a x$enable_avahi != xno; then
|
||||
if test "x$PKGCONFIG" != x -a x$enable_avahi != xno -a x$uname != xDarwin; then
|
||||
AC_MSG_CHECKING(for Avahi)
|
||||
if $PKGCONFIG --exists avahi-client; then
|
||||
AC_MSG_RESULT(yes)
|
||||
@@ -82,5 +82,5 @@ AC_SUBST(IPPFIND_BIN)
|
||||
AC_SUBST(IPPFIND_MAN)
|
||||
|
||||
dnl
|
||||
dnl End of "$Id: cups-dnssd.m4 11324 2013-10-04 03:11:42Z msweet $".
|
||||
dnl End of "$Id: cups-dnssd.m4 13138 2016-03-15 14:59:54Z msweet $".
|
||||
dnl
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
dnl
|
||||
dnl "$Id: cups-gssapi.m4 11911 2014-06-10 13:54:53Z msweet $"
|
||||
dnl "$Id: cups-gssapi.m4 11984 2014-07-02 13:16:59Z msweet $"
|
||||
dnl
|
||||
dnl GSSAPI/Kerberos library detection for CUPS.
|
||||
dnl
|
||||
@@ -129,5 +129,5 @@ AC_SUBST(CUPS_DEFAULT_GSSSERVICENAME)
|
||||
AC_DEFINE_UNQUOTED(CUPS_DEFAULT_GSSSERVICENAME, "$CUPS_DEFAULT_GSSSERVICENAME")
|
||||
|
||||
dnl
|
||||
dnl End of "$Id: cups-gssapi.m4 11911 2014-06-10 13:54:53Z msweet $".
|
||||
dnl End of "$Id: cups-gssapi.m4 11984 2014-07-02 13:16:59Z msweet $".
|
||||
dnl
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
dnl
|
||||
dnl "$Id: cups-network.m4 12325 2014-12-09 20:28:51Z msweet $"
|
||||
dnl "$Id: cups-network.m4 13138 2016-03-15 14:59:54Z msweet $"
|
||||
dnl
|
||||
dnl Networking stuff for CUPS.
|
||||
dnl
|
||||
@@ -72,5 +72,5 @@ AC_SUBST(CUPS_DEFAULT_DOMAINSOCKET)
|
||||
AC_SUBST(CUPS_LISTEN_DOMAINSOCKET)
|
||||
|
||||
dnl
|
||||
dnl End of "$Id: cups-network.m4 12325 2014-12-09 20:28:51Z msweet $".
|
||||
dnl End of "$Id: cups-network.m4 13138 2016-03-15 14:59:54Z msweet $".
|
||||
dnl
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
dnl
|
||||
dnl "$Id: cups-ssl.m4 12290 2014-12-05 17:25:55Z msweet $"
|
||||
dnl "$Id: cups-ssl.m4 13138 2016-03-15 14:59:54Z msweet $"
|
||||
dnl
|
||||
dnl TLS stuff for CUPS.
|
||||
dnl
|
||||
dnl Copyright 2007-2014 by Apple Inc.
|
||||
dnl Copyright 2007-2015 by Apple Inc.
|
||||
dnl Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
dnl
|
||||
dnl These coded instructions, statements, and computer programs are the
|
||||
@@ -53,6 +53,10 @@ if test x$enable_ssl != xno; then
|
||||
|
||||
AC_DEFINE(HAVE_CSSMERRORSTRING)
|
||||
AC_DEFINE(HAVE_SECKEYCHAINOPEN)])
|
||||
|
||||
if test $uversion -ge 150; then
|
||||
AC_DEFINE(HAVE_SSLSETENABLEDCIPHERS)
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -104,5 +108,5 @@ EXPORT_SSLLIBS="$SSLLIBS"
|
||||
AC_SUBST(EXPORT_SSLLIBS)
|
||||
|
||||
dnl
|
||||
dnl End of "$Id: cups-ssl.m4 12290 2014-12-05 17:25:55Z msweet $".
|
||||
dnl End of "$Id: cups-ssl.m4 13138 2016-03-15 14:59:54Z msweet $".
|
||||
dnl
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
dnl
|
||||
dnl "$Id: cups-startup.m4 12351 2014-12-09 22:18:45Z msweet $"
|
||||
dnl "$Id: cups-startup.m4 13138 2016-03-15 14:59:54Z msweet $"
|
||||
dnl
|
||||
dnl Launch-on-demand/startup stuff for CUPS.
|
||||
dnl
|
||||
dnl Copyright 2007-2014 by Apple Inc.
|
||||
dnl Copyright 2007-2015 by Apple Inc.
|
||||
dnl Copyright 1997-2005 by Easy Software Products, all rights reserved.
|
||||
dnl
|
||||
dnl These coded instructions, statements, and computer programs are the
|
||||
@@ -56,17 +56,33 @@ if test x$enable_systemd != xno; then
|
||||
AC_MSG_ERROR(Need pkg-config to enable systemd support.)
|
||||
fi
|
||||
else
|
||||
AC_MSG_CHECKING(for libsystemd-daemon)
|
||||
if $PKGCONFIG --exists libsystemd-daemon; then
|
||||
have_systemd=no
|
||||
AC_MSG_CHECKING(for libsystemd)
|
||||
if $PKGCONFIG --exists libsystemd; then
|
||||
AC_MSG_RESULT(yes)
|
||||
ONDEMANDFLAGS=`$PKGCONFIG --cflags libsystemd-daemon`
|
||||
ONDEMANDLIBS=`$PKGCONFIG --libs libsystemd-daemon`
|
||||
have_systemd=yes
|
||||
ONDEMANDFLAGS=`$PKGCONFIG --cflags libsystemd`
|
||||
ONDEMANDLIBS=`$PKGCONFIG --libs libsystemd`
|
||||
elif $PKGCONFIG --exists libsystemd-daemon; then
|
||||
AC_MSG_RESULT(yes - legacy)
|
||||
have_systemd=yes
|
||||
ONDEMANDFLAGS=`$PKGCONFIG --cflags libsystemd-daemon`
|
||||
ONDEMANDLIBS=`$PKGCONFIG --libs libsystemd-daemon`
|
||||
|
||||
if $PKGCONFIG --exists libsystemd-journal; then
|
||||
ONDEMANDFLAGS="$ONDEMANDFLAGS `$PKGCONFIG --cflags libsystemd-journal`"
|
||||
ONDEMANDLIBS="$ONDEMANDLIBS `$PKGCONFIG --libs libsystemd-journal`"
|
||||
fi
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
|
||||
if test $have_systemd = yes; then
|
||||
AC_DEFINE(HAVE_SYSTEMD)
|
||||
AC_CHECK_HEADER(systemd/sd-journal.h,AC_DEFINE(HAVE_SYSTEMD_SD_JOURNAL_H))
|
||||
if test "x$SYSTEMD_DIR" = x; then
|
||||
SYSTEMD_DIR="`$PKGCONFIG --variable=systemdsystemunitdir systemd`"
|
||||
fi
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
@@ -172,5 +188,5 @@ fi
|
||||
|
||||
|
||||
dnl
|
||||
dnl End of "$Id: cups-startup.m4 12351 2014-12-09 22:18:45Z msweet $".
|
||||
dnl End of "$Id: cups-startup.m4 13138 2016-03-15 14:59:54Z msweet $".
|
||||
dnl
|
||||
|
||||
+24
-3
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: config.h.in 12329 2014-12-09 20:50:51Z msweet $"
|
||||
* "$Id: config.h.in 13138 2016-03-15 14:59:54Z msweet $"
|
||||
*
|
||||
* Configuration file for CUPS.
|
||||
*
|
||||
* Copyright 2007-2014 by Apple Inc.
|
||||
* Copyright 2007-2015 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -242,6 +242,20 @@
|
||||
#undef HAVE_VSYSLOG
|
||||
|
||||
|
||||
/*
|
||||
* Do we have the ASL functions?
|
||||
*/
|
||||
|
||||
#undef HAVE_ASL_H
|
||||
|
||||
|
||||
/*
|
||||
* Do we have the systemd journal functions?
|
||||
*/
|
||||
|
||||
#undef HAVE_SYSTEMD_SD_JOURNAL_H
|
||||
|
||||
|
||||
/*
|
||||
* Do we have the (v)snprintf() functions?
|
||||
*/
|
||||
@@ -348,6 +362,13 @@
|
||||
#undef HAVE_SECKEYCHAINOPEN
|
||||
|
||||
|
||||
/*
|
||||
* Do we have (a working) SSLSetEnabledCiphers function?
|
||||
*/
|
||||
|
||||
#undef HAVE_SSLSETENABLEDCIPHERS
|
||||
|
||||
|
||||
/*
|
||||
* Do we have libpaper?
|
||||
*/
|
||||
@@ -719,5 +740,5 @@ static __inline int _cups_abs(int i) { return (i < 0 ? -i : i); }
|
||||
#endif /* !_CUPS_CONFIG_H_ */
|
||||
|
||||
/*
|
||||
* End of "$Id: config.h.in 12329 2014-12-09 20:50:51Z msweet $".
|
||||
* End of "$Id: config.h.in 13138 2016-03-15 14:59:54Z msweet $".
|
||||
*/
|
||||
|
||||
externo
+122
-44
@@ -1,6 +1,8 @@
|
||||
#! /bin/sh
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.68.
|
||||
# Generated by GNU Autoconf 2.68 for CUPS 2.2svn.
|
||||
#
|
||||
# Report bugs to <https://www.cups.org/str.php>.
|
||||
#
|
||||
#
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
|
||||
@@ -236,7 +238,8 @@ fi
|
||||
$as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
|
||||
$as_echo "$0: be upgraded to zsh 4.3.4 or later."
|
||||
else
|
||||
$as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
|
||||
$as_echo "$0: Please tell bug-autoconf@gnu.org and
|
||||
$0: https://www.cups.org/str.php about your system,
|
||||
$0: including any error possibly output before this
|
||||
$0: message. Then install a modern shell, or manually run
|
||||
$0: the script under such a shell if you do have one."
|
||||
@@ -555,14 +558,13 @@ MFLAGS=
|
||||
MAKEFLAGS=
|
||||
|
||||
# Identity of this package.
|
||||
PACKAGE_NAME=
|
||||
PACKAGE_TARNAME=
|
||||
PACKAGE_VERSION=
|
||||
PACKAGE_STRING=
|
||||
PACKAGE_BUGREPORT=
|
||||
PACKAGE_URL=
|
||||
PACKAGE_NAME='CUPS'
|
||||
PACKAGE_TARNAME='cups'
|
||||
PACKAGE_VERSION='2.2svn'
|
||||
PACKAGE_STRING='CUPS 2.2svn'
|
||||
PACKAGE_BUGREPORT='https://www.cups.org/str.php'
|
||||
PACKAGE_URL='https://www.cups.org/'
|
||||
|
||||
ac_unique_file="cups/cups.h"
|
||||
# Factoring default headers for most tests.
|
||||
ac_includes_default="\
|
||||
#include <stdio.h>
|
||||
@@ -870,7 +872,7 @@ with_log_file_perm
|
||||
with_fatal_errors
|
||||
with_log_level
|
||||
with_access_log_level
|
||||
with_page_logging
|
||||
enable_page_logging
|
||||
enable_browsing
|
||||
with_local_protocols
|
||||
enable_default_shared
|
||||
@@ -943,7 +945,7 @@ sharedstatedir='${prefix}/com'
|
||||
localstatedir='${prefix}/var'
|
||||
includedir='${prefix}/include'
|
||||
oldincludedir='/usr/include'
|
||||
docdir='${datarootdir}/doc/${PACKAGE}'
|
||||
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
|
||||
infodir='${datarootdir}/info'
|
||||
htmldir='${docdir}'
|
||||
dvidir='${docdir}'
|
||||
@@ -1445,7 +1447,7 @@ if test "$ac_init_help" = "long"; then
|
||||
# Omit some internal or obsolete options to make the list less imposing.
|
||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||
cat <<_ACEOF
|
||||
\`configure' configures this package to adapt to many kinds of systems.
|
||||
\`configure' configures CUPS 2.2svn to adapt to many kinds of systems.
|
||||
|
||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||
|
||||
@@ -1493,7 +1495,7 @@ Fine tuning of the installation directories:
|
||||
--infodir=DIR info documentation [DATAROOTDIR/info]
|
||||
--localedir=DIR locale-dependent data [DATAROOTDIR/locale]
|
||||
--mandir=DIR man documentation [DATAROOTDIR/man]
|
||||
--docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
|
||||
--docdir=DIR documentation root [DATAROOTDIR/doc/cups]
|
||||
--htmldir=DIR html documentation [DOCDIR]
|
||||
--dvidir=DIR dvi documentation [DOCDIR]
|
||||
--pdfdir=DIR pdf documentation [DOCDIR]
|
||||
@@ -1505,7 +1507,9 @@ _ACEOF
|
||||
fi
|
||||
|
||||
if test -n "$ac_init_help"; then
|
||||
|
||||
case $ac_init_help in
|
||||
short | recursive ) echo "Configuration of CUPS 2.2svn:";;
|
||||
esac
|
||||
cat <<\_ACEOF
|
||||
|
||||
Optional Features:
|
||||
@@ -1538,6 +1542,7 @@ Optional Features:
|
||||
--disable-dnssd disable DNS Service Discovery support using mDNSResponder
|
||||
--disable-launchd disable launchd support
|
||||
--disable-systemd disable systemd support
|
||||
--enable-page-logging enable page_log by default
|
||||
--disable-browsing disable Browsing by default
|
||||
--disable-default-shared
|
||||
disable DefaultShared by default
|
||||
@@ -1587,7 +1592,6 @@ Optional Packages:
|
||||
--with-fatal-errors set default FatalErrors value, default=config
|
||||
--with-log-level set default LogLevel value, default=warn
|
||||
--with-access-log-level set default AccessLogLevel value, default=none
|
||||
--enable-page-logging enable page_log by default
|
||||
--with-local-protocols set default BrowseLocalProtocols, default=""
|
||||
--with-cups-user set default user for CUPS
|
||||
--with-cups-group set default group for CUPS
|
||||
@@ -1619,7 +1623,8 @@ Some influential environment variables:
|
||||
Use these variables to override the choices made by `configure' or to help
|
||||
it to find libraries and programs with nonstandard names/locations.
|
||||
|
||||
Report bugs to the package provider.
|
||||
Report bugs to <https://www.cups.org/str.php>.
|
||||
CUPS home page: <https://www.cups.org/>.
|
||||
_ACEOF
|
||||
ac_status=$?
|
||||
fi
|
||||
@@ -1682,7 +1687,7 @@ fi
|
||||
test -n "$ac_init_help" && exit $ac_status
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
configure
|
||||
CUPS configure 2.2svn
|
||||
generated by GNU Autoconf 2.68
|
||||
|
||||
Copyright (C) 2010 Free Software Foundation, Inc.
|
||||
@@ -1967,6 +1972,10 @@ $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
|
||||
$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
|
||||
$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
|
||||
( $as_echo "## ------------------------------------------- ##
|
||||
## Report this to https://www.cups.org/str.php ##
|
||||
## ------------------------------------------- ##"
|
||||
) | sed "s/^/$as_me: WARNING: /" >&2
|
||||
;;
|
||||
esac
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
|
||||
@@ -2142,7 +2151,7 @@ cat >config.log <<_ACEOF
|
||||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
It was created by $as_me, which was
|
||||
It was created by CUPS $as_me 2.2svn, which was
|
||||
generated by GNU Autoconf 2.68. Invocation command line was
|
||||
|
||||
$ $0 $@
|
||||
@@ -2514,16 +2523,25 @@ esac
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
ac_config_headers="$ac_config_headers config.h"
|
||||
|
||||
|
||||
CUPS_VERSION=2.0.3
|
||||
CUPS_REVISION=
|
||||
#if test -z "$CUPS_REVISION" -a -d .svn; then
|
||||
# CUPS_REVISION="-r`svnversion . | awk -F: '{print $NF}' | sed -e '1,$s/[[a-zA-Z]]*//g'`"
|
||||
#fi
|
||||
CUPS_VERSION="2.2svn"
|
||||
|
||||
case "$CUPS_VERSION" in
|
||||
*svn)
|
||||
if test -z "$CUPS_REVISION" -a -d .svn; then
|
||||
CUPS_REVISION="-r`svnversion . | awk -F: '{print $NF}' | sed -e '1,$s/[a-zA-Z]*//g'`"
|
||||
else
|
||||
CUPS_REVISION=""
|
||||
fi
|
||||
;;
|
||||
|
||||
*)
|
||||
CUPS_REVISION=""
|
||||
;;
|
||||
esac
|
||||
|
||||
CUPS_BUILD="cups-$CUPS_VERSION"
|
||||
|
||||
|
||||
@@ -4910,6 +4928,13 @@ if test "x$ac_cv_header_sys_ucred_h" = xyes; then :
|
||||
fi
|
||||
|
||||
|
||||
ac_fn_c_check_header_mongrel "$LINENO" "asl.h" "ac_cv_header_asl_h" "$ac_includes_default"
|
||||
if test "x$ac_cv_header_asl_h" = xyes; then :
|
||||
$as_echo "#define HAVE_ASL_H 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
|
||||
|
||||
|
||||
ac_fn_c_check_header_mongrel "$LINENO" "iconv.h" "ac_cv_header_iconv_h" "$ac_includes_default"
|
||||
if test "x$ac_cv_header_iconv_h" = xyes; then :
|
||||
@@ -5635,7 +5660,7 @@ DBUSDIR=""
|
||||
DBUS_NOTIFIER=""
|
||||
DBUS_NOTIFIERLIBS=""
|
||||
|
||||
if test "x$enable_dbus" != xno -a "x$PKGCONFIG" != x; then
|
||||
if test "x$enable_dbus" != xno -a "x$PKGCONFIG" != x -a "x$uname" != xDarwin; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DBUS" >&5
|
||||
$as_echo_n "checking for DBUS... " >&6; }
|
||||
if $PKGCONFIG --exists dbus-1; then
|
||||
@@ -6769,6 +6794,32 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
# Add useful warning options for tracking down problems...
|
||||
OPTIM="-Wall -Wno-format-y2k -Wunused $OPTIM"
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler supports -Wno-unused-result" >&5
|
||||
$as_echo_n "checking whether compiler supports -Wno-unused-result... " >&6; }
|
||||
OLDCFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -Werror -Wno-unused-result"
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_compile "$LINENO"; then :
|
||||
OPTIM="$OPTIM -Wno-unused-result"
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
CFLAGS="$OLDCFLAGS"
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler supports -Wsign-conversion" >&5
|
||||
$as_echo_n "checking whether compiler supports -Wsign-conversion... " >&6; }
|
||||
OLDCFLAGS="$CFLAGS"
|
||||
@@ -8150,6 +8201,11 @@ fi
|
||||
fi
|
||||
|
||||
|
||||
|
||||
if test $uversion -ge 150; then
|
||||
$as_echo "#define HAVE_SSLSETENABLEDCIPHERS 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -8966,7 +9022,7 @@ DNSSD_BACKEND=""
|
||||
IPPFIND_BIN=""
|
||||
IPPFIND_MAN=""
|
||||
|
||||
if test "x$PKGCONFIG" != x -a x$enable_avahi != xno; then
|
||||
if test "x$PKGCONFIG" != x -a x$enable_avahi != xno -a x$uname != xDarwin; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Avahi" >&5
|
||||
$as_echo_n "checking for Avahi... " >&6; }
|
||||
if $PKGCONFIG --exists avahi-client; then
|
||||
@@ -9122,21 +9178,44 @@ if test x$enable_systemd != xno; then
|
||||
as_fn_error $? "Need pkg-config to enable systemd support." "$LINENO" 5
|
||||
fi
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libsystemd-daemon" >&5
|
||||
$as_echo_n "checking for libsystemd-daemon... " >&6; }
|
||||
if $PKGCONFIG --exists libsystemd-daemon; then
|
||||
have_systemd=no
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libsystemd" >&5
|
||||
$as_echo_n "checking for libsystemd... " >&6; }
|
||||
if $PKGCONFIG --exists libsystemd; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
ONDEMANDFLAGS=`$PKGCONFIG --cflags libsystemd-daemon`
|
||||
ONDEMANDLIBS=`$PKGCONFIG --libs libsystemd-daemon`
|
||||
have_systemd=yes
|
||||
ONDEMANDFLAGS=`$PKGCONFIG --cflags libsystemd`
|
||||
ONDEMANDLIBS=`$PKGCONFIG --libs libsystemd`
|
||||
elif $PKGCONFIG --exists libsystemd-daemon; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes - legacy" >&5
|
||||
$as_echo "yes - legacy" >&6; }
|
||||
have_systemd=yes
|
||||
ONDEMANDFLAGS=`$PKGCONFIG --cflags libsystemd-daemon`
|
||||
ONDEMANDLIBS=`$PKGCONFIG --libs libsystemd-daemon`
|
||||
|
||||
if $PKGCONFIG --exists libsystemd-journal; then
|
||||
ONDEMANDFLAGS="$ONDEMANDFLAGS `$PKGCONFIG --cflags libsystemd-journal`"
|
||||
ONDEMANDLIBS="$ONDEMANDLIBS `$PKGCONFIG --libs libsystemd-journal`"
|
||||
fi
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
fi
|
||||
|
||||
if test $have_systemd = yes; then
|
||||
$as_echo "#define HAVE_SYSTEMD 1" >>confdefs.h
|
||||
|
||||
ac_fn_c_check_header_mongrel "$LINENO" "systemd/sd-journal.h" "ac_cv_header_systemd_sd_journal_h" "$ac_includes_default"
|
||||
if test "x$ac_cv_header_systemd_sd_journal_h" = xyes; then :
|
||||
$as_echo "#define HAVE_SYSTEMD_SD_JOURNAL_H 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
|
||||
|
||||
if test "x$SYSTEMD_DIR" = x; then
|
||||
SYSTEMD_DIR="`$PKGCONFIG --variable=systemdsystemunitdir systemd`"
|
||||
fi
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
@@ -9401,10 +9480,9 @@ cat >>confdefs.h <<_ACEOF
|
||||
_ACEOF
|
||||
|
||||
|
||||
|
||||
# Check whether --with-page_logging was given.
|
||||
if test "${with_page_logging+set}" = set; then :
|
||||
withval=$with_page_logging;
|
||||
# Check whether --enable-page_logging was given.
|
||||
if test "${enable_page_logging+set}" = set; then :
|
||||
enableval=$enable_page_logging;
|
||||
fi
|
||||
|
||||
if test "x$enable_page_logging" = xyes; then
|
||||
@@ -10167,7 +10245,7 @@ fi
|
||||
|
||||
|
||||
|
||||
ac_config_files="$ac_config_files Makedefs conf/cups-files.conf conf/cupsd.conf conf/mime.convs conf/pam.std conf/snmp.conf cups-config data/testprint desktop/cups.desktop doc/index.html man/client.conf.man man/cups-files.conf.man man/cups-lpd.man man/cups-snmp.man man/cupsaddsmb.man man/cupsd.conf.man man/cupsd.man man/lpoptions.man scheduler/cups-lpd.xinetd scheduler/cups.sh scheduler/cups.xml scheduler/org.cups.cups-lpd.plist scheduler/org.cups.cups-lpdAT.service scheduler/org.cups.cupsd.path scheduler/org.cups.cupsd.service scheduler/org.cups.cupsd.socket templates/header.tmpl packaging/cups.list $LANGFILES"
|
||||
ac_config_files="$ac_config_files Makedefs conf/cups-files.conf conf/cupsd.conf conf/mime.convs conf/pam.std conf/snmp.conf cups-config desktop/cups.desktop doc/index.html man/client.conf.man man/cups-files.conf.man man/cups-lpd.man man/cups-snmp.man man/cupsaddsmb.man man/cupsd.conf.man man/cupsd.man man/lpoptions.man scheduler/cups-lpd.xinetd scheduler/cups.sh scheduler/cups.xml scheduler/org.cups.cups-lpd.plist scheduler/org.cups.cups-lpdAT.service scheduler/org.cups.cupsd.path scheduler/org.cups.cupsd.service scheduler/org.cups.cupsd.socket templates/header.tmpl packaging/cups.list $LANGFILES"
|
||||
|
||||
cat >confcache <<\_ACEOF
|
||||
# This file is a shell script that caches the results of configure
|
||||
@@ -10687,7 +10765,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
|
||||
# report actual input values of CONFIG_FILES etc. instead of their
|
||||
# values after options handling.
|
||||
ac_log="
|
||||
This file was extended by $as_me, which was
|
||||
This file was extended by CUPS $as_me 2.2svn, which was
|
||||
generated by GNU Autoconf 2.68. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
@@ -10743,13 +10821,14 @@ $config_files
|
||||
Configuration headers:
|
||||
$config_headers
|
||||
|
||||
Report bugs to the package provider."
|
||||
Report bugs to <https://www.cups.org/str.php>.
|
||||
CUPS home page: <https://www.cups.org/>."
|
||||
|
||||
_ACEOF
|
||||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
|
||||
ac_cs_version="\\
|
||||
config.status
|
||||
CUPS config.status 2.2svn
|
||||
configured by $0, generated by GNU Autoconf 2.68,
|
||||
with options \\"\$ac_cs_config\\"
|
||||
|
||||
@@ -10879,7 +10958,6 @@ do
|
||||
"conf/pam.std") CONFIG_FILES="$CONFIG_FILES conf/pam.std" ;;
|
||||
"conf/snmp.conf") CONFIG_FILES="$CONFIG_FILES conf/snmp.conf" ;;
|
||||
"cups-config") CONFIG_FILES="$CONFIG_FILES cups-config" ;;
|
||||
"data/testprint") CONFIG_FILES="$CONFIG_FILES data/testprint" ;;
|
||||
"desktop/cups.desktop") CONFIG_FILES="$CONFIG_FILES desktop/cups.desktop" ;;
|
||||
"doc/index.html") CONFIG_FILES="$CONFIG_FILES doc/index.html" ;;
|
||||
"man/client.conf.man") CONFIG_FILES="$CONFIG_FILES man/client.conf.man" ;;
|
||||
|
||||
+8
-5
@@ -1,9 +1,9 @@
|
||||
dnl
|
||||
dnl "$Id: configure.ac 12222 2014-10-21 11:55:01Z msweet $"
|
||||
dnl "$Id: configure.ac 13138 2016-03-15 14:59:54Z msweet $"
|
||||
dnl
|
||||
dnl Configuration script for CUPS.
|
||||
dnl
|
||||
dnl Copyright 2007-2014 by Apple Inc.
|
||||
dnl Copyright 2007-2015 by Apple Inc.
|
||||
dnl Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
dnl
|
||||
dnl These coded instructions, statements, and computer programs are the
|
||||
@@ -13,7 +13,11 @@ dnl which should have been included with this file. If this file is
|
||||
dnl file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
dnl
|
||||
|
||||
AC_INIT(cups/cups.h)
|
||||
dnl We need at least autoconf 2.60...
|
||||
AC_PREREQ(2.60)
|
||||
|
||||
dnl Package name and version...
|
||||
AC_INIT([CUPS], [2.2svn], [https://www.cups.org/str.php], [cups], [https://www.cups.org/])
|
||||
|
||||
sinclude(config-scripts/cups-opsys.m4)
|
||||
sinclude(config-scripts/cups-common.m4)
|
||||
@@ -66,7 +70,6 @@ AC_OUTPUT(Makedefs
|
||||
conf/pam.std
|
||||
conf/snmp.conf
|
||||
cups-config
|
||||
data/testprint
|
||||
desktop/cups.desktop
|
||||
doc/index.html
|
||||
man/client.conf.man
|
||||
@@ -92,5 +95,5 @@ AC_OUTPUT(Makedefs
|
||||
chmod +x cups-config
|
||||
|
||||
dnl
|
||||
dnl End of "$Id: configure.ac 12222 2014-10-21 11:55:01Z msweet $".
|
||||
dnl End of "$Id: configure.ac 13138 2016-03-15 14:59:54Z msweet $".
|
||||
dnl
|
||||
|
||||
+112
-119
@@ -2,99 +2,67 @@ adminutil.o: adminutil.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h ppd-private.h ../cups/ppd.h \
|
||||
thread-private.h adminutil.h
|
||||
../cups/cups.h file.h pwg.h thread-private.h ppd.h raster.h \
|
||||
adminutil.h
|
||||
array.o: array.c ../cups/cups.h file.h versioning.h ipp.h http.h array.h \
|
||||
language.h pwg.h string-private.h ../config.h debug-private.h \
|
||||
array-private.h
|
||||
attr.o: attr.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h ppd-private.h ../cups/ppd.h \
|
||||
thread-private.h
|
||||
auth.o: auth.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h ppd-private.h ../cups/ppd.h \
|
||||
thread-private.h
|
||||
../cups/cups.h file.h pwg.h thread-private.h
|
||||
backchannel.o: backchannel.c cups.h file.h versioning.h ipp.h http.h \
|
||||
array.h language.h pwg.h
|
||||
backend.o: backend.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h ppd-private.h ../cups/ppd.h \
|
||||
thread-private.h backend.h
|
||||
conflicts.o: conflicts.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h ppd-private.h ../cups/ppd.h \
|
||||
thread-private.h
|
||||
custom.o: custom.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h ppd-private.h ../cups/ppd.h \
|
||||
thread-private.h
|
||||
../cups/cups.h file.h pwg.h thread-private.h backend.h ppd.h raster.h
|
||||
debug.o: debug.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h ppd-private.h ../cups/ppd.h \
|
||||
thread-private.h
|
||||
../cups/cups.h file.h pwg.h thread-private.h
|
||||
dest.o: dest.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h ppd-private.h ../cups/ppd.h \
|
||||
thread-private.h
|
||||
../cups/cups.h file.h pwg.h thread-private.h
|
||||
dest-job.o: dest-job.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h ppd-private.h ../cups/ppd.h \
|
||||
thread-private.h
|
||||
../cups/cups.h file.h pwg.h thread-private.h
|
||||
dest-localization.o: dest-localization.c cups-private.h string-private.h \
|
||||
../config.h debug-private.h ../cups/versioning.h array-private.h \
|
||||
../cups/array.h ipp-private.h ../cups/ipp.h http.h http-private.h \
|
||||
../cups/language.h md5-private.h language-private.h \
|
||||
../cups/transcode.h pwg-private.h ../cups/cups.h file.h pwg.h \
|
||||
ppd-private.h ../cups/ppd.h thread-private.h
|
||||
thread-private.h
|
||||
dest-options.o: dest-options.c cups-private.h string-private.h \
|
||||
../config.h debug-private.h ../cups/versioning.h array-private.h \
|
||||
../cups/array.h ipp-private.h ../cups/ipp.h http.h http-private.h \
|
||||
../cups/language.h md5-private.h language-private.h \
|
||||
../cups/transcode.h pwg-private.h ../cups/cups.h file.h pwg.h \
|
||||
ppd-private.h ../cups/ppd.h thread-private.h
|
||||
thread-private.h
|
||||
dir.o: dir.c string-private.h ../config.h debug-private.h \
|
||||
../cups/versioning.h dir.h
|
||||
emit.o: emit.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h ppd-private.h ../cups/ppd.h \
|
||||
thread-private.h
|
||||
encode.o: encode.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h ppd-private.h ../cups/ppd.h \
|
||||
thread-private.h
|
||||
../cups/cups.h file.h pwg.h thread-private.h
|
||||
file.o: file.c file-private.h cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h ppd-private.h ../cups/ppd.h \
|
||||
thread-private.h
|
||||
../cups/cups.h file.h pwg.h thread-private.h
|
||||
getdevices.o: getdevices.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h ppd-private.h ../cups/ppd.h \
|
||||
thread-private.h
|
||||
../cups/cups.h file.h pwg.h thread-private.h
|
||||
getifaddrs.o: getifaddrs.c http-private.h ../config.h ../cups/language.h \
|
||||
array.h versioning.h ../cups/http.h md5-private.h ipp-private.h \
|
||||
../cups/ipp.h
|
||||
@@ -102,73 +70,59 @@ getputfile.o: getputfile.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h ppd-private.h ../cups/ppd.h \
|
||||
thread-private.h
|
||||
../cups/cups.h file.h pwg.h thread-private.h
|
||||
globals.o: globals.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h ppd-private.h ../cups/ppd.h \
|
||||
thread-private.h
|
||||
../cups/cups.h file.h pwg.h thread-private.h
|
||||
hash.o: hash.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h thread-private.h
|
||||
http.o: http.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h ppd-private.h ../cups/ppd.h \
|
||||
thread-private.h
|
||||
../cups/cups.h file.h pwg.h thread-private.h
|
||||
http-addr.o: http-addr.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h ppd-private.h ../cups/ppd.h \
|
||||
thread-private.h
|
||||
../cups/cups.h file.h pwg.h thread-private.h
|
||||
http-addrlist.o: http-addrlist.c cups-private.h string-private.h \
|
||||
../config.h debug-private.h ../cups/versioning.h array-private.h \
|
||||
../cups/array.h ipp-private.h ../cups/ipp.h http.h http-private.h \
|
||||
../cups/language.h md5-private.h language-private.h \
|
||||
../cups/transcode.h pwg-private.h ../cups/cups.h file.h pwg.h \
|
||||
ppd-private.h ../cups/ppd.h thread-private.h
|
||||
thread-private.h
|
||||
http-support.o: http-support.c cups-private.h string-private.h \
|
||||
../config.h debug-private.h ../cups/versioning.h array-private.h \
|
||||
../cups/array.h ipp-private.h ../cups/ipp.h http.h http-private.h \
|
||||
../cups/language.h md5-private.h language-private.h \
|
||||
../cups/transcode.h pwg-private.h ../cups/cups.h file.h pwg.h \
|
||||
ppd-private.h ../cups/ppd.h thread-private.h
|
||||
thread-private.h
|
||||
ipp.o: ipp.c cups-private.h string-private.h ../config.h debug-private.h \
|
||||
../cups/versioning.h array-private.h ../cups/array.h ipp-private.h \
|
||||
../cups/ipp.h http.h http-private.h ../cups/language.h md5-private.h \
|
||||
language-private.h ../cups/transcode.h pwg-private.h ../cups/cups.h \
|
||||
file.h pwg.h ppd-private.h ../cups/ppd.h thread-private.h
|
||||
file.h pwg.h thread-private.h
|
||||
ipp-support.o: ipp-support.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h ppd-private.h ../cups/ppd.h \
|
||||
thread-private.h
|
||||
../cups/cups.h file.h pwg.h thread-private.h
|
||||
langprintf.o: langprintf.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h ppd-private.h ../cups/ppd.h \
|
||||
thread-private.h
|
||||
../cups/cups.h file.h pwg.h thread-private.h
|
||||
language.o: language.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h ppd-private.h ../cups/ppd.h \
|
||||
thread-private.h
|
||||
localize.o: localize.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h ppd-private.h ../cups/ppd.h \
|
||||
thread-private.h
|
||||
mark.o: mark.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h ppd-private.h ../cups/ppd.h \
|
||||
thread-private.h
|
||||
../cups/cups.h file.h pwg.h thread-private.h
|
||||
md5.o: md5.c md5-private.h string-private.h ../config.h
|
||||
md5passwd.o: md5passwd.c http-private.h ../config.h ../cups/language.h \
|
||||
array.h versioning.h ../cups/http.h md5-private.h ipp-private.h \
|
||||
@@ -177,102 +131,138 @@ notify.o: notify.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h ppd-private.h ../cups/ppd.h \
|
||||
thread-private.h
|
||||
../cups/cups.h file.h pwg.h thread-private.h
|
||||
options.o: options.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h ppd-private.h ../cups/ppd.h \
|
||||
thread-private.h
|
||||
page.o: page.c string-private.h ../config.h debug-private.h \
|
||||
../cups/versioning.h ppd.h cups.h file.h ipp.h http.h array.h \
|
||||
language.h pwg.h
|
||||
../cups/cups.h file.h pwg.h thread-private.h
|
||||
ppd.o: ppd.c cups-private.h string-private.h ../config.h debug-private.h \
|
||||
../cups/versioning.h array-private.h ../cups/array.h ipp-private.h \
|
||||
../cups/ipp.h http.h http-private.h ../cups/language.h md5-private.h \
|
||||
language-private.h ../cups/transcode.h pwg-private.h ../cups/cups.h \
|
||||
file.h pwg.h ppd-private.h ../cups/ppd.h thread-private.h
|
||||
file.h pwg.h thread-private.h ppd-private.h ../cups/ppd.h raster.h
|
||||
ppd-attr.o: ppd-attr.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h thread-private.h ppd-private.h \
|
||||
../cups/ppd.h raster.h
|
||||
ppd-cache.o: ppd-cache.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h ppd-private.h ../cups/ppd.h \
|
||||
thread-private.h
|
||||
../cups/cups.h file.h pwg.h thread-private.h ppd-private.h \
|
||||
../cups/ppd.h raster.h
|
||||
ppd-conflicts.o: ppd-conflicts.c cups-private.h string-private.h \
|
||||
../config.h debug-private.h ../cups/versioning.h array-private.h \
|
||||
../cups/array.h ipp-private.h ../cups/ipp.h http.h http-private.h \
|
||||
../cups/language.h md5-private.h language-private.h \
|
||||
../cups/transcode.h pwg-private.h ../cups/cups.h file.h pwg.h \
|
||||
thread-private.h ppd-private.h ../cups/ppd.h raster.h
|
||||
ppd-custom.o: ppd-custom.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h thread-private.h ppd-private.h \
|
||||
../cups/ppd.h raster.h
|
||||
ppd-emit.o: ppd-emit.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h thread-private.h ppd.h raster.h
|
||||
ppd-localize.o: ppd-localize.c cups-private.h string-private.h \
|
||||
../config.h debug-private.h ../cups/versioning.h array-private.h \
|
||||
../cups/array.h ipp-private.h ../cups/ipp.h http.h http-private.h \
|
||||
../cups/language.h md5-private.h language-private.h \
|
||||
../cups/transcode.h pwg-private.h ../cups/cups.h file.h pwg.h \
|
||||
thread-private.h ppd-private.h ../cups/ppd.h raster.h
|
||||
ppd-mark.o: ppd-mark.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h thread-private.h ppd-private.h \
|
||||
../cups/ppd.h raster.h
|
||||
ppd-page.o: ppd-page.c string-private.h ../config.h debug-private.h \
|
||||
../cups/versioning.h ppd.h cups.h file.h ipp.h http.h array.h \
|
||||
language.h pwg.h raster.h
|
||||
ppd-util.o: ppd-util.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h thread-private.h ppd-private.h \
|
||||
../cups/ppd.h raster.h
|
||||
pwg-media.o: pwg-media.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h ppd-private.h ../cups/ppd.h \
|
||||
thread-private.h
|
||||
../cups/cups.h file.h pwg.h thread-private.h
|
||||
request.o: request.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h ppd-private.h ../cups/ppd.h \
|
||||
thread-private.h
|
||||
../cups/cups.h file.h pwg.h thread-private.h
|
||||
sidechannel.o: sidechannel.c sidechannel.h versioning.h cups-private.h \
|
||||
string-private.h ../config.h debug-private.h array-private.h \
|
||||
../cups/array.h ipp-private.h ../cups/ipp.h http.h http-private.h \
|
||||
../cups/language.h md5-private.h language-private.h \
|
||||
../cups/transcode.h pwg-private.h ../cups/cups.h file.h pwg.h \
|
||||
ppd-private.h ../cups/ppd.h thread-private.h
|
||||
thread-private.h
|
||||
snmp.o: snmp.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h ppd-private.h ../cups/ppd.h \
|
||||
thread-private.h snmp-private.h
|
||||
../cups/cups.h file.h pwg.h thread-private.h snmp-private.h
|
||||
snprintf.o: snprintf.c string-private.h ../config.h
|
||||
string.o: string.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h ppd-private.h ../cups/ppd.h \
|
||||
thread-private.h
|
||||
../cups/cups.h file.h pwg.h thread-private.h
|
||||
tempfile.o: tempfile.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h ppd-private.h ../cups/ppd.h \
|
||||
thread-private.h
|
||||
../cups/cups.h file.h pwg.h thread-private.h
|
||||
thread.o: thread.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h ppd-private.h ../cups/ppd.h \
|
||||
thread-private.h
|
||||
../cups/cups.h file.h pwg.h thread-private.h
|
||||
tls.o: tls.c cups-private.h string-private.h ../config.h debug-private.h \
|
||||
../cups/versioning.h array-private.h ../cups/array.h ipp-private.h \
|
||||
../cups/ipp.h http.h http-private.h ../cups/language.h md5-private.h \
|
||||
language-private.h ../cups/transcode.h pwg-private.h ../cups/cups.h \
|
||||
file.h pwg.h ppd-private.h ../cups/ppd.h thread-private.h tls-darwin.c
|
||||
file.h pwg.h thread-private.h tls-darwin.c
|
||||
transcode.o: transcode.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h ppd-private.h ../cups/ppd.h \
|
||||
thread-private.h
|
||||
../cups/cups.h file.h pwg.h thread-private.h
|
||||
usersys.o: usersys.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h ppd-private.h ../cups/ppd.h \
|
||||
thread-private.h
|
||||
../cups/cups.h file.h pwg.h thread-private.h
|
||||
util.o: util.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h ppd-private.h ../cups/ppd.h \
|
||||
thread-private.h
|
||||
../cups/cups.h file.h pwg.h thread-private.h
|
||||
testadmin.o: testadmin.c adminutil.h cups.h file.h versioning.h ipp.h \
|
||||
http.h array.h language.h pwg.h string-private.h ../config.h
|
||||
testarray.o: testarray.c string-private.h ../config.h debug-private.h \
|
||||
../cups/versioning.h array-private.h ../cups/array.h dir.h
|
||||
testcache.o: testcache.c ppd-private.h ../cups/cups.h file.h versioning.h \
|
||||
ipp.h http.h array.h language.h pwg.h ../cups/ppd.h raster.h \
|
||||
pwg-private.h file-private.h cups-private.h string-private.h \
|
||||
../config.h debug-private.h array-private.h ipp-private.h \
|
||||
http-private.h md5-private.h language-private.h ../cups/transcode.h \
|
||||
thread-private.h
|
||||
testconflicts.o: testconflicts.c cups.h file.h versioning.h ipp.h http.h \
|
||||
array.h language.h pwg.h ppd.h string-private.h ../config.h
|
||||
array.h language.h pwg.h ppd.h raster.h string-private.h ../config.h
|
||||
testcups.o: testcups.c string-private.h ../config.h cups.h file.h \
|
||||
versioning.h ipp.h http.h array.h language.h pwg.h ppd.h
|
||||
versioning.h ipp.h http.h array.h language.h pwg.h ppd.h raster.h
|
||||
testdest.o: testdest.c cups.h file.h versioning.h ipp.h http.h array.h \
|
||||
language.h pwg.h
|
||||
testfile.o: testfile.c string-private.h ../config.h debug-private.h \
|
||||
@@ -281,8 +271,7 @@ testhttp.o: testhttp.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h ppd-private.h ../cups/ppd.h \
|
||||
thread-private.h
|
||||
../cups/cups.h file.h pwg.h thread-private.h
|
||||
testi18n.o: testi18n.c string-private.h ../config.h language-private.h \
|
||||
../cups/transcode.h language.h array.h versioning.h
|
||||
testipp.o: testipp.c file.h versioning.h string-private.h ../config.h \
|
||||
@@ -291,28 +280,32 @@ testoptions.o: testoptions.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h ppd-private.h ../cups/ppd.h \
|
||||
thread-private.h
|
||||
../cups/cups.h file.h pwg.h thread-private.h
|
||||
testlang.o: testlang.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h ppd-private.h ../cups/ppd.h \
|
||||
thread-private.h
|
||||
../cups/cups.h file.h pwg.h thread-private.h ppd-private.h \
|
||||
../cups/ppd.h raster.h
|
||||
testppd.o: testppd.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h ppd-private.h ../cups/ppd.h \
|
||||
thread-private.h
|
||||
../cups/cups.h file.h pwg.h thread-private.h ppd-private.h \
|
||||
../cups/ppd.h raster.h
|
||||
testpwg.o: testpwg.c ppd-private.h ../cups/cups.h file.h versioning.h \
|
||||
ipp.h http.h array.h language.h pwg.h ../cups/ppd.h pwg-private.h \
|
||||
file-private.h cups-private.h string-private.h ../config.h \
|
||||
debug-private.h array-private.h ipp-private.h http-private.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h thread-private.h
|
||||
ipp.h http.h array.h language.h pwg.h ../cups/ppd.h raster.h \
|
||||
pwg-private.h file-private.h cups-private.h string-private.h \
|
||||
../config.h debug-private.h array-private.h ipp-private.h \
|
||||
http-private.h md5-private.h language-private.h ../cups/transcode.h \
|
||||
thread-private.h
|
||||
testsnmp.o: testsnmp.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h ppd-private.h ../cups/ppd.h \
|
||||
thread-private.h snmp-private.h
|
||||
../cups/cups.h file.h pwg.h thread-private.h snmp-private.h
|
||||
tlscheck.o: tlscheck.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h thread-private.h
|
||||
|
||||
+49
-19
@@ -1,9 +1,9 @@
|
||||
#
|
||||
# "$Id: Makefile 12032 2014-07-15 20:37:32Z msweet $"
|
||||
# "$Id: Makefile 13138 2016-03-15 14:59:54Z msweet $"
|
||||
#
|
||||
# API library Makefile for CUPS.
|
||||
#
|
||||
# Copyright 2007-2014 by Apple Inc.
|
||||
# Copyright 2007-2015 by Apple Inc.
|
||||
# Copyright 1997-2006 by Easy Software Products, all rights reserved.
|
||||
#
|
||||
# These coded instructions, statements, and computer programs are the
|
||||
@@ -32,42 +32,45 @@ OPTIONS = -D_CUPS_NO_DEPRECATED=1 -D_PPD_DEPRECATED=""
|
||||
LIBOBJS = \
|
||||
adminutil.o \
|
||||
array.o \
|
||||
attr.o \
|
||||
auth.o \
|
||||
backchannel.o \
|
||||
backend.o \
|
||||
conflicts.o \
|
||||
custom.o \
|
||||
debug.o \
|
||||
dest.o \
|
||||
dest-job.o \
|
||||
dest-localization.o \
|
||||
dest-options.o \
|
||||
dir.o \
|
||||
emit.o \
|
||||
encode.o \
|
||||
file.o \
|
||||
getdevices.o \
|
||||
getifaddrs.o \
|
||||
getputfile.o \
|
||||
globals.o \
|
||||
hash.o \
|
||||
http.o \
|
||||
http-addr.o \
|
||||
http-addrlist.o \
|
||||
http-support.o \
|
||||
huffman.o \
|
||||
ipp.o \
|
||||
ipp-support.o \
|
||||
langprintf.o \
|
||||
language.o \
|
||||
localize.o \
|
||||
mark.o \
|
||||
md5.o \
|
||||
md5passwd.o \
|
||||
notify.o \
|
||||
options.o \
|
||||
page.o \
|
||||
ppd.o \
|
||||
ppd-attr.o \
|
||||
ppd-cache.o \
|
||||
ppd-conflicts.o \
|
||||
ppd-custom.o \
|
||||
ppd-emit.o \
|
||||
ppd-localize.o \
|
||||
ppd-mark.o \
|
||||
ppd-page.o \
|
||||
ppd-util.o \
|
||||
pwg-media.o \
|
||||
request.o \
|
||||
sidechannel.o \
|
||||
@@ -83,18 +86,21 @@ LIBOBJS = \
|
||||
TESTOBJS = \
|
||||
testadmin.o \
|
||||
testarray.o \
|
||||
testcache.o \
|
||||
testconflicts.o \
|
||||
testcups.o \
|
||||
testdest.o \
|
||||
testfile.o \
|
||||
testhttp.o \
|
||||
testhuffman.o \
|
||||
testi18n.o \
|
||||
testipp.o \
|
||||
testoptions.o \
|
||||
testlang.o \
|
||||
testppd.o \
|
||||
testpwg.o \
|
||||
testsnmp.o
|
||||
testsnmp.o \
|
||||
tlscheck.o
|
||||
OBJS = \
|
||||
$(LIBOBJS) \
|
||||
$(TESTOBJS)
|
||||
@@ -127,6 +133,7 @@ HEADERSPRIV = \
|
||||
debug-private.h \
|
||||
file-private.h \
|
||||
http-private.h \
|
||||
huffman-private.h \
|
||||
ipp-private.h \
|
||||
language-private.h \
|
||||
md5-private.h \
|
||||
@@ -155,13 +162,15 @@ UNITTARGETS = \
|
||||
testdest \
|
||||
testfile \
|
||||
testhttp \
|
||||
testhuffman \
|
||||
testi18n \
|
||||
testipp \
|
||||
testlang \
|
||||
testoptions \
|
||||
testppd \
|
||||
testpwg \
|
||||
testsnmp
|
||||
testsnmp \
|
||||
tlscheck
|
||||
|
||||
TARGETS = \
|
||||
$(LIBTARGETS)
|
||||
@@ -317,13 +326,14 @@ libcups.so.2: $(LIBOBJS)
|
||||
|
||||
libcups.2.dylib: $(LIBOBJS) $(LIBCUPSORDER)
|
||||
echo Creating export list for $@...
|
||||
nm $(LIBOBJS) 2>/dev/null | grep "T _" | awk '{print $$3}' | \
|
||||
grep -v -e '^(_cupsConnect|_cupsCharset|_cupsEncodingName|_cupsSetDefaults|_cupsSetHTTPError|_cupsUserDefault|_httpWait)$$' | \
|
||||
nm -gm $(LIBOBJS) 2>/dev/null | grep "__text" | grep -v weak | \
|
||||
awk '{print $$NF}' | \
|
||||
grep -v -E -e '^(_cupsConnect|_cupsCharset|_cupsEncodingName|_cupsSetDefaults|_cupsSetHTTPError|_cupsUserDefault)$$' | \
|
||||
sort >t.exp
|
||||
echo Linking $@...
|
||||
$(DSO) $(ARCHFLAGS) $(DSOFLAGS) -o $@ \
|
||||
-install_name $(libdir)/$@ \
|
||||
-current_version 2.11.0 \
|
||||
-current_version 2.12.0 \
|
||||
-compatibility_version 2.0.0 \
|
||||
-exported_symbols_list t.exp \
|
||||
$(LIBOBJS) $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) \
|
||||
@@ -339,7 +349,7 @@ libcups.2.dylib: $(LIBOBJS) $(LIBCUPSORDER)
|
||||
libcups.la: $(LIBOBJS)
|
||||
echo Linking $@...
|
||||
$(CC) $(ARCHFLAGS) $(DSOFLAGS) -o $@ $(LIBOBJS:.o=.lo) \
|
||||
-rpath $(LIBDIR) -version-info 2:11 $(LIBGSSAPI) $(SSLLIBS) \
|
||||
-rpath $(LIBDIR) -version-info 2:12 $(LIBGSSAPI) $(SSLLIBS) \
|
||||
$(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
|
||||
|
||||
|
||||
@@ -457,6 +467,18 @@ testhttp: testhttp.o $(LIBCUPSSTATIC)
|
||||
./testhttp
|
||||
|
||||
|
||||
#
|
||||
# testhuffman (dependency on static CUPS library is intentional)
|
||||
#
|
||||
|
||||
testhuffman: testhuffman.o $(LIBCUPSSTATIC)
|
||||
echo Linking $@...
|
||||
$(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testhuffman.o $(LIBCUPSSTATIC) \
|
||||
$(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
|
||||
echo Running HTTP/2 Huffman tests...
|
||||
./testhuffman
|
||||
|
||||
|
||||
#
|
||||
# testipp (dependency on static CUPS library is intentional)
|
||||
#
|
||||
@@ -539,6 +561,16 @@ testsnmp: testsnmp.o $(LIBCUPSSTATIC)
|
||||
$(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
|
||||
|
||||
|
||||
#
|
||||
# tlscheck (dependency on static CUPS library is intentional)
|
||||
#
|
||||
|
||||
tlscheck: tlscheck.o $(LIBCUPSSTATIC)
|
||||
echo Linking $@...
|
||||
$(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ tlscheck.o $(LIBCUPSSTATIC) \
|
||||
$(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
|
||||
|
||||
|
||||
#
|
||||
# Automatic API help files...
|
||||
#
|
||||
@@ -576,9 +608,7 @@ apihelp:
|
||||
mxmldoc --section "Programming" --title "PPD API (DEPRECATED)" \
|
||||
--css ../doc/cups-printable.css \
|
||||
--header api-ppd.header --intro api-ppd.shtml \
|
||||
api-ppd.xml \
|
||||
ppd.h attr.c conflicts.c custom.c emit.c localize.c mark.c page.c \
|
||||
ppd.c >../doc/help/api-ppd.html
|
||||
api-ppd.xml ppd.h ppd-*.c >../doc/help/api-ppd.html
|
||||
mxmldoc --tokens help/api-ppd.html api-ppd.xml >../doc/help/api-ppd.tokens
|
||||
$(RM) api-ppd.xml
|
||||
mxmldoc --section "Programming" --title "HTTP and IPP APIs" \
|
||||
@@ -665,5 +695,5 @@ tls.o: tls-darwin.c tls-gnutls.c tls-sspi.c
|
||||
|
||||
|
||||
#
|
||||
# End of "$Id: Makefile 12032 2014-07-15 20:37:32Z msweet $".
|
||||
# End of "$Id: Makefile 13138 2016-03-15 14:59:54Z msweet $".
|
||||
#
|
||||
|
||||
+48
-4
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: adminutil.c 11598 2014-02-18 18:58:19Z msweet $"
|
||||
* "$Id: adminutil.c 13138 2016-03-15 14:59:54Z msweet $"
|
||||
*
|
||||
* Administration utility API definitions for CUPS.
|
||||
*
|
||||
* Copyright 2007-2014 by Apple Inc.
|
||||
* Copyright 2007-2015 by Apple Inc.
|
||||
* Copyright 2001-2007 by Easy Software Products.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -20,6 +20,7 @@
|
||||
*/
|
||||
|
||||
#include "cups-private.h"
|
||||
#include "ppd.h"
|
||||
#include "adminutil.h"
|
||||
#include <fcntl.h>
|
||||
#include <sys/stat.h>
|
||||
@@ -1175,6 +1176,7 @@ cupsAdminSetServerSettings(
|
||||
in_cancel_job, /* In a cancel-job section? */
|
||||
in_admin_location, /* In the /admin location? */
|
||||
in_conf_location, /* In the /admin/conf location? */
|
||||
in_log_location, /* In the /admin/log location? */
|
||||
in_root_location; /* In the / location? */
|
||||
const char *val; /* Setting value */
|
||||
int share_printers, /* Share local printers */
|
||||
@@ -1188,6 +1190,7 @@ cupsAdminSetServerSettings(
|
||||
wrote_loglevel, /* Wrote the LogLevel line? */
|
||||
wrote_admin_location, /* Wrote the /admin location? */
|
||||
wrote_conf_location, /* Wrote the /admin/conf location? */
|
||||
wrote_log_location, /* Wrote the /admin/log location? */
|
||||
wrote_root_location; /* Wrote the / location? */
|
||||
int indent; /* Indentation */
|
||||
int cupsd_num_settings; /* New number of settings */
|
||||
@@ -1401,12 +1404,14 @@ cupsAdminSetServerSettings(
|
||||
in_conf_location = 0;
|
||||
in_default_policy = 0;
|
||||
in_location = 0;
|
||||
in_log_location = 0;
|
||||
in_policy = 0;
|
||||
in_root_location = 0;
|
||||
linenum = 0;
|
||||
wrote_admin_location = 0;
|
||||
wrote_browsing = 0;
|
||||
wrote_conf_location = 0;
|
||||
wrote_log_location = 0;
|
||||
wrote_loglevel = 0;
|
||||
wrote_policy = 0;
|
||||
wrote_port_listen = 0;
|
||||
@@ -1550,8 +1555,10 @@ cupsAdminSetServerSettings(
|
||||
indent += 2;
|
||||
if (!strcmp(value, "/admin"))
|
||||
in_admin_location = 1;
|
||||
if (!strcmp(value, "/admin/conf"))
|
||||
else if (!strcmp(value, "/admin/conf"))
|
||||
in_conf_location = 1;
|
||||
else if (!strcmp(value, "/admin/log"))
|
||||
in_log_location = 1;
|
||||
else if (!strcmp(value, "/"))
|
||||
in_root_location = 1;
|
||||
|
||||
@@ -1593,6 +1600,23 @@ cupsAdminSetServerSettings(
|
||||
cupsFilePrintf(temp, " Allow %s\n",
|
||||
remote_any > 0 ? "all" : "@LOCAL");
|
||||
}
|
||||
else if (in_log_location && remote_admin >= 0)
|
||||
{
|
||||
wrote_log_location = 1;
|
||||
|
||||
if (remote_admin)
|
||||
cupsFilePuts(temp, " # Allow remote access to the log "
|
||||
"files...\n");
|
||||
else
|
||||
cupsFilePuts(temp, " # Restrict access to the log "
|
||||
"files...\n");
|
||||
|
||||
cupsFilePuts(temp, " Order allow,deny\n");
|
||||
|
||||
if (remote_admin)
|
||||
cupsFilePrintf(temp, " Allow %s\n",
|
||||
remote_any > 0 ? "all" : "@LOCAL");
|
||||
}
|
||||
else if (in_root_location &&
|
||||
(remote_admin >= 0 || remote_any > 0 || share_printers >= 0))
|
||||
{
|
||||
@@ -1619,6 +1643,7 @@ cupsAdminSetServerSettings(
|
||||
|
||||
in_admin_location = 0;
|
||||
in_conf_location = 0;
|
||||
in_log_location = 0;
|
||||
in_root_location = 0;
|
||||
|
||||
cupsFilePuts(temp, "</Location>\n");
|
||||
@@ -1867,6 +1892,25 @@ cupsAdminSetServerSettings(
|
||||
cupsFilePuts(temp, "</Location>\n");
|
||||
}
|
||||
|
||||
if (!wrote_log_location && remote_admin >= 0)
|
||||
{
|
||||
if (remote_admin)
|
||||
cupsFilePuts(temp,
|
||||
"# Allow remote access to the log files...\n");
|
||||
else
|
||||
cupsFilePuts(temp, "# Restrict access to the log files...\n");
|
||||
|
||||
cupsFilePuts(temp, "<Location /admin/log>\n"
|
||||
" AuthType Default\n"
|
||||
" Require user @SYSTEM\n"
|
||||
" Order allow,deny\n");
|
||||
|
||||
if (remote_admin)
|
||||
cupsFilePrintf(temp, " Allow %s\n", remote_any > 0 ? "all" : "@LOCAL");
|
||||
|
||||
cupsFilePuts(temp, "</Location>\n");
|
||||
}
|
||||
|
||||
if (!wrote_policy && user_cancel_any >= 0)
|
||||
{
|
||||
cupsFilePuts(temp, "<Policy default>\n"
|
||||
@@ -2326,5 +2370,5 @@ write_option(cups_file_t *dstfp, /* I - PPD file */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: adminutil.c 11598 2014-02-18 18:58:19Z msweet $".
|
||||
* End of "$Id: adminutil.c 13138 2016-03-15 14:59:54Z msweet $".
|
||||
*/
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: array.c 12031 2014-07-15 19:57:59Z msweet $"
|
||||
* "$Id: array.c 13138 2016-03-15 14:59:54Z msweet $"
|
||||
*
|
||||
* Sorted array routines for CUPS.
|
||||
*
|
||||
@@ -1330,5 +1330,5 @@ cups_array_find(cups_array_t *a, /* I - Array */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: array.c 12031 2014-07-15 19:57:59Z msweet $".
|
||||
* End of "$Id: array.c 13138 2016-03-15 14:59:54Z msweet $".
|
||||
*/
|
||||
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: auth.c 12230 2014-10-21 13:55:24Z msweet $"
|
||||
* "$Id: auth.c 13138 2016-03-15 14:59:54Z msweet $"
|
||||
*
|
||||
* Authentication functions for CUPS.
|
||||
*
|
||||
@@ -311,7 +311,7 @@ _cupsSetNegotiateAuthString(
|
||||
* to use it...
|
||||
*/
|
||||
|
||||
if (gss_init_sec_context == NULL)
|
||||
if (&gss_init_sec_context == NULL)
|
||||
{
|
||||
DEBUG_puts("1_cupsSetNegotiateAuthString: Weak-linked GSSAPI/Kerberos "
|
||||
"framework is not present");
|
||||
@@ -876,5 +876,5 @@ cups_local_auth(http_t *http) /* I - HTTP connection to server */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: auth.c 12230 2014-10-21 13:55:24Z msweet $".
|
||||
* End of "$Id: auth.c 13138 2016-03-15 14:59:54Z msweet $".
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: backchannel.c 11558 2014-02-06 18:33:34Z msweet $"
|
||||
* "$Id: backchannel.c 11984 2014-07-02 13:16:59Z msweet $"
|
||||
*
|
||||
* Backchannel functions for CUPS.
|
||||
*
|
||||
@@ -189,5 +189,5 @@ cups_setup(fd_set *set, /* I - Set for select() */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: backchannel.c 11558 2014-02-06 18:33:34Z msweet $".
|
||||
* End of "$Id: backchannel.c 11984 2014-07-02 13:16:59Z msweet $".
|
||||
*/
|
||||
|
||||
+12
-17
@@ -1,24 +1,18 @@
|
||||
/*
|
||||
* "$Id: backend.c 10996 2013-05-29 11:51:34Z msweet $"
|
||||
* "$Id: backend.c 13138 2016-03-15 14:59:54Z msweet $"
|
||||
*
|
||||
* Backend functions for CUPS.
|
||||
* Backend functions for CUPS.
|
||||
*
|
||||
* Copyright 2007-2012 by Apple Inc.
|
||||
* Copyright 2006 by Easy Software Products.
|
||||
* Copyright 2007-2015 by Apple Inc.
|
||||
* Copyright 2006 by Easy Software Products.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
* which should have been included with this file. If this file is
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
* which should have been included with this file. If this file is
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
*
|
||||
* This file is subject to the Apple OS-Developed Software exception.
|
||||
*
|
||||
* Contents:
|
||||
*
|
||||
* cupsBackendDeviceURI() - Get the device URI for a backend.
|
||||
* cupsBackendReport() - Write a device line from a backend.
|
||||
* quote_string() - Write a quoted string to stdout, escaping \ and ".
|
||||
* This file is subject to the Apple OS-Developed Software exception.
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -27,6 +21,7 @@
|
||||
|
||||
#include "cups-private.h"
|
||||
#include "backend.h"
|
||||
#include "ppd.h"
|
||||
|
||||
|
||||
/*
|
||||
@@ -150,5 +145,5 @@ quote_string(const char *s) /* I - String to write */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: backend.c 10996 2013-05-29 11:51:34Z msweet $".
|
||||
* End of "$Id: backend.c 13138 2016-03-15 14:59:54Z msweet $".
|
||||
*/
|
||||
|
||||
+4
-11
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: cups-private.h 11851 2014-05-07 23:55:35Z msweet $"
|
||||
* "$Id: cups-private.h 13138 2016-03-15 14:59:54Z msweet $"
|
||||
*
|
||||
* Private definitions for CUPS.
|
||||
*
|
||||
* Copyright 2007-2013 by Apple Inc.
|
||||
* Copyright 2007-2015 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -29,7 +29,6 @@
|
||||
# include "http-private.h"
|
||||
# include "language-private.h"
|
||||
# include "pwg-private.h"
|
||||
# include "ppd-private.h"
|
||||
# include "thread-private.h"
|
||||
# include <cups/cups.h>
|
||||
# ifdef __APPLE__
|
||||
@@ -122,11 +121,6 @@ typedef struct _cups_globals_s /**** CUPS global state data ****/
|
||||
char language[32]; /* Cached language */
|
||||
# endif /* __APPLE__ */
|
||||
|
||||
/* ppd.c */
|
||||
ppd_status_t ppd_status; /* Status of last ppdOpen*() */
|
||||
int ppd_line; /* Current line number */
|
||||
ppd_conform_t ppd_conform; /* Level of conformance required */
|
||||
|
||||
/* pwg-media.c */
|
||||
cups_array_t *leg_size_lut, /* Lookup table for legacy names */
|
||||
*ppd_size_lut, /* Lookup table for PPD names */
|
||||
@@ -173,8 +167,6 @@ typedef struct _cups_globals_s /**** CUPS global state data ****/
|
||||
/* util.c */
|
||||
char def_printer[256];
|
||||
/* Default printer */
|
||||
char ppd_filename[HTTP_MAX_URI];
|
||||
/* PPD filename */
|
||||
} _cups_globals_t;
|
||||
|
||||
typedef struct _cups_media_db_s /* Media database */
|
||||
@@ -244,6 +236,7 @@ extern char *_cupsBufferGet(size_t size);
|
||||
extern void _cupsBufferRelease(char *b);
|
||||
|
||||
extern http_t *_cupsConnect(void);
|
||||
extern char *_cupsCreateDest(const char *name, const char *info, const char *device_id, const char *device_uri, char *uri, size_t urisize);
|
||||
extern int _cupsGet1284Values(const char *device_id,
|
||||
cups_option_t **values);
|
||||
extern const char *_cupsGetDestResource(cups_dest_t *dest, char *resource,
|
||||
@@ -281,5 +274,5 @@ extern char *_cupsUserDefault(char *name, size_t namesize);
|
||||
#endif /* !_CUPS_CUPS_PRIVATE_H_ */
|
||||
|
||||
/*
|
||||
* End of "$Id: cups-private.h 11851 2014-05-07 23:55:35Z msweet $".
|
||||
* End of "$Id: cups-private.h 13138 2016-03-15 14:59:54Z msweet $".
|
||||
*/
|
||||
|
||||
+11
-16
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: cups.h 12704 2015-06-08 19:08:01Z msweet $"
|
||||
* "$Id: cups.h 13138 2016-03-15 14:59:54Z msweet $"
|
||||
*
|
||||
* API definitions for CUPS.
|
||||
*
|
||||
* Copyright 2007-2015 by Apple Inc.
|
||||
* Copyright 2007-2016 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -49,10 +49,10 @@ extern "C" {
|
||||
* Constants...
|
||||
*/
|
||||
|
||||
# define CUPS_VERSION 2.0003
|
||||
# define CUPS_VERSION 2.0200
|
||||
# define CUPS_VERSION_MAJOR 2
|
||||
# define CUPS_VERSION_MINOR 0
|
||||
# define CUPS_VERSION_PATCH 3
|
||||
# define CUPS_VERSION_MINOR 2
|
||||
# define CUPS_VERSION_PATCH 0
|
||||
|
||||
# define CUPS_BC_FD 3
|
||||
/* Back-channel file descriptor for
|
||||
@@ -241,6 +241,7 @@ enum cups_ptype_e /* Printer type/capability bit
|
||||
* @since CUPS 1.4/OS X 10.6@ */
|
||||
CUPS_PRINTER_MFP = 0x4000000, /* Printer with scanning capabilities
|
||||
* @since CUPS 1.4/OS X 10.6@ */
|
||||
CUPS_PRINTER_3D = 0x8000000, /* Printer with 3D capabilities @since CUPS 2.1@ */
|
||||
CUPS_PRINTER_OPTIONS = 0x6fffc /* ~(CLASS | REMOTE | IMPLICIT |
|
||||
* DEFAULT | FAX | REJECTING | DELETE |
|
||||
* NOT_SHARED | AUTHENTICATED |
|
||||
@@ -354,8 +355,6 @@ extern int cupsGetClasses(char ***classes) _CUPS_DEPRECATED_MSG("Use cupsGetDes
|
||||
extern const char *cupsGetDefault(void);
|
||||
extern int cupsGetJobs(cups_job_t **jobs, const char *name,
|
||||
int myjobs, int whichjobs);
|
||||
extern const char *cupsGetPPD(const char *name)
|
||||
_CUPS_DEPRECATED_1_6_MSG("Use cupsCopyDestInfo instead.");
|
||||
extern int cupsGetPrinters(char ***printers) _CUPS_DEPRECATED_MSG("Use cupsGetDests instead.");
|
||||
extern ipp_status_t cupsLastError(void);
|
||||
extern int cupsPrintFile(const char *name, const char *filename,
|
||||
@@ -413,8 +412,6 @@ extern int cupsGetDests2(http_t *http, cups_dest_t **dests)
|
||||
extern int cupsGetJobs2(http_t *http, cups_job_t **jobs,
|
||||
const char *name, int myjobs,
|
||||
int whichjobs) _CUPS_API_1_1_21;
|
||||
extern const char *cupsGetPPD2(http_t *http, const char *name)
|
||||
_CUPS_DEPRECATED_1_6_MSG("Use cupsCopyDestInfo instead.");
|
||||
extern int cupsPrintFile2(http_t *http, const char *name,
|
||||
const char *filename,
|
||||
const char *title, int num_options,
|
||||
@@ -448,8 +445,6 @@ extern cups_file_t *cupsTempFile2(char *filename, int len) _CUPS_API_1_2;
|
||||
extern ipp_t *cupsDoIORequest(http_t *http, ipp_t *request,
|
||||
const char *resource, int infile,
|
||||
int outfile) _CUPS_API_1_3;
|
||||
extern char *cupsGetServerPPD(http_t *http, const char *name)
|
||||
_CUPS_API_1_3;
|
||||
extern int cupsRemoveDest(const char *name,
|
||||
const char *instance,
|
||||
int num_dests, cups_dest_t **dests)
|
||||
@@ -477,9 +472,6 @@ extern cups_dest_t *cupsGetNamedDest(http_t *http, const char *name,
|
||||
extern const char *cupsGetPassword2(const char *prompt, http_t *http,
|
||||
const char *method,
|
||||
const char *resource) _CUPS_API_1_4;
|
||||
extern http_status_t cupsGetPPD3(http_t *http, const char *name,
|
||||
time_t *modtime, char *buffer,
|
||||
size_t bufsize) _CUPS_API_1_4;
|
||||
extern ipp_t *cupsGetResponse(http_t *http,
|
||||
const char *resource) _CUPS_API_1_4;
|
||||
extern ssize_t cupsReadResponseData(http_t *http, char *buffer,
|
||||
@@ -604,7 +596,7 @@ extern int cupsGetDestMediaByIndex(http_t *http, cups_dest_t *dest,
|
||||
unsigned flags,
|
||||
cups_size_t *size)
|
||||
_CUPS_API_1_7;
|
||||
extern int cupsGetDestMediaCount(http_t *http, cups_dest_t *dest,
|
||||
extern int cupsGetDestMediaCount(http_t *http, cups_dest_t *dest,
|
||||
cups_dinfo_t *dinfo,
|
||||
unsigned flags) _CUPS_API_1_7;
|
||||
extern int cupsGetDestMediaDefault(http_t *http, cups_dest_t *dest,
|
||||
@@ -621,6 +613,9 @@ extern const char *cupsLocalizeDestMedia(http_t *http, cups_dest_t *dest, cups_d
|
||||
extern int cupsMakeServerCredentials(const char *path, const char *common_name, int num_alt_names, const char **alt_names, time_t expiration_date) _CUPS_API_2_0;
|
||||
extern int cupsSetServerCredentials(const char *path, const char *common_name, int auto_create) _CUPS_API_2_0;
|
||||
|
||||
/* New in CUPS 2.2 */
|
||||
extern ssize_t cupsHashData(const char *algorithm, const void *data, size_t datalen, unsigned char *hash, size_t hashsize) _CUPS_API_2_2;
|
||||
|
||||
# ifdef __cplusplus
|
||||
}
|
||||
# endif /* __cplusplus */
|
||||
@@ -628,5 +623,5 @@ extern int cupsSetServerCredentials(const char *path, const char *common_name,
|
||||
#endif /* !_CUPS_CUPS_H_ */
|
||||
|
||||
/*
|
||||
* End of "$Id: cups.h 12704 2015-06-08 19:08:01Z msweet $".
|
||||
* End of "$Id: cups.h 13138 2016-03-15 14:59:54Z msweet $".
|
||||
*/
|
||||
|
||||
+253
-251
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: debug.c 12328 2014-12-09 20:38:47Z msweet $"
|
||||
* "$Id: debug.c 13138 2016-03-15 14:59:54Z msweet $"
|
||||
*
|
||||
* Debugging functions for CUPS.
|
||||
*
|
||||
* Copyright 2008-2014 by Apple Inc.
|
||||
* Copyright 2008-2015 by Apple Inc.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
@@ -82,14 +82,258 @@ debug_thread_id(void)
|
||||
|
||||
|
||||
/*
|
||||
* 'debug_vsnprintf()' - Format a string into a fixed size buffer.
|
||||
* '_cups_debug_printf()' - Write a formatted line to the log.
|
||||
*/
|
||||
|
||||
static ssize_t /* O - Number of bytes formatted */
|
||||
debug_vsnprintf(char *buffer, /* O - Output buffer */
|
||||
size_t bufsize, /* O - Size of output buffer */
|
||||
const char *format, /* I - printf-style format string */
|
||||
va_list ap) /* I - Pointer to additional arguments */
|
||||
void DLLExport
|
||||
_cups_debug_printf(const char *format, /* I - Printf-style format string */
|
||||
...) /* I - Additional arguments as needed */
|
||||
{
|
||||
va_list ap; /* Pointer to arguments */
|
||||
struct timeval curtime; /* Current time */
|
||||
char buffer[2048]; /* Output buffer */
|
||||
ssize_t bytes; /* Number of bytes in buffer */
|
||||
int level; /* Log level in message */
|
||||
|
||||
|
||||
/*
|
||||
* See if we need to do any logging...
|
||||
*/
|
||||
|
||||
if (!debug_init)
|
||||
_cups_debug_set(getenv("CUPS_DEBUG_LOG"), getenv("CUPS_DEBUG_LEVEL"),
|
||||
getenv("CUPS_DEBUG_FILTER"), 0);
|
||||
|
||||
if (_cups_debug_fd < 0)
|
||||
return;
|
||||
|
||||
/*
|
||||
* Filter as needed...
|
||||
*/
|
||||
|
||||
if (isdigit(format[0]))
|
||||
level = *format++ - '0';
|
||||
else
|
||||
level = 0;
|
||||
|
||||
if (level > _cups_debug_level)
|
||||
return;
|
||||
|
||||
if (debug_filter)
|
||||
{
|
||||
int result; /* Filter result */
|
||||
|
||||
_cupsMutexLock(&debug_init_mutex);
|
||||
result = regexec(debug_filter, format, 0, NULL, 0);
|
||||
_cupsMutexUnlock(&debug_init_mutex);
|
||||
|
||||
if (result)
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Format the message...
|
||||
*/
|
||||
|
||||
gettimeofday(&curtime, NULL);
|
||||
snprintf(buffer, sizeof(buffer), "T%03d %02d:%02d:%02d.%03d ",
|
||||
debug_thread_id(), (int)((curtime.tv_sec / 3600) % 24),
|
||||
(int)((curtime.tv_sec / 60) % 60),
|
||||
(int)(curtime.tv_sec % 60), (int)(curtime.tv_usec / 1000));
|
||||
|
||||
va_start(ap, format);
|
||||
bytes = _cups_safe_vsnprintf(buffer + 19, sizeof(buffer) - 20, format, ap) + 19;
|
||||
va_end(ap);
|
||||
|
||||
if ((size_t)bytes >= (sizeof(buffer) - 1))
|
||||
{
|
||||
buffer[sizeof(buffer) - 2] = '\n';
|
||||
bytes = sizeof(buffer) - 1;
|
||||
}
|
||||
else if (buffer[bytes - 1] != '\n')
|
||||
{
|
||||
buffer[bytes++] = '\n';
|
||||
buffer[bytes] = '\0';
|
||||
}
|
||||
|
||||
/*
|
||||
* Write it out...
|
||||
*/
|
||||
|
||||
_cupsMutexLock(&debug_log_mutex);
|
||||
write(_cups_debug_fd, buffer, (size_t)bytes);
|
||||
_cupsMutexUnlock(&debug_log_mutex);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* '_cups_debug_puts()' - Write a single line to the log.
|
||||
*/
|
||||
|
||||
void DLLExport
|
||||
_cups_debug_puts(const char *s) /* I - String to output */
|
||||
{
|
||||
struct timeval curtime; /* Current time */
|
||||
char buffer[2048]; /* Output buffer */
|
||||
ssize_t bytes; /* Number of bytes in buffer */
|
||||
int level; /* Log level in message */
|
||||
|
||||
|
||||
/*
|
||||
* See if we need to do any logging...
|
||||
*/
|
||||
|
||||
if (!debug_init)
|
||||
_cups_debug_set(getenv("CUPS_DEBUG_LOG"), getenv("CUPS_DEBUG_LEVEL"),
|
||||
getenv("CUPS_DEBUG_FILTER"), 0);
|
||||
|
||||
if (_cups_debug_fd < 0)
|
||||
return;
|
||||
|
||||
/*
|
||||
* Filter as needed...
|
||||
*/
|
||||
|
||||
if (isdigit(s[0]))
|
||||
level = *s++ - '0';
|
||||
else
|
||||
level = 0;
|
||||
|
||||
if (level > _cups_debug_level)
|
||||
return;
|
||||
|
||||
if (debug_filter)
|
||||
{
|
||||
int result; /* Filter result */
|
||||
|
||||
_cupsMutexLock(&debug_init_mutex);
|
||||
result = regexec(debug_filter, s, 0, NULL, 0);
|
||||
_cupsMutexUnlock(&debug_init_mutex);
|
||||
|
||||
if (result)
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Format the message...
|
||||
*/
|
||||
|
||||
gettimeofday(&curtime, NULL);
|
||||
bytes = snprintf(buffer, sizeof(buffer), "T%03d %02d:%02d:%02d.%03d %s",
|
||||
debug_thread_id(), (int)((curtime.tv_sec / 3600) % 24),
|
||||
(int)((curtime.tv_sec / 60) % 60),
|
||||
(int)(curtime.tv_sec % 60), (int)(curtime.tv_usec / 1000),
|
||||
s);
|
||||
|
||||
if ((size_t)bytes >= (sizeof(buffer) - 1))
|
||||
{
|
||||
buffer[sizeof(buffer) - 2] = '\n';
|
||||
bytes = sizeof(buffer) - 1;
|
||||
}
|
||||
else if (buffer[bytes - 1] != '\n')
|
||||
{
|
||||
buffer[bytes++] = '\n';
|
||||
buffer[bytes] = '\0';
|
||||
}
|
||||
|
||||
/*
|
||||
* Write it out...
|
||||
*/
|
||||
|
||||
_cupsMutexLock(&debug_log_mutex);
|
||||
write(_cups_debug_fd, buffer, (size_t)bytes);
|
||||
_cupsMutexUnlock(&debug_log_mutex);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* '_cups_debug_set()' - Enable or disable debug logging.
|
||||
*/
|
||||
|
||||
void DLLExport
|
||||
_cups_debug_set(const char *logfile, /* I - Log file or NULL */
|
||||
const char *level, /* I - Log level or NULL */
|
||||
const char *filter, /* I - Filter string or NULL */
|
||||
int force) /* I - Force initialization */
|
||||
{
|
||||
_cupsMutexLock(&debug_init_mutex);
|
||||
|
||||
if (!debug_init || force)
|
||||
{
|
||||
/*
|
||||
* Restore debug settings to defaults...
|
||||
*/
|
||||
|
||||
if (_cups_debug_fd != -1)
|
||||
{
|
||||
close(_cups_debug_fd);
|
||||
_cups_debug_fd = -1;
|
||||
}
|
||||
|
||||
if (debug_filter)
|
||||
{
|
||||
regfree((regex_t *)debug_filter);
|
||||
debug_filter = NULL;
|
||||
}
|
||||
|
||||
_cups_debug_level = 1;
|
||||
|
||||
/*
|
||||
* Open logs, set log levels, etc.
|
||||
*/
|
||||
|
||||
if (!logfile)
|
||||
_cups_debug_fd = -1;
|
||||
else if (!strcmp(logfile, "-"))
|
||||
_cups_debug_fd = 2;
|
||||
else
|
||||
{
|
||||
char buffer[1024]; /* Filename buffer */
|
||||
|
||||
snprintf(buffer, sizeof(buffer), logfile, getpid());
|
||||
|
||||
if (buffer[0] == '+')
|
||||
_cups_debug_fd = open(buffer + 1, O_WRONLY | O_APPEND | O_CREAT, 0644);
|
||||
else
|
||||
_cups_debug_fd = open(buffer, O_WRONLY | O_TRUNC | O_CREAT, 0644);
|
||||
}
|
||||
|
||||
if (level)
|
||||
_cups_debug_level = atoi(level);
|
||||
|
||||
if (filter)
|
||||
{
|
||||
if ((debug_filter = (regex_t *)calloc(1, sizeof(regex_t))) == NULL)
|
||||
fputs("Unable to allocate memory for CUPS_DEBUG_FILTER - results not "
|
||||
"filtered!\n", stderr);
|
||||
else if (regcomp(debug_filter, filter, REG_EXTENDED))
|
||||
{
|
||||
fputs("Bad regular expression in CUPS_DEBUG_FILTER - results not "
|
||||
"filtered!\n", stderr);
|
||||
free(debug_filter);
|
||||
debug_filter = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
debug_init = 1;
|
||||
}
|
||||
|
||||
_cupsMutexUnlock(&debug_init_mutex);
|
||||
}
|
||||
#endif /* DEBUG */
|
||||
|
||||
|
||||
/*
|
||||
* '_cups_safe_vsnprintf()' - Format a string into a fixed size buffer,
|
||||
* quoting special characters.
|
||||
*/
|
||||
|
||||
ssize_t /* O - Number of bytes formatted */
|
||||
_cups_safe_vsnprintf(
|
||||
char *buffer, /* O - Output buffer */
|
||||
size_t bufsize, /* O - Size of output buffer */
|
||||
const char *format, /* I - printf-style format string */
|
||||
va_list ap) /* I - Pointer to additional arguments */
|
||||
{
|
||||
char *bufptr, /* Pointer to position in buffer */
|
||||
*bufend, /* Pointer to end of buffer */
|
||||
@@ -401,247 +645,5 @@ debug_vsnprintf(char *buffer, /* O - Output buffer */
|
||||
|
||||
|
||||
/*
|
||||
* '_cups_debug_printf()' - Write a formatted line to the log.
|
||||
*/
|
||||
|
||||
void DLLExport
|
||||
_cups_debug_printf(const char *format, /* I - Printf-style format string */
|
||||
...) /* I - Additional arguments as needed */
|
||||
{
|
||||
va_list ap; /* Pointer to arguments */
|
||||
struct timeval curtime; /* Current time */
|
||||
char buffer[2048]; /* Output buffer */
|
||||
ssize_t bytes; /* Number of bytes in buffer */
|
||||
int level; /* Log level in message */
|
||||
|
||||
|
||||
/*
|
||||
* See if we need to do any logging...
|
||||
*/
|
||||
|
||||
if (!debug_init)
|
||||
_cups_debug_set(getenv("CUPS_DEBUG_LOG"), getenv("CUPS_DEBUG_LEVEL"),
|
||||
getenv("CUPS_DEBUG_FILTER"), 0);
|
||||
|
||||
if (_cups_debug_fd < 0)
|
||||
return;
|
||||
|
||||
/*
|
||||
* Filter as needed...
|
||||
*/
|
||||
|
||||
if (isdigit(format[0]))
|
||||
level = *format++ - '0';
|
||||
else
|
||||
level = 0;
|
||||
|
||||
if (level > _cups_debug_level)
|
||||
return;
|
||||
|
||||
if (debug_filter)
|
||||
{
|
||||
int result; /* Filter result */
|
||||
|
||||
_cupsMutexLock(&debug_init_mutex);
|
||||
result = regexec(debug_filter, format, 0, NULL, 0);
|
||||
_cupsMutexUnlock(&debug_init_mutex);
|
||||
|
||||
if (result)
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Format the message...
|
||||
*/
|
||||
|
||||
gettimeofday(&curtime, NULL);
|
||||
snprintf(buffer, sizeof(buffer), "T%03d %02d:%02d:%02d.%03d ",
|
||||
debug_thread_id(), (int)((curtime.tv_sec / 3600) % 24),
|
||||
(int)((curtime.tv_sec / 60) % 60),
|
||||
(int)(curtime.tv_sec % 60), (int)(curtime.tv_usec / 1000));
|
||||
|
||||
va_start(ap, format);
|
||||
bytes = debug_vsnprintf(buffer + 19, sizeof(buffer) - 20, format, ap) + 19;
|
||||
va_end(ap);
|
||||
|
||||
if ((size_t)bytes >= (sizeof(buffer) - 1))
|
||||
{
|
||||
buffer[sizeof(buffer) - 2] = '\n';
|
||||
bytes = sizeof(buffer) - 1;
|
||||
}
|
||||
else if (buffer[bytes - 1] != '\n')
|
||||
{
|
||||
buffer[bytes++] = '\n';
|
||||
buffer[bytes] = '\0';
|
||||
}
|
||||
|
||||
/*
|
||||
* Write it out...
|
||||
*/
|
||||
|
||||
_cupsMutexLock(&debug_log_mutex);
|
||||
write(_cups_debug_fd, buffer, (size_t)bytes);
|
||||
_cupsMutexUnlock(&debug_log_mutex);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* '_cups_debug_puts()' - Write a single line to the log.
|
||||
*/
|
||||
|
||||
void DLLExport
|
||||
_cups_debug_puts(const char *s) /* I - String to output */
|
||||
{
|
||||
struct timeval curtime; /* Current time */
|
||||
char buffer[2048]; /* Output buffer */
|
||||
ssize_t bytes; /* Number of bytes in buffer */
|
||||
int level; /* Log level in message */
|
||||
|
||||
|
||||
/*
|
||||
* See if we need to do any logging...
|
||||
*/
|
||||
|
||||
if (!debug_init)
|
||||
_cups_debug_set(getenv("CUPS_DEBUG_LOG"), getenv("CUPS_DEBUG_LEVEL"),
|
||||
getenv("CUPS_DEBUG_FILTER"), 0);
|
||||
|
||||
if (_cups_debug_fd < 0)
|
||||
return;
|
||||
|
||||
/*
|
||||
* Filter as needed...
|
||||
*/
|
||||
|
||||
if (isdigit(s[0]))
|
||||
level = *s++ - '0';
|
||||
else
|
||||
level = 0;
|
||||
|
||||
if (level > _cups_debug_level)
|
||||
return;
|
||||
|
||||
if (debug_filter)
|
||||
{
|
||||
int result; /* Filter result */
|
||||
|
||||
_cupsMutexLock(&debug_init_mutex);
|
||||
result = regexec(debug_filter, s, 0, NULL, 0);
|
||||
_cupsMutexUnlock(&debug_init_mutex);
|
||||
|
||||
if (result)
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Format the message...
|
||||
*/
|
||||
|
||||
gettimeofday(&curtime, NULL);
|
||||
bytes = snprintf(buffer, sizeof(buffer), "T%03d %02d:%02d:%02d.%03d %s",
|
||||
debug_thread_id(), (int)((curtime.tv_sec / 3600) % 24),
|
||||
(int)((curtime.tv_sec / 60) % 60),
|
||||
(int)(curtime.tv_sec % 60), (int)(curtime.tv_usec / 1000),
|
||||
s);
|
||||
|
||||
if ((size_t)bytes >= (sizeof(buffer) - 1))
|
||||
{
|
||||
buffer[sizeof(buffer) - 2] = '\n';
|
||||
bytes = sizeof(buffer) - 1;
|
||||
}
|
||||
else if (buffer[bytes - 1] != '\n')
|
||||
{
|
||||
buffer[bytes++] = '\n';
|
||||
buffer[bytes] = '\0';
|
||||
}
|
||||
|
||||
/*
|
||||
* Write it out...
|
||||
*/
|
||||
|
||||
_cupsMutexLock(&debug_log_mutex);
|
||||
write(_cups_debug_fd, buffer, (size_t)bytes);
|
||||
_cupsMutexUnlock(&debug_log_mutex);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* '_cups_debug_set()' - Enable or disable debug logging.
|
||||
*/
|
||||
|
||||
void DLLExport
|
||||
_cups_debug_set(const char *logfile, /* I - Log file or NULL */
|
||||
const char *level, /* I - Log level or NULL */
|
||||
const char *filter, /* I - Filter string or NULL */
|
||||
int force) /* I - Force initialization */
|
||||
{
|
||||
_cupsMutexLock(&debug_init_mutex);
|
||||
|
||||
if (!debug_init || force)
|
||||
{
|
||||
/*
|
||||
* Restore debug settings to defaults...
|
||||
*/
|
||||
|
||||
if (_cups_debug_fd != -1)
|
||||
{
|
||||
close(_cups_debug_fd);
|
||||
_cups_debug_fd = -1;
|
||||
}
|
||||
|
||||
if (debug_filter)
|
||||
{
|
||||
regfree((regex_t *)debug_filter);
|
||||
debug_filter = NULL;
|
||||
}
|
||||
|
||||
_cups_debug_level = 1;
|
||||
|
||||
/*
|
||||
* Open logs, set log levels, etc.
|
||||
*/
|
||||
|
||||
if (!logfile)
|
||||
_cups_debug_fd = -1;
|
||||
else if (!strcmp(logfile, "-"))
|
||||
_cups_debug_fd = 2;
|
||||
else
|
||||
{
|
||||
char buffer[1024]; /* Filename buffer */
|
||||
|
||||
snprintf(buffer, sizeof(buffer), logfile, getpid());
|
||||
|
||||
if (buffer[0] == '+')
|
||||
_cups_debug_fd = open(buffer + 1, O_WRONLY | O_APPEND | O_CREAT, 0644);
|
||||
else
|
||||
_cups_debug_fd = open(buffer, O_WRONLY | O_TRUNC | O_CREAT, 0644);
|
||||
}
|
||||
|
||||
if (level)
|
||||
_cups_debug_level = atoi(level);
|
||||
|
||||
if (filter)
|
||||
{
|
||||
if ((debug_filter = (regex_t *)calloc(1, sizeof(regex_t))) == NULL)
|
||||
fputs("Unable to allocate memory for CUPS_DEBUG_FILTER - results not "
|
||||
"filtered!\n", stderr);
|
||||
else if (regcomp(debug_filter, filter, REG_EXTENDED))
|
||||
{
|
||||
fputs("Bad regular expression in CUPS_DEBUG_FILTER - results not "
|
||||
"filtered!\n", stderr);
|
||||
free(debug_filter);
|
||||
debug_filter = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
debug_init = 1;
|
||||
}
|
||||
|
||||
_cupsMutexUnlock(&debug_init_mutex);
|
||||
}
|
||||
#endif /* DEBUG */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: debug.c 12328 2014-12-09 20:38:47Z msweet $".
|
||||
* End of "$Id: debug.c 13138 2016-03-15 14:59:54Z msweet $".
|
||||
*/
|
||||
|
||||
+23
-16
@@ -1,9 +1,7 @@
|
||||
/*
|
||||
* "$Id: dest-job.c 11558 2014-02-06 18:33:34Z msweet $"
|
||||
*
|
||||
* Destination job support for CUPS.
|
||||
*
|
||||
* Copyright 2012-2014 by Apple Inc.
|
||||
* Copyright 2012-2016 by Apple Inc.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
@@ -26,8 +24,9 @@
|
||||
*
|
||||
* The "job_id" is the number returned by cupsCreateDestJob.
|
||||
*
|
||||
* Returns IPP_STATUS_OK on success and IPP_NOT_AUTHORIZED or IPP_FORBIDDEN on
|
||||
* failure.
|
||||
* Returns @code IPP_STATUS_OK@ on success and
|
||||
* @code IPP_STATUS_ERRPR_NOT_AUTHORIZED@ or
|
||||
* @code IPP_STATUS_ERROR_FORBIDDEN@ on failure.
|
||||
*
|
||||
* @since CUPS 1.6/OS X 10.8@
|
||||
*/
|
||||
@@ -37,13 +36,26 @@ cupsCancelDestJob(http_t *http, /* I - Connection to destination */
|
||||
cups_dest_t *dest, /* I - Destination */
|
||||
int job_id) /* I - Job ID */
|
||||
{
|
||||
/* TODO: Needs to be implemented! */
|
||||
/* Probably also needs to be revved to accept cups_dinfo_t... */
|
||||
(void)http;
|
||||
(void)dest;
|
||||
(void)job_id;
|
||||
cups_dinfo_t *info; /* Destination information */
|
||||
|
||||
return (IPP_STATUS_ERROR_NOT_FOUND);
|
||||
|
||||
if ((info = cupsCopyDestInfo(http, dest)) != NULL)
|
||||
{
|
||||
ipp_t *request; /* Cancel-Job request */
|
||||
|
||||
request = ippNewRequest(IPP_OP_CANCEL_JOB);
|
||||
|
||||
ippSetVersion(request, info->version / 10, info->version % 10);
|
||||
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, info->uri);
|
||||
ippAddInteger(request, IPP_TAG_OPERATION, IPP_TAG_INTEGER, "job-id", job_id);
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "requesting-user-name", NULL, cupsUser());
|
||||
|
||||
ippDelete(cupsDoRequest(http, request, info->resource));
|
||||
cupsFreeDestInfo(info);
|
||||
}
|
||||
|
||||
return (cupsLastError());
|
||||
}
|
||||
|
||||
|
||||
@@ -357,8 +369,3 @@ cupsStartDestDocument(
|
||||
|
||||
return (status);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: dest-job.c 11558 2014-02-06 18:33:34Z msweet $".
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: dest-localization.c 12094 2014-08-19 12:15:11Z msweet $"
|
||||
* "$Id: dest-localization.c 13138 2016-03-15 14:59:54Z msweet $"
|
||||
*
|
||||
* Destination localization support for CUPS.
|
||||
*
|
||||
@@ -535,5 +535,5 @@ cups_scan_strings(char *buffer) /* I - Start of string */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: dest-localization.c 12094 2014-08-19 12:15:11Z msweet $".
|
||||
* End of "$Id: dest-localization.c 13138 2016-03-15 14:59:54Z msweet $".
|
||||
*/
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
/*
|
||||
* "$Id: dest-options.c 11882 2014-05-16 21:02:15Z msweet $"
|
||||
*
|
||||
* Destination option/media support for CUPS.
|
||||
*
|
||||
* Copyright 2012-2014 by Apple Inc.
|
||||
* Copyright 2012-2016 by Apple Inc.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
@@ -706,6 +704,7 @@ cupsFindDestDefault(
|
||||
return (ippFindAttribute(dinfo->attrs, name, IPP_TAG_ZERO));
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 'cupsFindDestReady()' - Find the default value(s) for the given option.
|
||||
*
|
||||
@@ -748,6 +747,7 @@ cupsFindDestReady(
|
||||
return (ippFindAttribute(dinfo->ready_attrs, name, IPP_TAG_ZERO));
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 'cupsFindDestSupported()' - Find the default value(s) for the given option.
|
||||
*
|
||||
@@ -2267,5 +2267,5 @@ cups_update_ready(http_t *http, /* I - Connection to destination */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: dest-options.c 11882 2014-05-16 21:02:15Z msweet $".
|
||||
* End of "$Id: dest-options.c 13138 2016-03-15 14:59:54Z msweet $".
|
||||
*/
|
||||
|
||||
+160
-81
@@ -1,9 +1,7 @@
|
||||
/*
|
||||
* "$Id: dest.c 12665 2015-05-25 15:08:55Z msweet $"
|
||||
*
|
||||
* User-defined destination (and option) support for CUPS.
|
||||
*
|
||||
* Copyright 2007-2015 by Apple Inc.
|
||||
* Copyright 2007-2016 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -122,7 +120,7 @@ typedef struct _cups_dnssd_resolve_s /* Data for resolving URI */
|
||||
#ifdef __APPLE__
|
||||
static CFArrayRef appleCopyLocations(void);
|
||||
static CFStringRef appleCopyNetwork(void);
|
||||
static char *appleGetPaperSize(char *name, int namesize);
|
||||
static char *appleGetPaperSize(char *name, size_t namesize);
|
||||
static CFStringRef appleGetPrinter(CFArrayRef locations,
|
||||
CFStringRef network, CFIndex *locindex);
|
||||
#endif /* __APPLE__ */
|
||||
@@ -402,7 +400,10 @@ _cupsAppleSetDefaultPaperID(
|
||||
{
|
||||
CFPreferencesSetAppValue(kDefaultPaperIDKey, name, kCUPSPrintingPrefs);
|
||||
CFPreferencesAppSynchronize(kCUPSPrintingPrefs);
|
||||
|
||||
# ifdef HAVE_NOTIFY_POST
|
||||
notify_post("com.apple.printerPrefsChange");
|
||||
# endif /* HAVE_NOTIFY_POST */
|
||||
}
|
||||
|
||||
|
||||
@@ -490,7 +491,10 @@ _cupsAppleSetDefaultPrinter(
|
||||
CFPreferencesSetAppValue(kLastUsedPrintersKey, newlocations,
|
||||
kCUPSPrintingPrefs);
|
||||
CFPreferencesAppSynchronize(kCUPSPrintingPrefs);
|
||||
|
||||
# ifdef HAVE_NOTIFY_POST
|
||||
notify_post("com.apple.printerPrefsChange");
|
||||
# endif /* HAVE_NOTIFY_POST */
|
||||
}
|
||||
|
||||
if (newlocations)
|
||||
@@ -519,7 +523,10 @@ _cupsAppleSetUseLastPrinter(
|
||||
uselast ? kCFBooleanTrue : kCFBooleanFalse,
|
||||
kCUPSPrintingPrefs);
|
||||
CFPreferencesAppSynchronize(kCUPSPrintingPrefs);
|
||||
|
||||
# ifdef HAVE_NOTIFY_POST
|
||||
notify_post("com.apple.printerPrefsChange");
|
||||
# endif /* HAVE_NOTIFY_POST */
|
||||
}
|
||||
#endif /* __APPLE__ */
|
||||
|
||||
@@ -559,6 +566,8 @@ cupsConnectDest(
|
||||
http_t *http; /* Connection to server */
|
||||
|
||||
|
||||
DEBUG_printf(("cupsConnectDest(dest=%p, flags=0x%x, msec=%d, cancel=%p(%d), resource=\"%s\", resourcesize=" CUPS_LLFMT ", cb=%p, user_data=%p)", dest, flags, msec, cancel, cancel ? *cancel : -1, resource, CUPS_LLCAST resourcesize, cb, user_data));
|
||||
|
||||
/*
|
||||
* Range check input...
|
||||
*/
|
||||
@@ -582,27 +591,40 @@ cupsConnectDest(
|
||||
* Grab the printer URI...
|
||||
*/
|
||||
|
||||
if ((uri = cupsGetOption("printer-uri-supported", dest->num_options,
|
||||
dest->options)) == NULL)
|
||||
if ((uri = cupsGetOption("printer-uri-supported", dest->num_options, dest->options)) == NULL)
|
||||
{
|
||||
if ((uri = cupsGetOption("resolved-device-uri", dest->num_options, dest->options)) == NULL)
|
||||
{
|
||||
if ((uri = cupsGetOption("device-uri", dest->num_options, dest->options)) != NULL)
|
||||
{
|
||||
#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI)
|
||||
if (strstr(uri, "._tcp"))
|
||||
uri = cups_dnssd_resolve(dest, uri, msec, cancel, cb, user_data);
|
||||
}
|
||||
#endif /* HAVE_DNSSD || HAVE_AVAHI */
|
||||
}
|
||||
|
||||
if (uri)
|
||||
uri = _cupsCreateDest(dest->name, cupsGetOption("printer-info", dest->num_options, dest->options), NULL, uri, tempresource, sizeof(tempresource));
|
||||
|
||||
if (uri)
|
||||
{
|
||||
dest->num_options = cupsAddOption("printer-uri-supported", uri, dest->num_options, &dest->options);
|
||||
|
||||
uri = cupsGetOption("printer-uri-supported", dest->num_options, dest->options);
|
||||
}
|
||||
}
|
||||
|
||||
if (!uri)
|
||||
{
|
||||
_cupsSetError(IPP_STATUS_ERROR_INTERNAL, strerror(ENOENT), 0);
|
||||
|
||||
if (cb)
|
||||
(*cb)(user_data, CUPS_DEST_FLAGS_UNCONNECTED | CUPS_DEST_FLAGS_ERROR,
|
||||
dest);
|
||||
(*cb)(user_data, CUPS_DEST_FLAGS_UNCONNECTED | CUPS_DEST_FLAGS_ERROR, dest);
|
||||
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI)
|
||||
if (strstr(uri, "._tcp"))
|
||||
{
|
||||
if ((uri = cups_dnssd_resolve(dest, uri, msec, cancel, cb,
|
||||
user_data)) == NULL)
|
||||
return (NULL);
|
||||
}
|
||||
#endif /* HAVE_DNSSD || HAVE_AVAHI */
|
||||
|
||||
if (httpSeparateURI(HTTP_URI_CODING_ALL, uri, scheme, sizeof(scheme),
|
||||
userpass, sizeof(userpass), hostname, sizeof(hostname),
|
||||
&port, resource, (int)resourcesize) < HTTP_URI_STATUS_OK)
|
||||
@@ -621,16 +643,14 @@ cupsConnectDest(
|
||||
*/
|
||||
|
||||
if (cb)
|
||||
(*cb)(user_data, CUPS_DEST_FLAGS_UNCONNECTED | CUPS_DEST_FLAGS_RESOLVING,
|
||||
dest);
|
||||
(*cb)(user_data, CUPS_DEST_FLAGS_UNCONNECTED | CUPS_DEST_FLAGS_RESOLVING, dest);
|
||||
|
||||
snprintf(portstr, sizeof(portstr), "%d", port);
|
||||
|
||||
if ((addrlist = httpAddrGetList(hostname, AF_UNSPEC, portstr)) == NULL)
|
||||
{
|
||||
if (cb)
|
||||
(*cb)(user_data, CUPS_DEST_FLAGS_UNCONNECTED | CUPS_DEST_FLAGS_ERROR,
|
||||
dest);
|
||||
(*cb)(user_data, CUPS_DEST_FLAGS_UNCONNECTED | CUPS_DEST_FLAGS_ERROR, dest);
|
||||
|
||||
return (NULL);
|
||||
}
|
||||
@@ -640,8 +660,7 @@ cupsConnectDest(
|
||||
httpAddrFreeList(addrlist);
|
||||
|
||||
if (cb)
|
||||
(*cb)(user_data, CUPS_DEST_FLAGS_UNCONNECTED | CUPS_DEST_FLAGS_CANCELED,
|
||||
dest);
|
||||
(*cb)(user_data, CUPS_DEST_FLAGS_UNCONNECTED | CUPS_DEST_FLAGS_CANCELED, dest);
|
||||
|
||||
return (NULL);
|
||||
}
|
||||
@@ -655,8 +674,7 @@ cupsConnectDest(
|
||||
else
|
||||
encryption = HTTP_ENCRYPTION_IF_REQUESTED;
|
||||
|
||||
http = httpConnect2(hostname, port, addrlist, AF_UNSPEC, encryption, 1, 0,
|
||||
NULL);
|
||||
http = httpConnect2(hostname, port, addrlist, AF_UNSPEC, encryption, 1, 0, NULL);
|
||||
httpAddrFreeList(addrlist);
|
||||
|
||||
/*
|
||||
@@ -671,17 +689,14 @@ cupsConnectDest(
|
||||
else
|
||||
{
|
||||
if (cb)
|
||||
(*cb)(user_data, CUPS_DEST_FLAGS_UNCONNECTED | CUPS_DEST_FLAGS_CONNECTING,
|
||||
dest);
|
||||
(*cb)(user_data, CUPS_DEST_FLAGS_UNCONNECTED | CUPS_DEST_FLAGS_CONNECTING, dest);
|
||||
|
||||
if (!httpReconnect2(http, msec, cancel) && cb)
|
||||
{
|
||||
if (cancel && *cancel)
|
||||
(*cb)(user_data,
|
||||
CUPS_DEST_FLAGS_UNCONNECTED | CUPS_DEST_FLAGS_CONNECTING, dest);
|
||||
(*cb)(user_data, CUPS_DEST_FLAGS_UNCONNECTED | CUPS_DEST_FLAGS_CONNECTING, dest);
|
||||
else
|
||||
(*cb)(user_data, CUPS_DEST_FLAGS_UNCONNECTED | CUPS_DEST_FLAGS_ERROR,
|
||||
dest);
|
||||
(*cb)(user_data, CUPS_DEST_FLAGS_UNCONNECTED | CUPS_DEST_FLAGS_ERROR, dest);
|
||||
}
|
||||
else if (cb)
|
||||
(*cb)(user_data, CUPS_DEST_FLAGS_NONE, dest);
|
||||
@@ -795,6 +810,83 @@ cupsCopyDest(cups_dest_t *dest,
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* '_cupsCreateDest()' - Create a local (temporary) queue.
|
||||
*/
|
||||
|
||||
char * /* O - Printer URI or @code NULL@ on error */
|
||||
_cupsCreateDest(const char *name, /* I - Printer name */
|
||||
const char *info, /* I - Printer description of @code NULL@ */
|
||||
const char *device_id, /* I - 1284 Device ID or @code NULL@ */
|
||||
const char *device_uri, /* I - Device URI */
|
||||
char *uri, /* I - Printer URI buffer */
|
||||
size_t urisize) /* I - Size of URI buffer */
|
||||
{
|
||||
http_t *http; /* Connection to server */
|
||||
ipp_t *request, /* CUPS-Create-Local-Printer request */
|
||||
*response; /* CUPS-Create-Local-Printer response */
|
||||
ipp_attribute_t *attr; /* printer-uri-supported attribute */
|
||||
ipp_pstate_t state = IPP_PSTATE_STOPPED;
|
||||
/* printer-state value */
|
||||
|
||||
|
||||
if (!name || !device_uri || !uri || urisize < 32)
|
||||
return (NULL);
|
||||
|
||||
if ((http = httpConnect2(cupsServer(), ippPort(), NULL, AF_UNSPEC, HTTP_ENCRYPTION_IF_REQUESTED, 1, 30000, NULL)) == NULL)
|
||||
return (NULL);
|
||||
|
||||
request = ippNewRequest(IPP_OP_CUPS_CREATE_LOCAL_PRINTER);
|
||||
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, "ipp://localhost/");
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "requesting-user-name", NULL, cupsUser());
|
||||
|
||||
ippAddString(request, IPP_TAG_PRINTER, IPP_TAG_URI, "device-uri", NULL, device_uri);
|
||||
ippAddString(request, IPP_TAG_PRINTER, IPP_TAG_NAME, "printer-name", NULL, name);
|
||||
if (info)
|
||||
ippAddString(request, IPP_TAG_PRINTER, IPP_TAG_TEXT, "printer-info", NULL, info);
|
||||
if (device_id)
|
||||
ippAddString(request, IPP_TAG_PRINTER, IPP_TAG_TEXT, "printer-device-id", NULL, device_id);
|
||||
|
||||
response = cupsDoRequest(http, request, "/");
|
||||
|
||||
if ((attr = ippFindAttribute(response, "printer-uri-supported", IPP_TAG_URI)) != NULL)
|
||||
strlcpy(uri, ippGetString(attr, 0, NULL), urisize);
|
||||
else
|
||||
{
|
||||
ippDelete(response);
|
||||
httpClose(http);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
if ((attr = ippFindAttribute(response, "printer-state", IPP_TAG_ENUM)) != NULL)
|
||||
state = (ipp_pstate_t)ippGetInteger(attr, 0);
|
||||
|
||||
while (state == IPP_PSTATE_STOPPED && cupsLastError() == IPP_STATUS_OK)
|
||||
{
|
||||
sleep(1);
|
||||
ippDelete(response);
|
||||
|
||||
request = ippNewRequest(IPP_OP_GET_PRINTER_ATTRIBUTES);
|
||||
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, uri);
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "requesting-user-name", NULL, cupsUser());
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD, "requested-attributes", NULL, "printer-state");
|
||||
|
||||
response = cupsDoRequest(http, request, "/");
|
||||
|
||||
if ((attr = ippFindAttribute(response, "printer-state", IPP_TAG_ENUM)) != NULL)
|
||||
state = (ipp_pstate_t)ippGetInteger(attr, 0);
|
||||
}
|
||||
|
||||
ippDelete(response);
|
||||
|
||||
httpClose(http);
|
||||
|
||||
return (uri);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 'cupsEnumDests()' - Enumerate available destinations with a callback function.
|
||||
*
|
||||
@@ -871,7 +963,7 @@ cupsEnumDests(
|
||||
*/
|
||||
|
||||
num_dests = _cupsGetDests(CUPS_HTTP_DEFAULT, IPP_OP_CUPS_GET_PRINTERS, NULL,
|
||||
&dests, type, mask);
|
||||
&dests, type, mask | CUPS_PRINTER_3D);
|
||||
|
||||
if ((user_default = _cupsUserDefault(name, sizeof(name))) != NULL)
|
||||
defprinter = name;
|
||||
@@ -1390,7 +1482,7 @@ cupsGetDestWithURI(const char *name, /* I - Desired printer name or @code NULL@
|
||||
}
|
||||
|
||||
dest->name = _cupsStrAlloc(name);
|
||||
dest->num_options = cupsAddOption("printer-uri-supported", uri, dest->num_options, &(dest->options));
|
||||
dest->num_options = cupsAddOption("device-uri", uri, dest->num_options, &(dest->options));
|
||||
dest->num_options = cupsAddOption("printer-info", name, dest->num_options, &(dest->options));
|
||||
|
||||
return (dest);
|
||||
@@ -1743,7 +1835,7 @@ cupsGetDests2(http_t *http, /* I - Connection to server or @code CUPS_HTTP_
|
||||
*/
|
||||
|
||||
*dests = (cups_dest_t *)0;
|
||||
num_dests = _cupsGetDests(http, IPP_OP_CUPS_GET_PRINTERS, NULL, dests, 0, 0);
|
||||
num_dests = _cupsGetDests(http, IPP_OP_CUPS_GET_PRINTERS, NULL, dests, 0, CUPS_PRINTER_3D);
|
||||
|
||||
if (cupsLastError() >= IPP_STATUS_REDIRECTION_OTHER_SITE)
|
||||
{
|
||||
@@ -1960,7 +2052,7 @@ cupsGetNamedDest(http_t *http, /* I - Connection to server or @code CUPS_HTT
|
||||
* Get the printer's attributes...
|
||||
*/
|
||||
|
||||
if (!_cupsGetDests(http, op, name, &dest, 0, 0))
|
||||
if (!_cupsGetDests(http, op, name, &dest, 0, CUPS_PRINTER_3D))
|
||||
return (NULL);
|
||||
|
||||
if (instance)
|
||||
@@ -2136,7 +2228,7 @@ cupsSetDests2(http_t *http, /* I - Connection to server or @code CUPS_HTTP_
|
||||
* Get the server destinations...
|
||||
*/
|
||||
|
||||
num_temps = _cupsGetDests(http, IPP_OP_CUPS_GET_PRINTERS, NULL, &temps, 0, 0);
|
||||
num_temps = _cupsGetDests(http, IPP_OP_CUPS_GET_PRINTERS, NULL, &temps, 0, CUPS_PRINTER_3D);
|
||||
|
||||
if (cupsLastError() >= IPP_STATUS_REDIRECTION_OTHER_SITE)
|
||||
{
|
||||
@@ -2491,8 +2583,8 @@ appleCopyNetwork(void)
|
||||
*/
|
||||
|
||||
static char * /* O - Default paper size */
|
||||
appleGetPaperSize(char *name, /* I - Paper size name buffer */
|
||||
int namesize) /* I - Size of buffer */
|
||||
appleGetPaperSize(char *name, /* I - Paper size name buffer */
|
||||
size_t namesize) /* I - Size of buffer */
|
||||
{
|
||||
CFStringRef defaultPaperID; /* Default paper ID */
|
||||
pwg_media_t *pwgmedia; /* PWG media size */
|
||||
@@ -2501,8 +2593,7 @@ appleGetPaperSize(char *name, /* I - Paper size name buffer */
|
||||
defaultPaperID = _cupsAppleCopyDefaultPaperID();
|
||||
if (!defaultPaperID ||
|
||||
CFGetTypeID(defaultPaperID) != CFStringGetTypeID() ||
|
||||
!CFStringGetCString(defaultPaperID, name, namesize,
|
||||
kCFStringEncodingUTF8))
|
||||
!CFStringGetCString(defaultPaperID, name, (CFIndex)namesize, kCFStringEncodingUTF8))
|
||||
name[0] = '\0';
|
||||
else if ((pwgmedia = pwgMediaForLegacy(name)) != NULL)
|
||||
strlcpy(name, pwgmedia->pwg, namesize);
|
||||
@@ -3270,22 +3361,28 @@ cups_dnssd_query_cb(
|
||||
*/
|
||||
|
||||
const char *start, *next; /* Pointer into value */
|
||||
int have_pdf = 0; /* Have PDF? */
|
||||
int have_pdf = 0, /* Have PDF? */
|
||||
have_raster = 0;/* Have raster format support? */
|
||||
|
||||
for (start = value; start && *start; start = next)
|
||||
{
|
||||
if (!_cups_strncasecmp(start, "application/pdf", 15) &&
|
||||
(!start[15] || start[15] == ','))
|
||||
if (!_cups_strncasecmp(start, "application/pdf", 15) && (!start[15] || start[15] == ','))
|
||||
{
|
||||
have_pdf = 1;
|
||||
break;
|
||||
}
|
||||
else if ((!_cups_strncasecmp(start, "image/pwg-raster", 16) && (!start[16] || start[16] == ',')) ||
|
||||
(!_cups_strncasecmp(start, "image/urf", 9) && (!start[9] || start[9] == ',')))
|
||||
{
|
||||
have_raster = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
if ((next = strchr(start, ',')) != NULL)
|
||||
next ++;
|
||||
}
|
||||
|
||||
if (!have_pdf)
|
||||
if (!have_pdf && !have_raster)
|
||||
device->state = _CUPS_DNSSD_INCOMPATIBLE;
|
||||
}
|
||||
else if (!_cups_strcasecmp(key, "printer-type"))
|
||||
@@ -3351,31 +3448,21 @@ cups_dnssd_query_cb(
|
||||
* Save the printer-xxx values...
|
||||
*/
|
||||
|
||||
device->dest.num_options = cupsAddOption("printer-info", name,
|
||||
device->dest.num_options,
|
||||
&device->dest.options);
|
||||
device->dest.num_options = cupsAddOption("printer-info", name, device->dest.num_options, &device->dest.options);
|
||||
|
||||
if (make_and_model[0])
|
||||
{
|
||||
strlcat(make_and_model, " ", sizeof(make_and_model));
|
||||
strlcat(make_and_model, model, sizeof(make_and_model));
|
||||
|
||||
device->dest.num_options = cupsAddOption("printer-make-and-model",
|
||||
make_and_model,
|
||||
device->dest.num_options,
|
||||
&device->dest.options);
|
||||
device->dest.num_options = cupsAddOption("printer-make-and-model", make_and_model, device->dest.num_options, &device->dest.options);
|
||||
}
|
||||
else
|
||||
device->dest.num_options = cupsAddOption("printer-make-and-model",
|
||||
model,
|
||||
device->dest.num_options,
|
||||
&device->dest.options);
|
||||
device->dest.num_options = cupsAddOption("printer-make-and-model", model, device->dest.num_options, &device->dest.options);
|
||||
|
||||
device->type = type;
|
||||
snprintf(value, sizeof(value), "%u", type);
|
||||
device->dest.num_options = cupsAddOption("printer-type", value,
|
||||
device->dest.num_options,
|
||||
&device->dest.options);
|
||||
device->dest.num_options = cupsAddOption("printer-type", value, device->dest.num_options, &device->dest.options);
|
||||
|
||||
/*
|
||||
* Save the URI...
|
||||
@@ -3386,11 +3473,9 @@ cups_dnssd_query_cb(
|
||||
!strcmp(device->regtype, "_ipps._tcp") ? "ipps" : "ipp",
|
||||
NULL, uriname, 0, saw_printer_type ? "/cups" : "/");
|
||||
|
||||
DEBUG_printf(("6cups_dnssd_query: printer-uri-supported=\"%s\"", uri));
|
||||
DEBUG_printf(("6cups_dnssd_query: device-uri=\"%s\"", uri));
|
||||
|
||||
device->dest.num_options = cupsAddOption("printer-uri-supported", uri,
|
||||
device->dest.num_options,
|
||||
&device->dest.options);
|
||||
device->dest.num_options = cupsAddOption("device-uri", uri, device->dest.num_options, &device->dest.options);
|
||||
}
|
||||
else
|
||||
DEBUG_printf(("6cups_dnssd_query: Ignoring TXT record for '%s'.",
|
||||
@@ -3436,18 +3521,14 @@ cups_dnssd_resolve(
|
||||
resolve.end_time.tv_sec += 75;
|
||||
|
||||
if (cb)
|
||||
(*cb)(user_data, CUPS_DEST_FLAGS_UNCONNECTED | CUPS_DEST_FLAGS_RESOLVING,
|
||||
dest);
|
||||
(*cb)(user_data, CUPS_DEST_FLAGS_UNCONNECTED | CUPS_DEST_FLAGS_RESOLVING, dest);
|
||||
|
||||
if ((uri = _httpResolveURI(uri, tempuri, sizeof(tempuri),
|
||||
_HTTP_RESOLVE_FQDN, cups_dnssd_resolve_cb,
|
||||
&resolve)) == NULL)
|
||||
if ((uri = _httpResolveURI(uri, tempuri, sizeof(tempuri), _HTTP_RESOLVE_DEFAULT, cups_dnssd_resolve_cb, &resolve)) == NULL)
|
||||
{
|
||||
_cupsSetError(IPP_STATUS_ERROR_INTERNAL, _("Unable to resolve printer-uri."), 1);
|
||||
|
||||
if (cb)
|
||||
(*cb)(user_data, CUPS_DEST_FLAGS_UNCONNECTED | CUPS_DEST_FLAGS_ERROR,
|
||||
dest);
|
||||
(*cb)(user_data, CUPS_DEST_FLAGS_UNCONNECTED | CUPS_DEST_FLAGS_ERROR, dest);
|
||||
|
||||
return (NULL);
|
||||
}
|
||||
@@ -3456,11 +3537,9 @@ cups_dnssd_resolve(
|
||||
* Save the resolved URI...
|
||||
*/
|
||||
|
||||
dest->num_options = cupsAddOption("printer-uri-supported", uri,
|
||||
dest->num_options, &dest->options);
|
||||
dest->num_options = cupsAddOption("resolved-device-uri", uri, dest->num_options, &dest->options);
|
||||
|
||||
return (cupsGetOption("printer-uri-supported", dest->num_options,
|
||||
dest->options));
|
||||
return (cupsGetOption("resolved-device-uri", dest->num_options, dest->options));
|
||||
}
|
||||
|
||||
|
||||
@@ -3480,8 +3559,11 @@ cups_dnssd_resolve_cb(void *context) /* I - Resolve data */
|
||||
* If the cancel variable is set, return immediately.
|
||||
*/
|
||||
|
||||
if (*resolve->cancel)
|
||||
if (resolve->cancel && *(resolve->cancel))
|
||||
{
|
||||
DEBUG_puts("4cups_dnssd_resolve_cb: Canceled.");
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Otherwise check the end time...
|
||||
@@ -3489,9 +3571,11 @@ cups_dnssd_resolve_cb(void *context) /* I - Resolve data */
|
||||
|
||||
gettimeofday(&curtime, NULL);
|
||||
|
||||
return (curtime.tv_sec > resolve->end_time.tv_sec ||
|
||||
DEBUG_printf(("4cups_dnssd_resolve_cb: curtime=%d.%06d, end_time=%d.%06d", (int)curtime.tv_sec, (int)curtime.tv_usec, (int)resolve->end_time.tv_sec, (int)resolve->end_time.tv_usec));
|
||||
|
||||
return (curtime.tv_sec < resolve->end_time.tv_sec ||
|
||||
(curtime.tv_sec == resolve->end_time.tv_sec &&
|
||||
curtime.tv_usec > resolve->end_time.tv_usec));
|
||||
curtime.tv_usec < resolve->end_time.tv_usec));
|
||||
}
|
||||
|
||||
|
||||
@@ -3940,8 +4024,3 @@ cups_make_string(
|
||||
|
||||
return (buffer);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: dest.c 12665 2015-05-25 15:08:55Z msweet $".
|
||||
*/
|
||||
|
||||
+11
-6
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: encode.c 11733 2014-03-25 18:01:41Z msweet $"
|
||||
* "$Id: encode.c 13138 2016-03-15 14:59:54Z msweet $"
|
||||
*
|
||||
* Option encoding routines for CUPS.
|
||||
*
|
||||
* Copyright 2007-2014 by Apple Inc.
|
||||
* Copyright 2007-2016 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -117,6 +117,9 @@ static const _ipp_option_t ipp_options[] =
|
||||
{ 0, "copies", IPP_TAG_INTEGER, IPP_TAG_JOB,
|
||||
IPP_TAG_DOCUMENT },
|
||||
{ 0, "copies-default", IPP_TAG_INTEGER, IPP_TAG_PRINTER },
|
||||
{ 0, "date-time-at-completed",IPP_TAG_DATE, IPP_TAG_ZERO }, /* never send as option */
|
||||
{ 0, "date-time-at-creation", IPP_TAG_DATE, IPP_TAG_ZERO }, /* never send as option */
|
||||
{ 0, "date-time-at-processing",IPP_TAG_DATE, IPP_TAG_ZERO }, /* never send as option */
|
||||
{ 0, "device-uri", IPP_TAG_URI, IPP_TAG_PRINTER },
|
||||
{ 1, "document-copies", IPP_TAG_RANGE, IPP_TAG_JOB,
|
||||
IPP_TAG_DOCUMENT,
|
||||
@@ -274,9 +277,11 @@ static const _ipp_option_t ipp_options[] =
|
||||
{ 0, "print-quality-default", IPP_TAG_ENUM, IPP_TAG_PRINTER },
|
||||
{ 1, "printer-commands", IPP_TAG_KEYWORD, IPP_TAG_PRINTER },
|
||||
{ 0, "printer-error-policy", IPP_TAG_NAME, IPP_TAG_PRINTER },
|
||||
{ 0, "printer-geo-location", IPP_TAG_URI, IPP_TAG_PRINTER },
|
||||
{ 0, "printer-info", IPP_TAG_TEXT, IPP_TAG_PRINTER },
|
||||
{ 0, "printer-is-accepting-jobs", IPP_TAG_BOOLEAN, IPP_TAG_PRINTER },
|
||||
{ 0, "printer-is-shared", IPP_TAG_BOOLEAN, IPP_TAG_PRINTER },
|
||||
{ 0, "printer-is-temporary", IPP_TAG_BOOLEAN, IPP_TAG_PRINTER },
|
||||
{ 0, "printer-location", IPP_TAG_TEXT, IPP_TAG_PRINTER },
|
||||
{ 0, "printer-make-and-model", IPP_TAG_TEXT, IPP_TAG_PRINTER },
|
||||
{ 0, "printer-more-info", IPP_TAG_URI, IPP_TAG_PRINTER },
|
||||
@@ -538,14 +543,13 @@ cupsEncodeOptions2(
|
||||
else if (*sep == ',' && !quote)
|
||||
count ++;
|
||||
else if (*sep == '\\' && sep[1])
|
||||
sep ++;
|
||||
sep += 2;
|
||||
}
|
||||
}
|
||||
else
|
||||
count = 1;
|
||||
|
||||
DEBUG_printf(("2cupsEncodeOptions2: option=\"%s\", count=%d",
|
||||
option->name, count));
|
||||
DEBUG_printf(("2cupsEncodeOptions2: option=\"%s\", value=\"%s\", count=%d", option->name, option->value, count));
|
||||
|
||||
/*
|
||||
* Allocate memory for the attribute values...
|
||||
@@ -629,6 +633,7 @@ cupsEncodeOptions2(
|
||||
* Skip quoted character...
|
||||
*/
|
||||
|
||||
memmove(sep, sep + 1, strlen(sep));
|
||||
sep ++;
|
||||
}
|
||||
}
|
||||
@@ -849,5 +854,5 @@ compare_ipp_options(_ipp_option_t *a, /* I - First option */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: encode.c 11733 2014-03-25 18:01:41Z msweet $".
|
||||
* End of "$Id: encode.c 13138 2016-03-15 14:59:54Z msweet $".
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: file-private.h 11627 2014-02-20 16:15:09Z msweet $"
|
||||
* "$Id: file-private.h 11984 2014-07-02 13:16:59Z msweet $"
|
||||
*
|
||||
* Private file definitions for CUPS.
|
||||
*
|
||||
@@ -135,5 +135,5 @@ extern void _cupsFileCheckFilter(void *context,
|
||||
#endif /* !_CUPS_FILE_PRIVATE_H_ */
|
||||
|
||||
/*
|
||||
* End of "$Id: file-private.h 11627 2014-02-20 16:15:09Z msweet $".
|
||||
* End of "$Id: file-private.h 11984 2014-07-02 13:16:59Z msweet $".
|
||||
*/
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: file.c 12642 2015-05-19 15:04:47Z msweet $"
|
||||
* "$Id: file.c 13138 2016-03-15 14:59:54Z msweet $"
|
||||
*
|
||||
* File functions for CUPS.
|
||||
*
|
||||
@@ -2752,5 +2752,5 @@ cups_write(cups_file_t *fp, /* I - CUPS file */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: file.c 12642 2015-05-19 15:04:47Z msweet $".
|
||||
* End of "$Id: file.c 13138 2016-03-15 14:59:54Z msweet $".
|
||||
*/
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: file.h 11627 2014-02-20 16:15:09Z msweet $"
|
||||
* "$Id: file.h 11984 2014-07-02 13:16:59Z msweet $"
|
||||
*
|
||||
* Public file definitions for CUPS.
|
||||
*
|
||||
@@ -114,5 +114,5 @@ extern ssize_t cupsFileWrite(cups_file_t *fp, const char *buf,
|
||||
#endif /* !_CUPS_FILE_H_ */
|
||||
|
||||
/*
|
||||
* End of "$Id: file.h 11627 2014-02-20 16:15:09Z msweet $".
|
||||
* End of "$Id: file.h 11984 2014-07-02 13:16:59Z msweet $".
|
||||
*/
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: getputfile.c 11558 2014-02-06 18:33:34Z msweet $"
|
||||
* "$Id: getputfile.c 11984 2014-07-02 13:16:59Z msweet $"
|
||||
*
|
||||
* Get/put file functions for CUPS.
|
||||
*
|
||||
@@ -511,5 +511,5 @@ cupsPutFile(http_t *http, /* I - Connection to server or @code CUPS_HTTP_DE
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: getputfile.c 11558 2014-02-06 18:33:34Z msweet $".
|
||||
* End of "$Id: getputfile.c 11984 2014-07-02 13:16:59Z msweet $".
|
||||
*/
|
||||
|
||||
+11
-23
@@ -1,29 +1,18 @@
|
||||
/*
|
||||
* "$Id: globals.c 12481 2015-02-03 12:45:14Z msweet $"
|
||||
* "$Id: globals.c 13138 2016-03-15 14:59:54Z msweet $"
|
||||
*
|
||||
* Global variable access routines for CUPS.
|
||||
* Global variable access routines for CUPS.
|
||||
*
|
||||
* Copyright 2007-2013 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
* Copyright 2007-2015 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
* which should have been included with this file. If this file is
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
* which should have been included with this file. If this file is
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
*
|
||||
* This file is subject to the Apple OS-Developed Software exception.
|
||||
*
|
||||
* Contents:
|
||||
*
|
||||
* _cupsGlobalLock() - Lock the global mutex.
|
||||
* _cupsGlobals() - Return a pointer to thread local storage
|
||||
* _cupsGlobalUnlock() - Unlock the global mutex.
|
||||
* DllMain() - Main entry for library.
|
||||
* cups_fix_path() - Fix a file path to use forward slashes consistently.
|
||||
* cups_globals_alloc() - Allocate and initialize global data.
|
||||
* cups_globals_free() - Free global data.
|
||||
* cups_globals_init() - Initialize environment variables.
|
||||
* This file is subject to the Apple OS-Developed Software exception.
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -37,7 +26,6 @@
|
||||
* Local globals...
|
||||
*/
|
||||
|
||||
|
||||
#ifdef DEBUG
|
||||
static int cups_global_index = 0;
|
||||
/* Next thread number */
|
||||
@@ -394,5 +382,5 @@ cups_globals_init(void)
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: globals.c 12481 2015-02-03 12:45:14Z msweet $".
|
||||
* End of "$Id: globals.c 13138 2016-03-15 14:59:54Z msweet $".
|
||||
*/
|
||||
|
||||
+252
@@ -0,0 +1,252 @@
|
||||
/*
|
||||
* "$Id: hash.c 13138 2016-03-15 14:59:54Z msweet $"
|
||||
*
|
||||
* Hashing function for CUPS.
|
||||
*
|
||||
* Copyright 2015 by Apple Inc.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
* which should have been included with this file. If this file is
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
*
|
||||
* This file is subject to the Apple OS-Developed Software exception.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Include necessary headers...
|
||||
*/
|
||||
|
||||
#include "cups-private.h"
|
||||
#ifdef __APPLE__
|
||||
# include <CommonCrypto/CommonDigest.h>
|
||||
#elif defined(HAVE_GNUTLS)
|
||||
# include <gnutls/crypto.h>
|
||||
#endif /* __APPLE__ */
|
||||
|
||||
|
||||
/*
|
||||
* 'cupsHashData()' - Perform a hash function on the given data.
|
||||
*
|
||||
* The "algorithm" argument can be any of the registered, non-deprecated IPP
|
||||
* hash algorithms for the "job-password-encryption" attribute, including
|
||||
* "sha" for SHA-1, "sha-256" for SHA2-256, etc.
|
||||
*
|
||||
* The "hash" argument points to a buffer of "hashsize" bytes and should be at
|
||||
* least 64 bytes in length for all of the supported algorithms.
|
||||
*
|
||||
* The returned hash is binary data.
|
||||
*
|
||||
* @since CUPS 2.2@
|
||||
*/
|
||||
|
||||
ssize_t /* O - Size of hash or -1 on error */
|
||||
cupsHashData(const char *algorithm, /* I - Algorithm name */
|
||||
const void *data, /* I - Data to hash */
|
||||
size_t datalen, /* I - Length of data to hash */
|
||||
unsigned char *hash, /* I - Hash buffer */
|
||||
size_t hashsize) /* I - Size of hash buffer */
|
||||
{
|
||||
if (!algorithm || !data || datalen == 0 || !hash || hashsize == 0)
|
||||
{
|
||||
_cupsSetError(IPP_STATUS_ERROR_INTERNAL, _("Bad arguments to function"), 1);
|
||||
return (-1);
|
||||
}
|
||||
|
||||
#ifdef __APPLE__
|
||||
if (strcmp(algorithm, "sha"))
|
||||
{
|
||||
/*
|
||||
* SHA-1...
|
||||
*/
|
||||
|
||||
CC_SHA1_CTX ctx; /* SHA-1 context */
|
||||
|
||||
if (hashsize < CC_SHA1_DIGEST_LENGTH)
|
||||
goto too_small;
|
||||
|
||||
CC_SHA1_Init(&ctx);
|
||||
CC_SHA1_Update(&ctx, data, (CC_LONG)datalen);
|
||||
CC_SHA1_Final(hash, &ctx);
|
||||
|
||||
return (CC_SHA1_DIGEST_LENGTH);
|
||||
}
|
||||
else if (strcmp(algorithm, "sha2-224"))
|
||||
{
|
||||
CC_SHA256_CTX ctx; /* SHA-224 context */
|
||||
|
||||
if (hashsize < CC_SHA224_DIGEST_LENGTH)
|
||||
goto too_small;
|
||||
|
||||
CC_SHA224_Init(&ctx);
|
||||
CC_SHA224_Update(&ctx, data, (CC_LONG)datalen);
|
||||
CC_SHA224_Final(hash, &ctx);
|
||||
|
||||
return (CC_SHA224_DIGEST_LENGTH);
|
||||
}
|
||||
else if (strcmp(algorithm, "sha2-256"))
|
||||
{
|
||||
CC_SHA256_CTX ctx; /* SHA-256 context */
|
||||
|
||||
if (hashsize < CC_SHA256_DIGEST_LENGTH)
|
||||
goto too_small;
|
||||
|
||||
CC_SHA256_Init(&ctx);
|
||||
CC_SHA256_Update(&ctx, data, (CC_LONG)datalen);
|
||||
CC_SHA256_Final(hash, &ctx);
|
||||
|
||||
return (CC_SHA256_DIGEST_LENGTH);
|
||||
}
|
||||
else if (strcmp(algorithm, "sha2-384"))
|
||||
{
|
||||
CC_SHA512_CTX ctx; /* SHA-384 context */
|
||||
|
||||
if (hashsize < CC_SHA384_DIGEST_LENGTH)
|
||||
goto too_small;
|
||||
|
||||
CC_SHA384_Init(&ctx);
|
||||
CC_SHA384_Update(&ctx, data, (CC_LONG)datalen);
|
||||
CC_SHA384_Final(hash, &ctx);
|
||||
|
||||
return (CC_SHA384_DIGEST_LENGTH);
|
||||
}
|
||||
else if (strcmp(algorithm, "sha2-512"))
|
||||
{
|
||||
CC_SHA512_CTX ctx; /* SHA-512 context */
|
||||
|
||||
if (hashsize < CC_SHA512_DIGEST_LENGTH)
|
||||
goto too_small;
|
||||
|
||||
CC_SHA512_Init(&ctx);
|
||||
CC_SHA512_Update(&ctx, data, (CC_LONG)datalen);
|
||||
CC_SHA512_Final(hash, &ctx);
|
||||
|
||||
return (CC_SHA512_DIGEST_LENGTH);
|
||||
}
|
||||
else if (strcmp(algorithm, "sha2-512_224"))
|
||||
{
|
||||
CC_SHA512_CTX ctx; /* SHA-512 context */
|
||||
unsigned char temp[CC_SHA512_DIGEST_LENGTH];
|
||||
/* SHA-512 hash */
|
||||
|
||||
/*
|
||||
* SHA2-512 truncated to 224 bits (28 bytes)...
|
||||
*/
|
||||
|
||||
if (hashsize < CC_SHA224_DIGEST_LENGTH)
|
||||
goto too_small;
|
||||
|
||||
CC_SHA512_Init(&ctx);
|
||||
CC_SHA512_Update(&ctx, data, (CC_LONG)datalen);
|
||||
CC_SHA512_Final(temp, &ctx);
|
||||
|
||||
memcpy(hash, temp, CC_SHA224_DIGEST_LENGTH);
|
||||
|
||||
return (CC_SHA224_DIGEST_LENGTH);
|
||||
}
|
||||
else if (strcmp(algorithm, "sha2-512_256"))
|
||||
{
|
||||
CC_SHA512_CTX ctx; /* SHA-512 context */
|
||||
unsigned char temp[CC_SHA512_DIGEST_LENGTH];
|
||||
/* SHA-512 hash */
|
||||
|
||||
/*
|
||||
* SHA2-512 truncated to 256 bits (32 bytes)...
|
||||
*/
|
||||
|
||||
if (hashsize < CC_SHA256_DIGEST_LENGTH)
|
||||
goto too_small;
|
||||
|
||||
CC_SHA512_Init(&ctx);
|
||||
CC_SHA512_Update(&ctx, data, (CC_LONG)datalen);
|
||||
CC_SHA512_Final(temp, &ctx);
|
||||
|
||||
memcpy(hash, temp, CC_SHA256_DIGEST_LENGTH);
|
||||
|
||||
return (CC_SHA256_DIGEST_LENGTH);
|
||||
}
|
||||
|
||||
#elif defined(HAVE_GNUTLS)
|
||||
gnutls_digest_algorithm_t alg = GNUTLS_DIG_UNKNOWN;
|
||||
/* Algorithm */
|
||||
unsigned char temp[64]; /* Temporary hash buffer */
|
||||
size_t tempsize = 0; /* Truncate to this size? */
|
||||
|
||||
if (strcmp(algorithm, "sha"))
|
||||
alg = GNUTLS_DIG_SHA1;
|
||||
else if (strcmp(algorithm, "sha2-224"))
|
||||
alg = GNUTLS_DIG_SHA224;
|
||||
else if (strcmp(algorithm, "sha2-256"))
|
||||
alg = GNUTLS_DIG_SHA256;
|
||||
else if (strcmp(algorithm, "sha2-384"))
|
||||
alg = GNUTLS_DIG_SHA384;
|
||||
else if (strcmp(algorithm, "sha2-512"))
|
||||
alg = GNUTLS_DIG_SHA512;
|
||||
else if (strcmp(algorithm, "sha2-512_224"))
|
||||
{
|
||||
alg = GNUTLS_DIG_SHA512;
|
||||
tempsize = 28;
|
||||
}
|
||||
else if (strcmp(algorithm, "sha2-512_256"))
|
||||
{
|
||||
alg = GNUTLS_DIG_SHA512;
|
||||
tempsize = 32;
|
||||
}
|
||||
|
||||
if (alg != GNUTLS_DIG_UNKNOWN)
|
||||
{
|
||||
if (tempsize > 0)
|
||||
{
|
||||
/*
|
||||
* Truncate result to tempsize bytes...
|
||||
*/
|
||||
|
||||
if (hashsize < tempsize)
|
||||
goto too_small;
|
||||
|
||||
gnutls_hash_fast(alg, data, datalen, temp);
|
||||
memcpy(hash, temp, tempsize);
|
||||
|
||||
return ((ssize_t)tempsize);
|
||||
}
|
||||
|
||||
if (hashsize < gnutls_hash_get_len(alg))
|
||||
goto too_small;
|
||||
|
||||
gnutls_hash_fast(alg, data, datalen, hash);
|
||||
|
||||
return (gnutls_hash_get_len(alg));
|
||||
}
|
||||
|
||||
#else
|
||||
/*
|
||||
* No hash support without CommonCrypto or GNU TLS...
|
||||
*/
|
||||
|
||||
if (hashsize < 64)
|
||||
goto too_small;
|
||||
#endif /* __APPLE__ */
|
||||
|
||||
/*
|
||||
* Unknown hash algorithm...
|
||||
*/
|
||||
|
||||
_cupsSetError(IPP_STATUS_ERROR_INTERNAL, _("Unknown hash algorithm."), 1);
|
||||
|
||||
return (-1);
|
||||
|
||||
/*
|
||||
* We get here if the buffer is too small.
|
||||
*/
|
||||
|
||||
too_small:
|
||||
|
||||
_cupsSetError(IPP_STATUS_ERROR_INTERNAL, _("Hash buffer too small."), 1);
|
||||
return (-1);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: hash.c 13138 2016-03-15 14:59:54Z msweet $".
|
||||
*/
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: http-addr.c 12129 2014-08-28 19:26:31Z msweet $"
|
||||
* "$Id: http-addr.c 13138 2016-03-15 14:59:54Z msweet $"
|
||||
*
|
||||
* HTTP address routines for CUPS.
|
||||
*
|
||||
@@ -924,5 +924,5 @@ httpResolveHostname(http_t *http, /* I - HTTP connection */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: http-addr.c 12129 2014-08-28 19:26:31Z msweet $".
|
||||
* End of "$Id: http-addr.c 13138 2016-03-15 14:59:54Z msweet $".
|
||||
*/
|
||||
|
||||
+149
-125
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: http-addrlist.c 11627 2014-02-20 16:15:09Z msweet $"
|
||||
* "$Id: http-addrlist.c 13138 2016-03-15 14:59:54Z msweet $"
|
||||
*
|
||||
* HTTP address list routines for CUPS.
|
||||
*
|
||||
@@ -68,14 +68,19 @@ httpAddrConnect2(
|
||||
http_addr_t peer; /* Peer address */
|
||||
int flags, /* Socket flags */
|
||||
remaining; /* Remaining timeout */
|
||||
int i, /* Looping var */
|
||||
nfds, /* Number of file descriptors */
|
||||
fds[100], /* Socket file descriptors */
|
||||
result; /* Result from select() or poll() */
|
||||
http_addrlist_t *addrs[100]; /* Addresses */
|
||||
# ifdef HAVE_POLL
|
||||
struct pollfd pfd; /* Polled file descriptor */
|
||||
struct pollfd pfds[100]; /* Polled file descriptors */
|
||||
# else
|
||||
int max_fd = -1; /* Highest file descriptor */
|
||||
fd_set input_set, /* select() input set */
|
||||
output_set; /* select() output set */
|
||||
struct timeval timeout; /* Timeout */
|
||||
# endif /* HAVE_POLL */
|
||||
int nfds; /* Result from select()/poll() */
|
||||
#endif /* O_NONBLOCK */
|
||||
#ifdef DEBUG
|
||||
char temp[256]; /* Temporary address string */
|
||||
@@ -95,35 +100,39 @@ httpAddrConnect2(
|
||||
if (cancel && *cancel)
|
||||
return (NULL);
|
||||
|
||||
if (msec <= 0 || getenv("CUPS_DISABLE_ASYNC_CONNECT"))
|
||||
if (msec <= 0)
|
||||
msec = INT_MAX;
|
||||
|
||||
/*
|
||||
* Loop through each address until we connect or run out of addresses...
|
||||
*/
|
||||
|
||||
while (addrlist)
|
||||
for (nfds = 0; addrlist && nfds < (int)(sizeof(fds) / sizeof(fds[0])); addrlist = addrlist->next)
|
||||
{
|
||||
if (cancel && *cancel)
|
||||
{
|
||||
while (nfds > 0)
|
||||
{
|
||||
nfds --;
|
||||
httpAddrClose(NULL, fds[nfds]);
|
||||
}
|
||||
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
* Create the socket...
|
||||
*/
|
||||
|
||||
DEBUG_printf(("2httpAddrConnect2: Trying %s:%d...",
|
||||
httpAddrString(&(addrlist->addr), temp, sizeof(temp)),
|
||||
httpAddrPort(&(addrlist->addr))));
|
||||
DEBUG_printf(("2httpAddrConnect2: Trying %s:%d...", httpAddrString(&(addrlist->addr), temp, sizeof(temp)), httpAddrPort(&(addrlist->addr))));
|
||||
|
||||
if ((*sock = (int)socket(httpAddrFamily(&(addrlist->addr)), SOCK_STREAM,
|
||||
0)) < 0)
|
||||
if ((fds[nfds] = (int)socket(httpAddrFamily(&(addrlist->addr)), SOCK_STREAM, 0)) < 0)
|
||||
{
|
||||
/*
|
||||
* Don't abort yet, as this could just be an issue with the local
|
||||
* system not being configured with IPv4/IPv6/domain socket enabled...
|
||||
*/
|
||||
|
||||
addrlist = addrlist->next;
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -132,16 +141,16 @@ httpAddrConnect2(
|
||||
*/
|
||||
|
||||
val = 1;
|
||||
setsockopt(*sock, SOL_SOCKET, SO_REUSEADDR, CUPS_SOCAST &val, sizeof(val));
|
||||
setsockopt(fds[nfds], SOL_SOCKET, SO_REUSEADDR, CUPS_SOCAST &val, sizeof(val));
|
||||
|
||||
#ifdef SO_REUSEPORT
|
||||
val = 1;
|
||||
setsockopt(*sock, SOL_SOCKET, SO_REUSEPORT, CUPS_SOCAST &val, sizeof(val));
|
||||
setsockopt(fds[nfds], SOL_SOCKET, SO_REUSEPORT, CUPS_SOCAST &val, sizeof(val));
|
||||
#endif /* SO_REUSEPORT */
|
||||
|
||||
#ifdef SO_NOSIGPIPE
|
||||
val = 1;
|
||||
setsockopt(*sock, SOL_SOCKET, SO_NOSIGPIPE, CUPS_SOCAST &val, sizeof(val));
|
||||
setsockopt(fds[nfds], SOL_SOCKET, SO_NOSIGPIPE, CUPS_SOCAST &val, sizeof(val));
|
||||
#endif /* SO_NOSIGPIPE */
|
||||
|
||||
/*
|
||||
@@ -150,14 +159,14 @@ httpAddrConnect2(
|
||||
*/
|
||||
|
||||
val = 1;
|
||||
setsockopt(*sock, IPPROTO_TCP, TCP_NODELAY, CUPS_SOCAST &val, sizeof(val));
|
||||
setsockopt(fds[nfds], IPPROTO_TCP, TCP_NODELAY, CUPS_SOCAST &val, sizeof(val));
|
||||
|
||||
#ifdef FD_CLOEXEC
|
||||
/*
|
||||
* Close this socket when starting another process...
|
||||
*/
|
||||
|
||||
fcntl(*sock, F_SETFD, FD_CLOEXEC);
|
||||
fcntl(fds[nfds], F_SETFD, FD_CLOEXEC);
|
||||
#endif /* FD_CLOEXEC */
|
||||
|
||||
#ifdef O_NONBLOCK
|
||||
@@ -167,142 +176,157 @@ httpAddrConnect2(
|
||||
|
||||
DEBUG_printf(("httpAddrConnect2: Setting non-blocking connect()"));
|
||||
|
||||
flags = fcntl(*sock, F_GETFL, 0);
|
||||
if (msec != INT_MAX)
|
||||
{
|
||||
DEBUG_puts("httpAddrConnect2: Setting non-blocking connect()");
|
||||
|
||||
fcntl(*sock, F_SETFL, flags | O_NONBLOCK);
|
||||
}
|
||||
flags = fcntl(fds[nfds], F_GETFL, 0);
|
||||
fcntl(fds[nfds], F_SETFL, flags | O_NONBLOCK);
|
||||
#endif /* O_NONBLOCK */
|
||||
|
||||
/*
|
||||
* Then connect...
|
||||
*/
|
||||
|
||||
if (!connect(*sock, &(addrlist->addr.addr), (socklen_t)httpAddrLength(&(addrlist->addr))))
|
||||
if (!connect(fds[nfds], &(addrlist->addr.addr), (socklen_t)httpAddrLength(&(addrlist->addr))))
|
||||
{
|
||||
DEBUG_printf(("1httpAddrConnect2: Connected to %s:%d...",
|
||||
httpAddrString(&(addrlist->addr), temp, sizeof(temp)),
|
||||
httpAddrPort(&(addrlist->addr))));
|
||||
DEBUG_printf(("1httpAddrConnect2: Connected to %s:%d...", httpAddrString(&(addrlist->addr), temp, sizeof(temp)), httpAddrPort(&(addrlist->addr))));
|
||||
|
||||
#ifdef O_NONBLOCK
|
||||
fcntl(*sock, F_SETFL, flags);
|
||||
fcntl(fds[nfds], F_SETFL, flags);
|
||||
#endif /* O_NONBLOCK */
|
||||
|
||||
*sock = fds[nfds];
|
||||
|
||||
while (nfds > 0)
|
||||
{
|
||||
nfds --;
|
||||
httpAddrClose(NULL, fds[nfds]);
|
||||
}
|
||||
|
||||
return (addrlist);
|
||||
}
|
||||
|
||||
#ifdef O_NONBLOCK
|
||||
# ifdef WIN32
|
||||
if (WSAGetLastError() == WSAEINPROGRESS ||
|
||||
WSAGetLastError() == WSAEWOULDBLOCK)
|
||||
# else
|
||||
if (errno == EINPROGRESS || errno == EWOULDBLOCK)
|
||||
# endif /* WIN32 */
|
||||
#ifdef WIN32
|
||||
if (WSAGetLastError() != WSAEINPROGRESS && WSAGetLastError() != WSAEWOULDBLOCK)
|
||||
#else
|
||||
if (errno != EINPROGRESS && errno != EWOULDBLOCK)
|
||||
#endif /* WIN32 */
|
||||
{
|
||||
DEBUG_puts("1httpAddrConnect2: Finishing async connect()");
|
||||
|
||||
fcntl(*sock, F_SETFL, flags);
|
||||
|
||||
for (remaining = msec; remaining > 0; remaining -= 250)
|
||||
{
|
||||
do
|
||||
{
|
||||
if (cancel && *cancel)
|
||||
{
|
||||
/*
|
||||
* Close this socket and return...
|
||||
*/
|
||||
|
||||
DEBUG_puts("1httpAddrConnect2: Canceled connect()");
|
||||
|
||||
httpAddrClose(NULL, *sock);
|
||||
|
||||
*sock = -1;
|
||||
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
# ifdef HAVE_POLL
|
||||
pfd.fd = *sock;
|
||||
pfd.events = POLLIN | POLLOUT;
|
||||
|
||||
nfds = poll(&pfd, 1, remaining > 250 ? 250 : remaining);
|
||||
|
||||
DEBUG_printf(("1httpAddrConnect2: poll() returned %d (%d)", nfds,
|
||||
errno));
|
||||
|
||||
# else
|
||||
FD_ZERO(&input_set);
|
||||
FD_SET(*sock, &input_set);
|
||||
output_set = input_set;
|
||||
|
||||
timeout.tv_sec = 0;
|
||||
timeout.tv_usec = (remaining > 250 ? 250 : remaining) * 1000;
|
||||
|
||||
nfds = select(*sock + 1, &input_set, &output_set, NULL, &timeout);
|
||||
|
||||
DEBUG_printf(("1httpAddrConnect2: select() returned %d (%d)", nfds,
|
||||
errno));
|
||||
# endif /* HAVE_POLL */
|
||||
}
|
||||
# ifdef WIN32
|
||||
while (nfds < 0 && (WSAGetLastError() == WSAEINTR ||
|
||||
WSAGetLastError() == WSAEWOULDBLOCK));
|
||||
# else
|
||||
while (nfds < 0 && (errno == EINTR || errno == EAGAIN));
|
||||
# endif /* WIN32 */
|
||||
|
||||
if (nfds > 0)
|
||||
{
|
||||
len = sizeof(peer);
|
||||
if (!getpeername(*sock, (struct sockaddr *)&peer, &len))
|
||||
{
|
||||
DEBUG_printf(("1httpAddrConnect2: Connected to %s:%d...",
|
||||
httpAddrString(&peer, temp, sizeof(temp)),
|
||||
httpAddrPort(&peer)));
|
||||
|
||||
return (addrlist);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
DEBUG_printf(("1httpAddrConnect2: Unable to connect to %s:%d: %s", httpAddrString(&(addrlist->addr), temp, sizeof(temp)), httpAddrPort(&(addrlist->addr)), strerror(errno)));
|
||||
httpAddrClose(NULL, fds[nfds]);
|
||||
continue;
|
||||
}
|
||||
#endif /* O_NONBLOCK */
|
||||
|
||||
DEBUG_printf(("1httpAddrConnect2: Unable to connect to %s:%d: %s",
|
||||
httpAddrString(&(addrlist->addr), temp, sizeof(temp)),
|
||||
httpAddrPort(&(addrlist->addr)), strerror(errno)));
|
||||
fcntl(fds[nfds], F_SETFL, flags);
|
||||
|
||||
#ifndef WIN32
|
||||
if (errno == EINPROGRESS)
|
||||
errno = ETIMEDOUT;
|
||||
#endif /* !WIN32 */
|
||||
#ifndef HAVE_POLL
|
||||
if (fds[nfds] > max_fd)
|
||||
max_fd = fds[nfds];
|
||||
#endif /* !HAVE_POLL */
|
||||
|
||||
/*
|
||||
* Close this socket and move to the next address...
|
||||
*/
|
||||
|
||||
httpAddrClose(NULL, *sock);
|
||||
|
||||
*sock = -1;
|
||||
addrlist = addrlist->next;
|
||||
addrs[nfds] = addrlist;
|
||||
nfds ++;
|
||||
}
|
||||
|
||||
#ifdef O_NONBLOCK
|
||||
DEBUG_puts("1httpAddrConnect2: Finishing async connect()");
|
||||
|
||||
for (remaining = msec; remaining > 0; remaining -= 250)
|
||||
{
|
||||
do
|
||||
{
|
||||
if (cancel && *cancel)
|
||||
{
|
||||
/*
|
||||
* Close this socket and return...
|
||||
*/
|
||||
|
||||
DEBUG_puts("1httpAddrConnect2: Canceled connect()");
|
||||
|
||||
while (nfds > 0)
|
||||
{
|
||||
nfds --;
|
||||
httpAddrClose(NULL, fds[nfds]);
|
||||
}
|
||||
|
||||
*sock = -1;
|
||||
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
# ifdef HAVE_POLL
|
||||
for (i = 0; i < nfds; i ++)
|
||||
{
|
||||
pfds[i].fd = fds[i];
|
||||
pfds[i].events = POLLIN | POLLOUT;
|
||||
}
|
||||
|
||||
result = poll(pfds, (nfds_t)nfds, remaining > 250 ? 250 : remaining);
|
||||
|
||||
DEBUG_printf(("1httpAddrConnect2: poll() returned %d (%d)", result, errno));
|
||||
|
||||
# else
|
||||
FD_ZERO(&input_set);
|
||||
for (i = 0; i < nfds; i ++)
|
||||
FD_SET(fds[i], &input_set);
|
||||
output_set = input_set;
|
||||
|
||||
timeout.tv_sec = 0;
|
||||
timeout.tv_usec = (remaining > 250 ? 250 : remaining) * 1000;
|
||||
|
||||
result = select(max_fd + 1, &input_set, &output_set, NULL, &timeout);
|
||||
|
||||
DEBUG_printf(("1httpAddrConnect2: select() returned %d (%d)", result, errno));
|
||||
# endif /* HAVE_POLL */
|
||||
}
|
||||
# ifdef WIN32
|
||||
while (result < 0 && (WSAGetLastError() == WSAEINTR || WSAGetLastError() == WSAEWOULDBLOCK));
|
||||
# else
|
||||
while (result < 0 && (errno == EINTR || errno == EAGAIN));
|
||||
# endif /* WIN32 */
|
||||
|
||||
if (result > 0)
|
||||
{
|
||||
for (i = 0; i < nfds; i ++)
|
||||
{
|
||||
# ifdef HAVE_POLL
|
||||
DEBUG_printf(("pfds[%d].revents=%x\n", i, pfds[i].revents));
|
||||
if (pfds[i].revents)
|
||||
# else
|
||||
if (FD_ISSET(fds[i], &input))
|
||||
# endif /* HAVE_POLL */
|
||||
{
|
||||
*sock = fds[i];
|
||||
len = sizeof(peer);
|
||||
if (!getpeername(fds[i], (struct sockaddr *)&peer, &len))
|
||||
{
|
||||
DEBUG_printf(("1httpAddrConnect2: Connected to %s:%d...", httpAddrString(&peer, temp, sizeof(temp)), httpAddrPort(&peer)));
|
||||
|
||||
addrlist = addrs[i];
|
||||
}
|
||||
}
|
||||
else
|
||||
httpAddrClose(NULL, fds[i]);
|
||||
}
|
||||
|
||||
return (addrlist);
|
||||
}
|
||||
}
|
||||
#endif /* O_NONBLOCK */
|
||||
|
||||
while (nfds > 0)
|
||||
{
|
||||
nfds --;
|
||||
httpAddrClose(NULL, fds[nfds]);
|
||||
}
|
||||
|
||||
if (!addrlist)
|
||||
#ifdef WIN32
|
||||
_cupsSetError(IPP_STATUS_ERROR_SERVICE_UNAVAILABLE, "Connection failed", 0);
|
||||
_cupsSetError(IPP_STATUS_ERROR_SERVICE_UNAVAILABLE, "Connection failed", 0);
|
||||
#else
|
||||
_cupsSetError(IPP_STATUS_ERROR_SERVICE_UNAVAILABLE, strerror(errno), 0);
|
||||
_cupsSetError(IPP_STATUS_ERROR_SERVICE_UNAVAILABLE, strerror(errno), 0);
|
||||
#endif /* WIN32 */
|
||||
|
||||
return (addrlist);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* 'httpAddrCopyList()' - Copy an address list.
|
||||
*
|
||||
@@ -868,5 +892,5 @@ httpAddrGetList(const char *hostname, /* I - Hostname, IP address, or NULL for p
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: http-addrlist.c 11627 2014-02-20 16:15:09Z msweet $".
|
||||
* End of "$Id: http-addrlist.c 13138 2016-03-15 14:59:54Z msweet $".
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: http-private.h 12419 2015-01-22 15:51:20Z msweet $"
|
||||
* "$Id: http-private.h 13138 2016-03-15 14:59:54Z msweet $"
|
||||
*
|
||||
* Private HTTP definitions for CUPS.
|
||||
*
|
||||
@@ -126,6 +126,7 @@ extern CFAbsoluteTime SecCertificateNotValidAfter(SecCertificateRef certificate)
|
||||
|
||||
# ifndef WIN32
|
||||
# include <net/if.h>
|
||||
# include <resolv.h>
|
||||
# ifdef HAVE_GETIFADDRS
|
||||
# include <ifaddrs.h>
|
||||
# else
|
||||
@@ -161,8 +162,11 @@ extern "C" {
|
||||
#define _HTTP_RESOLVE_FQDN 2 /* Resolve to a FQDN */
|
||||
#define _HTTP_RESOLVE_FAXOUT 4 /* Resolve FaxOut service? */
|
||||
|
||||
#define _HTTP_TLS_NONE 0 /* No TLS options */
|
||||
#define _HTTP_TLS_ALLOW_RC4 1 /* Allow RC4 cipher suites */
|
||||
#define _HTTP_TLS_ALLOW_SSL3 2 /* Allow SSL 3.0 */
|
||||
#define _HTTP_TLS_ALLOW_DH 4 /* Allow DH/DHE key negotiation */
|
||||
#define _HTTP_TLS_DENY_TLS10 16 /* Deny TLS 1.0 */
|
||||
|
||||
|
||||
/*
|
||||
@@ -438,5 +442,5 @@ extern int _httpWait(http_t *http, int msec, int usessl);
|
||||
#endif /* !_CUPS_HTTP_PRIVATE_H_ */
|
||||
|
||||
/*
|
||||
* End of "$Id: http-private.h 12419 2015-01-22 15:51:20Z msweet $".
|
||||
* End of "$Id: http-private.h 13138 2016-03-15 14:59:54Z msweet $".
|
||||
*/
|
||||
|
||||
+28
-31
@@ -1,9 +1,7 @@
|
||||
/*
|
||||
* "$Id: http-support.c 12124 2014-08-28 15:37:22Z msweet $"
|
||||
*
|
||||
* HTTP support routines for CUPS.
|
||||
*
|
||||
* Copyright 2007-2014 by Apple Inc.
|
||||
* Copyright 2007-2016 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -1233,6 +1231,12 @@ httpSeparateURI(
|
||||
|
||||
*port = (int)strtol(uri + 1, (char **)&uri, 10);
|
||||
|
||||
if (*port <= 0 || *port > 65535)
|
||||
{
|
||||
*port = 0;
|
||||
return (HTTP_URI_STATUS_BAD_PORT);
|
||||
}
|
||||
|
||||
if (*uri != '/' && *uri)
|
||||
{
|
||||
*port = 0;
|
||||
@@ -1574,9 +1578,7 @@ _httpResolveURI(
|
||||
#endif /* DEBUG */
|
||||
|
||||
|
||||
DEBUG_printf(("4_httpResolveURI(uri=\"%s\", resolved_uri=%p, "
|
||||
"resolved_size=" CUPS_LLFMT ")", uri, resolved_uri,
|
||||
CUPS_LLCAST resolved_size));
|
||||
DEBUG_printf(("_httpResolveURI(uri=\"%s\", resolved_uri=%p, resolved_size=" CUPS_LLFMT ", options=0x%x, cb=%p, context=%p)", uri, resolved_uri, CUPS_LLCAST resolved_size, options, cb, context));
|
||||
|
||||
/*
|
||||
* Get the device URI...
|
||||
@@ -1597,8 +1599,8 @@ _httpResolveURI(
|
||||
if (options & _HTTP_RESOLVE_STDERR)
|
||||
_cupsLangPrintFilter(stderr, "ERROR", _("Bad device-uri \"%s\"."), uri);
|
||||
|
||||
DEBUG_printf(("6_httpResolveURI: httpSeparateURI returned %d!", status));
|
||||
DEBUG_puts("5_httpResolveURI: Returning NULL");
|
||||
DEBUG_printf(("2_httpResolveURI: httpSeparateURI returned %d!", status));
|
||||
DEBUG_puts("2_httpResolveURI: Returning NULL");
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
@@ -1658,7 +1660,7 @@ _httpResolveURI(
|
||||
|
||||
if (regtype <= hostname)
|
||||
{
|
||||
DEBUG_puts("5_httpResolveURI: Bad hostname, returning NULL");
|
||||
DEBUG_puts("2_httpResolveURI: Bad hostname, returning NULL");
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
@@ -1687,7 +1689,7 @@ _httpResolveURI(
|
||||
uribuf.resource = resource;
|
||||
uribuf.uuid = uuid;
|
||||
|
||||
DEBUG_printf(("6_httpResolveURI: Resolving hostname=\"%s\", regtype=\"%s\", "
|
||||
DEBUG_printf(("2_httpResolveURI: Resolving hostname=\"%s\", regtype=\"%s\", "
|
||||
"domain=\"%s\"\n", hostname, regtype, domain));
|
||||
if (options & _HTTP_RESOLVE_STDERR)
|
||||
{
|
||||
@@ -1722,11 +1724,11 @@ _httpResolveURI(
|
||||
while (time(NULL) < end_time)
|
||||
{
|
||||
if (options & _HTTP_RESOLVE_STDERR)
|
||||
_cupsLangPrintFilter(stderr, "INFO", _("Looking for printer."));
|
||||
_cupsLangPrintFilter(stderr, "INFO", _("Looking for printer..."));
|
||||
|
||||
if (cb && !(*cb)(context))
|
||||
{
|
||||
DEBUG_puts("5_httpResolveURI: callback returned 0 (stop)");
|
||||
DEBUG_puts("2_httpResolveURI: callback returned 0 (stop)");
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1762,7 +1764,7 @@ _httpResolveURI(
|
||||
{
|
||||
if (errno != EINTR && errno != EAGAIN)
|
||||
{
|
||||
DEBUG_printf(("5_httpResolveURI: poll error: %s", strerror(errno)));
|
||||
DEBUG_printf(("2_httpResolveURI: poll error: %s", strerror(errno)));
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1958,7 +1960,7 @@ _httpResolveURI(
|
||||
uri = resolved_uri;
|
||||
}
|
||||
|
||||
DEBUG_printf(("5_httpResolveURI: Returning \"%s\"", uri));
|
||||
DEBUG_printf(("2_httpResolveURI: Returning \"%s\"", uri));
|
||||
|
||||
return (uri);
|
||||
}
|
||||
@@ -2145,7 +2147,7 @@ http_resolve_cb(
|
||||
uint8_t valueLen; /* Length of value */
|
||||
|
||||
|
||||
DEBUG_printf(("7http_resolve_cb(sdRef=%p, flags=%x, interfaceIndex=%u, "
|
||||
DEBUG_printf(("4http_resolve_cb(sdRef=%p, flags=%x, interfaceIndex=%u, "
|
||||
"errorCode=%d, fullName=\"%s\", hostTarget=\"%s\", port=%u, "
|
||||
"txtLen=%u, txtRecord=%p, context=%p)", sdRef, flags,
|
||||
interfaceIndex, errorCode, fullName, hostTarget, port, txtLen,
|
||||
@@ -2170,7 +2172,7 @@ http_resolve_cb(
|
||||
fprintf(stderr, "DEBUG: Found UUID %s, looking for %s.", uuid,
|
||||
uribuf->uuid);
|
||||
|
||||
DEBUG_printf(("7http_resolve_cb: Found UUID %s, looking for %s.", uuid,
|
||||
DEBUG_printf(("5http_resolve_cb: Found UUID %s, looking for %s.", uuid,
|
||||
uribuf->uuid));
|
||||
return;
|
||||
}
|
||||
@@ -2260,7 +2262,7 @@ http_resolve_cb(
|
||||
http_addrlist_t *addrlist, /* List of addresses */
|
||||
*addr; /* Current address */
|
||||
|
||||
DEBUG_printf(("8http_resolve_cb: Looking up \"%s\".", hostTarget));
|
||||
DEBUG_printf(("5http_resolve_cb: Looking up \"%s\".", hostTarget));
|
||||
|
||||
snprintf(fqdn, sizeof(fqdn), "%d", ntohs(port));
|
||||
if ((addrlist = httpAddrGetList(hostTarget, AF_UNSPEC, fqdn)) != NULL)
|
||||
@@ -2271,7 +2273,7 @@ http_resolve_cb(
|
||||
|
||||
if (!error)
|
||||
{
|
||||
DEBUG_printf(("8http_resolve_cb: Found \"%s\".", fqdn));
|
||||
DEBUG_printf(("5http_resolve_cb: Found \"%s\".", fqdn));
|
||||
|
||||
if ((hostptr = fqdn + strlen(fqdn) - 6) <= fqdn ||
|
||||
_cups_strcasecmp(hostptr, ".local"))
|
||||
@@ -2282,7 +2284,7 @@ http_resolve_cb(
|
||||
}
|
||||
#ifdef DEBUG
|
||||
else
|
||||
DEBUG_printf(("8http_resolve_cb: \"%s\" did not resolve: %d",
|
||||
DEBUG_printf(("5http_resolve_cb: \"%s\" did not resolve: %d",
|
||||
httpAddrString(&(addr->addr), fqdn, sizeof(fqdn)),
|
||||
error));
|
||||
#endif /* DEBUG */
|
||||
@@ -2302,7 +2304,7 @@ http_resolve_cb(
|
||||
else
|
||||
httpAssembleURI(HTTP_URI_CODING_ALL, uribuf->buffer, (int)uribuf->bufsize, scheme, NULL, hostTarget, ntohs(port), resource);
|
||||
|
||||
DEBUG_printf(("8http_resolve_cb: Resolved URI is \"%s\"...", uribuf->buffer));
|
||||
DEBUG_printf(("5http_resolve_cb: Resolved URI is \"%s\"...", uribuf->buffer));
|
||||
}
|
||||
|
||||
#elif defined(HAVE_AVAHI)
|
||||
@@ -2361,7 +2363,7 @@ http_resolve_cb(
|
||||
size_t valueLen = 0; /* Length of "rp" key */
|
||||
|
||||
|
||||
DEBUG_printf(("7http_resolve_cb(resolver=%p, "
|
||||
DEBUG_printf(("4http_resolve_cb(resolver=%p, "
|
||||
"interface=%d, protocol=%d, event=%d, name=\"%s\", "
|
||||
"type=\"%s\", domain=\"%s\", hostTarget=\"%s\", address=%p, "
|
||||
"port=%d, txt=%p, flags=%d, context=%p)",
|
||||
@@ -2394,7 +2396,7 @@ http_resolve_cb(
|
||||
fprintf(stderr, "DEBUG: Found UUID %s, looking for %s.", uuid,
|
||||
uribuf->uuid);
|
||||
|
||||
DEBUG_printf(("7http_resolve_cb: Found UUID %s, looking for %s.", uuid,
|
||||
DEBUG_printf(("5http_resolve_cb: Found UUID %s, looking for %s.", uuid,
|
||||
uribuf->uuid));
|
||||
return;
|
||||
}
|
||||
@@ -2498,7 +2500,7 @@ http_resolve_cb(
|
||||
http_addrlist_t *addrlist, /* List of addresses */
|
||||
*addr; /* Current address */
|
||||
|
||||
DEBUG_printf(("8http_resolve_cb: Looking up \"%s\".", hostTarget));
|
||||
DEBUG_printf(("5http_resolve_cb: Looking up \"%s\".", hostTarget));
|
||||
|
||||
snprintf(fqdn, sizeof(fqdn), "%d", ntohs(port));
|
||||
if ((addrlist = httpAddrGetList(hostTarget, AF_UNSPEC, fqdn)) != NULL)
|
||||
@@ -2509,7 +2511,7 @@ http_resolve_cb(
|
||||
|
||||
if (!error)
|
||||
{
|
||||
DEBUG_printf(("8http_resolve_cb: Found \"%s\".", fqdn));
|
||||
DEBUG_printf(("5http_resolve_cb: Found \"%s\".", fqdn));
|
||||
|
||||
if ((hostptr = fqdn + strlen(fqdn) - 6) <= fqdn ||
|
||||
_cups_strcasecmp(hostptr, ".local"))
|
||||
@@ -2520,7 +2522,7 @@ http_resolve_cb(
|
||||
}
|
||||
#ifdef DEBUG
|
||||
else
|
||||
DEBUG_printf(("8http_resolve_cb: \"%s\" did not resolve: %d",
|
||||
DEBUG_printf(("5http_resolve_cb: \"%s\" did not resolve: %d",
|
||||
httpAddrString(&(addr->addr), fqdn, sizeof(fqdn)),
|
||||
error));
|
||||
#endif /* DEBUG */
|
||||
@@ -2536,13 +2538,8 @@ http_resolve_cb(
|
||||
|
||||
httpAssembleURI(HTTP_URI_CODING_ALL, uribuf->buffer, uribuf->bufsize, scheme,
|
||||
NULL, hostTarget, port, resource);
|
||||
DEBUG_printf(("8http_resolve_cb: Resolved URI is \"%s\".", uribuf->buffer));
|
||||
DEBUG_printf(("5http_resolve_cb: Resolved URI is \"%s\".", uribuf->buffer));
|
||||
|
||||
avahi_simple_poll_quit(uribuf->poll);
|
||||
}
|
||||
#endif /* HAVE_DNSSD */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: http-support.c 12124 2014-08-28 15:37:22Z msweet $".
|
||||
*/
|
||||
|
||||
+6
-7
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: http.c 12334 2014-12-09 21:01:55Z msweet $"
|
||||
* "$Id: http.c 13138 2016-03-15 14:59:54Z msweet $"
|
||||
*
|
||||
* HTTP routines for CUPS.
|
||||
*
|
||||
* Copyright 2007-2014 by Apple Inc.
|
||||
* Copyright 2007-2015 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
*
|
||||
* This file contains Kerberos support code, copyright 2006 by
|
||||
@@ -898,7 +898,7 @@ httpGetContentEncoding(http_t *http) /* I - HTTP connection */
|
||||
*/
|
||||
|
||||
const char * /* O - Cookie data or NULL */
|
||||
httpGetCookie(http_t *http) /* I - HTTP connecion */
|
||||
httpGetCookie(http_t *http) /* I - HTTP connection */
|
||||
{
|
||||
return (http ? http->cookie : NULL);
|
||||
}
|
||||
@@ -2428,8 +2428,7 @@ httpReconnect2(http_t *http, /* I - HTTP connection */
|
||||
httpAddrPort(&(current->addr))));
|
||||
#endif /* DEBUG */
|
||||
|
||||
if ((addr = httpAddrConnect2(http->addrlist, &(http->fd), msec,
|
||||
cancel)) == NULL)
|
||||
if ((addr = httpAddrConnect2(http->addrlist, &(http->fd), msec, cancel)) == NULL)
|
||||
{
|
||||
/*
|
||||
* Unable to connect...
|
||||
@@ -3003,7 +3002,7 @@ _httpUpdate(http_t *http, /* I - HTTP connection */
|
||||
*status = http->status;
|
||||
return (0);
|
||||
}
|
||||
else if (!strncmp(line, "HTTP/", 5))
|
||||
else if (!strncmp(line, "HTTP/", 5) && http->mode == _HTTP_MODE_CLIENT)
|
||||
{
|
||||
/*
|
||||
* Got the beginning of a response...
|
||||
@@ -4850,5 +4849,5 @@ http_write_chunk(http_t *http, /* I - HTTP connection */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: http.c 12334 2014-12-09 21:01:55Z msweet $".
|
||||
* End of "$Id: http.c 13138 2016-03-15 14:59:54Z msweet $".
|
||||
*/
|
||||
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: http.h 12094 2014-08-19 12:15:11Z msweet $"
|
||||
* "$Id: http.h 13138 2016-03-15 14:59:54Z msweet $"
|
||||
*
|
||||
* Hyper-Text Transport Protocol definitions for CUPS.
|
||||
*
|
||||
@@ -246,7 +246,7 @@ typedef enum http_status_e /**** HTTP status codes ****/
|
||||
HTTP_STATUS_NOT_AUTHORITATIVE, /* Information isn't authoritative */
|
||||
HTTP_STATUS_NO_CONTENT, /* Successful command, no new data */
|
||||
HTTP_STATUS_RESET_CONTENT, /* Content was reset/recreated */
|
||||
HTTP_STATUS_PARTIAL_CONTENT, /* Only a partial file was recieved/sent */
|
||||
HTTP_STATUS_PARTIAL_CONTENT, /* Only a partial file was received/sent */
|
||||
|
||||
HTTP_STATUS_MULTIPLE_CHOICES = 300, /* Multiple files match request */
|
||||
HTTP_STATUS_MOVED_PERMANENTLY, /* Document has moved permanently */
|
||||
@@ -656,5 +656,5 @@ extern const char *httpURIStatusString(http_uri_status_t status) _CUPS_API_2_0;
|
||||
#endif /* !_CUPS_HTTP_H_ */
|
||||
|
||||
/*
|
||||
* End of "$Id: http.h 12094 2014-08-19 12:15:11Z msweet $".
|
||||
* End of "$Id: http.h 13138 2016-03-15 14:59:54Z msweet $".
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
/*
|
||||
* "$Id: huffman-private.h 11985 2014-07-02 15:41:16Z msweet $"
|
||||
*
|
||||
* HTTP/2 Huffman compression/decompression definitions for CUPS.
|
||||
*
|
||||
* Copyright 2014 by Apple Inc.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
* which should have been included with this file. If this file is
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
*
|
||||
* This file is subject to the Apple OS-Developed Software exception.
|
||||
*/
|
||||
|
||||
#ifndef _CUPS_HUFFMAN_PRIVATE_H_
|
||||
# define _CUPS_HUFFMAN_PRIVATE_H_
|
||||
|
||||
/*
|
||||
* Include necessary headers...
|
||||
*/
|
||||
|
||||
# include "versioning.h"
|
||||
# include <stdlib.h>
|
||||
|
||||
|
||||
/*
|
||||
* C++ magic...
|
||||
*/
|
||||
|
||||
# ifdef __cplusplus
|
||||
extern "C" {
|
||||
# endif /* __cplusplus */
|
||||
|
||||
|
||||
/*
|
||||
* Functions...
|
||||
*/
|
||||
|
||||
extern size_t _http2HuffmanDecode(char *dst, size_t dstsize, const unsigned char *src, size_t srclen);
|
||||
extern size_t _http2HuffmanEncode(unsigned char *dst, size_t dstsize, const char *src);
|
||||
|
||||
|
||||
/*
|
||||
* C++ magic...
|
||||
*/
|
||||
|
||||
# ifdef __cplusplus
|
||||
}
|
||||
# endif /* __cplusplus */
|
||||
#endif /* !_CUPS_HUFFMAN_PRIVATE_H_ */
|
||||
|
||||
/*
|
||||
* End of "$Id: huffman-private.h 11985 2014-07-02 15:41:16Z msweet $".
|
||||
*/
|
||||
@@ -0,0 +1,651 @@
|
||||
/*
|
||||
* "$Id: huffman.c 11990 2014-07-02 21:13:22Z msweet $"
|
||||
*
|
||||
* HTTP/2 Huffman compression/decompression routines for CUPS.
|
||||
*
|
||||
* Copyright 2014 by Apple Inc.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
* which should have been included with this file. If this file is
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
*
|
||||
* This file is subject to the Apple OS-Developed Software exception.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Include necessary headers...
|
||||
*/
|
||||
|
||||
#include "debug-private.h"
|
||||
#include "huffman-private.h"
|
||||
#include "thread-private.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
|
||||
/*
|
||||
* Constants...
|
||||
*/
|
||||
|
||||
#define _HTTP2_HUFFMAN_MAX 30 /* Max Huffman bits in table */
|
||||
|
||||
|
||||
/*
|
||||
* Huffman table from HPACK-08 draft.
|
||||
*/
|
||||
|
||||
typedef struct _http2_huffman_s /**** Huffman code table ****/
|
||||
{
|
||||
int code; /* Code */
|
||||
short len; /* Length in bits */
|
||||
short ch; /* Character */
|
||||
} _http2_huffman_t;
|
||||
|
||||
static _http2_huffman_t http2_decode[256];
|
||||
/* Decoder values */
|
||||
static int http2_decode_max[_HTTP2_HUFFMAN_MAX + 1];
|
||||
static const _http2_huffman_t *http2_decode_next[_HTTP2_HUFFMAN_MAX + 1];
|
||||
static int http2_decode_init = 0;
|
||||
static _cups_mutex_t http2_decode_mutex = _CUPS_MUTEX_INITIALIZER;
|
||||
static const _http2_huffman_t http2_encode[256] =
|
||||
{ /* Encoder values */
|
||||
{ 0x1ff8, 13, 0x00 },
|
||||
{ 0x7fffd8, 23, 0x01 },
|
||||
{ 0xfffffe2, 28, 0x02 },
|
||||
{ 0xfffffe3, 28, 0x03 },
|
||||
{ 0xfffffe4, 28, 0x04 },
|
||||
{ 0xfffffe5, 28, 0x05 },
|
||||
{ 0xfffffe6, 28, 0x06 },
|
||||
{ 0xfffffe7, 28, 0x07 },
|
||||
{ 0xfffffe8, 28, 0x08 },
|
||||
{ 0xffffea, 24, 0x09 },
|
||||
{ 0xffffffc, 30, 0x0a },
|
||||
{ 0xfffffe9, 28, 0x0b },
|
||||
{ 0xfffffea, 28, 0x0c },
|
||||
{ 0xffffffd, 30, 0x0d },
|
||||
{ 0xfffffeb, 28, 0x0e },
|
||||
{ 0xfffffec, 28, 0x0f },
|
||||
{ 0xfffffed, 28, 0x10 },
|
||||
{ 0xfffffee, 28, 0x11 },
|
||||
{ 0xfffffef, 28, 0x12 },
|
||||
{ 0xffffff0, 28, 0x13 },
|
||||
{ 0xffffff1, 28, 0x14 },
|
||||
{ 0xffffff2, 28, 0x15 },
|
||||
{ 0xffffffe, 30, 0x16 },
|
||||
{ 0xffffff3, 28, 0x17 },
|
||||
{ 0xffffff4, 28, 0x18 },
|
||||
{ 0xffffff5, 28, 0x19 },
|
||||
{ 0xffffff6, 28, 0x1a },
|
||||
{ 0xffffff7, 28, 0x1b },
|
||||
{ 0xffffff8, 28, 0x1c },
|
||||
{ 0xffffff9, 28, 0x1d },
|
||||
{ 0xffffffa, 28, 0x1e },
|
||||
{ 0xffffffb, 28, 0x1f },
|
||||
{ 0x14, 6, 0x20 },
|
||||
{ 0x3f8, 10, 0x21 },
|
||||
{ 0x3f9, 10, 0x22 },
|
||||
{ 0xffa, 12, 0x23 },
|
||||
{ 0x1ff9, 13, 0x24 },
|
||||
{ 0x15, 6, 0x25 },
|
||||
{ 0xf8, 8, 0x26 },
|
||||
{ 0x7fa, 11, 0x27 },
|
||||
{ 0x3fa, 10, 0x28 },
|
||||
{ 0x3fb, 10, 0x29 },
|
||||
{ 0xf9, 8, 0x2a },
|
||||
{ 0x7fb, 11, 0x2b },
|
||||
{ 0xfa, 8, 0x2c },
|
||||
{ 0x16, 6, 0x2d },
|
||||
{ 0x17, 6, 0x2e },
|
||||
{ 0x18, 6, 0x2f },
|
||||
{ 0x0, 5, 0x30 },
|
||||
{ 0x1, 5, 0x31 },
|
||||
{ 0x2, 5, 0x32 },
|
||||
{ 0x19, 6, 0x33 },
|
||||
{ 0x1a, 6, 0x34 },
|
||||
{ 0x1b, 6, 0x35 },
|
||||
{ 0x1c, 6, 0x36 },
|
||||
{ 0x1d, 6, 0x37 },
|
||||
{ 0x1e, 6, 0x38 },
|
||||
{ 0x1f, 6, 0x39 },
|
||||
{ 0x5c, 7, 0x3a },
|
||||
{ 0xfb, 8, 0x3b },
|
||||
{ 0x7ffc, 15, 0x3c },
|
||||
{ 0x20, 6, 0x3d },
|
||||
{ 0xffb, 12, 0x3e },
|
||||
{ 0x3fc, 10, 0x3f },
|
||||
{ 0x1ffa, 13, 0x40 },
|
||||
{ 0x21, 6, 0x41 },
|
||||
{ 0x5d, 7, 0x42 },
|
||||
{ 0x5e, 7, 0x43 },
|
||||
{ 0x5f, 7, 0x44 },
|
||||
{ 0x60, 7, 0x45 },
|
||||
{ 0x61, 7, 0x46 },
|
||||
{ 0x62, 7, 0x47 },
|
||||
{ 0x63, 7, 0x48 },
|
||||
{ 0x64, 7, 0x49 },
|
||||
{ 0x65, 7, 0x4a },
|
||||
{ 0x66, 7, 0x4b },
|
||||
{ 0x67, 7, 0x4c },
|
||||
{ 0x68, 7, 0x4d },
|
||||
{ 0x69, 7, 0x4e },
|
||||
{ 0x6a, 7, 0x4f },
|
||||
{ 0x6b, 7, 0x50 },
|
||||
{ 0x6c, 7, 0x51 },
|
||||
{ 0x6d, 7, 0x52 },
|
||||
{ 0x6e, 7, 0x53 },
|
||||
{ 0x6f, 7, 0x54 },
|
||||
{ 0x70, 7, 0x55 },
|
||||
{ 0x71, 7, 0x56 },
|
||||
{ 0x72, 7, 0x57 },
|
||||
{ 0xfc, 8, 0x58 },
|
||||
{ 0x73, 7, 0x59 },
|
||||
{ 0xfd, 8, 0x5a },
|
||||
{ 0x1ffb, 13, 0x5b },
|
||||
{ 0x7fff0, 19, 0x5c },
|
||||
{ 0x1ffc, 13, 0x5d },
|
||||
{ 0x3ffc, 14, 0x5e },
|
||||
{ 0x22, 6, 0x5f },
|
||||
{ 0x7ffd, 15, 0x60 },
|
||||
{ 0x3, 5, 0x61 },
|
||||
{ 0x23, 6, 0x62 },
|
||||
{ 0x4, 5, 0x63 },
|
||||
{ 0x24, 6, 0x64 },
|
||||
{ 0x5, 5, 0x65 },
|
||||
{ 0x25, 6, 0x66 },
|
||||
{ 0x26, 6, 0x67 },
|
||||
{ 0x27, 6, 0x68 },
|
||||
{ 0x6, 5, 0x69 },
|
||||
{ 0x74, 7, 0x6a },
|
||||
{ 0x75, 7, 0x6b },
|
||||
{ 0x28, 6, 0x6c },
|
||||
{ 0x29, 6, 0x6d },
|
||||
{ 0x2a, 6, 0x6e },
|
||||
{ 0x7, 5, 0x6f },
|
||||
{ 0x2b, 6, 0x70 },
|
||||
{ 0x76, 7, 0x71 },
|
||||
{ 0x2c, 6, 0x72 },
|
||||
{ 0x8, 5, 0x73 },
|
||||
{ 0x9, 5, 0x74 },
|
||||
{ 0x2d, 6, 0x75 },
|
||||
{ 0x77, 7, 0x76 },
|
||||
{ 0x78, 7, 0x77 },
|
||||
{ 0x79, 7, 0x78 },
|
||||
{ 0x7a, 7, 0x79 },
|
||||
{ 0x7b, 7, 0x7a },
|
||||
{ 0x7ffe, 15, 0x7b },
|
||||
{ 0x7fc, 11, 0x7c },
|
||||
{ 0x3ffd, 14, 0x7d },
|
||||
{ 0x1ffd, 13, 0x7e },
|
||||
{ 0xffffffc, 28, 0x7f },
|
||||
{ 0xfffe6, 20, 0x80 },
|
||||
{ 0x3fffd2, 22, 0x81 },
|
||||
{ 0xfffe7, 20, 0x82 },
|
||||
{ 0xfffe8, 20, 0x83 },
|
||||
{ 0x3fffd3, 22, 0x84 },
|
||||
{ 0x3fffd4, 22, 0x85 },
|
||||
{ 0x3fffd5, 22, 0x86 },
|
||||
{ 0x7fffd9, 23, 0x87 },
|
||||
{ 0x3fffd6, 22, 0x88 },
|
||||
{ 0x7fffda, 23, 0x89 },
|
||||
{ 0x7fffdb, 23, 0x8a },
|
||||
{ 0x7fffdc, 23, 0x8b },
|
||||
{ 0x7fffdd, 23, 0x8c },
|
||||
{ 0x7fffde, 23, 0x8d },
|
||||
{ 0xffffeb, 24, 0x8e },
|
||||
{ 0x7fffdf, 23, 0x8f },
|
||||
{ 0xffffec, 24, 0x90 },
|
||||
{ 0xffffed, 24, 0x91 },
|
||||
{ 0x3fffd7, 22, 0x92 },
|
||||
{ 0x7fffe0, 23, 0x93 },
|
||||
{ 0xffffee, 24, 0x94 },
|
||||
{ 0x7fffe1, 23, 0x95 },
|
||||
{ 0x7fffe2, 23, 0x96 },
|
||||
{ 0x7fffe3, 23, 0x97 },
|
||||
{ 0x7fffe4, 23, 0x98 },
|
||||
{ 0x1fffdc, 21, 0x99 },
|
||||
{ 0x3fffd8, 22, 0x9a },
|
||||
{ 0x7fffe5, 23, 0x9b },
|
||||
{ 0x3fffd9, 22, 0x9c },
|
||||
{ 0x7fffe6, 23, 0x9d },
|
||||
{ 0x7fffe7, 23, 0x9e },
|
||||
{ 0xffffef, 24, 0x9f },
|
||||
{ 0x3fffda, 22, 0xa0 },
|
||||
{ 0x1fffdd, 21, 0xa1 },
|
||||
{ 0xfffe9, 20, 0xa2 },
|
||||
{ 0x3fffdb, 22, 0xa3 },
|
||||
{ 0x3fffdc, 22, 0xa4 },
|
||||
{ 0x7fffe8, 23, 0xa5 },
|
||||
{ 0x7fffe9, 23, 0xa6 },
|
||||
{ 0x1fffde, 21, 0xa7 },
|
||||
{ 0x7fffea, 23, 0xa8 },
|
||||
{ 0x3fffdd, 22, 0xa9 },
|
||||
{ 0x3fffde, 22, 0xaa },
|
||||
{ 0xfffff0, 24, 0xab },
|
||||
{ 0x1fffdf, 21, 0xac },
|
||||
{ 0x3fffdf, 22, 0xad },
|
||||
{ 0x7fffeb, 23, 0xae },
|
||||
{ 0x7fffec, 23, 0xaf },
|
||||
{ 0x1fffe0, 21, 0xb0 },
|
||||
{ 0x1fffe1, 21, 0xb1 },
|
||||
{ 0x3fffe0, 22, 0xb2 },
|
||||
{ 0x1fffe2, 21, 0xb3 },
|
||||
{ 0x7fffed, 23, 0xb4 },
|
||||
{ 0x3fffe1, 22, 0xb5 },
|
||||
{ 0x7fffee, 23, 0xb6 },
|
||||
{ 0x7fffef, 23, 0xb7 },
|
||||
{ 0xfffea, 20, 0xb8 },
|
||||
{ 0x3fffe2, 22, 0xb9 },
|
||||
{ 0x3fffe3, 22, 0xba },
|
||||
{ 0x3fffe4, 22, 0xbb },
|
||||
{ 0x7ffff0, 23, 0xbc },
|
||||
{ 0x3fffe5, 22, 0xbd },
|
||||
{ 0x3fffe6, 22, 0xbe },
|
||||
{ 0x7ffff1, 23, 0xbf },
|
||||
{ 0x3ffffe0, 26, 0xc0 },
|
||||
{ 0x3ffffe1, 26, 0xc1 },
|
||||
{ 0xfffeb, 20, 0xc2 },
|
||||
{ 0x7fff1, 19, 0xc3 },
|
||||
{ 0x3fffe7, 22, 0xc4 },
|
||||
{ 0x7ffff2, 23, 0xc5 },
|
||||
{ 0x3fffe8, 22, 0xc6 },
|
||||
{ 0x1ffffec, 25, 0xc7 },
|
||||
{ 0x3ffffe2, 26, 0xc8 },
|
||||
{ 0x3ffffe3, 26, 0xc9 },
|
||||
{ 0x3ffffe4, 26, 0xca },
|
||||
{ 0x7ffffde, 27, 0xcb },
|
||||
{ 0x7ffffdf, 27, 0xcc },
|
||||
{ 0x3ffffe5, 26, 0xcd },
|
||||
{ 0xfffff1, 24, 0xce },
|
||||
{ 0x1ffffed, 25, 0xcf },
|
||||
{ 0x7fff2, 19, 0xd0 },
|
||||
{ 0x1fffe3, 21, 0xd1 },
|
||||
{ 0x3ffffe6, 26, 0xd2 },
|
||||
{ 0x7ffffe0, 27, 0xd3 },
|
||||
{ 0x7ffffe1, 27, 0xd4 },
|
||||
{ 0x3ffffe7, 26, 0xd5 },
|
||||
{ 0x7ffffe2, 27, 0xd6 },
|
||||
{ 0xfffff2, 24, 0xd7 },
|
||||
{ 0x1fffe4, 21, 0xd8 },
|
||||
{ 0x1fffe5, 21, 0xd9 },
|
||||
{ 0x3ffffe8, 26, 0xda },
|
||||
{ 0x3ffffe9, 26, 0xdb },
|
||||
{ 0xffffffd, 28, 0xdc },
|
||||
{ 0x7ffffe3, 27, 0xdd },
|
||||
{ 0x7ffffe4, 27, 0xde },
|
||||
{ 0x7ffffe5, 27, 0xdf },
|
||||
{ 0xfffec, 20, 0xe0 },
|
||||
{ 0xfffff3, 24, 0xe1 },
|
||||
{ 0xfffed, 20, 0xe2 },
|
||||
{ 0x1fffe6, 21, 0xe3 },
|
||||
{ 0x3fffe9, 22, 0xe4 },
|
||||
{ 0x1fffe7, 21, 0xe5 },
|
||||
{ 0x1fffe8, 21, 0xe6 },
|
||||
{ 0x7ffff3, 23, 0xe7 },
|
||||
{ 0x3fffea, 22, 0xe8 },
|
||||
{ 0x3fffeb, 22, 0xe9 },
|
||||
{ 0x1ffffee, 25, 0xea },
|
||||
{ 0x1ffffef, 25, 0xeb },
|
||||
{ 0xfffff4, 24, 0xec },
|
||||
{ 0xfffff5, 24, 0xed },
|
||||
{ 0x3ffffea, 26, 0xee },
|
||||
{ 0x7ffff4, 23, 0xef },
|
||||
{ 0x3ffffeb, 26, 0xf0 },
|
||||
{ 0x7ffffe6, 27, 0xf1 },
|
||||
{ 0x3ffffec, 26, 0xf2 },
|
||||
{ 0x3ffffed, 26, 0xf3 },
|
||||
{ 0x7ffffe7, 27, 0xf4 },
|
||||
{ 0x7ffffe8, 27, 0xf5 },
|
||||
{ 0x7ffffe9, 27, 0xf6 },
|
||||
{ 0x7ffffea, 27, 0xf7 },
|
||||
{ 0x7ffffeb, 27, 0xf8 },
|
||||
{ 0xffffffe, 28, 0xf9 },
|
||||
{ 0x7ffffec, 27, 0xfa },
|
||||
{ 0x7ffffed, 27, 0xfb },
|
||||
{ 0x7ffffee, 27, 0xfc },
|
||||
{ 0x7ffffef, 27, 0xfd },
|
||||
{ 0x7fffff0, 27, 0xfe },
|
||||
{ 0x3ffffee, 26, 0xff }
|
||||
};
|
||||
static const unsigned char http2_masks[9] = { 0x00, 0x01, 0x03, 0x07, 0x0f, 0x1f, 0x3f, 0x7f, 0xff };
|
||||
/* Bitmasks */
|
||||
|
||||
|
||||
/*
|
||||
* Local functions...
|
||||
*/
|
||||
|
||||
static int http2_compare_decode(const _http2_huffman_t *a, const _http2_huffman_t *b);
|
||||
|
||||
|
||||
/*
|
||||
* '_http2HuffmanDecode()' - Decode (decompress) a HTTP/2 Huffman-encoded string.
|
||||
*
|
||||
* The "dst" string is nul-terminated even if the total length of the Huffman-
|
||||
* encoded string does not fit. The return value contains the actual length
|
||||
* of the string after decoding.
|
||||
*/
|
||||
|
||||
size_t /* O - Actual length of string or 0 on error */
|
||||
_http2HuffmanDecode(
|
||||
char *dst, /* I - Destination string buffer */
|
||||
size_t dstsize, /* I - Size of string buffer */
|
||||
const unsigned char *src, /* I - Incoming Huffman data */
|
||||
size_t srclen) /* I - Length of incoming Huffman data */
|
||||
{
|
||||
char *dstptr, /* Pointer into string buffer */
|
||||
*dstend; /* End of string buffer */
|
||||
const unsigned char *srcend; /* End of Huffman data */
|
||||
unsigned char srcbyte; /* Current source string byte */
|
||||
int srcavail, /* How many bits are available in the current byte? */
|
||||
code, /* Assembled code */
|
||||
len, /* Length of assembled code */
|
||||
bits; /* Bits to grab */
|
||||
const _http2_huffman_t *dptr, /* Pointer into decoder table */
|
||||
*dend; /* End of decoder table */
|
||||
|
||||
|
||||
DEBUG_printf(("4_http2HuffmanDecode(dst=%p, dstsize=" CUPS_LLFMT ", src=%p, srclen=" CUPS_LLFMT ")", dst, CUPS_LLCAST dstsize, src, CUPS_LLCAST srclen));
|
||||
|
||||
/*
|
||||
* Initialize the decoder array as needed...
|
||||
*/
|
||||
|
||||
dend = http2_decode + (sizeof(http2_decode) / sizeof(http2_decode[0]));
|
||||
|
||||
if (!http2_decode_init)
|
||||
{
|
||||
_cupsMutexLock(&http2_decode_mutex);
|
||||
if (!http2_decode_init)
|
||||
{
|
||||
http2_decode_init = 1;
|
||||
memcpy(http2_decode, http2_encode, sizeof(http2_decode));
|
||||
qsort(http2_decode, sizeof(http2_decode) / sizeof(http2_decode[0]), sizeof(http2_decode[0]), (int (*)(const void *, const void *))http2_compare_decode);
|
||||
|
||||
for (len = 0, dptr = http2_decode; dptr < dend; dptr ++)
|
||||
{
|
||||
if (len != dptr->len)
|
||||
{
|
||||
http2_decode_next[len] = dptr;
|
||||
len = dptr->len;
|
||||
}
|
||||
|
||||
if ((dptr + 1) < dend && dptr[1].len != len)
|
||||
http2_decode_max[len] = dptr->code;
|
||||
}
|
||||
}
|
||||
_cupsMutexUnlock(&http2_decode_mutex);
|
||||
}
|
||||
|
||||
/*
|
||||
* Decode the string.
|
||||
*
|
||||
* Note: Initial implementation that has very little optimization applied.
|
||||
*/
|
||||
|
||||
dstptr = dst;
|
||||
dstend = dst + dstsize - 1;
|
||||
srcavail = 0;
|
||||
srcbyte = 0;
|
||||
srcend = src + srclen;
|
||||
|
||||
while (src < srcend || srcavail > 0)
|
||||
{
|
||||
/*
|
||||
* Each Huffman code has a minimum of 5 bits. We do a linear search of the
|
||||
* decode table, which has been sorted in ascending order for length and
|
||||
* code. If we don't find the code in the table we return an error.
|
||||
*/
|
||||
|
||||
code = 0;
|
||||
len = 0;
|
||||
dptr = http2_decode;
|
||||
|
||||
DEBUG_printf(("5_http2HuffmanDecode: init srcbyte=%02x, srcavail=%d", srcbyte, srcavail));
|
||||
|
||||
while (dptr < dend)
|
||||
{
|
||||
while (len < dptr->len)
|
||||
{
|
||||
/*
|
||||
* Get N more bits from the input...
|
||||
*/
|
||||
|
||||
if (srcavail == 0)
|
||||
{
|
||||
if (src < srcend)
|
||||
{
|
||||
srcbyte = *src++;
|
||||
srcavail = 8;
|
||||
|
||||
DEBUG_printf(("5_http2HuffmanDecode: cont srcbyte=%02x, srcavail=%d", srcbyte, srcavail));
|
||||
}
|
||||
else if (len < 8 && code == http2_masks[len])
|
||||
break;
|
||||
else
|
||||
{
|
||||
DEBUG_puts("5_http2HuffmanDecode: Early end-of-string.");
|
||||
return (0);
|
||||
}
|
||||
}
|
||||
|
||||
if ((bits = dptr->len - len) > srcavail)
|
||||
bits = srcavail;
|
||||
|
||||
DEBUG_printf(("5_http2HuffmanDecode: Pulling %d bits", bits));
|
||||
|
||||
if (bits == srcavail)
|
||||
{
|
||||
if (len == 0)
|
||||
{
|
||||
if (bits == 8)
|
||||
code = srcbyte;
|
||||
else
|
||||
code = srcbyte & http2_masks[bits];
|
||||
}
|
||||
else
|
||||
code = (code << bits) | (srcbyte & http2_masks[bits]);
|
||||
|
||||
srcavail = 0;
|
||||
}
|
||||
else if (len == 0)
|
||||
{
|
||||
code = (srcbyte >> (srcavail - bits)) & http2_masks[bits];
|
||||
srcavail -= bits;
|
||||
}
|
||||
else
|
||||
{
|
||||
code = (code << bits) | ((srcbyte >> (srcavail - bits)) & http2_masks[bits]);
|
||||
srcavail -= bits;
|
||||
}
|
||||
|
||||
len += bits;
|
||||
|
||||
#ifdef DEBUG
|
||||
if (len < dptr->len)
|
||||
DEBUG_printf(("5_http2HuffmanDecode: code=%x, len=%d, srcavail=%d", code, len, srcavail));
|
||||
#endif /* DEBUG */
|
||||
}
|
||||
|
||||
DEBUG_printf(("5_http2HuffmanDecode: code=%x, len=%d, dptr->len=%d", code, len, dptr->len));
|
||||
|
||||
if (len < dptr->len)
|
||||
break;
|
||||
|
||||
if (code > http2_decode_max[len])
|
||||
{
|
||||
dptr = http2_decode_next[len];
|
||||
continue;
|
||||
}
|
||||
|
||||
while (len == dptr->len)
|
||||
if (dptr->code == code)
|
||||
break;
|
||||
else
|
||||
dptr ++;
|
||||
|
||||
if (dptr->code == code && dptr->len == len)
|
||||
{
|
||||
DEBUG_printf(("5_http2HuffmanDecode: code=%x, len=%d, match='%c' (0x%02x)", (unsigned)code, len, dptr->ch, dptr->ch));
|
||||
|
||||
if (dstptr < dstend)
|
||||
*dstptr = (char)dptr->ch;
|
||||
|
||||
dstptr ++;
|
||||
break;
|
||||
}
|
||||
#ifdef DEBUG
|
||||
else
|
||||
DEBUG_printf(("5_http2HuffmanDecode: code=%x, len=%d, no match", (unsigned)code, len));
|
||||
#endif /* DEBUG */
|
||||
}
|
||||
}
|
||||
|
||||
if (dstptr < dstend)
|
||||
*dstptr = '\0';
|
||||
else
|
||||
*dstend = '\0';
|
||||
|
||||
return ((size_t)(dstptr - dst));
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* '_http2HuffmanEncode()' - Encode (compress) a string using HTTP/2 Huffman-coding.
|
||||
*
|
||||
* The return value contains the actual length of the string after encoding.
|
||||
*/
|
||||
|
||||
size_t /* O - Number of bytes used for Huffman */
|
||||
_http2HuffmanEncode(
|
||||
unsigned char *dst, /* I - Output buffer */
|
||||
size_t dstsize, /* I - Size of output buffer */
|
||||
const char *src) /* I - String to encode */
|
||||
{
|
||||
unsigned char *dstptr, /* Pointer into buffer */
|
||||
*dstend, /* End of buffer */
|
||||
dstbyte; /* Current output byte */
|
||||
int dstused, /* Current bits used */
|
||||
dstremaining; /* Remaining bits */
|
||||
int ch; /* Current character */
|
||||
int code, /* Huffman code */
|
||||
len; /* Length of Huffman code */
|
||||
|
||||
|
||||
/*
|
||||
* Note: Initial implementation that has very little optimization applied.
|
||||
*/
|
||||
|
||||
dstptr = dst;
|
||||
dstend = dst + dstsize;
|
||||
dstbyte = 0;
|
||||
dstused = 0;
|
||||
|
||||
while (*src)
|
||||
{
|
||||
ch = *src++ & 255;
|
||||
code = http2_encode[ch].code;
|
||||
len = http2_encode[ch].len;
|
||||
|
||||
while (len > 0)
|
||||
{
|
||||
if (dstused == 0)
|
||||
{
|
||||
if (len == 8)
|
||||
{
|
||||
dstbyte = (unsigned char)code;
|
||||
dstused = 8;
|
||||
}
|
||||
else if (len > 8)
|
||||
{
|
||||
dstbyte = (unsigned char)(code >> (len - 8));
|
||||
dstused = 8;
|
||||
}
|
||||
else
|
||||
{
|
||||
dstbyte = (unsigned char)(code << (8 - len));
|
||||
dstused = len;
|
||||
}
|
||||
|
||||
len -= dstused;
|
||||
}
|
||||
else
|
||||
{
|
||||
dstremaining = 8 - dstused;
|
||||
|
||||
if (len == dstremaining)
|
||||
{
|
||||
dstbyte |= (unsigned char)(code & http2_masks[dstremaining]);
|
||||
dstused = 8;
|
||||
len = 0;
|
||||
}
|
||||
else if (len > dstremaining)
|
||||
{
|
||||
dstbyte |= (unsigned char)((code >> (len - dstremaining)) & http2_masks[dstremaining]);
|
||||
dstused = 8;
|
||||
len -= dstremaining;
|
||||
}
|
||||
else
|
||||
{
|
||||
dstbyte |= (unsigned char)((code << (dstremaining - len)) & http2_masks[dstremaining]);
|
||||
dstused += len;
|
||||
len = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (dstused == 8)
|
||||
{
|
||||
/*
|
||||
* "Write" a byte to the output buffer
|
||||
*/
|
||||
|
||||
if (dstptr < dstend)
|
||||
*dstptr = dstbyte;
|
||||
|
||||
dstptr ++;
|
||||
dstused = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (dstused)
|
||||
{
|
||||
/*
|
||||
* Pad the output string with 1's as an End-Of-String code...
|
||||
*/
|
||||
|
||||
dstremaining = 8 - dstused;
|
||||
dstbyte |= http2_masks[dstremaining];
|
||||
if (dstptr < dstend)
|
||||
*dstptr = dstbyte;
|
||||
dstptr ++;
|
||||
}
|
||||
|
||||
return ((size_t)(dstptr - dst));
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 'http2_compare_decode()' - Compare two Huffman codes for decoding.
|
||||
*/
|
||||
|
||||
static int /* O - Result of comparison */
|
||||
http2_compare_decode(
|
||||
const _http2_huffman_t *a, /* I - First code */
|
||||
const _http2_huffman_t *b) /* I - Second code */
|
||||
{
|
||||
int result; /* Result of comparison */
|
||||
|
||||
|
||||
if ((result = a->len - b->len) == 0)
|
||||
result = a->code - b->code;
|
||||
|
||||
return (result);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: huffman.c 11990 2014-07-02 21:13:22Z msweet $".
|
||||
*/
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: ipp-private.h 11558 2014-02-06 18:33:34Z msweet $"
|
||||
* "$Id: ipp-private.h 11984 2014-07-02 13:16:59Z msweet $"
|
||||
*
|
||||
* Private IPP definitions for CUPS.
|
||||
*
|
||||
@@ -77,5 +77,5 @@ extern _ipp_option_t *_ippFindOption(const char *name);
|
||||
#endif /* !_CUPS_IPP_H_ */
|
||||
|
||||
/*
|
||||
* End of "$Id: ipp-private.h 11558 2014-02-06 18:33:34Z msweet $".
|
||||
* End of "$Id: ipp-private.h 11984 2014-07-02 13:16:59Z msweet $".
|
||||
*/
|
||||
|
||||
+26
-8
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: ipp-support.c 12194 2014-10-02 18:44:36Z msweet $"
|
||||
* "$Id: ipp-support.c 13138 2016-03-15 14:59:54Z msweet $"
|
||||
*
|
||||
* Internet Printing Protocol support functions for CUPS.
|
||||
*
|
||||
@@ -78,7 +78,8 @@ static const char * const ipp_status_oks[] = /* "OK" status codes */
|
||||
"client-error-account-info-needed",
|
||||
"client-error-account-closed",
|
||||
"client-error-account-limit-reached",
|
||||
"client-error-account-authorization-failed"
|
||||
"client-error-account-authorization-failed",
|
||||
"client-error-not-fetchable"
|
||||
},
|
||||
* const ipp_status_480s[] = /* Vendor client errors */
|
||||
{
|
||||
@@ -195,7 +196,7 @@ static const char * const ipp_std_ops[] =
|
||||
"Suspend-Current-Job",
|
||||
"Resume-Job",
|
||||
|
||||
/* 0x0030 - 0x003e */
|
||||
/* 0x0030 - 0x003f */
|
||||
"Promote-Job",
|
||||
"Schedule-Job-After",
|
||||
"0x0032",
|
||||
@@ -210,7 +211,21 @@ static const char * const ipp_std_ops[] =
|
||||
"Close-Job",
|
||||
"Identify-Printer",
|
||||
"Validate-Document",
|
||||
"Send-Hardcopy-Document"
|
||||
"Send-Hardcopy-Document",
|
||||
"Acknowledge-Document",
|
||||
|
||||
/* 0x0040 - 0x004a */
|
||||
"Acknowledge-Identify-Printer",
|
||||
"Acknowledge-Job",
|
||||
"Fetch-Document",
|
||||
"Fetch-Job",
|
||||
"Get-Output-Device-Attributes",
|
||||
"Update-Active-Jobs",
|
||||
"Deregister-Output-Device",
|
||||
"Update-Document-Status",
|
||||
"Update-Job-Status",
|
||||
"Update-Output-Device-Attributes",
|
||||
"Get-Next-Document-Data"
|
||||
},
|
||||
* const ipp_cups_ops[] =
|
||||
{
|
||||
@@ -232,7 +247,8 @@ static const char * const ipp_std_ops[] =
|
||||
},
|
||||
* const ipp_cups_ops2[] =
|
||||
{
|
||||
"CUPS-Get-Document"
|
||||
"CUPS-Get-Document",
|
||||
"CUPS-Create-Local-Printer"
|
||||
},
|
||||
* const ipp_tag_names[] =
|
||||
{ /* Value/group tag names */
|
||||
@@ -1549,6 +1565,7 @@ ippCreateRequestedArray(ipp_t *request) /* I - IPP request */
|
||||
"printer-input-tray", /* IPP JPS3 */
|
||||
"printer-is-accepting-jobs",
|
||||
"printer-is-shared", /* CUPS extension */
|
||||
"printer-is-temporary", /* CUPS extension */
|
||||
"printer-kind", /* IPP Paid Printing */
|
||||
"printer-location",
|
||||
"printer-make-and-model",
|
||||
@@ -1563,6 +1580,7 @@ ippCreateRequestedArray(ipp_t *request) /* I - IPP request */
|
||||
"printer-organization",
|
||||
"printer-organizational-unit",
|
||||
"printer-output-tray", /* IPP JPS3 */
|
||||
"printer-queue-id", /* CUPS extension */
|
||||
"printer-settable-attributes-supported",
|
||||
"printer-state",
|
||||
"printer-state-change-date-time",
|
||||
@@ -2033,8 +2051,8 @@ ippOpString(ipp_op_t op) /* I - Operation ID */
|
||||
return ("windows-ext");
|
||||
else if (op >= IPP_OP_CUPS_GET_DEFAULT && op <= IPP_OP_CUPS_GET_PPD)
|
||||
return (ipp_cups_ops[op - IPP_OP_CUPS_GET_DEFAULT]);
|
||||
else if (op == IPP_OP_CUPS_GET_DOCUMENT)
|
||||
return (ipp_cups_ops2[0]);
|
||||
else if (op >= IPP_OP_CUPS_GET_DOCUMENT && op <= IPP_OP_CUPS_CREATE_LOCAL_PRINTER)
|
||||
return (ipp_cups_ops2[op - IPP_OP_CUPS_GET_DOCUMENT]);
|
||||
|
||||
/*
|
||||
* No, build an "0xxxxx" operation string...
|
||||
@@ -2271,5 +2289,5 @@ ipp_col_string(ipp_t *col, /* I - Collection attribute */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: ipp-support.c 12194 2014-10-02 18:44:36Z msweet $".
|
||||
* End of "$Id: ipp-support.c 13138 2016-03-15 14:59:54Z msweet $".
|
||||
*/
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: ipp.c 12469 2015-02-01 04:51:08Z msweet $"
|
||||
* "$Id: ipp.c 13138 2016-03-15 14:59:54Z msweet $"
|
||||
*
|
||||
* Internet Printing Protocol functions for CUPS.
|
||||
*
|
||||
@@ -7062,5 +7062,5 @@ ipp_write_file(int *fd, /* I - File descriptor */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: ipp.c 12469 2015-02-01 04:51:08Z msweet $".
|
||||
* End of "$Id: ipp.c 13138 2016-03-15 14:59:54Z msweet $".
|
||||
*/
|
||||
|
||||
+46
-31
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: ipp.h 11806 2014-04-09 16:12:27Z msweet $"
|
||||
* "$Id: ipp.h 13138 2016-03-15 14:59:54Z msweet $"
|
||||
*
|
||||
* Internet Printing Protocol definitions for CUPS.
|
||||
*
|
||||
@@ -246,11 +246,11 @@ typedef enum ipp_op_e /**** IPP operations ****/
|
||||
IPP_OP_CUPS_INVALID = -1, /* Invalid operation name for @link ippOpValue@ */
|
||||
IPP_OP_CUPS_NONE = 0, /* No operation @private@ */
|
||||
IPP_OP_PRINT_JOB = 0x0002, /* Print a single file */
|
||||
IPP_OP_PRINT_URI, /* Print a single URL @private@ */
|
||||
IPP_OP_PRINT_URI, /* Print a single URL */
|
||||
IPP_OP_VALIDATE_JOB, /* Validate job options */
|
||||
IPP_OP_CREATE_JOB, /* Create an empty print job */
|
||||
IPP_OP_SEND_DOCUMENT, /* Add a file to a job */
|
||||
IPP_OP_SEND_URI, /* Add a URL to a job @private@ */
|
||||
IPP_OP_SEND_URI, /* Add a URL to a job */
|
||||
IPP_OP_CANCEL_JOB, /* Cancel a job */
|
||||
IPP_OP_GET_JOB_ATTRIBUTES, /* Get job attributes */
|
||||
IPP_OP_GET_JOBS, /* Get a list of jobs */
|
||||
@@ -261,7 +261,7 @@ typedef enum ipp_op_e /**** IPP operations ****/
|
||||
IPP_OP_PAUSE_PRINTER = 0x0010, /* Stop a printer */
|
||||
IPP_OP_RESUME_PRINTER, /* Start a printer */
|
||||
IPP_OP_PURGE_JOBS, /* Cancel all jobs */
|
||||
IPP_OP_SET_PRINTER_ATTRIBUTES, /* Set printer attributes @private@ */
|
||||
IPP_OP_SET_PRINTER_ATTRIBUTES, /* Set printer attributes */
|
||||
IPP_OP_SET_JOB_ATTRIBUTES, /* Set job attributes */
|
||||
IPP_OP_GET_PRINTER_SUPPORTED_VALUES, /* Get supported attribute values */
|
||||
IPP_OP_CREATE_PRINTER_SUBSCRIPTIONS, /* Create one or more printer subscriptions @since CUPS 1.2/OS X 10.5@ */
|
||||
@@ -279,32 +279,45 @@ typedef enum ipp_op_e /**** IPP operations ****/
|
||||
IPP_OP_ENABLE_PRINTER, /* Start a printer */
|
||||
IPP_OP_DISABLE_PRINTER, /* Stop a printer */
|
||||
IPP_OP_PAUSE_PRINTER_AFTER_CURRENT_JOB,
|
||||
/* Stop printer after the current job @private@ */
|
||||
IPP_OP_HOLD_NEW_JOBS, /* Hold new jobs @private@ */
|
||||
IPP_OP_RELEASE_HELD_NEW_JOBS, /* Release new jobs @private@ */
|
||||
IPP_OP_DEACTIVATE_PRINTER, /* Stop a printer @private@ */
|
||||
IPP_OP_ACTIVATE_PRINTER, /* Start a printer @private@ */
|
||||
IPP_OP_RESTART_PRINTER, /* Restart a printer @private@ */
|
||||
IPP_OP_SHUTDOWN_PRINTER, /* Turn a printer off @private@ */
|
||||
IPP_OP_STARTUP_PRINTER, /* Turn a printer on @private@ */
|
||||
IPP_OP_REPROCESS_JOB, /* Reprint a job @private@ */
|
||||
IPP_OP_CANCEL_CURRENT_JOB, /* Cancel the current job @private@ */
|
||||
IPP_OP_SUSPEND_CURRENT_JOB, /* Suspend the current job @private@ */
|
||||
IPP_OP_RESUME_JOB, /* Resume the current job @private@ */
|
||||
IPP_OP_PROMOTE_JOB, /* Promote a job to print sooner @private@ */
|
||||
IPP_OP_SCHEDULE_JOB_AFTER, /* Schedule a job to print after another @private@ */
|
||||
IPP_OP_CANCEL_DOCUMENT = 0x0033, /* Cancel-Document @private@ */
|
||||
IPP_OP_GET_DOCUMENT_ATTRIBUTES, /* Get-Document-Attributes @private@ */
|
||||
IPP_OP_GET_DOCUMENTS, /* Get-Documents @private@ */
|
||||
IPP_OP_DELETE_DOCUMENT, /* Delete-Document @private@ */
|
||||
IPP_OP_SET_DOCUMENT_ATTRIBUTES, /* Set-Document-Attributes @private@ */
|
||||
/* Stop printer after the current job */
|
||||
IPP_OP_HOLD_NEW_JOBS, /* Hold new jobs */
|
||||
IPP_OP_RELEASE_HELD_NEW_JOBS, /* Release new jobs */
|
||||
IPP_OP_DEACTIVATE_PRINTER, /* Stop a printer */
|
||||
IPP_OP_ACTIVATE_PRINTER, /* Start a printer */
|
||||
IPP_OP_RESTART_PRINTER, /* Restart a printer */
|
||||
IPP_OP_SHUTDOWN_PRINTER, /* Turn a printer off */
|
||||
IPP_OP_STARTUP_PRINTER, /* Turn a printer on */
|
||||
IPP_OP_REPROCESS_JOB, /* Reprint a job */
|
||||
IPP_OP_CANCEL_CURRENT_JOB, /* Cancel the current job */
|
||||
IPP_OP_SUSPEND_CURRENT_JOB, /* Suspend the current job */
|
||||
IPP_OP_RESUME_JOB, /* Resume the current job */
|
||||
IPP_OP_PROMOTE_JOB, /* Promote a job to print sooner */
|
||||
IPP_OP_SCHEDULE_JOB_AFTER, /* Schedule a job to print after another */
|
||||
IPP_OP_CANCEL_DOCUMENT = 0x0033, /* Cancel-Document */
|
||||
IPP_OP_GET_DOCUMENT_ATTRIBUTES, /* Get-Document-Attributes */
|
||||
IPP_OP_GET_DOCUMENTS, /* Get-Documents */
|
||||
IPP_OP_DELETE_DOCUMENT, /* Delete-Document */
|
||||
IPP_OP_SET_DOCUMENT_ATTRIBUTES, /* Set-Document-Attributes */
|
||||
IPP_OP_CANCEL_JOBS, /* Cancel-Jobs */
|
||||
IPP_OP_CANCEL_MY_JOBS, /* Cancel-My-Jobs */
|
||||
IPP_OP_RESUBMIT_JOB, /* Resubmit-Job */
|
||||
IPP_OP_CLOSE_JOB, /* Close-Job */
|
||||
IPP_OP_IDENTIFY_PRINTER, /* Identify-Printer @private@ */
|
||||
IPP_OP_VALIDATE_DOCUMENT, /* Validate-Document @private@ */
|
||||
IPP_OP_SEND_HARDCOPY_DOCUMENT, /* Send-Hardcopy-Document @private@ */
|
||||
IPP_OP_IDENTIFY_PRINTER, /* Identify-Printer */
|
||||
IPP_OP_VALIDATE_DOCUMENT, /* Validate-Document */
|
||||
IPP_OP_SEND_HARDCOPY_DOCUMENT, /* Send-Hardcopy-Document */
|
||||
IPP_OP_ACKNOWLEDGE_DOCUMENT, /* Acknowledge-Document */
|
||||
IPP_OP_ACKNOWLEDGE_IDENTIFY_PRINTER, /* Acknowledge-Identify-Printer */
|
||||
IPP_OP_ACKNOWLEDGE_JOB, /* Acknowledge-Job */
|
||||
IPP_OP_FETCH_DOCUMENT, /* Fetch-Document */
|
||||
IPP_OP_FETCH_JOB, /* Fetch-Job */
|
||||
IPP_OP_GET_OUTPUT_DEVICE_ATTRIBUTES, /* Get-Output-Device-Attributes */
|
||||
IPP_OP_UPDATE_ACTIVE_JOBS, /* Update-Active-Jobs */
|
||||
IPP_OP_DEREGISTER_OUTPUT_DEVICE, /* Deregister-Output-Device */
|
||||
IPP_OP_UPDATE_DOCUMENT_STATUS, /* Update-Document-Status */
|
||||
IPP_OP_UPDATE_JOB_STATUS, /* Update-Job-Status */
|
||||
IPP_OP_UPDATE_OUTPUT_DEVICE_ATTRIBUTES,
|
||||
/* Update-Output-Device-Attributes */
|
||||
IPP_OP_GET_NEXT_DOCUMENT_DATA, /* Get-Next-Document-Data */
|
||||
|
||||
IPP_OP_PRIVATE = 0x4000, /* Reserved @private@ */
|
||||
IPP_OP_CUPS_GET_DEFAULT, /* Get the default printer */
|
||||
@@ -317,12 +330,13 @@ typedef enum ipp_op_e /**** IPP operations ****/
|
||||
IPP_OP_CUPS_ACCEPT_JOBS, /* Accept new jobs on a printer */
|
||||
IPP_OP_CUPS_REJECT_JOBS, /* Reject new jobs on a printer */
|
||||
IPP_OP_CUPS_SET_DEFAULT, /* Set the default printer */
|
||||
IPP_OP_CUPS_GET_DEVICES, /* Get a list of supported devices */
|
||||
IPP_OP_CUPS_GET_PPDS, /* Get a list of supported drivers */
|
||||
IPP_OP_CUPS_GET_DEVICES, /* Get a list of supported devices @deprecated@ */
|
||||
IPP_OP_CUPS_GET_PPDS, /* Get a list of supported drivers @deprecated@ */
|
||||
IPP_OP_CUPS_MOVE_JOB, /* Move a job to a different printer */
|
||||
IPP_OP_CUPS_AUTHENTICATE_JOB, /* Authenticate a job @since CUPS 1.2/OS X 10.5@ */
|
||||
IPP_OP_CUPS_GET_PPD, /* Get a PPD file @since CUPS 1.3/OS X 10.5@ */
|
||||
IPP_OP_CUPS_GET_DOCUMENT = 0x4027 /* Get a document file @since CUPS 1.4/OS X 10.6@ */
|
||||
IPP_OP_CUPS_GET_PPD, /* Get a PPD file @deprecated@ */
|
||||
IPP_OP_CUPS_GET_DOCUMENT = 0x4027, /* Get a document file @since CUPS 1.4/OS X 10.6@ */
|
||||
IPP_OP_CUPS_CREATE_LOCAL_PRINTER /* Create a local (temporary) printer @since CUPS 2.2 */
|
||||
|
||||
# ifndef _CUPS_NO_DEPRECATED
|
||||
# define IPP_PRINT_JOB IPP_OP_PRINT_JOB
|
||||
@@ -523,6 +537,7 @@ typedef enum ipp_status_e /**** IPP status codes ****/
|
||||
/* client-error-account-limit-reached */
|
||||
IPP_STATUS_ERROR_ACCOUNT_AUTHORIZATION_FAILED,
|
||||
/* client-error-account-authorization-failed */
|
||||
IPP_STATUS_ERROR_NOT_FETCHABLE, /* client-error-not-fetchable */
|
||||
|
||||
/* Legacy status codes for paid printing */
|
||||
IPP_STATUS_ERROR_CUPS_ACCOUNT_INFO_NEEDED = 0x049C,
|
||||
@@ -1021,5 +1036,5 @@ extern const char *ippStateString(ipp_state_t state) _CUPS_API_2_0;
|
||||
#endif /* !_CUPS_IPP_H_ */
|
||||
|
||||
/*
|
||||
* End of "$Id: ipp.h 11806 2014-04-09 16:12:27Z msweet $".
|
||||
* End of "$Id: ipp.h 13138 2016-03-15 14:59:54Z msweet $".
|
||||
*/
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: langprintf.c 11558 2014-02-06 18:33:34Z msweet $"
|
||||
* "$Id: langprintf.c 11984 2014-07-02 13:16:59Z msweet $"
|
||||
*
|
||||
* Localized printf/puts functions for CUPS.
|
||||
*
|
||||
@@ -337,5 +337,5 @@ _cupsSetLocale(char *argv[]) /* IO - Command-line arguments */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: langprintf.c 11558 2014-02-06 18:33:34Z msweet $".
|
||||
* End of "$Id: langprintf.c 11984 2014-07-02 13:16:59Z msweet $".
|
||||
*/
|
||||
|
||||
+42
-6
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: language.c 12266 2014-11-19 16:05:28Z msweet $"
|
||||
* "$Id: language.c 13138 2016-03-15 14:59:54Z msweet $"
|
||||
*
|
||||
* I18N/language support for CUPS.
|
||||
*
|
||||
* Copyright 2007-2014 by Apple Inc.
|
||||
* Copyright 2007-2015 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -1180,7 +1180,7 @@ appleLangDefault(void)
|
||||
* See if we have an Info.plist file in the bundle...
|
||||
*/
|
||||
|
||||
CFStringGetCString(cfpath, path,sizeof(path), kCFStringEncodingUTF8);
|
||||
CFStringGetCString(cfpath, path, sizeof(path), kCFStringEncodingUTF8);
|
||||
DEBUG_printf(("3appleLangDefault: Got a resource URL (\"%s\")", path));
|
||||
strlcat(path, "Contents/Info.plist", sizeof(path));
|
||||
|
||||
@@ -1211,7 +1211,6 @@ appleLangDefault(void)
|
||||
|
||||
if (localizationList)
|
||||
{
|
||||
|
||||
#ifdef DEBUG
|
||||
if (CFGetTypeID(localizationList) == CFArrayGetTypeID())
|
||||
DEBUG_printf(("3appleLangDefault: Got localizationList, %d entries.",
|
||||
@@ -1287,6 +1286,8 @@ appleLangDefault(void)
|
||||
strlcpy(cg->language, "en_US.UTF-8", sizeof(cg->language));
|
||||
}
|
||||
}
|
||||
else
|
||||
DEBUG_printf(("3appleLangDefault: Using previous locale \"%s\".", cg->language));
|
||||
|
||||
/*
|
||||
* Return the cached locale...
|
||||
@@ -1305,7 +1306,8 @@ static cups_array_t * /* O - Message catalog */
|
||||
appleMessageLoad(const char *locale) /* I - Locale ID */
|
||||
{
|
||||
char filename[1024], /* Path to cups.strings file */
|
||||
applelang[256]; /* Apple language ID */
|
||||
applelang[256], /* Apple language ID */
|
||||
baselang[3]; /* Base language */
|
||||
CFURLRef url; /* URL to cups.strings file */
|
||||
CFReadStreamRef stream = NULL; /* File stream */
|
||||
CFPropertyListRef plist = NULL; /* Localization file */
|
||||
@@ -1323,6 +1325,18 @@ appleMessageLoad(const char *locale) /* I - Locale ID */
|
||||
snprintf(filename, sizeof(filename),
|
||||
CUPS_BUNDLEDIR "/Resources/%s.lproj/cups.strings",
|
||||
_cupsAppleLanguage(locale, applelang, sizeof(applelang)));
|
||||
|
||||
if (access(filename, 0))
|
||||
{
|
||||
/*
|
||||
* <rdar://problem/22086642>
|
||||
*
|
||||
* Try with original locale string...
|
||||
*/
|
||||
|
||||
snprintf(filename, sizeof(filename), CUPS_BUNDLEDIR "/Resources/%s.lproj/cups.strings", locale);
|
||||
}
|
||||
|
||||
DEBUG_printf(("1appleMessageLoad: filename=\"%s\"", filename));
|
||||
|
||||
if (access(filename, 0))
|
||||
@@ -1345,6 +1359,28 @@ appleMessageLoad(const char *locale) /* I - Locale ID */
|
||||
locale = "Japanese";
|
||||
else if (!strncmp(locale, "es", 2))
|
||||
locale = "Spanish";
|
||||
else if (!strcmp(locale, "zh_HK"))
|
||||
{
|
||||
/*
|
||||
* <rdar://problem/22130168>
|
||||
*
|
||||
* Try zh_TW first, then zh... Sigh...
|
||||
*/
|
||||
|
||||
if (!access(CUPS_BUNDLEDIR "/Resources/zh_TW.lproj/cups.strings", 0))
|
||||
locale = "zh_TW";
|
||||
else
|
||||
locale = "zh";
|
||||
}
|
||||
else if (strstr(locale, "_") != NULL || strstr(locale, "-") != NULL)
|
||||
{
|
||||
/*
|
||||
* Drop country code, just try language...
|
||||
*/
|
||||
|
||||
strlcpy(baselang, locale, sizeof(baselang));
|
||||
locale = baselang;
|
||||
}
|
||||
|
||||
snprintf(filename, sizeof(filename),
|
||||
CUPS_BUNDLEDIR "/Resources/%s.lproj/cups.strings", locale);
|
||||
@@ -1588,5 +1624,5 @@ cups_unquote(char *d, /* O - Unquoted string */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: language.c 12266 2014-11-19 16:05:28Z msweet $".
|
||||
* End of "$Id: language.c 13138 2016-03-15 14:59:54Z msweet $".
|
||||
*/
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: md5.c 12124 2014-08-28 15:37:22Z msweet $"
|
||||
* "$Id: md5.c 13138 2016-03-15 14:59:54Z msweet $"
|
||||
*
|
||||
* Private MD5 implementation for CUPS.
|
||||
*
|
||||
@@ -342,5 +342,5 @@ _cupsMD5Finish(_cups_md5_state_t *pms, unsigned char digest[16])
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: md5.c 12124 2014-08-28 15:37:22Z msweet $".
|
||||
* End of "$Id: md5.c 13138 2016-03-15 14:59:54Z msweet $".
|
||||
*/
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: options.c 11558 2014-02-06 18:33:34Z msweet $"
|
||||
* "$Id: options.c 11984 2014-07-02 13:16:59Z msweet $"
|
||||
*
|
||||
* Option routines for CUPS.
|
||||
*
|
||||
@@ -694,5 +694,5 @@ cups_find_option(
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: options.c 11558 2014-02-06 18:33:34Z msweet $".
|
||||
* End of "$Id: options.c 11984 2014-07-02 13:16:59Z msweet $".
|
||||
*/
|
||||
|
||||
@@ -1,22 +1,16 @@
|
||||
/*
|
||||
* "$Id: attr.c 10996 2013-05-29 11:51:34Z msweet $"
|
||||
* "$Id: ppd-attr.c 13138 2016-03-15 14:59:54Z msweet $"
|
||||
*
|
||||
* PPD model-specific attribute routines for CUPS.
|
||||
* PPD model-specific attribute routines for CUPS.
|
||||
*
|
||||
* Copyright 2007-2012 by Apple Inc.
|
||||
* Copyright 1997-2006 by Easy Software Products.
|
||||
* Copyright 2007-2015 by Apple Inc.
|
||||
* Copyright 1997-2006 by Easy Software Products.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
* which should have been included with this file. If this file is
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
*
|
||||
* Contents:
|
||||
*
|
||||
* ppdFindAttr() - Find the first matching attribute.
|
||||
* ppdFindNextAttr() - Find the next matching attribute.
|
||||
* _ppdNormalizeMakeAndModel() - Normalize a product/make-and-model string.
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
* which should have been included with this file. If this file is
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -229,14 +223,6 @@ _ppdNormalizeMakeAndModel(
|
||||
|
||||
snprintf(buffer, bufsize, "Canon %s", make_and_model);
|
||||
}
|
||||
else if (!_cups_strncasecmp(make_and_model, "primera", 7))
|
||||
{
|
||||
/*
|
||||
* Fargo...
|
||||
*/
|
||||
|
||||
snprintf(buffer, bufsize, "Fargo %s", make_and_model);
|
||||
}
|
||||
else if (!_cups_strncasecmp(make_and_model, "designjet", 9) ||
|
||||
!_cups_strncasecmp(make_and_model, "deskjet", 7))
|
||||
{
|
||||
@@ -331,5 +317,5 @@ _ppdNormalizeMakeAndModel(
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: attr.c 10996 2013-05-29 11:51:34Z msweet $".
|
||||
* End of "$Id: ppd-attr.c 13138 2016-03-15 14:59:54Z msweet $".
|
||||
*/
|
||||
+1106
-2
Diferenças do arquivo suprimidas por serem muito extensas
Carregar Diff
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: conflicts.c 11558 2014-02-06 18:33:34Z msweet $"
|
||||
* "$Id: ppd-conflicts.c 13138 2016-03-15 14:59:54Z msweet $"
|
||||
*
|
||||
* Option marking routines for CUPS.
|
||||
* Option conflict management routines for CUPS.
|
||||
*
|
||||
* Copyright 2007-2014 by Apple Inc.
|
||||
* Copyright 2007-2015 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -1196,5 +1196,5 @@ ppd_test_constraints(
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: conflicts.c 11558 2014-02-06 18:33:34Z msweet $".
|
||||
* End of "$Id: ppd-conflicts.c 13138 2016-03-15 14:59:54Z msweet $".
|
||||
*/
|
||||
@@ -1,34 +1,27 @@
|
||||
/*
|
||||
* "$Id: custom.c 10996 2013-05-29 11:51:34Z msweet $"
|
||||
* "$Id: ppd-custom.c 13138 2016-03-15 14:59:54Z msweet $"
|
||||
*
|
||||
* PPD custom option routines for CUPS.
|
||||
* PPD custom option routines for CUPS.
|
||||
*
|
||||
* Copyright 2007-2012 by Apple Inc.
|
||||
* Copyright 1997-2006 by Easy Software Products, all rights reserved.
|
||||
* Copyright 2007-2015 by Apple Inc.
|
||||
* Copyright 1997-2006 by Easy Software Products, all rights reserved.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
* which should have been included with this file. If this file is
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
* which should have been included with this file. If this file is
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
*
|
||||
* PostScript is a trademark of Adobe Systems, Inc.
|
||||
* PostScript is a trademark of Adobe Systems, Inc.
|
||||
*
|
||||
* This code and any derivative of it may be used and distributed
|
||||
* freely under the terms of the GNU General Public License when
|
||||
* used with GNU Ghostscript or its derivatives. Use of the code
|
||||
* (or any derivative of it) with software other than GNU
|
||||
* GhostScript (or its derivatives) is governed by the CUPS license
|
||||
* agreement.
|
||||
* This code and any derivative of it may be used and distributed
|
||||
* freely under the terms of the GNU General Public License when
|
||||
* used with GNU Ghostscript or its derivatives. Use of the code
|
||||
* (or any derivative of it) with software other than GNU
|
||||
* GhostScript (or its derivatives) is governed by the CUPS license
|
||||
* agreement.
|
||||
*
|
||||
* This file is subject to the Apple OS-Developed Software exception.
|
||||
*
|
||||
* Contents:
|
||||
*
|
||||
* ppdFindCustomOption() - Find a custom option.
|
||||
* ppdFindCustomParam() - Find a parameter for a custom option.
|
||||
* ppdFirstCustomParam() - Return the first parameter for a custom option.
|
||||
* ppdNextCustomParam() - Return the next parameter for a custom option.
|
||||
* This file is subject to the Apple OS-Developed Software exception.
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -36,6 +29,7 @@
|
||||
*/
|
||||
|
||||
#include "cups-private.h"
|
||||
#include "ppd-private.h"
|
||||
|
||||
|
||||
/*
|
||||
@@ -118,5 +112,5 @@ ppdNextCustomParam(ppd_coption_t *opt) /* I - Custom option */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: custom.c 10996 2013-05-29 11:51:34Z msweet $".
|
||||
* End of "$Id: ppd-custom.c 13138 2016-03-15 14:59:54Z msweet $".
|
||||
*/
|
||||
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: emit.c 11594 2014-02-14 20:09:01Z msweet $"
|
||||
* "$Id: ppd-emit.c 13138 2016-03-15 14:59:54Z msweet $"
|
||||
*
|
||||
* PPD code emission routines for CUPS.
|
||||
*
|
||||
* Copyright 2007-2014 by Apple Inc.
|
||||
* Copyright 2007-2015 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -22,6 +22,7 @@
|
||||
*/
|
||||
|
||||
#include "cups-private.h"
|
||||
#include "ppd.h"
|
||||
#if defined(WIN32) || defined(__EMX__)
|
||||
# include <io.h>
|
||||
#else
|
||||
@@ -1202,5 +1203,5 @@ ppd_handle_media(ppd_file_t *ppd) /* I - PPD file */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: emit.c 11594 2014-02-14 20:09:01Z msweet $".
|
||||
* End of "$Id: ppd-emit.c 13138 2016-03-15 14:59:54Z msweet $".
|
||||
*/
|
||||
Alguns arquivos não foram exibidos porque demasiados arquivos foram alterados neste diff Mostrar Mais
Referência em uma Nova Issue
Bloquear um usuário